/* --- Header & Navigation Styles --- */

/* Top Bar */
.top-bar {
    background-color: var(--white);
    border-bottom: 1px solid #eee;
    padding: 8px 0;
    font-size: 11px;
    color: #555;
    position: relative;
    z-index: 101;
}

.top-bar-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.welcome-msg {
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.top-phone {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--dark);
    font-weight: 700;
    font-size: 13px;
    margin-left: 20px;
}

.top-phone svg {
    width: 14px;
    height: 14px;
    fill: var(--primary);
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.top-email {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #666;
    transition: color 0.2s;
}

.top-email:hover {
    color: var(--secondary);
}

.top-email svg {
    width: 14px;
    height: 14px;
    fill: var(--secondary);
}

.header-socials {
    display: flex;
    gap: 10px;
}

.header-socials a {
    color: #888;
    font-size: 12px;
    transition: color 0.2s;
}

.header-socials a:hover {
    color: var(--primary);
}

/* Main Header */
.main-header {
    background: var(--white);
    padding: 15px 0;
    box-shadow: var(--shadow-sm);
    position: relative;
    z-index: 1000;
}

.header-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    padding: 0 10px;
}

.logo-section img {
    height: 32px;
    width: auto;
}

.company-name-section {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    text-align: center;
    z-index: 10;
}

.company-name-section h1 {
    font-family: 'Oswald', sans-serif;
    font-size: 28px;
    color: var(--primary);
    margin: 0;
    text-transform: uppercase;
    line-height: 1;
}

.header-right-contacts {
    display: flex;
    gap: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon-red-circle {
    width: 28px;
    height: 28px;
    color: var(--secondary);
}

.contact-item span {
    font-size: 13px;
    font-weight: 700;
    color: var(--dark);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--primary);
    cursor: pointer;
}

/* Desktop Navigation */
.nav-desktop {
    background: var(--primary);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-desktop ul {
    display: flex;
    justify-content: center;
    margin: 0;
    padding: 0;
    position: relative;
    z-index: 500;
}

.nav-desktop li {
    position: relative;
}

.nav-desktop a {
    display: block;
    padding: 12px 20px;
    color: var(--white);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 3px solid transparent;
}

.nav-desktop a:hover,
.nav-desktop a.active {
    background: rgba(0, 0, 0, 0.1);
    border-bottom-color: var(--secondary);
}

/* Mega Menu */
.has-mega-menu:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mega-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translate(-50%, 10px);
    width: 900px;
    /* Fixed width container style */
    background: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 20px;
    border-top: 3px solid var(--secondary);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    border-radius: 0 0 4px 4px;
}

/* Adjust margin to center relative to viewport/container if needed */
.nav-desktop li.has-mega-menu {
    position: static;
    /* Allows menu to be full width of container */
}

.nav-desktop .container {
    position: relative;
}

.mega-menu {
    left: 0;
    width: 100%;
    transform: translateY(10px);
}

.mega-menu-flex {
    display: flex;
    gap: 30px;
}

.mega-col {
    flex: 1;
}

.mega-col h3 {
    font-size: 14px;
    color: var(--primary);
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
    margin-bottom: 10px;
}

.mega-col ul {
    display: block;
}

.mega-col li a {
    color: #666;
    padding: 5px 0;
    font-size: 12px;
    text-transform: capitalize;
    font-weight: 400;
    border: none;
    background: transparent !important;
}

.mega-col li a:hover {
    color: var(--secondary);
    padding-left: 5px;
}

.mega-promo {
    flex: 1.5;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.promo-item {
    display: block;
    text-align: center;
    background: #f9f9f9;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #eee;
}

.promo-item:hover {
    border-color: var(--secondary);
    background: #fff;
}

.promo-item img {
    margin: 0 auto 10px;
    height: 80px;
    object-fit: contain;
}

.promo-item span {
    display: block;
    font-size: 11px;
    color: var(--dark);
    font-weight: 600;
}

/* Mobile Drawer (Hidden by default) */
.mobile-drawer {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100%;
    background: #fff;
    z-index: 2000;
    transition: 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

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

.drawer-header {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
}

.drawer-header img {
    height: 35px;
}

.close-drawer {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #555;
}

.mobile-nav ul {
    display: block;
}

.mobile-nav li {
    border-bottom: 1px solid #f5f5f5;
}

.mobile-nav a {
    display: block;
    padding: 12px 20px;
    color: var(--dark);
    font-weight: 600;
}

.mobile-nav a:hover,
.mobile-nav a.active {
    color: var(--primary);
    background: #f9f9f9;
}

.drawer-contact {
    padding: 20px;
    background: #f0f4f8;
    margin-top: 20px;
}

.drawer-contact p {
    font-size: 12px;
    color: #555;
    margin-bottom: 8px;
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Mobile Drawer Grouped Styles */
.drawer-group {
    background: #fbfbfb;
    border-bottom: 1px solid #eee;
}

.drawer-group-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary);
    letter-spacing: 1px;
    background: #f0f4f8;
    cursor: pointer;
}

.drawer-group-title i {
    font-size: 10px;
    transition: transform 0.3s ease;
}

.drawer-group.active .drawer-group-title i {
    transform: rotate(90deg);
}

.drawer-sub-menu {
    list-style: none;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: #fff;
}

.drawer-group.active .drawer-sub-menu {
    border-bottom: 2px solid var(--accent);
}

.drawer-sub-menu li {
    border-bottom: 1px solid #f5f5f5 !important;
}

.drawer-sub-menu li:last-child {
    border-bottom: none !important;
}

.drawer-sub-menu a {
    padding: 10px 35px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #555 !important;
    opacity: 0.9;
}

.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
}

.drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Responsive Header */
@media (max-width: 992px) {

    .top-bar,
    .nav-desktop,
    .header-right-contacts,
    .top-bar-right {
        display: none;
    }

    .mobile-toggle {
        display: block;
    }

    .top-bar-flex {
        justify-content: center;
    }

    .top-phone {
        margin: 0;
    }

    .welcome-msg,
    .top-bar-right {
        display: none;
    }

    .company-name-section {
        position: static;
        transform: none;
        flex: 1;
        text-align: center;
    }

    .company-name-section h1 {
        font-size: 14px;
    }

    .logo-section img {
        height: 18px;
    }

    .header-grid {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 5px;
    }

    .main-header {
        position: sticky;
        top: 0;
        padding: 10px 0;
    }
}