/* ==========================================================================
   CONSOLIDATED NAVIGATION STYLES - DESKTOP & MOBILE
   ========================================================================== */

/* ==========================================================================
   GLOBAL LOGO ASPECT RATIO PROTECTION
   ========================================================================== */

/* Force correct aspect ratio for all navbar logos */
.navbar-brand img {
    aspect-ratio: auto !important;
    object-fit: contain !important;
    width: auto !important;
    min-width: auto !important;
    max-width: none !important;
}

/* Note: Logo aspect ratios now handled by logo-aspect-ratio.css */

/* Note: Logo aspect ratios now handled by logo-aspect-ratio.css */

/* ==========================================================================
   BASE NAVIGATION STYLES
   ========================================================================== */

/* ==========================================================================
   DESKTOP/MOBILE VISIBILITY CONTROLS
   ========================================================================== */

/* Hide elements on desktop only (>= 1231px) */
@media (min-width: 1231px) {
    .desktop-hidden {
        display: none !important;
    }
}

/* Hide elements on mobile only (< 1231px) */
@media (max-width: 1230px) {
    .mobile-hidden {
        display: none !important;
    }
}

nav#navbar {
    background: var(--primary-color);
    padding: 0;
    position: static;
    width: 100%;
    z-index: 9999;
    box-shadow: 0 2px 15px rgba(124, 10, 2, 0.3);
    transition: all 0.3s ease;
    height: 80px;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Navigation Container */
.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    height: 100%;
    position: relative;
}

/* ==========================================================================
   DESKTOP NAVIGATION (1231px+)
   ========================================================================== */

@media (min-width: 1231px) {
    /* ==========================================================================
       CLEAN THREE-CONTAINER LAYOUT
       ========================================================================== */
    
    /* Main navbar container */
    nav#navbar .nav-container {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        height: 80px !important;
        padding: 0 30px !important;
        background: var(--primary-color) !important;
    }
    
    /* ==========================================================================
       1. LOGO SECTION (Left)
       ========================================================================== */
    
    .navbar-logo {
        order: 1 !important;
        flex-shrink: 0 !important;
    }
    
.navbar-brand {
        text-decoration: none !important;
        color: white !important;
    display: flex !important;
    align-items: center !important;
    }
    
    .navbar-brand img {
        height: 45px !important;  /* Reduced from 60px for better proportions */
        width: auto !important;
        max-width: none !important;
        min-width: auto !important;
        object-fit: contain !important;
        display: block !important;
        max-height: 45px !important;
        aspect-ratio: auto !important;
    }
    
    /* Override any width attributes that might be added dynamically */
    .navbar-brand img[width],
    .navbar-brand img[style*="width"] {
        width: auto !important;
        aspect-ratio: auto !important;
    }
    
    /* Force desktop logo size with ultra-high specificity */
    @media (min-width: 1231px) {
        body nav#navbar .nav-container .navbar-logo .navbar-brand img,
        html body nav#navbar .nav-container .navbar-logo .navbar-brand img,
        .navbar-brand img {
            height: 45px !important;  /* Reduced from 60px for better proportions */
            width: auto !important;  /* Allow natural width based on aspect ratio */
            max-height: 45px !important;
            min-height: 45px !important;
            max-width: none !important;  /* Remove width constraint */
            min-width: auto !important;  /* Remove width constraint */
            object-fit: contain !important;  /* Preserve aspect ratio */
        }
    }
    
    /* Disable logo hover effects */
