@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600&display=swap');

:root {
    --emp-glass-bg: rgba(255, 255, 255, 0.65);
    --emp-glass-border: rgba(255, 255, 255, 0.4);
    --emp-accent: #0b1c3b;
    --emp-hover: #0a3370;
    --emp-font: 'Montserrat', sans-serif;
}

/* Base Header Setup for Page 43 */
@keyframes empSlideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.no-sticky-standard {
    font-family: var(--emp-font) !important;
    background: #fff; /* Normal background */
}

/* Static State (Normal) - Only the menu is shown, integrating with theme logo above */
.emp-premium-header {
    display: flex;
    justify-content: center; /* Standard centering for static mode */
    align-items: center;
    padding: 12px 25px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fff;
    border-bottom: 1px solid #eee;
    position: relative;
    z-index: 999999 !important;
    width: 100%; 
    box-sizing: border-box;
}

/* Expansion Logic for the Header Bar itself - Force it to be above overlay and solid */
.emp-premium-header:has(.emp-nav-item:hover) {
    background: #fff !important;
    border-bottom: 1px solid #eee !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1) !important;
    position: relative;
    z-index: 9999999 !important; /* One level higher than overlay */
}

.emp-premium-header .emp-header-logo,
.emp-premium-header .emp-header-actions {
    display: none !important; /* Hide custom logo/actions in normal flow */
}

