/* ============================================
   PRECISION TECH - PREMIUM E-COMMERCE DESIGN
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Precision Palette - Black & Gold Theme */
    --tech-bg: #0a0a0a;
    --tech-surface: #141414;
    --tech-surface-hover: #1f1f1f;
    --tech-border: rgba(212, 175, 55, 0.2);
    --tech-border-strong: rgba(212, 175, 55, 0.4);
    
    /* Brand Colors - Gold with Blue/Green hints */
    --tech-primary: #D4AF37; /* Gold */
    --tech-primary-hover: #F3E5AB;
    --tech-primary-muted: rgba(212, 175, 55, 0.15);
    
    /* Neutrals */
    --tech-text-main: #f5f5f7;
    --tech-text-muted: #a1a1a6;
    --tech-text-dim: #6e6e73;

    /* Shadows & Effects */
    --tech-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
    --tech-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --tech-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    
    /* Animations */
    --tech-transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);

    /* Bootstrap Overrides */
    --bs-body-bg: var(--tech-bg);
    --bs-body-color: var(--tech-text-main);
    --bs-border-color: var(--tech-border);
    --bs-primary: var(--tech-primary);
}

[data-theme="light"] {
    --tech-bg: #f8f9fa;
    --tech-surface: #ffffff;
    --tech-surface-hover: #f1f3f5;
    --tech-border: rgba(212, 175, 55, 0.4);
    --tech-border-strong: rgba(212, 175, 55, 0.8);
    
    --tech-text-main: #1d1d1f;
    --tech-text-muted: #6e6e73;
    --tech-text-dim: #86868b;

    --tech-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --tech-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --tech-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    --bs-body-bg: var(--tech-bg);
    --bs-body-color: var(--tech-text-main);
}

/* Base Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background-color: var(--tech-bg);
    color: var(--tech-text-main);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.page-fade-in {
    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--tech-text-main);
    margin-bottom: 1rem;
}

.text-gradient {
    background: linear-gradient(135deg, var(--tech-primary) 0%, #00d2ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

p {
    color: var(--tech-text-muted);
    line-height: 1.5;
}

a {
    color: var(--tech-primary);
    text-decoration: none;
    transition: var(--tech-transition);
}

a:hover {
    color: var(--tech-primary-hover);
}

/* Components: Surfaces (Cards, Panels) */
.tech-surface {
    background: var(--tech-surface);
    border: 1px solid var(--tech-border);
    border-radius: 12px;
    box-shadow: var(--tech-shadow-sm);
    transition: var(--tech-transition);
}

.tech-surface:hover {
    box-shadow: var(--tech-shadow-lg);
    border-color: var(--tech-border-strong);
    transform: translateY(-4px);
}

/* Navbar & Glassmorphism */
.tech-navbar {
    background: var(--tech-surface);
    border-bottom: 1px solid var(--tech-border);
    padding: 0.75rem 0;
}

.glass-nav {
    background: rgba(10, 10, 10, 0.75) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.glass-panel {
    background: rgba(23, 23, 23, 0.6) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--tech-border);
}

[data-theme="light"] .glass-nav, [data-theme="light"] .glass-panel {
    background: rgba(255, 255, 255, 0.75) !important;
}

.brand-text {
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.5px;
    color: var(--tech-text-main) !important;
}

/* Inputs & Forms */
.tech-input {
    background: var(--tech-bg);
    border: 1px solid var(--tech-border);
    color: var(--tech-text-main);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: var(--tech-transition);
}

.tech-input:focus {
    outline: none;
    border-color: var(--tech-primary);
    box-shadow: 0 0 0 3px var(--tech-primary-muted);
    background: var(--tech-surface);
}

.tech-input-group {
    display: flex;
    align-items: center;
    background: var(--tech-bg);
    border: 1px solid var(--tech-border);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--tech-transition);
}

.tech-input-group:focus-within {
    border-color: var(--tech-primary);
    box-shadow: 0 0 0 3px var(--tech-primary-muted);
}

.tech-input-group input {
    border: none;
    background: transparent;
    color: var(--tech-text-main);
    padding: 0.75rem 1rem;
    width: 100%;
}

.tech-input-group input:focus {
    outline: none;
}

.tech-input-group .icon {
    padding-left: 1rem;
    color: var(--tech-text-muted);
}

/* Buttons */
.btn-tech-primary {
    background: var(--tech-primary);
    color: #ffffff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    transition: var(--tech-transition);
}