.navbar-brand:hover,
    .navbar-brand:focus,
    .navbar-brand:active {
    transform: none !important;
    text-decoration: none !important;
        color: white !important;
    }
    
    /* ==========================================================================
       2. MAIN NAVIGATION + SEARCH SECTION (Center)
       ========================================================================== */
    
    .navbar-links {
        order: 2 !important;
    display: flex !important;
    align-items: center !important;
        gap: 30px !important;
        flex-grow: 1 !important;
    justify-content: center !important;
        padding: 0 20px !important;
    }
    
    /* Luxury main navigation links styling */
    .navbar-links .nav-link {
        color: rgba(255, 255, 255, 0.9) !important;
        text-decoration: none !important;
        font-weight: 500 !important;
        font-size: 1.05rem !important;
        padding: 12px 16px !important;
    display: flex !important;
    align-items: center !important;
        white-space: nowrap !important;
        font-family: 'Playfair Display', serif !important;
        letter-spacing: 0.5px !important;
        transition: color 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
        position: relative !important;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
    }
    
    /* Premium gold hover effect */
    .navbar-links .nav-link:hover {
        color: #d4af37 !important;
    text-decoration: none !important;
        text-shadow: 0 0 8px rgba(212, 175, 55, 0.4) !important;
    }
    
    .navbar-links .nav-link i {
        margin-right: 5px !important;
        font-size: 0.9rem !important;
    }
    
    /* Luxury search bar styling */
    .search-bar.desktop-only {
        margin-left: 15px !important;
    }
    
    /* Glassmorphism search container */
    .search-bar .search-container {
        position: relative !important;
        background: rgba(255, 255, 255, 0.08) !important;
        border: 1px solid rgba(212, 175, 55, 0.3) !important;
        border-radius: 8px !important;
        backdrop-filter: blur(15px) !important;
        -webkit-backdrop-filter: blur(15px) !important;
        box-shadow: 
            0 4px 20px rgba(0, 0, 0, 0.15),
            inset 0 1px 0 rgba(255, 255, 255, 0.1),
            0 1px 3px rgba(212, 175, 55, 0.1) !important;
        transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    }
    
    .search-bar .search-container:hover {
        background: rgba(255, 255, 255, 0.12) !important;
        border-color: rgba(212, 175, 55, 0.5) !important;
        box-shadow: 
            0 6px 25px rgba(0, 0, 0, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.15),
            0 2px 8px rgba(212, 175, 55, 0.2) !important;
        transform: translateY(-1px) !important;
    }
    
    /* Premium glassmorphism search input */
    .search-bar input[type="search"],
    .search-bar .form-control,
    html body .search-bar input[type="search"],
    html body .search-bar .form-control {
        background: transparent !important;
        border: none !important;
        color: rgba(255, 255, 255, 0.95) !important;
        padding: 14px 18px !important;
        border-radius: 6px !important;
        width: 300px !important;
        transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
        font-size: 0.95rem !important;
        font-family: 'Playfair Display', serif !important;
        font-weight: 400 !important;
        height: 46px !important;
        min-width: 280px !important;
        max-width: 320px !important;
        letter-spacing: 0.3px !important;
        text-align: left !important;
        line-height: 1.4 !important;
        box-sizing: border-box !important;
        appearance: none !important;
        -webkit-appearance: none !important;
    outline: none !important;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
    }
    
    /* Search input focus state */
    .search-bar input[type="search"]:focus,
    .search-bar .form-control:focus,
    html body .search-bar input[type="search"]:focus,
    html body .search-bar .form-control:focus {
        background: rgba(255, 255, 255, 0.05) !important;
    outline: none !important;
        width: 300px !important;
        color: #d4af37 !important;
        text-shadow: 0 0 6px rgba(212, 175, 55, 0.3) !important;
    }
    
    /* Search input placeholder */
    .search-bar input[type="search"]::placeholder,
    .search-bar .form-control::placeholder,
    html body .search-bar input[type="search"]::placeholder,
    html body .search-bar .form-control::placeholder {
        color: rgba(255, 255, 255, 0.6) !important;
        font-style: italic !important;
        font-weight: 300 !important;
        letter-spacing: 0.3px !important;
    }
    
    /* ==========================================================================
       3. ICON LINKS SECTION (Right)
       ========================================================================== */
    
    .navbar-icons {
        order: 3 !important;
    display: flex !important;
    align-items: center !important;
        gap: 18px !important;
        flex-shrink: 0 !important;
        padding: 0 10px !important;
    }
    
    /* Luxury icon links styling */
    .navbar-icons .icon-link,
    .navbar-icons .mobile-search-button {
        color: rgba(255, 255, 255, 0.9) !important;
        font-size: 1.25rem !important;
        padding: 12px !important;
        border-radius: 8px !important;
        transition: color 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
        position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
        width: 48px !important;
        height: 48px !important;
        text-decoration: none !important;
        border: none !important;
        background: transparent !important;
        cursor: pointer !important;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
    }
    
    /* Premium gold hover effect for icons */
    .navbar-icons .icon-link:hover,
    .navbar-icons .mobile-search-button:hover {
        color: #d4af37 !important;
        text-decoration: none !important;
        text-shadow: 0 0 8px rgba(212, 175, 55, 0.5) !important;
    }
    
    /* Cart and Wishlist badges - handled by unified styles below */
    
    /* Hide mobile search button on desktop */
    .navbar-icons .mobile-search-button {
        display: none !important;
    }
    
    /* Show desktop-only navigation links */
    .navbar-links .nav-link.desktop-only {
        display: flex !important;
    }
    
    /* ==========================================================================
       HIDE LEGACY MOBILE SIDEBAR FOR DESKTOP
       ========================================================================== */
    
    .nav-links.legacy-mobile-sidebar {
    display: none !important;
    }
}

