/* --- 1. CORE HEADER FIXES --- */
.header-site-main {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 3000; /* Stays above slider */
    width: 100%;
}

.header-flex-grid {
    display: grid;
    grid-template-columns: 200px 1fr 200px; /* Strict 3-lane system */
    align-items: center;
    height: 80px;
    gap: 15px;
}

/* Lane 1: Logo */
.header-col-left { display: flex; align-items: center; }
.site-logo-link img { max-height: 48px; display: block; width: auto; }
.site-logo-text { font-weight: 900; font-size: 1.5rem; color: #0f172a; text-decoration: none; }

/* Lane 2: Mega Menu Desktop */
.header-col-center { display: flex; justify-content: center; height: 100%; }
.desktop-navigation-main { height: 100%; }
.mega-menu-list { display: flex; list-style: none; gap: 5px; height: 100%; align-items: center; }
.mega-menu-list li { position: relative; height: 100%; display: flex; align-items: center; }

.mega-menu-list a { 
    text-decoration: none; font-weight: 700; font-size: 0.85rem; 
    color: #475569; padding: 10px 15px; text-transform: uppercase; white-space: nowrap;
}

/* SIDE-BY-SIDE CHILD MENU LOGIC */
.mega-dropdown-panel {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #ffffff;
    min-width: 600px; /* Wide for side-by-side items */
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    border: 1px solid #e2e8f0;
    border-radius: 0 0 12px 12px;
    padding: 25px;
    display: none; 
    z-index: 3100;
}

/* Force child items to show side-by-side */
.mega-dropdown-panel .mega-menu-list {
    display: flex !important;
    flex-direction: row !important; /* SIDE BY SIDE FIX */
    flex-wrap: wrap;
    gap: 20px;
    height: auto !important;
    width: 100%;
}

.mega-dropdown-panel .mega-menu-list li {
    height: auto !important;
    width: auto;
    border-right: 1px solid #f1f5f9;
    padding-right: 15px;
}

.has-mega-dropdown:hover > .mega-dropdown-panel { display: block; }

/* Lane 3: Right Actions */
.header-col-right { display: flex; justify-content: flex-end; align-items: center; gap: 15px; }
.auth-desktop-links { display: flex; gap: 15px; align-items: center; }
.nav-auth-btn { font-weight: 700; font-size: 0.85rem; color: #64748b; text-decoration: none; }
.nav-auth-btn.brand-btn { color: var(--brand); }

/* --- 2. MOBILE REPAIR (Fixes the "Double" and overlaps) --- */
.mobile-menu-trigger {
    display: none; background: none; border: none; cursor: pointer; color: #0f172a; padding: 5px;
}

/* HIDDEN BY DEFAULT (CRITICAL FIX FOR "DOUBLE") */
.mobile-side-drawer {
    position: fixed; top: 0; left: -320px; width: 300px; height: 100vh;
    background: #ffffff; z-index: 5000; transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 10px 0 40px rgba(0,0,0,0.1); overflow-y: auto;
    display: flex; flex-direction: column;
}

.mobile-side-drawer.active { left: 0; }

.mobile-drawer-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 4500; display: none;
}
.mobile-drawer-overlay.active { display: block; }

@media (max-width: 1024px) {
    .header-flex-grid {
        grid-template-columns: 1fr auto !important; /* Logo | Hamburger only */
        height: 65px;
    }
    /* Hide mess */
    .header-col-center, .desktop-only { display: none !important; }
    .mobile-menu-trigger { display: flex !important; }
}

/* --- 3. SLIDER COMPATIBILITY --- */
.hero-slider-container {
    position: relative;
    z-index: 10; /* Lower than header (3000) */
    width: 100%;
    overflow: visible; /* Prevents menu clipping */
}