.site-header {
    background: var(--header-bg);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    transition: background 0.3s ease;
}

.navbar-modern {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 0; /* Full width for the bar backgrounds */
}

.navbar-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 40px; /* Reduced padding slightly */
    gap: 20px;
}

.logo-wrapper {
    flex: 1; /* Allow to grow to balance search bar */
    display: flex;
    justify-content: flex-start;
}

.header-search-desktop {
    flex: 2; /* Occupy more space in the middle */
    max-width: 650px;
    margin: 0;
    display: flex;
    justify-content: center;
}

.header-search-bar {
    background: #fff;
    border-radius: 8px;
    height: 42px; /* Slimmer height */
    display: flex;
    width: 100%;
    align-items: center;
    padding: 0 3px 0 12px; /* Reduced internal padding */
    justify-content: space-between;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid var(--primary);
    transition: all 0.3s ease;
}

.header-search-bar:hover {
    border-color: var(--primary);
}

.search-placeholder {
    color: #444;
    font-size: 15px;
    font-weight: 500;
}

.header-search-btn {
    background: var(--primary) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 6px !important;
    width: 36px !important;
    height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: background 0.3s ease !important; /* No zoom */
}

.header-search-btn:hover {
    background: var(--primary-dark) !important;
    transform: none !important; /* Explicitly remove zoom */
}

.header-actions-right {
    flex: 1; 
    display: flex;
    align-items: center;
    gap: 20px;
    justify-content: flex-end;
}

.header-action-icons-group {
    display: flex;
    align-items: center;
    gap: 15px; /* Better spacing between icons */
    margin-left: 10px;
}

.header-action-btn,
.cart-action-link {
    cursor: pointer;
    color: var(--header-text);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    width: 42px;
    height: 42px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    text-decoration: none;
    position: relative;
    border: none;
    padding: 0;
    overflow: visible; /* Ensure badge is not cut off */
}

/* Ensure the SVG itself is centered and has no margins */
.header-action-btn svg,
.cart-action-link svg {
    display: block;
    margin: 0 auto;
}

.header-action-btn:hover,
.cart-action-link:hover {
    background: rgba(0, 0, 0, 0.05); /* Keep same background as static */
    color: var(--header-text); /* Keep same color as static */
    transform: none !important;
    transition: none !important;
}

.header-socials {
    display: flex;
    align-items: center;
    gap: 12px;
}

.social-icon-item {
    color: var(--header-social-icon);
    background: var(--header-social-bg);
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: none !important;
}

.social-icon-item:hover {
    background: var(--header-social-bg);
    color: var(--header-social-icon);
    opacity: 1;
    transform: none !important;
}

.social-icon-item svg {
    width: 20px;
    height: 20px;
}

/* Cart link styles handled by unified class above */

.cart-icon-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
}

.cart-count-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--primary);
    color: #fff;
    font-size: 8.5px;
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: none !important;
    font-weight: 800;
    line-height: 1;
    z-index: 2;
}

/* Bottom Row (Menu) */
.navbar-bottom-row {
    background: rgba(0,0,0,0.03); /* Professional semi-transparent background */
    padding: 8px 0;
    border-top: 1px solid rgba(0,0,0,0.05);
    display: flex;
    justify-content: center;
    width: 100%;
}

.header-main-nav {
    flex: 2;
    display: flex;
    justify-content: center;
}

.main-nav-ul-centered {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px; /* Logical spacing for premium feel */
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav-ul-centered li a {
    color: var(--header-text);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: color 0.3s ease;
    opacity: 0.85;
}

.main-nav-ul-centered li a:hover {
    color: var(--primary);
}

/* Mobile Styles */
@media (max-width: 768px) {
    .navbar-modern {
        padding: 0; 
    }

    .navbar-top-row {
        padding: 12px 15px; /* Increased padding slightly */
        gap: 12px;
    }

    .logo-wrapper {
        flex: 1;
        display: flex;
        justify-content: flex-start;
        order: 1;
    }

    .logo-wrapper img {
        max-width: 90px !important;
    }

    .header-actions-right {
        flex: 0;
        display: flex;
        justify-content: flex-end;
        order: 2;
        gap: 8px;
    }

    .menu-toggle-wrapper {
        flex: 0;
        display: flex;
        justify-content: flex-end;
        order: 3;
    }

    .navbar-mobile-row {
        padding: 0 12px 12px 12px; /* Internal gap with header background */
    }

    .navbar-mobile-row .header-search-bar {
        height: 30px;
        border-radius: 4px;
        padding: 0 3px 0 10px;
    }

    .navbar-mobile-row .header-search-btn {
        width: 24px !important;
        height: 24px !important;
    }

    .navbar-mobile-row .search-placeholder {
        font-size: 13px;
    }

    .mobile-only {
        display: flex !important;
    }

    .desktop-only {
        display: none !important;
    }
    
    .action-icon {
        color: var(--header-text) !important;
        background: rgba(0, 0, 0, 0.05) !important;
        border-radius: 10px !important;
        border: none !important;
        box-shadow: none !important;
        width: 32px !important;
        height: 32px !important;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .action-icon svg,
    .header-action-btn svg,
    .cart-action-link svg {
        width: 18px !important;
        height: 18px !important;
    }

    /* Badge size handled globally */
    
    .header-action-btn,
    .cart-action-link {
        width: 32px !important;
        height: 32px !important;
        border-radius: 10px !important;
    }
}

/* Utils */
.desktop-only {
    display: flex;
}

.mobile-only {
    display: none;
}

@media (max-width: 768px) {
    .desktop-only { display: none !important; }
    .mobile-only { display: flex !important; }
}

/* Existing Drawer Styles for compatibility */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 110000;
    visibility: hidden;
    opacity: 0;
}
.drawer-overlay.active {
    visibility: visible;
    opacity: 1;
}
.drawer {
    position: fixed;
    top: 0;
    width: 320px;
    max-width: 85%;
    height: 100%;
    background: white;
    z-index: 110001;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, opacity 0.2s ease;
    visibility: hidden;
    opacity: 0;
}
.drawer-left { left: 0; transform: translate3d(-101%, 0, 0); }
.drawer-right { right: 0; transform: translate3d(101%, 0, 0); }
.drawer.active {
    visibility: visible;
    opacity: 1;
    transform: translate3d(0, 0, 0) !important;
}
.drawer-header {
    padding: 0 20px;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f0f0f0;
}
.drawer-title { margin: 0; font-size: 1.1rem; color: #333; }
.drawer-close-modern {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    cursor: pointer;
    color: #333;
}
.drawer-content { padding: 20px; flex-grow: 1; overflow-y: auto; }