/* ==========================================================================
   MOBILE NAVIGATION (Max 1230px)
   ========================================================================== */

@media (max-width: 1230px) {
    /* ==========================================================================
       MOBILE THREE-CONTAINER LAYOUT
       ========================================================================== */
    
    /* Mobile Navigation Container */
    nav#navbar {
        height: 75px !important;
        min-height: 75px !important;
        position: relative !important;
    }
    
    .nav-container {
        height: 75px !important;
        min-height: 75px !important;
        position: relative !important;
        padding: 0 15px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
    }
    
    /* ==========================================================================
       1. LOGO SECTION (Center on mobile) - Now part of flex layout
       ========================================================================== */
    
    .navbar-logo {
        order: 2 !important;
        flex: 1 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        z-index: 10 !important;
    }
    
    .navbar-brand {
        text-decoration: none !important;
        color: white !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: auto !important;
        min-width: 120px !important; /* Ensure minimum width */
        max-width: none !important; /* Remove constraint to allow proper aspect ratio */
    }
    
    .navbar-brand img {
        height: 45px !important;
        max-height: 45px !important;
        width: auto !important;
    }
    
    /* ==========================================================================
       2. HIDE DESKTOP NAVIGATION ON MOBILE
       ========================================================================== */
    
    .navbar-links {
        display: none !important;
    }
    
    /* Hide desktop-only navigation links on mobile */
    .navbar-links .nav-link.desktop-only {
    display: none !important;
}

    /* ==========================================================================
       3. MOBILE ICON SECTION (Right side) - Now part of flex layout
       ========================================================================== */
    
    .navbar-icons {
        order: 3 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        gap: 8px !important;
        flex: 1 !important;
    }
    
    /* Mobile luxury search button */
    .navbar-icons .mobile-search-button {
        display: flex !important;
        background: transparent !important;
        border: none !important;
        color: rgba(255, 255, 255, 0.9) !important;
        font-size: 1.15rem !important;
        padding: 10px !important;
        width: 42px !important;
        height: 42px !important;
        border-radius: 8px !important;
        transition: color 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
        cursor: pointer !important;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .navbar-icons .mobile-search-button:hover {
        color: #d4af37 !important;
        text-shadow: 0 0 6px rgba(212, 175, 55, 0.5) !important;
    }
    
    /* Move search icon closer to account icon and push account further right */
    @media (max-width: 1230px) {
        /* Reduce overall gap between all icons */
        nav#navbar .nav-container .navbar-icons {
            gap: 0px !important;
        }
        
        /* Move search button closer to account with higher specificity */
        nav#navbar .nav-container .navbar-icons .mobile-search-button,
        nav#navbar .navbar-icons .mobile-search-button,
        .nav-container .navbar-icons .mobile-search-button {
            margin-right: -15px !important;
            margin-left: 12px !important;
            transform: translateX(8px) !important;
        }
        
        /* Push account icon further to the right with higher specificity */
        nav#navbar .nav-container .navbar-icons .icon-link:last-child,
        nav#navbar .navbar-icons .icon-link:last-child,
        .nav-container .navbar-icons .icon-link:last-child {
            margin-left: -8px !important;
            margin-right: 8px !important;
            transform: translateX(20px) !important;
        }
    }
    
    /* Mobile luxury icon styling */
    .navbar-icons .icon-link {
        color: rgba(255, 255, 255, 0.9) !important;
        font-size: 1.15rem !important;
        padding: 10px !important;
    display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 42px !important;
        height: 42px !important;
        border-radius: 8px !important;
        transition: color 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
        text-decoration: none !important;
        position: relative !important;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
    }

    /* Hide cart and wishlist icons on mobile navbar (they're in bottom nav) */
    .navbar-icons .icon-link[href*="cart"],
    .navbar-icons .icon-link[href*="wishlist"] {
        display: none !important;
    }
    
    .navbar-icons .icon-link:hover {
        color: #d4af37 !important;
        text-shadow: 0 0 6px rgba(212, 175, 55, 0.5) !important;
    }
    
    /* Mobile badges - handled by unified styles below */
    
    /* ==========================================================================
       0. HAMBURGER SECTION (Left side) - Part of flex layout  
       ========================================================================== */
    
    .nav-links.legacy-mobile-sidebar {
        order: 1 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 8px !important;
        flex: 1 !important;
        visibility: visible !important; /* Make visible for hamburger positioning */
        pointer-events: auto !important;
    }

    /* Ensure navbar can contain positioned elements */
    nav#navbar {
        position: relative !important;
        overflow: visible !important;
    }
    
    .nav-container {
        position: relative !important;
    }

    /* tighten icon cluster spacing */
    .navbar-icons {
        gap: 4px !important;
    }
}

