/* --- GLOBAL RESET --- */
html, body { overflow-x: hidden; width: 100%; position: relative; margin: 0; padding: 0; }

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

.header-flex-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    padding: 0 20px;
}

/* Lane 1: Logo */
.header-col-left { flex: 0 0 auto; 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 { flex: 1 1 auto; 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; margin: 0; padding: 0; }
.mega-menu-list > li { position: relative; height: 100%; display: flex; align-items: center; }

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

/* MEGA PANEL CONTAINER */
.mega-dropdown-panel {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #ffffff;
    min-width: 650px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    border: 1px solid #e2e8f0;
    border-radius: 0 0 12px 12px;
    padding: 30px;
    display: none; 
    z-index: 3100;
}

/* LEVEL 2: The 3-Column Grid */
.mega-grid-list {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

.mega-grid-item { display: flex; flex-direction: column; }

/* LEVEL 2: Bold Column Headers */
.mega-col-header {
    font-weight: 900;
    font-size: 1rem;
    color: #0f172a;
    margin-bottom: 12px;
    display: block;
    text-decoration: none;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 8px;
    transition: 0.2s;
}
.mega-col-header:hover { color: var(--brand, #165f2c); }

/* LEVEL 3: Sub Links List */
.mega-sub-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* LEVEL 3: Standard Link Text */
.mega-sub-link {
    font-size: 0.9rem;
    color: #475569;
    text-decoration: none;
    transition: 0.2s ease;
    display: block;
}
.mega-sub-link:hover {
    color: var(--brand, #165f2c);
    transform: translateX(4px);
}

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

/* Lane 3: Right Actions */
.header-col-right { flex: 0 0 auto; 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, #165f2c); }

/* --- 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 */
.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; }

.drawer-top { padding: 20px; border-bottom: 1px solid #e2e8f0; display: flex; justify-content: space-between; font-weight: 900; }
.drawer-close-btn { background: none; border: none; cursor: pointer; font-size: 1.2rem; }
.drawer-content { flex: 1; overflow-y: auto; padding: 20px; }
.mob-accordion-list { list-style: none; margin: 0; padding: 0; }
.mob-nav-item { margin-bottom: 8px; }
.mob-row { display: flex; justify-content: space-between; background: #f8fafc; padding: 12px; border-radius: 8px; font-weight: 700; color: #0f172a; text-decoration: none; }
.drawer-footer-auth { padding: 20px; border-top: 1px solid #e2e8f0; display: flex; justify-content: space-between; font-weight: 700; }

@media (max-width: 1024px) {
    .header-flex-grid { justify-content: space-between; height: 65px; }
    .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; width: 100%; overflow: visible; }