.header {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
    align-items: flex-start;
    justify-content: space-between;
    width: 100%;
    padding: 20px 40px 0;
}

.header__icon svg {
    width: 24px;
    height: 24px;
}

.header__lang svg {
    width: 24px;
    height: 24px;
}

.header--black .header__burger svg path {
    stroke: #000;
}

.header--black .header__link {
    color: #00000063;
}

.header--black .header__link--active {
    color: #000;
    border-bottom-color: #000;
}

.header--black .header__logo svg path {
    fill: #000;
}

.header--black .header__phone {
    color: #000;
}

.header--black .header__lang {
    color: #000;
}

.header--black .header__lang svg path {
    stroke: #000;
}

.header--black .header__icon svg path {
    stroke: #000;
}

.header--black .header__icon svg circle {
    stroke: #000;
}

.header--black .header__icon {
    color: #000;
}

header.authorized {
    display: flex;
}

.header__left {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.header__burger {
    display: flex;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
}

.header__nav {
    display: flex;
    gap: 16px;
}

.header__link {
    color: var(--color-white-40);
    padding-bottom: 1px;
    border-bottom: 1px solid transparent;
    transition: color 0.25s ease,
    border-color 0.25s ease;
}

.header__link:hover,
.header__link--active {
    color: var(--color-white);
    border-bottom-color: var(--color-white);
}

.header__logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 20px;
}

.header__logo img {
    width: 283px;
    height: 80px;
}

.header__right {
    display: flex;
    align-items: center;
    gap: 24px;
    height: 30px;
}

.header__phone {
    color: var(--color-white);
    transition: opacity 0.25s ease;
}

.header__phone:hover {
    opacity: 0.7;
}

.header__icons {
    display: flex;
    align-items: center;
    gap: 24px;
}

.header__lang-wrapper {
    position: relative;
    display: inline-block;
}

/* Кнопка выбора языка */
.header__lang {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    min-width: 52px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-white);
    transition: background 0.2s;
    font-family: inherit;
}

.header__lang:hover {
    background: rgba(0, 0, 0, 0.05);
}

.header__lang svg {
    transition: transform 0.25s ease;
}

/* Поворот стрелки при открытии */
.header__lang--open svg {
    transform: rotate(180deg);
}

/* Выпадающий список */
.header__lang-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    right: 1px;
    min-width: 52px;
    background: #ffffff;
    margin: 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.2s ease,
    transform 0.2s ease,
    visibility 0.2s;
    z-index: 100;
}

/* Открытое состояние */
.header__lang-dropdown--open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Элементы списка */
.header__lang-dropdown li {
    margin: 0;
    padding: 0;
}

/* Кнопки внутри списка */
.header__lang-dropdown a {
    display: block;
    width: 100%;
    text-align: left;
    padding: 8px 14px;
    background: transparent;
    border: none;
    font-size: 14px;
    font-weight: 400;
    color: #333;
    cursor: pointer;
    transition: background 0.15s,
    color 0.15s;
    font-family: inherit;
}

.header__lang-dropdown button:hover {
    background: #f5f5f5;
}

/* Активный язык */
.header__lang-dropdown button.active {
    color: #24242466;
}

.header__icon {
    position: relative;
    display: flex;
    align-items: center;
    flex-direction: column;
    min-width: 24px;
    height: 24px;
    transition: opacity 0.25s ease;
    color: var(--color-white);
}

.header__icon--profile span {
    margin-top: 4px;
    font-size: 16px;
}

.header__icon:hover {
    opacity: 0.7;
}

.header__count {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--color-white);
    color: var(--color-black);
    font-size: 11px;
}

@media (max-width: 1500px) {
    .header {
        padding: 20px 20px 0;
    }
}

@media (max-width: 1400px) {

    .header__phone {
        display: none;
    }
}

/* 768 и 375: в шапке только логотип по центру */
@media (max-width: 1024px) {
    .header {
        padding: 20px 15px 0
    }

    .header__right {
        width: 100%;
    }

    /* .header__left,
    .header__right {
      display: none;
    } */
    .header__left {
        display: none;
    }

    .header__icons {
        width: 100%;
        justify-content: space-between;
        flex-direction: row-reverse;
    }

    a.header__icon {
        display: none;
    }
}