/* ==========================================================================
   HAMBURGER BUTTON - CLEAN IMPLEMENTATION
   ========================================================================== */

/* ==========================================================================
   HAMBURGER BUTTON - SIMPLE & CLEAN (Outside nav container)
   ========================================================================== */

/* Hide on desktop */
@media (min-width: 1231px) {
    #open-sidebar-button {
        display: none !important;
    }
}

/* Mobile hamburger button - Positioning handled by JavaScript */
@media (max-width: 1230px) {
    #open-sidebar-button {
        /* Position: absolute so it scrolls with navbar, not sticky/fixed */
        position: absolute !important;
        top: 37.5px !important;
        left: 15px !important;
        transform: translateY(-50%) !important;
        /* Essential styles */
        width: 60px !important;
        height: 60px !important;
        background: transparent !important;
        border: none !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
        /* Default visible state - can be overridden by hiding classes */
        visibility: visible !important;
        opacity: 1 !important;
        /* Ensure button properties work properly */
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
        will-change: auto !important;
        contain: layout style !important;
        /* Force independence from any parent containers */
        float: none !important;
        clear: none !important;
        overflow: visible !important;
        /* Prevent any transform interference */
        backface-visibility: hidden !important;
        perspective: none !important;
        transform-style: flat !important;
        /* Add smooth transitions for showing/hiding */
        transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease !important;
        /* Z-index to ensure it appears above other elements */
        z-index: 9999999 !important;
    }
    
    /* Enhanced hiding for search overlay and newsletter popups with maximum specificity */
    .mobile-search-overlay.active ~ #open-sidebar-button,
    body .mobile-search-overlay.active ~ #open-sidebar-button,
    html body .mobile-search-overlay.active ~ #open-sidebar-button,
    #open-sidebar-button.search-overlay-hidden,
    body #open-sidebar-button.search-overlay-hidden,
    html body #open-sidebar-button.search-overlay-hidden,
    html body div nav #open-sidebar-button.search-overlay-hidden,
    .newsletter-popup.show ~ #open-sidebar-button,
    body .newsletter-popup.show ~ #open-sidebar-button,
    html body .newsletter-popup.show ~ #open-sidebar-button,
    .checkout-newsletter-popup.show ~ #open-sidebar-button,
    body .checkout-newsletter-popup.show ~ #open-sidebar-button,
    html body .checkout-newsletter-popup.show ~ #open-sidebar-button,
    #open-sidebar-button.newsletter-hidden,
    body #open-sidebar-button.newsletter-hidden,
    html body #open-sidebar-button.newsletter-hidden,
    html body div nav div #open-sidebar-button.search-overlay-hidden {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        z-index: -999999 !important;
        pointer-events: none !important;
        transform: translateY(-50%) scale(0) !important;
    }
    
    /* Hide bottom navigation during newsletter popups - Global approach */
    body:has(.newsletter-popup.show) .mobile-bottom-nav,
    body:has(.checkout-newsletter-popup.show) .mobile-bottom-nav {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        z-index: -1 !important;
        pointer-events: none !important;
        transform: translateY(100%) !important;
    }
    
    /* Fallback for browsers that don't support :has() */
    .newsletter-popup.show ~ .mobile-bottom-nav,
    body .newsletter-popup.show ~ .mobile-bottom-nav,
    html body .newsletter-popup.show ~ .mobile-bottom-nav,
    .checkout-newsletter-popup.show ~ .mobile-bottom-nav,
    body .checkout-newsletter-popup.show ~ .mobile-bottom-nav,
    html body .checkout-newsletter-popup.show ~ .mobile-bottom-nav,
    .mobile-bottom-nav.newsletter-hidden,
    body .mobile-bottom-nav.newsletter-hidden,
    html body .mobile-bottom-nav.newsletter-hidden {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        z-index: -1 !important;
        pointer-events: none !important;
        transform: translateY(100%) !important;
    }
    
    /* Hide during scroll with maximum specificity */
    #open-sidebar-button.scroll-hidden,
    body #open-sidebar-button.scroll-hidden,
    html body #open-sidebar-button.scroll-hidden,
    html body div nav #open-sidebar-button.scroll-hidden,
    html body div nav div #open-sidebar-button.scroll-hidden {
        opacity: 0 !important;
        visibility: hidden !important;
        transform: translateY(-50%) scale(0.8) !important;
        pointer-events: none !important;
        transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease !important;
    }
    
    /* Lottie container */
    #open-sidebar-button .lottie-hamburger {
        width: 60px !important;
        height: 60px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        pointer-events: none !important;
    }
    
    /* Lottie SVG */
    #open-sidebar-button .lottie-hamburger svg {
        width: 100% !important;
        height: 100% !important;
        fill: white !important;
        transform: scale(1.8) !important;
    }
    
    /* Lottie paths */
    #open-sidebar-button .lottie-hamburger svg,
    #open-sidebar-button .lottie-hamburger svg * {
        fill: white !important;
        stroke: white !important;
    }
}