/* Sticky Modes - Standard Floating Glass Look */
.is-sticky .emp-premium-header, .navbar-compact .emp-premium-header {
    display: flex !important;
    align-items: center;
    position: fixed !important;
    top: 15px !important;
    left: 20px !important;
    right: 20px !important;
    width: auto !important;
    padding: 8px 30px !important;
    background: var(--emp-glass-bg) !important;
    backdrop-filter: blur(5px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    border: 1px solid var(--emp-glass-border) !important;
    border-radius: 25px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
    z-index: 999999 !important;
    height: 70px !important;
    justify-content: space-between !important;
    animation: empSlideDown 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    transition: all 0.3s ease;
    box-sizing: border-box !important;
}

/* State when Megamenu is Open - Solid Opaque background to prevent overlay tint */
.emp-premium-header:has(.emp-nav-item:hover) {
    background: #fff !important; 
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-radius: 25px 25px 0 0 !important; 
    border-bottom: 0 !important; /* Forces seamless connection */
    box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important;
}

/* Ensure content stays white and above overlay */
.emp-premium-header .emp-header-logo,
.emp-premium-header .emp-main-nav,
.emp-premium-header .emp-header-actions {
    position: relative;
    z-index: 2;
}

/* Global Overlay Styling */
.emp-overlay-global {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999998 !important; /* Set below the header (999999) */
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

/* Show global overlay when header is hovered */
.emp-premium-header:has(.emp-nav-item:hover) + .emp-overlay-global {
    opacity: 1;
    visibility: visible;
}

/* Centering and alignment logic for Sticky Elements */
.is-sticky .emp-premium-header .emp-sticky-logo-wrap,
.navbar-compact .emp-premium-header .emp-sticky-logo-wrap {
    flex: 1;
    display: flex;
    justify-content: flex-start;
    margin-right: 15px;
    z-index: 10;
}

.is-sticky .emp-premium-header .emp-main-nav,
.navbar-compact .emp-premium-header .emp-main-nav {
    flex: 0 1 auto;
    display: flex;
    justify-content: center;
    z-index: 10;
}

.is-sticky .emp-premium-header .emp-sticky-actions-wrap,
.navbar-compact .emp-premium-header .emp-sticky-actions-wrap {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    margin-left: 15px;
    z-index: 10;
}

/* Aggressively hide theme's default sticky components on Page 43 */
.no-sticky-standard.is-sticky .header-top,
.no-sticky-standard.is-sticky .header-middle .logo-w,
.no-sticky-standard.is-sticky .header-middle .bottom-right,
.no-sticky-standard.navbar-compact .header-top,
.no-sticky-standard.navbar-compact .header-middle .logo-w,
.no-sticky-standard.navbar-compact .header-middle .bottom-right {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Prevent theme background from showing through */
.no-sticky-standard.is-sticky,
.no-sticky-standard.navbar-compact {
    background: transparent !important;
    box-shadow: none !important;
    height: 0 !important;
    border: none !important;
}

.is-sticky .emp-premium-header .emp-header-logo,
.is-sticky .emp-premium-header .emp-header-actions,
.navbar-compact .emp-premium-header .emp-header-logo,
.navbar-compact .emp-premium-header .emp-header-actions {
    display: flex !important;
}

.is-sticky .emp-premium-header .emp-header-logo img,
.navbar-compact .emp-premium-header .emp-header-logo img {
    height: 38px !important;
}

/* Ensure integrated actions block is compact */
.emp-header-actions .inner,
.emp-header-actions .emp-actions-wrapper {
    display: flex !important;
    align-items: center;
    gap: 8px !important; /* Force tight gap */
    visibility: visible !important;
    opacity: 1 !important;
}

.emp-sticky-item {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.emp-account, .emp-wishlist, .emp-compare, .emp-shopping-cart {
    display: flex !important;
    visibility: visible !important;
}

.wishlist.emp-wishlist.emp-sticky-item {
    margin-top: 5px;
}

.emp-header-actions .account-text,
.emp-header-actions .wishlist-text,
.emp-header-actions .comparetext,
.emp-header-actions .shopping_cart-text {
    display: none !important; /* Make it ultra compact */
}

.emp-header-actions .search-header-w {
    margin: 0 !important;
}

.emp-header-actions i,
.emp-header-actions svg {
    font-size: 24px !important;
    color: var(--emp-accent);
    stroke-width: 1px;
}

.emp-header-actions .search-input {
    width: 0;
    padding: 0;
    border: none;
    overflow: hidden;
    transition: all 0.3s ease;
    background: transparent;
}

.emp-header-actions .search-header-w:hover .search-input,
.emp-header-actions .search-input:focus {
    width: 150px;
    padding: 5px 10px;
    border-bottom: 1px solid #ccc;
    background: #fff;
}

/* Navigation Styles */
.emp-nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 20px;
}

.emp-nav-link {
    font-family: var(--emp-font);
    font-weight: 500;
    font-size: 16px;
    color: var(--emp-accent);
    text-decoration: none;
    padding: 12px 11px;
    transition: all 0.3s ease-in-out;
    display: flex;
    align-items: center;
    gap: 8px;
}

.emp-nav-link:hover {
    color: var(--emp-hover);
}

.emp-nav-link i.fa-chevron-down {
    font-size: 10px;
}

/* Megamenu Styles (Shared) */
.emp-nav-item {
    position: static;
}

.emp-megamenu {
    position: absolute;
    top: calc(100% - 1px); /* Avoid any hairline gaps */
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    background: #fff;
    border-radius: 0 0 25px 25px;
    box-shadow: 0 40px 80px rgba(0,0,0,0.2);
    display: flex;
    opacity: 0;
    visibility: hidden;
    transform: translateY(0); 
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 99999999 !important;
    overflow: hidden;
    border: 1px solid #eee;
    border-top: none;
    margin: 0;
    box-sizing: border-box;
}

/* Position adjustment logic - Megamenu follows header */
.emp-nav-item:hover .emp-megamenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.emp-mega-left {
    flex: 0 0 25%;
    background: #fdfdfd;
    padding: 30px;
    border-right: 1px solid #f0f0f0;
}

.emp-mega-cat-item {
    display: flex;
    align-items: center;
    gap: 10px; /* Tighter gap for smaller icons */
    padding: 12px 18px;
    border-radius: 12px;
    color: var(--emp-accent);
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 8px;
    transition: all 0.3s ease-in-out;
}

.emp-mega-cat-item:hover, .emp-mega-cat-item.active {
    background: #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.06);
    color: var(--emp-hover);
}

.emp-mega-right {
    flex: 1;
    padding: 25px 35px 35px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Brand Logo Navigation */
.emp-brand-nav {
    display: flex;
    align-items: center;
    justify-content: space-between; /* Equal distribution until the ends */
    gap: 15px; /* Minimum gap for smaller screens */
    width: 100%;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 10px;
    box-sizing: border-box;
}

.emp-brand-item {
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s ease;
    filter: grayscale(100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.emp-brand-item:hover, .emp-brand-item.active {
    opacity: 1;
    filter: grayscale(0);
    transform: scale(1.05);
}

.emp-brand-item img {
    height: 30px;
    width: auto;
    object-fit: contain;
}

.emp-brand-label {
    font-size: 14px;
    font-weight: 700;
    color: #444;
}

/* Grid Layout for BTU groups */
.emp-mega-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 25px;
}

.emp-mega-group-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--emp-accent);
    margin-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 8px;
}

.emp-sub-list {
    list-style: none;
    padding: 0;
}

.emp-sub-link {
    display: block;
    padding: 2px 0;
    color: #555;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease-in-out;
}

.emp-sub-link:hover {
    color: var(--emp-hover);
    padding-left: 3px;
}

/* Search Input Styling */
.search-input {
    font-family: var(--emp-font);
    font-size: 13px;
    padding: 8px 15px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 20px 0 0 20px;
    background: rgba(0,0,0,0.04);
    outline: none;
    width: 160px;
    transition: width 0.3s;
}

.search-input:focus {
    width: 240px;
    background: #fff;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

/* Category Content Switching */
.emp-cat-content {
    display: none;
    width: 100%;
}

.emp-cat-content.active {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Brand Content Visibility */
.emp-brand-content {
    display: none;
    animation: fadeIn 0.4s ease;
    width: 100%;
}

.emp-brand-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile Responsiveness */
@media (max-width: 991px) {
    .emp-premium-header {
        padding: 15px;
    }
    
    .emp-nav-list {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }
    
    .emp-nav-link {
        width: 100%;
        justify-content: space-between;
        border-bottom: 1px solid #f9f9f9;
    }
    
    .emp-megamenu {
        position: static;
        flex-direction: column;
        max-height: 0;
        min-height: 0;
        box-shadow: none;
        transform: none;
        transition: max-height 0.4s;
    }
    
    .emp-nav-item:hover .emp-megamenu {
        max-height: 2000px;
    }
    
    .emp-mega-left {
        width: 100%;
        border-right: none;
        padding: 15px;
    }
    
    .emp-mega-right {
        grid-template-columns: 1fr 1fr;
        padding: 15px;
    }
}