@media (max-width: 576px) {
    .header__logo img {
        width: 190px;
        height: 54px;
    }
}

/* ============================================================
   Бургер-меню
   ============================================================ */
.menu {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 0;
    display: flex;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    transform: translateY(-100%);
}

/* Когда меню активно, оно становится видимым */
.menu.is-open {
    pointer-events: auto;
    opacity: 1;
    z-index: 10;
    transform: translateY(0);
}

/* Базовая колонка */
.menu__col {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 438px;
    background: var(--color-white);
    border-bottom: 1px solid #e4e4e4;
    overflow-y: auto;
    scrollbar-width: none;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.35s ease;
}

.menu__col::-webkit-scrollbar {
    display: none;
}

/* Позиции колонок на десктопе */
.menu__col[data-menu-col="1"] {
    left: 0;
    z-index: 1;
}

.menu__col[data-menu-col="2"] {
    left: 438px;
    z-index: 2;
    border-left: 1px solid #e4e4e4;
}

.menu__col[data-menu-col="3"] {
    left: 876px;
    z-index: 3;
    border-left: 1px solid #e4e4e4;
}

/* --- СОСТОЯНИЕ: СКРЫТА --- */
.menu__col.is-hidden {
    transform: translateX(-100%);
    opacity: 0;
    pointer-events: none;
}

/* --- СОСТОЯНИЕ: ВИДИМА --- */
.menu__col:not(.is-hidden) {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

/* Адаптив 1600px */
@media (max-width: 1600px) {
    .menu__col {
        width: 400px;
    }

    .menu__col[data-menu-col="2"] {
        left: 400px;
    }

    .menu__col[data-menu-col="3"] {
        left: 800px;
    }
}

/* Адаптив Мобильные: на весь экран */
@media (max-width: 1024px) {
    .menu {
        right: 0;
    }

    .menu__col {
        width: 100% !important;
        left: 0 !important;
        border: none;
        padding-bottom: calc(var(--tabbar-height) + 20px);
    }

    /* Остальные мобильные стили (padding, шрифты) остаются твоими */
    .menu__head {
        padding: 20px 20px 0;
    }

    .menu__tabs,
    .menu__sections {
        padding-left: 20px;
        padding-right: 20px;
    }

    .menu__footer {
        padding: 24px 20px 20px;
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
    }

    .menu__banner {
        height: 205px;
    }

    .menu__banner-title {
        left: 56%;
    }

    .menu__col--sub {
        padding-top: 0;
    }

    .menu__col--sub .menu__head {
        display: flex;
    }

    .menu__col--sub .menu__title {
        display: block;
        font-size: 24px;
        line-height: 1.1;
        padding: 24px 20px 0;
    }

    .menu__list {
        padding: 24px 20px 40px;
    }
}

@media (max-width: 576px) {
    .menu__head {
        padding: 20px 15px 0;
    }

    .menu__logo img {
        width: 190px;
        height: 54px;
    }

    .menu__tabs,
    .menu__sections {
        padding-left: 15px;
        padding-right: 15px;
    }

    .menu__footer {
        padding: 24px 15px 20px;
        flex-direction: column;
    }

    .menu__contact {
        font-size: 16px;
    }

    .menu__item {
        font-size: 16px;
    }

    .menu__arrow {
        width: 18px;
        height: 18px;
    }

    .menu__title {
        padding-left: 15px;
        padding-right: 15px;
    }

    .menu__list {
        padding-top: 18px;
        padding-left: 32px;
        padding-right: 20px;
    }
}

.menu__head {
    display: flex;
    justify-content: space-between;
    padding: 20px 40px 0;
}

.menu__close,
.menu__back,
.menu__search-btn {
    display: flex;
    flex-shrink: 0;
}

.menu__close img,
.menu__back img {
    width: 30px;
    height: 30px;
}

.menu__search-btn img {
    width: 24px;
    height: 24px;
}

.menu__logo img {
    width: 216px;
    height: 62px;
    filter: invert(1); /* белый логотип → чёрный на белом фоне */
}

.menu__tabs {
    display: flex;
    justify-content: center;
    gap: 24px;
    padding: 24px 40px 0;
}

.menu__tab {
    color: rgba(36, 36, 36, 0.4);
    padding-bottom: 1px;
    border-bottom: 1px solid transparent;
    transition: color 0.25s ease,
    border-color 0.25s ease;
}

.menu__tab:hover,
.menu__tab--active {
    color: var(--color-black);
    border-bottom-color: var(--color-black);
}

.menu__sections {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 24px 40px 0;
}

.menu__section {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.menu__section--last {
    border-bottom: none;
    padding-bottom: 0;
}

.menu__item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    min-height: 24px;
    font-size: 18px;
    line-height: 1.2;
    color: var(--color-black);
    text-align: left;
}

.menu__item span:first-child,
a.menu__item {
    flex: 1;
}

/* серая подложка при ховере/активности — выступает на 12px за края */
.menu__item::before {
    content: "";
    position: absolute;
    left: -12px;
    right: -12px;
    top: -10px;
    bottom: -10px;
    background: rgba(36, 36, 36, 0.1);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.menu__item:hover::before,
.menu__item.is-active::before {
    opacity: 1;
}

.menu__item > * {
    position: relative;
}

.menu__arrow {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    transition: transform 0.2s ease-in-out;
}

.menu__item:hover .menu__arrow,
.menu__item.is-active .menu__arrow {
    transform: rotate(45deg);
}

/* мини-баннер */
.menu__banner {
    position: relative;
    display: block;
    height: 140px;
    margin-top: 24px;
    overflow: hidden;
    background: var(--color-banner-bg);
    flex-shrink: 0;
}

.menu__banner-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 20% 25%;
    transform: scaleX(-1);
}

.menu__banner::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
            90deg,
            rgba(0, 0, 0, 0) 25%,
            rgba(0, 0, 0, 0.7) 75%
    );
}