/* ==========================================================================
   SIDEBAR OVERLAY
   ========================================================================== */

#sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

/* DISABLED: Old sidebar overlay system */
/* body.sidebar-active #sidebar-overlay - using new mobile-sidebar-overlay instead */

/* ==========================================================================
   SEARCH RESULTS DROPDOWN
   ========================================================================== */

/* Luxury Search Results Dropdown */
.search-results-dropdown {
        position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 248, 248, 0.95));
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15), 
                0 5px 20px rgba(212, 175, 55, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.8);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
        display: none;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    margin-top: 8px;
}

.search-results-dropdown.show {
    display: block;
  }
  
.search-result-item {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 12px;
    margin: 4px 8px;
}

.search-result-item:hover {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.08), rgba(255, 255, 255, 0.5));
    border-color: rgba(212, 175, 55, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.1);
}

.search-result-item:last-child {
    border-bottom: none;
    margin-bottom: 8px;
}

.search-result-name {
    font-weight: 600;
    color: #2C2C2C;
    margin-bottom: 6px;
    font-family: 'Playfair Display', serif;
    font-size: 1.05rem;
    letter-spacing: 0.3px;
}

.search-result-price {
    color: #7C0A02;
    font-weight: 600;
    font-family: 'Playfair Display', serif;
    font-size: 0.95rem;
    text-shadow: 0 1px 2px rgba(124, 10, 2, 0.1);
}

