/* ===== Header ===== */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--white);
    box-shadow: var(--shadow-menu);
}

.header > .container {
    display: flex;
    align-items: center;
    height: 84px;
    gap: 40px;
}

.header__logo {
    flex-shrink: 0;
}

.header__logo img {
    width: 66px;
    height: 60px;
    object-fit: contain;
}

.header__products-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: var(--orange);
    color: var(--white);
    border-radius: 100px;
    font-size: 16px;
    font-weight: 600;
    line-height: 18px;
    transition: background var(--transition);
    flex-shrink: 0;
    cursor: pointer;
}

.header__products-btn:hover {
    background: var(--orange-hover);
}

.header__products-icon--close {
    display: none;
}

.header__products-btn.active .header__products-icon--menu {
    display: none;
}

.header__products-btn.active .header__products-icon--close {
    display: block;
}

/* Nav */
.header__nav {
    flex: 0 0 auto;
    height: 100%;
}

.nav {
    display: flex;
    align-items: center;
    gap: 40px;
    height: 100%;
}

.nav__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 16px;
    font-weight: 600;
    color: var(--blue);
    padding: 8px 0;
    transition: color var(--transition);
}

.nav__item:first-child .nav__link {
    font-weight: 700;
}

.nav__link:hover {
    color: var(--orange);
}

.nav__arrow {
    transition: transform var(--transition);
}

/* Dropdown */
.nav__item {
    display: flex;
    align-items: center;
    position: relative;
    height: 100%;
}

.dropdown {
    position: absolute;
    top: calc(100% - 1px);
    left: 0;
    background: var(--white);
    border-radius: 0 0 20px 20px;
    box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
    padding: 9px 0;
    min-width: 210px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-5px);
    transition: all var(--transition);
    z-index: 50;
    overflow: hidden;
}

.dropdown::after {
    content: "";
    position: absolute;
    top: -9px;
    left: -2px;
    width: calc(100% + 4px);
    height: 10px;
    background: var(--white);
    box-shadow: var(--shadow-menu);
    pointer-events: none;
    z-index: 1;
}

.dropdown::before {
    content: "";
    position: absolute;
    top: -9px;
    left: -6px;
    width: calc(100% + 12px);
    height: 10px;
    background: var(--white);
    pointer-events: none;
    z-index: 2;
}

.nav__item--has-dropdown:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav__item--has-dropdown:hover .nav__arrow {
    transform: rotate(180deg);
}

.nav__item--has-dropdown:hover .nav__link {
    color: var(--orange);
    font-weight: 700;
}

/*.dropdown__list li + li {
    border-top: 1px solid var(--border);
}*/

.dropdown__list a {
    display: block;
    padding: 7px 13px 7px 15px;
    font-size: 16px;
    font-weight: 500;
    line-height: normal;
    color: #687E92;
    transition: all var(--transition);
    position: relative;
}

.dropdown__list li + li a::before {
    content: "";
    position: absolute;
    top: 0;
    left: 15px;
    width: calc(100% - 28px);
    height: 1px;
    background-color: var(--border);
    pointer-events: none;
}

.dropdown__list a:hover {
    color: var(--blue);
    font-weight: 600;
    background-color: var(--menu-l2);
}

/* Search */
.header__search {
    display: flex;
    align-items: center;
    background: var(--search-bg);
    border-radius: 100px;
    padding: 12px 20px;
    flex: 1;
    max-width: 771px;
    margin-left: auto;
}

.header__search-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 16px;
    color: var(--blue);
    max-width: calc(100% - 20px);
}

.header__search-input::placeholder {
    color: var(--light-blue);
}

.header__search-btn {
    flex-shrink: 0;
    padding: 0;
}

/* Mobile actions */
.header__mobile-actions {
    display: none;
    align-items: center;
    gap: 16px;
}

.header__mobile-phone,
.header__mobile-search {
    width: 24px;
    height: 24px;
    padding: 0;
}

.header__burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 24px;
    height: 24px;
    padding: 0;
}