.menu__banner-title {
    position: absolute;
    top: 50%;
    left: 46%;
    transform: translateY(-50%);
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: var(--color-white);
}

.menu__banner-heading {
    font-size: 28px;
    font-weight: 500;
    line-height: 0.9;
    letter-spacing: -0.02em;
    max-width: 200px;
}

.menu__banner-desc {
    font-size: 14px;
    line-height: 1.2;
    max-width: 202px;
}

/* контакты и соцсети */
.menu__footer {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 24px 40px 20px;
}

.menu__contacts {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
}

.menu__contact {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    line-height: 1.1;
    color: var(--color-black);
    transition: border-bottom 0.2s ease-in-out;
}

.menu__contact span {
    border-bottom: 1px solid transparent;
}

a.menu__contact:hover span {
    border-color: var(--color-black);
}

.menu__contact img {
    filter: invert(1); /* белые иконки → чёрные */
}

.menu__social {
    display: flex;
    gap: 8px;
}

.menu__social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--color-black);
    border: 1px solid var(--color-black);
    transition: all 0.25s ease;
}

.menu__social-link:hover {
    background: var(--color-white);
}

.menu__social-link:hover svg {
    color: var(--color-black);
}

.menu__social-link svg {
    width: 32px;
    height: 32px;
    color: var(--color-white);
    transition: color 0.25s ease;
}

/* колонки 2 и 3 */
.menu__col--sub {
    padding-top: 134px;
}

.menu__col--sub .menu__head,
.menu__col--sub .menu__title {
    display: none;
}

.menu__list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 0 40px 40px;
}

@media (max-width: 1600px) {
    .menu__col {
        width: 400px;
    }
}