/* ==========================================================================
   SIDEBAR STATES
   ========================================================================== */

/* DISABLED: Hide hamburger when sidebar is open */
/* Now handled by overlay system in hamburger-animation.js */

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */

@media (max-width: 768px) {
    /* Tablet adjustments */
    .nav-links {
        gap: 6px !important;
        margin-right: 10px !important;
    }
    
    .nav-links li a {
        width: 38px !important;
        height: 38px !important;
        font-size: 1rem !important;
    }
}

@media (max-width: 480px) {
    /* Phone adjustments */
    .nav-container {
        padding: 0 10px !important;
    }
    
    .nav-links {
        gap: 4px !important;
        margin-right: 8px !important;
    }
    
    .nav-links li a {
        width: 36px !important;
        height: 36px !important;
        font-size: 0.9rem !important;
    }
    
    /* Ensure logo visibility on very small screens */
    .navbar-brand {
        min-width: 120px !important;
        max-width: none !important; /* Remove width constraint to allow proper aspect ratio */
    }
    
    .navbar-brand img {
        height: 35px !important;
        max-height: 35px !important;
        width: auto !important;
        max-width: none !important;
        min-width: auto !important;
        aspect-ratio: auto !important;
    }
    
    /* Force proper aspect ratio on mobile - override any square constraints */
    .navbar-brand img[width],
    .navbar-brand img[style*="width"] {
        width: auto !important;
        aspect-ratio: auto !important;
    }
    
    /* Ensure container doesn't constrain logo */
    .navbar-brand {
        min-width: 120px !important;
        max-width: 250px !important; /* Increased to accommodate wider logo */
    }
    
    /* Hamburger button positioning handled entirely by JavaScript */
}

/* ==========================================================================
   MOBILE SCROLL LOCK SYSTEM
   ========================================================================== */

/* Global scroll lock for mobile overlay and desktop mouse blocking */
body.scroll-locked {
    overflow: hidden !important;
    touch-action: none !important;
    overscroll-behavior: none !important;
    pointer-events: none !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
}

/* Ensure only the overlay, hamburger button, and newsletter forms can receive pointer events when locked */
body.scroll-locked #open-sidebar-button,
body.scroll-locked .newsletter-popup,
body.scroll-locked .newsletter-popup *,
body.scroll-locked .checkout-newsletter-popup,
body.scroll-locked .checkout-newsletter-popup *,
body.scroll-locked .newsletter-popup input,
body.scroll-locked .newsletter-popup input *,
body.scroll-locked .checkout-newsletter-popup input,
body.scroll-locked .checkout-newsletter-popup input *,
body.scroll-locked .newsletter-popup button,
body.scroll-locked .checkout-newsletter-popup button {
    pointer-events: auto !important;
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    user-select: text !important;
}

/* Prevent background content from being draggable or selectable when overlay is open */
body.scroll-locked * {
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    -khtml-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
    -webkit-user-drag: none !important;
    -khtml-user-drag: none !important;
    -moz-user-drag: none !important;
    -o-user-drag: none !important;
}

/* Allow text selection within the newsletter forms */
body.scroll-locked .newsletter-popup *,
body.scroll-locked .checkout-newsletter-popup * {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    user-select: text !important;
}