.header__burger span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--blue);
    border-radius: 2px;
    transition: all var(--transition);
}

.header__burger.active span {
    background: var(--orange);
}

.header__burger.active span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

.header__burger.active span:nth-child(2) {
    opacity: 0;
}

.header__burger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

/* ===== Mega Menu (Products) ===== */
.mega-menu {
    display: none;
    position: absolute;
    top: calc(100% - 1px);
    left: var(--container-pad);
    z-index: 90;
}

.mega-menu::after {
    content: "";
    position: absolute;
    top: -9px;
    left: -2px;
    width: calc(100% + 4px);
    height: 10px;
    background: var(--white);
    box-shadow: var(--shadow-menu);
    pointer-events: none;
    z-index: 1;
}

.mega-menu::before {
    content: "";
    position: absolute;
    top: -9px;
    left: -6px;
    width: calc(100% + 12px);
    height: 10px;
    background: var(--white);
    pointer-events: none;
    z-index: 2;
}

.mega-menu.active {
    display: flex;
}

.mega-menu__col {
    padding: 8px 0 10px;
    overflow-y: auto;
    max-height: 520px;
}

.mega-menu__col--l1 {
    width: 296px;
    background: var(--white);
    border-radius: 0 0 0 20px;
    box-shadow: 4px 4px 15.5px rgba(0, 0, 0, 0.09);
}

.mega-menu__col--l2 {
    width: 296px;
    background: var(--menu-l2);
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.09);
}

.mega-menu__col--l3 {
    width: 296px;
    background: var(--menu-l3);
    border-radius: 0 0 20px 0;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.09);
}

.mega-menu__list {
    padding: 0;
}

/*.mega-menu__list li + li {
    border-top: 1px solid var(--border);
}

.mega-menu__col--l2 .mega-menu__list li + li {
    border-color: var(--menu-divider);
}

.mega-menu__col--l3 .mega-menu__list li + li {
    border-color: var(--menu-divider);
}*/

.mega-menu__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 15px 6px;
    font-size: 16px;
    line-height: normal;
    font-weight: 500;
    color: var(--dark-blue);
    transition: all var(--transition);
    position: relative;
}

.mega-menu__list li:not(:first-child) .mega-menu__link::before {
    content: "";
    position: absolute;
    left: 15px;
    width: calc(100% - 30px);
    height: 1px;
    top: 0;
    background-color: var(--border);
    pointer-events: none;
}

.mega-menu__col--l3 .mega-menu__list li:not(:first-child) .mega-menu__link::before {
    background-color: var(--menu-divider);
}

.mega-menu__link:hover,
.mega-menu__link--active {
    color: var(--blue);
    font-weight: 600;
    background: var(--menu-l2);
}

.mega-menu__col--l2 .mega-menu__link:hover,
.mega-menu__col--l2 .mega-menu__link--active {
    background: var(--menu-l2-active);
}

.mega-menu__col--l3 .mega-menu__link:hover,
.mega-menu__col--l3 .mega-menu__link--active {
    background: var(--menu-l3-active);
}

/*.mega-menu__link[data-target]::after {
    content: '';
    display: inline-block;
    width: 19px;
    height: 24px;
    background: url("data:image/svg+xml,%3Csvg width='8' height='12' viewBox='0 0 8 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.5 1l5 5-5 5' stroke='%2390A7BC' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/8px no-repeat;
    flex-shrink: 0;
}

.mega-menu__link--active[data-target]::after {
    background-image: url("data:image/svg+xml,%3Csvg width='8' height='12' viewBox='0 0 8 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.5 1l5 5-5 5' stroke='%232C3E50' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}*/

.mega-menu__panel {
    display: none;
}

.mega-menu__panel--active {
    display: block;
}

/* ===== Mobile Overlay & Menu ===== */
.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 150;
}

