/* ==========================================================================
   EVELLE BOUTIQUE — OPTIMIZED GLOBAL NAVBAR SYSTEM
   High-performance sticky luxury header, active indicator & mobile drawer
   ========================================================================== */

/* Body Offset for Non-Home Pages (Fixed Navbar safety) */
body:not(.page-home) {
    padding-top: 76px;
}

@media (max-width: 868px) {
    body:not(.page-home) {
        padding-top: 66px;
    }
}

/* Main Header Bar - Fixed Transparent Overlay at Top */
.luxury-header,
.navbar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 10000 !important;
    height: 76px;
    background: transparent;
    border-bottom: 1px solid transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transition: background-color 300ms cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 300ms cubic-bezier(0.22, 1, 0.36, 1),
        border-color 300ms cubic-bezier(0.22, 1, 0.36, 1),
        backdrop-filter 300ms cubic-bezier(0.22, 1, 0.36, 1);
    will-change: background-color, box-shadow, border-color;
    box-sizing: border-box !important;
}

/* Scrolled State - Solid White with Light Bottom Border & Subtle Shadow */
.luxury-header.scrolled,
.luxury-header.is-scrolled,
.navbar.scrolled,
.navbar.is-scrolled {
    background: #ffffff !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.header-container {
    max-width: 1400px;
    height: 100%;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
    box-sizing: border-box;
}

.header-content {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    height: 100%;
    width: 100%;
    gap: 1.5rem;
    flex-wrap: nowrap !important;
}

/* Brand Logo */
.logo-brand {
    font-family: var(--font-primary, 'Outfit', sans-serif);
    font-size: 1.85rem;
    font-weight: 800;
    color: #111111;
    text-decoration: none;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    transition: opacity 200ms ease, transform 200ms ease;
    flex-shrink: 0;
}

.logo-brand:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

/* Desktop Navigation Links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 2.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link {
    font-family: var(--font-primary, 'Outfit', sans-serif);
    font-size: 0.95rem;
    font-weight: 500;
    color: #444444;
    text-decoration: none;
    position: relative;
    padding: 0.4rem 0;
    letter-spacing: 0.3px;
    transition: color 220ms cubic-bezier(0.22, 1, 0.36, 1);
    display: inline-flex;
    align-items: center;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-pink, #db2777);
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1), opacity 220ms ease;
    opacity: 0;
    will-change: transform, opacity;
}

.nav-link:hover {
    color: #111111;
}

.nav-link:hover::after {
    transform: scaleX(0.5);
    opacity: 0.6;
}

/* Active Navigation State */
.nav-link.active {
    color: #111111;
    font-weight: 600;
}

.nav-link.active::after {
    transform: scaleX(1);
    opacity: 1;
}

/* Action Controls (Right) */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

/* Header Buttons & Icons */
.nav-actions .icon-btn {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid transparent;
    color: #222222;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 200ms ease, color 200ms ease, transform 200ms ease;
    -webkit-tap-highlight-color: transparent;
}

.nav-actions .icon-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #000000;
    transform: translateY(-1px);
}

.nav-actions .icon-btn.active {
    color: var(--primary-pink, #db2777);
    background: rgba(219, 39, 119, 0.06);
}

/* Badge Counter */
.nav-actions .badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--primary-pink, #db2777);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(219, 39, 119, 0.3);
}

/* Auth Action Buttons */
.nav-actions .btn-primary,
.nav-actions .btn-secondary {
    padding: 0.55rem 1.25rem;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: 100px;
    cursor: pointer;
    transition: all 200ms cubic-bezier(0.22, 1, 0.36, 1);
    letter-spacing: 0.3px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}

.nav-actions .btn-secondary {
    background: transparent;
    color: #111111;
    border: 1px solid rgba(0, 0, 0, 0.15);
}

.nav-actions .btn-secondary:hover {
    border-color: #111111;
    background: rgba(0, 0, 0, 0.03);
}

.nav-actions .btn-primary {
    background: #111111;
    color: #ffffff;
    border: 1px solid #111111;
}