.btn-tech-primary:hover {
    background: var(--tech-primary-hover);
    color: #ffffff;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 15px var(--tech-primary-muted);
}

.btn-tech-secondary {
    background: var(--tech-surface);
    color: var(--tech-text-main);
    border: 1px solid var(--tech-border);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    transition: var(--tech-transition);
}

.btn-tech-secondary:hover {
    background: var(--tech-surface-hover);
    border-color: var(--tech-border-strong);
    color: var(--tech-text-main);
}

.btn-tech-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--tech-surface);
    border: 1px solid var(--tech-border);
    color: var(--tech-text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--tech-transition);
}

.btn-tech-icon:hover {
    background: var(--tech-surface-hover);
    border-color: var(--tech-border-strong);
    color: var(--tech-primary);
}

/* Hero Section */
.tech-hero {
    padding: 6rem 0;
    background: var(--tech-bg);
}

.tech-badge {
    background: var(--tech-primary-muted);
    color: var(--tech-primary);
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hero-img-container {
    padding: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-img-container img {
    border-radius: 16px;
    box-shadow: var(--tech-shadow-lg);
    transition: var(--tech-transition);
}

/* Product Cards */
.tech-product-card {
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.tech-product-img-wrapper {
    background: #ffffff; /* Always white to showcase hardware cleanly */
    padding: 2rem;
    position: relative;
    border-bottom: 1px solid var(--tech-border);
}

.tech-product-img-wrapper img {
    width: 100%;
    height: 220px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.tech-product-card:hover .tech-product-img-wrapper img {
    transform: scale(1.03);
}

.tech-price {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--tech-text-main);
}

/* Filtering Chips */
.tech-chip {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: var(--tech-surface);
    border: 1px solid var(--tech-border);
    color: var(--tech-text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--tech-transition);
    display: inline-block;
    text-decoration: none;
}

.tech-chip:hover {
    background: var(--tech-surface-hover);
    color: var(--tech-text-main);
}

.tech-chip.active,
input:checked + .tech-chip {
    background: var(--tech-primary);
    color: #ffffff;
    border-color: var(--tech-primary);
}

/* Tables */
.tech-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.tech-table th {
    background: var(--tech-surface);
    color: var(--tech-text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1rem;
    border-bottom: 2px solid var(--tech-border);
}

.tech-table td {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid var(--tech-border);
    color: var(--tech-text-main);
    background: var(--tech-bg);
}

.tech-table tr:hover td {
    background: var(--tech-surface-hover);
}

/* Authentication / Onboarding */
.auth-wrapper {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.auth-card {
    max-width: 450px;
    width: 100%;
    padding: 3rem;
}

/* Toasts */
.tech-toast {
    background: var(--tech-surface);
    border: 1px solid var(--tech-border);
    color: var(--tech-text-main);
    border-radius: 8px;
    box-shadow: var(--tech-shadow-lg);
}

/* Mobile Bottom Nav */
.mobile-bottom-nav {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: rgba(20, 20, 20, 0.75) !important;
    border: 1px solid var(--tech-border) !important;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    z-index: 1000;
    padding: 0.75rem 0;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.nav-item-mobile {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--tech-text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--tech-transition);
}

.nav-item-mobile i {
    font-size: 1.35rem;
    margin-bottom: 4px;
}

.nav-item-mobile.active, .nav-item-mobile:hover {
    color: var(--tech-primary);
}

@media (max-width: 991px) {
    body {
        padding-bottom: 100px !important;
    }
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--tech-bg); }
::-webkit-scrollbar-thumb { background: var(--tech-border-strong); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--tech-text-muted); }

/* Dropdown */
.tech-dropdown {
    background: var(--tech-surface) !important;
    border: 1px solid var(--tech-border) !important;
    border-radius: 8px !important;
    box-shadow: var(--tech-shadow-lg) !important;
    padding: 0.5rem !important;
}

.tech-dropdown .dropdown-item {
    color: var(--tech-text-main) !important;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    transition: var(--tech-transition);
}

.tech-dropdown .dropdown-item:hover,
.tech-dropdown .dropdown-item.active {
    background: var(--tech-surface-hover) !important;
    color: var(--tech-primary) !important;
}

/* Utility Helpers */
.text-dim { color: var(--tech-text-dim) !important; }
.bg-tech-surface { background-color: var(--tech-surface) !important; }

/* Skeleton Loader */
.skeleton {
    background: linear-gradient(90deg, var(--tech-border) 25%, var(--tech-border-strong) 50%, var(--tech-border) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}
@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Mobile Cart Icon & Badge Dot */
.cart-icon-mobile {
    position: relative;
    display: inline-block;
}
.cart-icon-mobile .badge-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: var(--tech-primary);
    border-radius: 50%;
    box-shadow: 0 0 5px var(--tech-primary);
}

/* Category Card Styling */
.category-card {
    background: rgba(20, 20, 22, 0.65) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(212, 175, 55, 0.15) !important;
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-8px);
    border-color: var(--tech-primary) !important;
    background: rgba(212, 175, 55, 0.08) !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), 0 0 15px rgba(212, 175, 55, 0.15);
}

.category-card i {
    transition: transform 0.3s ease;
}

.category-card:hover i {
    transform: scale(1.15);
    color: var(--tech-primary-hover) !important;
}

/* Customer Authentication Cards & Forms (Black & Gold Upgrades) */
.auth-card {
    max-width: 450px;
    width: 100%;
    padding: 3.5rem !important;
    border-radius: 24px !important;
    background: rgba(20, 20, 22, 0.65) !important;
    backdrop-filter: blur(25px) !important;
    -webkit-backdrop-filter: blur(25px) !important;
    border: 1px solid rgba(212, 175, 55, 0.15) !important;
    box-shadow: 0 40px 100px rgba(0,0,0,0.85), 0 0 40px rgba(212, 175, 55, 0.03) !important;
    color: var(--tech-text-main) !important;
}

.auth-card .form-label {
    font-weight: 600;
    font-size: 0.825rem;
    color: rgba(255, 255, 255, 0.75) !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
    padding-left: 0.75rem;
}

/* Premium Inputs */
.tech-input {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 2px solid rgba(255, 255, 255, 0.08) !important;
    color: var(--tech-text-main) !important;
    border-radius: 50px !important;
    padding: 0.85rem 1.5rem !important;
    transition: all 0.3s !important;
}

.tech-input:focus {
    outline: none !important;
    border-color: #D4AF37 !important;
    box-shadow: 0 0 0 5px rgba(212, 175, 55, 0.2) !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

/* Premium Action Buttons */
.btn-tech-primary {
    background: linear-gradient(135deg, #D4AF37, #AA7C11) !important;
    color: #000000 !important;
    border: none !important;
    padding: 0.85rem 1.5rem !important;
    border-radius: 50px !important;
    font-weight: 700 !important;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.2) !important;
}

.btn-tech-primary:hover {
    transform: scale(1.02) translateY(-3px) !important;
    box-shadow: 0 20px 40px rgba(212, 175, 55, 0.35) !important;
    background: linear-gradient(135deg, #F3E5AB, #D4AF37) !important;
    color: #000000 !important;
}

.btn-tech-secondary {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 2px solid rgba(255, 255, 255, 0.08) !important;
    color: var(--tech-text-main) !important;
    padding: 0.85rem 1.5rem !important;
    border-radius: 50px !important;
    font-weight: 700 !important;
    transition: all 0.3s !important;
}

.btn-tech-secondary:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(212, 175, 55, 0.3) !important;
    color: var(--tech-text-main) !important;
}

.text-tech-main {
    color: var(--tech-text-main) !important;
}

[data-theme="light"] .tech-navbar .nav-link {
    color: var(--tech-text-main) !important;
}

[data-theme="light"] .btn-tech-secondary {
    background: rgba(0, 0, 0, 0.04) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
}

[data-theme="light"] .btn-tech-secondary:hover {
    background: rgba(0, 0, 0, 0.08) !important;
    border-color: var(--tech-primary) !important;
}

/* Fix footer payment icons in light mode */
[data-theme="light"] .payment-badges {
    filter: invert(0.8) grayscale(100%);
}

/* Fix dropdown options visibility */
select.tech-input option, select.form-control option {
    background-color: var(--tech-surface);
    color: var(--tech-text-main);
}

/* Hide number input spinners for cleaner UI */
.hide-spinners::-webkit-outer-spin-button,
.hide-spinners::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.hide-spinners {
    -moz-appearance: textfield;
}

/* Fix navbar toggler visibility in light mode */
[data-theme="light"] .navbar-toggler-icon {
    filter: invert(1);
}