.mobile-overlay.active {
    display: block;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 51px;
    left: 0;
    width: 360px;
    max-width: 100vw;
    height: 100vh;
    background: var(--white);
    z-index: 99;
    flex-direction: column;
    overflow-y: auto;
    box-shadow: var(--shadow-menu);
    transform: translateX(-100%);
    transition: transform var(--transition);
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-menu__body {
    padding: 20px 15px 12.5px;
    flex: 1;
}

.mobile-menu__footer {
    padding: 20px 15px;
    text-align: center;
    position: relative;
}

.mobile-menu__footer::after {
    content: "";
    position: absolute;
    left: 15px;
    width: calc(100% - 30px);
    top: 0;
    height: 1px;
    background: var(--border);
}

.mobile-menu__footer .btn {
    margin-bottom: 20px;
}

.mobile-menu__contacts {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.mobile-menu__contacts a,
.mobile-menu__contacts span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 16px;
    line-height: normal;
    color: var(--light-blue);
}

.mobile-menu__contacts svg {
    flex: none;
}

.mobile-menu__address {
    align-items: flex-start;
    text-align: center;
}

.mobile-menu__contacts .mobile-menu__address {
    align-items: flex-start;
}

.mobile-menu__address svg {
    margin-top: 4px;
}

/* Mobile nav */
.mobile-nav__item {
    text-align: center;
}

.mobile-nav__toggle,
.mobile-nav__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 16px;
    font-weight: 600;
    color: var(--blue);
    padding: 7.5px 0;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-nav__item--products {
    padding-bottom: 7.5px;
    border-bottom: 1px solid #CEE1F3;
    margin-bottom: 7.5px;
}

.mobile-nav__item--products > .mobile-nav__toggle {
    padding-top: 0;
}

.mobile-nav__toggle--orange {
    color: var(--orange);
    font-weight: 600;
}

.mobile-nav__toggle--bold {
    font-weight: 800;
    text-decoration: underline;
}

.mobile-nav__chevron {
    transition: transform var(--transition);
}

.mobile-nav__toggle.expanded {
    font-weight: 800;
    text-decoration: underline;
}

.mobile-nav__toggle.expanded .mobile-nav__chevron {
    transform: rotate(180deg);
}

.mobile-nav__sub {
    display: none;
    padding: 5px 0 0;
}

.mobile-nav__item--default > .mobile-nav__sub {
    padding-bottom: 22.5px;
}

.mobile-nav__sub.expanded {
    display: block;
}

.mobile-nav__sub a {
    display: block;
    padding: 5px 0;
    font-size: 16px;
    font-weight: 500;
    color: var(--light-blue);
}

.mobile-nav__sub .mobile-nav__sub {
    padding-left: 0;
}

@media (max-width: 1400px) and (min-width: 1025px) {
    .header > .container {
        gap: 15px;
    }

    .nav {
        gap: 15px;
    }

    .header__search {
        max-width: 350px;
    }
}

@media (max-width: 1170px) {
    .top-bar__left {
        max-width: 35%;
    }

    .nav__link,
    .dropdown__list a {
        font-size: 14px;
    }

    .top-bar__item {
        font-size: 14px;
    }

    .top-bar__email,
    .top-bar__phone {
        font-size: 16px;
    }
}

@media (min-width: 1024px) and (max-width: 1170px) {
    .header__search {
        max-width: 250px;
    }
}

@media (max-width: 1024px) {
    .header__nav {
        display: none;
    }

    .header__search {
        display: none;
    }

    .header__mobile-actions {
        display: flex;
        margin-left: auto;
    }

    .header__burger {
        display: flex;
        order: -1;
    }

    .header__products-btn {
        display: none;
    }

    .header__logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }

    .header > .container {
        position: relative;
    }

    .mobile-menu {
        display: flex;
    }

    .mega-menu {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .mobile-overlay.active {
        display: none;
    }

    .header {
        background-color: var(--header-bg);
    }

    .mobile-menu__body {
        flex: none;
    }
}

@media (max-width: 480px) {
    .header > .container {
        height: 51px;
    }

    .header__logo img {
        width: 50px;
        height: 44px;
    }
}