/* ==========================================================================
   HEADER & MEGA MENU STYLES (TinhTe Inspired - Flat & Aligned)
   ========================================================================== */

/* --- TinhTe Style Header (2 Tiers) --- */
.site-header {
    z-index: 2000;
    --header-top-height: 60px;
    --header-nav-height: 48px;
    --header-total-height: 108px;
}

.header-top {
    height: var(--header-top-height);
}

.header-nav {
    height: var(--header-nav-height);
}

/* --- Search Pill --- */
.header-search {
    flex-grow: 1 !important;
    max-width: 600px;
}

.input-group-pill {
    background: #f1f5f9;
    border-radius: 50px;
    padding: 6px 15px;
    display: flex;
    align-items: center;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.input-group-pill input {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    font-size: 13px;
    padding: 0;
    height: auto;
}

.input-group-pill:focus-within {
    background: #fff;
    border-color: var(--primary);
}

/* --- Navigation --- */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.header-nav .nav-link {
    white-space: nowrap;
    font-size: 13px;
    color: #333;
    font-weight: 600;
    padding: 0 16px;
    height: var(--header-nav-height);
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
    position: relative;
}

.header-nav .nav-link:hover,
.header-nav .nav-link.active {
    color: var(--primary) !important;
}

.header-nav .nav-link.active::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 16px;
    right: 16px;
    height: 3px;
    background-color: var(--primary);
    border-radius: 3px 3px 0 0;
}


/* --- Logo --- */
.logo-text {
    letter-spacing: -1px;
    font-family: var(--font-body);
    font-weight: 850;
    color: var(--primary) !important;
    font-size: 24px;
    text-transform: uppercase;
}

.mega-menu-item {
    position: static; 
}

.mega-menu-item .menu-drawer-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    cursor: pointer;
}

.mega-menu-item .menu-drawer-trigger:hover i {
    color: var(--primary);
}

/* --- Mega Menu Overlay --- */
.mega-menu-overlay {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: auto;
    background: #fff;
    z-index: 2100;
    visibility: hidden;
    opacity: 0; 
    border-top: 1px solid #eee;
}

.mega-menu-overlay.active {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.mega-menu-overlay .container {
    padding: 20px;
}

.mega-menu-title {
    font-size: 16px;
    font-weight: 700;
    color: #3b3b3b;
    margin-bottom: 10px;
    display: block;
}

.mega-menu-list {
    margin-left: 10px;
    padding: 0;
    list-style: none;
}

.mega-menu-list li {
    margin-bottom: 10px;
}

.mega-menu-list a {
    color: #555;
    font-size: 14px;
    font-weight: 500;
}


.btn-close-white-custom {
    display: none;
}

/* --- Drawer Overlay --- */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1500;
    display: none;
}

.drawer-overlay.active {
    display: block;
}

/* --- Mobile --- */
@media (max-width: 768px) {
    .logo-text {
        font-size: 18px;
    }

    .input-group-pill {
        padding: 2px 12px;
    }

    .input-group-pill input {
        font-size: 11px;
    }

    .header-search {
        min-width: 0;
        max-width: 150px !important; /* Force a shorter width on mobile */
        margin-left: auto !important; /* Push it to the right if needed */
        margin-right: 0 !important;
        padding-top: 0;
    }
}