/* Mobile Header & Bottom Nav - Force Hide Old Headers */

/* CRITICAL: Hide ALL old header elements on mobile */
@media (max-width: 991px) {

    /* Hide all header variations */
    .new-desktop-header,
    .header-top-area,
    .desktop-navigation-bar,
    .main-header-area,
    .header-t,
    div.header-t,
    header .header-t,
    header>.header-t,
    body>header:not(#mobile-view-header)>*:not(#mobile-view-header) {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        max-height: 0 !important;
        overflow: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Ensure body has padding for bottom nav */
    body {
        padding-bottom: 70px !important;
        padding-top: 0 !important;
    }

    /* Hide old sticky footer */
    .sticky-footer-mobile {
        display: none !important;
    }
}

/* New Mobile Header Styles */
#mobile-view-header {
    display: none;
}

@media (max-width: 991px) {
    #mobile-view-header {
        display: block !important;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 10000 !important;
        background-color: #ffffff;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    }

    .mobile-header-top {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 15px;
        height: 60px;
    }

    .mobile-menu-trigger {
        color: #10503D;
        font-size: 22px;
        cursor: pointer;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: flex-start;
    }

    .mobile-logo {
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-logo img {
        height: 55px;
        /* Increased from 42px for better visibility */
        width: auto;
        max-width: 200px;
        /* Increased from 180px */
        object-fit: contain;
    }

    .mobile-cart-icon {
        position: relative;
        color: #10503D;
        font-size: 22px;
        cursor: pointer;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: flex-end;
    }

    .mobile-cart-count {
        position: absolute;
        top: 2px;
        right: 0;
        background-color: #A68A6A;
        color: #ffffff;
        font-size: 10px;
        font-weight: 700;
        width: 16px;
        height: 16px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 1px solid #10503D;
    }

    .mobile-search-container {
        padding: 0 15px 15px 15px;
        background-color: #ffffff;
        position: relative;
    }

    .mobile-search-input-group {
        position: relative;
        display: flex;
        align-items: center;
        background: #f8f9fa;
        border-radius: 8px;
        overflow: hidden;
        padding: 0 10px;
        height: 44px;
        border: 2px solid transparent;
        transition: all 0.3s ease;
    }

    .mobile-search-input-group:focus-within {
        border-color: #A68A6A;
        box-shadow: 0 0 0 3px rgba(166, 138, 106, 0.2);
    }

    .mobile-search-input {
        border: none;
        outline: none;
        flex: 1;
        height: 100%;
        font-size: 15px;
        color: #333;
        background: transparent;
        padding-left: 5px;
    }

    .mobile-search-input::placeholder {
        color: #999;
    }

    .mobile-search-btn {
        background: transparent;
        border: none;
        color: #A68A6A;
        /* Updated from #10503D to match brand gold */
        font-size: 18px;
        cursor: pointer;
        padding: 0 5px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-header-spacer {
        height: 60px;
        /* Reduced from 110px to eliminate the gap when search is closed */
        display: block;
        width: 100%;
    }
}

/* New Mobile Bottom Navigation */
#mobile-bottom-nav {
    display: none;
}

@media (max-width: 991px) {
    #mobile-bottom-nav {
        display: flex !important;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 60px;
        background-color: #10503D;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        z-index: 9999;
        justify-content: space-around;
        align-items: center;
        padding: 0;
        margin: 0;
    }

    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        color: rgba(255, 255, 255, 0.7);
        text-decoration: none;
        font-size: 9px;
        font-weight: 500;
        text-transform: uppercase;
        flex: 1;
        height: 100%;
        transition: all 0.2s ease;
        position: relative;
        padding: 5px 0;
        gap: 3px;
    }

    .mobile-nav-item i {
        font-size: 20px;
        color: rgba(255, 255, 255, 0.7);
        transition: all 0.2s ease;
    }

    .mobile-nav-item.active,
    .mobile-nav-item:hover {
        color: #ffffff;
    }

    .mobile-nav-item.active i,
    .mobile-nav-item:hover i {
        color: #ffffff;
    }

    /* Center Floating Cart Button */
    .mobile-nav-item.nav-cart-btn {
        flex: 0 0 80px;
        margin-top: -30px;
        padding: 0;
    }

    .mobile-nav-cart-circle {
        top: 31px;
        background: none !important;
        width: 56px;
        height: 56px;
        border: none !important;
        /* border-radius: 45%; */
        display: flex;
        align-items: center;
        justify-content: center;
        color: #5c1717;
        box-shadow: none;
        position: relative;
        /* border: 4px solid #ffffff; REMOVED per requested override logic though kept in prompted snippet, user said 'update this css', implying apply their block. The block has 'border: none !important' then 'border: 4px solid' later. CSS rule order matters, but 'important' wins. I will paste their exact block to be safe. */
        border: 4px solid #ffffff;
        transition: all 0.3s ease;
    }

    .mobile-nav-item.nav-cart-btn:active .mobile-nav-cart-circle {
        transform: scale(0.92);
        box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.2), 0 1px 4px rgba(0, 0, 0, 0.1);
    }

    .mobile-nav-cart-circle i {
        color: #ffffff !important;
        margin: 0;
        font-size: 26px;
        filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
    }

    .mobile-nav-cart-count {
        position: absolute;
        top: -4px;
        right: -4px;
        background: linear-gradient(135deg, #ff4444 0%, #cc0000 100%);
        color: #ffffff;
        font-size: 11px;
        font-weight: 700;
        min-width: 20px;
        height: 20px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 5px;
        border: 2px solid #ffffff;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    }

    .mobile-nav-item.nav-cart-btn span.label {
        margin-top: 32px;
        color: rgba(255, 255, 255, 0.7);
        font-weight: 600;
        font-size: 9px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .mobile-nav-item.nav-cart-btn.active span.label,
    .mobile-nav-item.nav-cart-btn:hover span.label {
        color: #ffffff;
    }

    /* Hide Floating Summary Widgets on Mobile */
    .compare-summary-widget,
    .cart-summary-widget,
    #compare-summary-widget,
    #cart-summary-widget,
    #hcp-floating-compare-btn,
    .hcp-floating-btn {
        display: none !important;
    }

    /* Style for the new mobile compare icon */
    .mobile-compare-icon {
        position: relative;
        color: #10503D;
        font-size: 20px;
        cursor: pointer;
        width: 35px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-decoration: none;
    }

    .mobile-compare-count {
        position: absolute;
        top: 2px;
        right: -2px;
        background-color: #A68A6A;
        color: #ffffff;
        font-size: 10px;
        font-weight: 700;
        width: 16px;
        height: 16px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 1px solid #10503D;
    }
}