:root {
    --brand-blue: #2563eb;
    --brand-blue-dark: #1d4ed8;
    --brand-gold: #D4AF37;
    --surface-100: #FFFFFF;
    --surface-200: #F8FAFC;
    --text-900: #0F172A;
    --text-600: #475569;
    --text-400: #94A3B8;
    --border-color: rgba(226, 232, 240, 0.6);
    --radius-premium: 1rem; /* Smaller for mobile */
}
@media (min-width: 768px) {
    :root {
        --radius-premium: 1.25rem;
    }
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ----- Premium Card ----- */
.premium-card {
    background: #fff;
    border: 1px solid rgba(226, 232, 240, 0.6);
    border-radius: 1.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02), 0 10px 20px -5px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.premium-card:hover {
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.1);
    transform: translateY(-0.4rem);
    border-color: rgba(37, 99, 235, 0.15);
}

.glass-card {
    background: rgba(255, 255, 255, 0.7);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    backdrop-filter: blur(24px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 1.75rem;
    box-shadow: 0 8px 32px -4px rgba(15, 23, 42, 0.04);
}

.stepper-line {
    height: 1px;
    background: linear-gradient(to right, #2563eb 50%, #e2e8f0 50%);
    background-size: 200% 100%;
    transition: background-position 0.6s ease;
}


/* ----- Sidebar Active State ----- */
.sidebar-link.active {
    background: #EFF6FF;
    color: var(--brand-blue);
    position: relative;
}
.sidebar-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    background: var(--brand-blue);
    border-radius: 0 4px 4px 0;
    box-shadow: 2px 0 10px rgba(37, 99, 235, 0.4);
}

/* ----- Premium Input ----- */
.premium-input {
    width: 100%;
    padding: 1rem 1.25rem;
    border-radius: 1rem;
    background: #f8fafc;
    border: 1px solid transparent;
    transition: all 0.3s;
    outline: none;
    /* 16px prevents iOS Safari from auto-zooming on focus. */
    font-size: 1rem;
    font-weight: 500;
}
.premium-input::placeholder { color: #94a3b8; }
.premium-input:focus {
    background: #fff;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.05);
}

/* ----- Premium Buttons ----- */
.premium-btn,
.premium-btn-primary,
.premium-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all 0.3s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.premium-btn:active,
.premium-btn-primary:active,
.premium-btn-secondary:active { transform: scale(0.98); }

.premium-btn-primary {
    background: #2563eb;
    color: #fff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}
.premium-btn-primary:hover {
    background: #1d4ed8;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.3);
}

.premium-btn-secondary {
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #0f172a;
}
.premium-btn-secondary:hover {
    border-color: #2563eb;
    color: #2563eb;
}

/* ----- Sticky Editorial Nav ----- */
.modern-nav-container {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.85);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(226, 232, 240, 0.55);
    transition: background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}
.modern-nav-container.scrolled {
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(226, 232, 240, 0.95);
    box-shadow: 0 4px 24px -10px rgba(15, 23, 42, 0.08);
}

.modern-nav {
    margin-left: auto;
    margin-right: auto;
    max-width: 80rem;
    height: 4rem; /* Reduced for mobile */
    background: transparent;
    border: 0;
    box-shadow: none;
    border-radius: 0;
    display: flex;
    align-items: center;
    padding: 0 1rem; /* Reduced for mobile */
    gap: 1rem; /* Reduced for mobile */
    transition: height 0.35s ease;
}
@media (min-width: 1024px) {
    .modern-nav {
        height: 4.75rem;
        padding: 0 1.75rem;
        gap: 2rem;
    }
}
.modern-nav-container.scrolled .modern-nav { height: 3.5rem; }
@media (min-width: 1024px) {
    .modern-nav-container.scrolled .modern-nav { height: 4rem; }
}

.nav-link-modern {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 4rem; /* Reduced for mobile */
    font-size: 10px; /* Smaller for mobile */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: #475569;
    transition: color 0.25s ease, height 0.35s ease;
    white-space: nowrap;
}
@media (min-width: 1024px) {
    .nav-link-modern {
        height: 4.75rem;
        font-size: 11px;
    }
}
.nav-link-modern:hover { color: #0f172a; }
.modern-nav-container.scrolled .nav-link-modern { height: 3.5rem; }
@media (min-width: 1024px) {
    .modern-nav-container.scrolled .nav-link-modern { height: 4rem; }
}

.nav-link-modern::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    width: 28px;
    height: 2px;
    background: #2563eb;
    border-radius: 2px;
    opacity: 0;
    transform: translateX(-50%) scaleX(0.4);
    transform-origin: center;
    transition: transform 0.35s ease, opacity 0.25s ease;
}
.nav-link-modern:hover::after,
.nav-link-modern.active::after {
    opacity: 1;
    transform: translateX(-50%) scaleX(1);
}
.nav-link-modern.active { color: #0f172a; }

.nav-action-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: 1px solid #e2e8f0;
    border-radius: 9999px;
    padding: 0.75rem 1.25rem;
    min-height: 44px;
    transition: all 0.2s ease;
    cursor: pointer;
    color: #475569;
}
.nav-action-pill:hover {
    background: #f8fafc;
    border-color: #0f172a;
    color: #0f172a;
}

.cart-pill {
    width: 2.75rem;
    height: 2.75rem;
    background: #0f172a;
    color: #fff;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: background 0.25s ease, transform 0.2s ease;
}
.cart-pill:hover {
    background: #2563eb;
    transform: translateY(-1px);
}
.cart-pill:active { transform: scale(0.95); }

.glass-nav { display: none; } /* Deprecated */

/* ----- Touch-friendly quantity buttons (44x44 minimum) ----- */
.qty-btn {
    width: 2.75rem;
    height: 2.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    background: #fff;
    border: 1px solid #f1f5f9;
    color: #94a3b8;
    font-size: 1.125rem;
    font-weight: 700;
    transition: all 0.2s ease;
}
.qty-btn:hover {
    color: #2563eb;
    border-color: #bfdbfe;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.qty-btn:active { transform: scale(0.92); }

/* ----- Mobile Drawer (off-canvas nav) ----- */
.mobile-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 200;
}
.mobile-drawer-backdrop.open {
    opacity: 1;
    visibility: visible;
}
.mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(85vw, 380px);
    background: #fff;
    box-shadow: -16px 0 60px -20px rgba(15, 23, 42, 0.25);
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 201;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}
.mobile-drawer.open { transform: translateX(0); }
.mobile-drawer-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-radius: 1rem;
    color: #0f172a;
    font-size: 0.95rem;
    font-weight: 700;
    min-height: 44px;
    transition: background 0.2s ease;
}
.mobile-drawer-link:active { background: #f1f5f9; }
@media (hover: hover) {
    .mobile-drawer-link:hover { background: #f8fafc; }
}

/* ----- Mobile search overlay (full-screen) ----- */
.mobile-search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.98);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    z-index: 210;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}
.mobile-search-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* Hide horizontal scrollbar on category-pill row etc. */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes shake { 
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

.animate-fade-in {
    animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-shake { 
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both; 
}

/* Custom Scrollbar for a cleaner look */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 20px;
    border: 2px solid #FFFFFF;
}

::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}