.nav-actions .btn-primary:hover {
    background: var(--primary-pink, #db2777);
    border-color: var(--primary-pink, #db2777);
    box-shadow: 0 4px 14px rgba(219, 39, 119, 0.25);
    transform: translateY(-1px);
}

.nav-actions .hidden {
    display: none !important;
}

/* Mobile Hamburger Button */
.mobile-menu-btn {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: #111111;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 200ms ease, transform 200ms ease;
    -webkit-tap-highlight-color: transparent;
}

.mobile-menu-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.mobile-menu-btn:active {
    transform: scale(0.95);
}

/* Mobile Drawer Overlay */
.mobile-menu-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.5) !important;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99990 !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity 280ms cubic-bezier(0.22, 1, 0.36, 1), visibility 280ms cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, visibility;
}

.mobile-menu-overlay.active {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Mobile Drawer Sidebar — Hardware Accelerated 60fps */
.mobile-menu {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    left: auto !important;
    width: 320px !important;
    max-width: 85vw !important;
    height: 100dvh !important;
    background: #ffffff !important;
    z-index: 99999 !important;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15) !important;
    display: flex !important;
    flex-direction: column !important;
    transform: translate3d(100%, 0, 0) !important;
    transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1) !important;
    will-change: transform;
    padding-top: env(safe-area-inset-top, 0);
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.mobile-menu.active {
    transform: translate3d(0, 0, 0) !important;
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.mobile-menu-header .logo-brand {
    font-size: 1.5rem;
}

.mobile-menu-close {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: #f4f4f5;
    color: #111111;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 200ms ease, transform 200ms ease;
    -webkit-tap-highlight-color: transparent;
}

.mobile-menu-close:hover {
    background: #e4e4e7;
    transform: rotate(90deg);
}

.mobile-menu-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mobile-menu-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-link {
    font-family: var(--font-primary, 'Outfit', sans-serif);
    font-size: 1.05rem;
    font-weight: 500;
    color: #333333;
    text-decoration: none;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    transition: background-color 200ms ease, color 200ms ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    -webkit-tap-highlight-color: transparent;
}

.mobile-link:hover {
    background: #f8fafc;
    color: #111111;
}

.mobile-link.active {
    background: rgba(219, 39, 119, 0.08);
    color: var(--primary-pink, #db2777);
    font-weight: 600;
}

.mobile-link.active::after {
    content: '•';
    font-size: 1.4rem;
    color: var(--primary-pink, #db2777);
}

.mobile-menu-divider {
    height: 1px;
    background: #eeeeee;
    margin: 0.5rem 0;
}

.mobile-menu-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mobile-menu-actions .btn-primary,
.mobile-menu-actions .btn-secondary {
    width: 100%;
    padding: 0.85rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.mobile-menu-actions .btn-secondary.danger {
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.2);
}

.mobile-menu-actions .btn-secondary.danger:hover {
    background: rgba(239, 68, 68, 0.08);
}

/* Media Queries for Desktop, Tablet, and Mobile */
@media (max-width: 1024px) {
    .nav-links {
        gap: 1.5rem;
    }

    .nav-link {
        font-size: 0.9rem;
    }
}

@media (max-width: 868px) {
    .luxury-header {
        height: 66px;
    }

    .nav-links {
        display: none !important;
    }

    .mobile-menu-btn {
        display: inline-flex !important;
    }

    .nav-actions .btn-primary,
    .nav-actions .btn-secondary {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0 0.85rem;
    }

    .logo-brand {
        font-size: 1.45rem;
    }

    .nav-actions {
        gap: 0.25rem;
    }

    .nav-actions .icon-btn {
        width: 38px;
        height: 38px;
    }

    .mobile-menu-btn {
        width: 38px;
        height: 38px;
    }
}

@media (max-width: 360px) {
    .header-container {
        padding: 0 0.5rem;
    }

    .logo-brand {
        font-size: 1.3rem;
    }
}