/* 768 и 375: каждый уровень — отдельный полноэкранный экран */
@media (max-width: 1024px) {
    .menu {
        z-index: 44;
    }

    .menu__col {
        position: absolute;
        inset: 0;
        width: 100%;
        border: none;
        padding-bottom: calc(var(--tabbar-height) + 20px);
    }

    .menu__head {
        padding: 20px 20px 0;
    }

    .menu__tabs,
    .menu__sections {
        padding-left: 20px;
        padding-right: 20px;
    }

    .menu__footer {
        padding: 24px 20px 20px;
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
    }

    .menu__banner {
        height: 205px;
    }

    .menu__banner-title {
        left: 56%;
    }

    .menu__col--sub {
        padding-top: 0;
    }

    .menu__col--sub .menu__head {
        display: flex;
    }

    .menu__col--sub .menu__title {
        display: block;
    }

    body.menu-open {
        overflow: hidden;
    }

    body.menu-open .tabbar {
        background: var(--color-black);
    }
}

@media (max-width: 576px) {
    .menu__banner-title {
        left: 45%;
    }

    .menu__head {
        padding: 20px 15px 0;
    }

    .menu__logo img {
        width: 190px;
        height: 54px;
    }

    .menu__tabs,
    .menu__sections {
        padding-left: 15px;
        padding-right: 15px;
    }

    .menu__footer {
        padding: 24px 15px 20px;
        flex-direction: column;
    }

    .menu__contact {
        font-size: 16px;
    }

    .menu__item {
        font-size: 16px;
    }

    .menu__arrow {
        width: 18px;
        height: 18px;
    }

    .menu__title {
        padding-left: 15px;
        padding-right: 15px;
    }

    .menu__list {
        padding-top: 18px;
        padding-left: 32px;
        padding-right: 20px;
    }
}

/* ============================================================
   Поиск
   ============================================================ */
.search {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: var(--color-white);
    padding: 20px 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transform: translateY(-100%); /* Скрыт сверху */
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    opacity 0.35s ease;
    pointer-events: none;
}

/* Поиск - открытое состояние */
.search.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

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

.search__close,
.search__back {
    display: flex;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
}

.search__back {
    display: none;
}

.search__input {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
    padding: 12px 16px;
    border: 1px solid #e4e4e4;
    transition: border-color 0.2s ease-in-out;
}

.search__input input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    font: inherit;
    font-size: 18px;
    line-height: 1.2;
    color: var(--color-black);
    background: transparent;
}

.search__input input::placeholder {
    color: rgba(36, 36, 36, 0.4);
}

.search__submit {
    display: flex;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

/* disable-состояние инпута: рамка #C8CACA, серые текст и иконка */
.search__input:hover {
    border-color: #000000;
}

.search__input.is-disabled {
    border-color: #c8caca;
}

.search__input.is-disabled input {
    color: var(--color-gray-2);
    pointer-events: none;
}

.search__input.is-disabled .search__submit {
    pointer-events: none;
    filter: brightness(0) invert(0.55);
}

@media (max-width: 1600px) {
    .search {
        padding: 20px;
    }
}

/* 768 и 375: полноэкранный оверлей, назад — шеврон, таб-бар остаётся */
@media (max-width: 1024px) {
    .search {
        bottom: 0;
        padding: 20px;
    }

    .search__close {
        display: none;
    }

    .search__back {
        display: flex;
    }

    .search__input {
        padding: 12px;
    }

    .search__input input {
        font-size: 16px;
    }

    /* под открытым поиском фон белый — таб-бар становится непрозрачно-чёрным */
    body.search-open .tabbar {
        background: var(--color-black);
    }

    body.search-open {
        overflow: hidden;
    }
}

@media (max-width: 576px) {
    .search {
        padding: 20px 15px;
    }
}

.header__right .search {
    position: static;
    top: auto;
    right: auto;
    left: auto;
    z-index: auto;
    background: transparent;
    padding: 0;
    box-shadow: none;
    transform: none;
    opacity: 1;
    transition: none;
    pointer-events: auto;
}

.header-black {
    position: unset;
    margin-bottom: 50px;
    --fill-0: #000;
    --stroke-0: #000;
}

.header-black .header__link,
.header-black .header__phone,
.header-black .header__lang,
.header-black .header__icon {
    color: #000;
}

.header-black .header__link:hover,
.header-black .header__link--active {
    color: #000;
    border-bottom-color: #000;
}

.header-black .header__burger svg path {
    stroke: #000;
}

.header-black .header__count {
    color: #fff;
    background-color: #000;
}