/* ==========================================================================
   GENERAL FIXES
   ========================================================================== */

/* Ensure navbar has proper stacking order */
    nav#navbar {
        z-index: 9999 !important;
    position: static !important;
}

/* Prevent any unwanted animations */
.navbar-brand,
.navbar-brand img {
    will-change: auto !important;
    backface-visibility: visible !important;
    transform-style: flat !important;
    perspective: none !important;
}

/* Clean transitions for interactive elements */
.nav-links a,
.nav-search input {
    transition: all 0.3s ease !important;
}

/* Accessibility improvements */
.nav-links a:focus,
.nav-search input:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5) !important;
    outline-offset: 2px !important;
}

/* Text selection prevention for UI elements */
.navbar-brand,
.nav-links li a,
#open-sidebar-button {
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
}

/* ==========================================================================
   UNIFIED LUXURY BADGE STYLES (Cart & Wishlist Counters)
   ========================================================================== */

.cart-count,
.wishlist-count {
    /* Reset everything */
    all: initial !important;
    /* Apply luxury home page styling */
    position: absolute !important;
    background: linear-gradient(135deg, #7C0A02 0%, #5a0701 100%) !important;
    color: #d4af37 !important;
    border: 1px solid rgba(212, 175, 55, 0.4) !important;
    border-radius: 0 !important; /* Sharp corners like home page elements */
    font-family: 'Playfair Display', serif !important;
    font-weight: 700 !important; /* Bolder for luxury feel */
    font-size: 0.75rem !important;
    line-height: 1 !important;
    padding: 4px 7px !important; /* Slightly larger for better visibility */
    min-width: 20px !important;
    min-height: 18px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important; /* Ensure text is centered */
    vertical-align: middle !important; /* Additional vertical centering */
    box-sizing: border-box !important; /* Ensure padding is included in dimensions */
    box-shadow: 0 4px 15px rgba(124, 10, 2, 0.3), inset 0 1px 0 rgba(212, 175, 55, 0.2) !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7) !important;
    backdrop-filter: blur(15px) !important;
    z-index: 20 !important;
    pointer-events: none !important;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    letter-spacing: 0.5px !important; /* Luxury letter spacing */
}

/* Removed hover effects on cart and wishlist counts per user request */

/* Mobile bottom nav hover effects are in mobile-navigation.css for better specificity */

/* Consistent positioning for navbar icons */
.navbar-icons .cart-count,
.navbar-icons .wishlist-count {
    top: -8px !important; /* Higher position for better visibility */
    right: -8px !important; /* Further right for cleaner look */
}

/* Mobile bottom nav badges have their own specific positioning in mobile-navigation.css */

/* Desktop fine-tuning */
@media (min-width: 1231px) {
    .navbar-icons .cart-count,
    .navbar-icons .wishlist-count {
        top: -6px !important;
        right: -6px !important;
        font-size: 0.7rem !important; /* Slightly smaller on desktop */
        padding: 3px 6px !important;
    min-width: 18px !important;
        min-height: 16px !important;
    }
}

/* Mobile optimization */
@media (max-width: 1230px) {
    /* Mobile top navbar - only for search/account icons */
    .navbar-icons .cart-count,
    .navbar-icons .wishlist-count {
        top: -8px !important;
        right: -8px !important;
        font-size: 0.75rem !important;
        padding: 4px 7px !important;
        min-width: 20px !important;
        min-height: 18px !important;
    }
    
    /* Mobile bottom nav badges - styling moved to mobile-navigation.css for better specificity */
}

/* Hidden state */
.cart-count.hidden,
.wishlist-count.hidden,
.cart-count.cart-count-hidden,
.wishlist-count.cart-count-hidden {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: scale(0) !important;
}

/* ==== GLOBAL RESET FOR NAVBAR WHITE GAP ==== */
html, body {
    margin: 0 !important;
    padding: 0 !important;
}

/* ==== REMOVE WHITE GAP ABOVE NAVBAR ==== */

