/* ===== HEADER ===== */
@supports (height: 100dvh) {
    .page {
        min-height: 100dvh;
    }


}


:root {
    --safe-area-max-inset-bottom: env(safe-area-max-inset-bottom, 36px);
    --bottom-bar-height: 110px;
    /* высота твоего бара */
}

.header-wrapper {
    position: sticky;
    inset: 0 0 auto 0;
    height: 111px;
    background: #fff;
    z-index: 900;

    display: flex;
    justify-content: center;
    transition: box-shadow 0.3s ease;
}

.header-inner {
    width: 100%;
    max-width: 1540px;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    min-width: 0;
    gap: 64px;
}

/* ===== LEFT ===== */

.header-left-outer {
    display: flex;
    align-items: center;
    margin-right: 0;
    flex-shrink: 0;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 19px;

    flex-shrink: 0;
    /* ⛔️ запрещаем сжатие */
    min-width: auto;
}

.header-gap {
    flex: 0 1 64px;
    /* ← БЫЛ margin-right: 64px */
    min-width: 16px;
    /* ниже — не сжимаемся */
}


/* logo */
.logo-box {
    display: flex;
    align-items: center;
    padding: 10px 0 10px 10px;
    text-decoration: none;
    color: inherit;

    flex: 0 0 auto;
    min-width: 0;
}

.logo-box img {
    width: 100%;
    max-width: 100%;
    max-height: 87px;
    height: auto;
    object-fit: contain;
}

/* divider */
.divider {
    width: 56px;
    height: 0;
    border-top: 1px solid #E61734;
    transform: rotate(116.74deg);
    flex-shrink: 1;
}

/* tagline */
.tagline-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 173px;
    height: 40px;
    color: #E61734;
    flex-shrink: 1;
}

.tagline {
    font-family: "PT Astra Serif", serif;
    font-size: 20px;
    font-style: italic;
    font-weight: 700;
    line-height: 20px;
    color: #E61734;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== NAV ===== */

/* ===== NAV ===== */

.nav {
    display: flex;
    align-items: center;
    white-space: nowrap;
    flex-shrink: 1;
    overflow: hidden;
    min-width: 0;
}

.nav>*:not(script) {
    flex: 1;
    width: 100%;
}

.main-menu {
    width: 100%;
}

.main-menu__list {
    display: flex;
    gap: 48px;
    width: 100%;
    min-width: 0;
}

.header-inner {
    min-width: 0;
}

/* ===== RIGHT ===== */

.header-actions {
    display: flex;
    align-items: center;

    flex: 1 1 auto;
    margin-left: 32px;
}

/* language */
.language-box {
    display: flex;
    position: relative;
    width: 76px;
    justify-content: flex-start;
    flex-shrink: 0;
    margin-right: 32px;
}

.language-icon {
    display: flex;
    align-items: center;
    padding: 10px;
    border: none;
    background: none;
    cursor: pointer;
    position: relative;
}

.language-icon img {
    width: 24px;
    height: 24px;
    display: block;
}

/* ===== ICONS ===== */

.header-icons {
    display: flex;
    align-items: center;
    gap: 24px;

    margin-left: auto;
    flex-shrink: 0;
}

.actions-top {
    display: flex;
}

.actions-icons {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 6px 24px 6px 16px;
}

.like-icon,
.lk-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.actions-bottom {
    display: flex;
    padding: 6px 10px 6px 16px;
    flex-shrink: 0;
}

.cart-icon {
    width: 20px;
    height: 20px;
    cursor: pointer;
}


/* ===== LANGUAGE POPUP ===== */

.language-popup {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    margin-top: 20px;

    padding: 16px 24px;
    gap: 7px;

    border-radius: 4px;
    background: #005C67;
    z-index: 1000;

    min-width: 153px;
    width: fit-content;
    white-space: nowrap;

    /* Анимация */
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);

    display: flex;
    flex-direction: column;
    pointer-events: none;
    cursor: default;
}

.language-popup.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.language-popup__arrow {
    position: absolute;
    top: -28px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-bottom: 30px solid #005C67;
    pointer-events: none;
}

.language-popup__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.language-popup__item:hover {
    background: rgba(255, 255, 255, 0.15);
}

.language-popup__flag img {
    width: 20px;
    height: auto;
    flex-shrink: 0;
}

.language-popup__text {
    color: #F8F8F3;
    font-family: "tt-commons-pro-thin", sans-serif;
    font-size: 12px;
    font-weight: 100;
    letter-spacing: 1.12px;
    text-transform: uppercase;
}

/* ===== HOVERS ===== */

.like-icon:hover svg path {
    stroke: #005C67;
}

.lk-icon:hover svg path {
    fill: #005C67;
    stroke: #005C67;
}

.lk-badge {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #005C67;
    text-decoration: none;
}

.lk-badge__text {
    color: #FFFFFF;
    text-align: center;
    font-family: "PT Astra Serif", serif;
    font-size: 16px;
    font-style: italic;
    font-weight: 400;
    line-height: 120%;
}



/* ===== BURGER ===== */
.burger {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    flex-shrink: 0;
}

.burger svg path {
    transition: stroke 0.2s ease;
}

.burger:hover svg path {
    stroke: #F6881B;
}

/* ===== MOBILE BOTTOM BAR ===== */
/* ===== MOBILE BOTTOM BAR ===== */
.mobile-bottom-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #005C67;
    z-index: 1000;
    padding: 24px 16px;
    box-sizing: border-box;
}

.mobile-bottom-bar::after {
    display: none;
}

.mobile-bottom-bar__inner {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 32px;
    width: 100%;
}

.mobile-bottom-bar__item {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    border: none;
    background: none;
    cursor: pointer;
    text-decoration: none;
}

.mobile-bottom-bar__item img,
.mobile-bottom-bar__item svg {
    transition: opacity 0.2s ease;
}

.mobile-bottom-bar__item:hover img {
    opacity: 0.7;
}



/* ЛК — кружок */
.mobile-bottom-bar .lk-badge {
    display: flex;
    width: 32px;
    height: 32px;
    padding: 8px 5px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    border-radius: 16px;
    background: #E61734;
}

.mobile-bottom-bar .lk-badge__text {
    font-family: "PT Astra Serif", serif;
    font-size: 16px;
    font-style: italic;
    font-weight: 700;
    line-height: 100%;
    color: #FFF;
}

/* ЛК — иконка (не авторизован) */
.mobile-bottom-bar .lk-icon img {
    width: 29.403px;
    height: 29.406px;
}


/* Избранное */
.mobile-bottom-bar .like-icon svg {
    width: 29.403px;
    height: 29.406px;
}

/* Корзина */
.mobile-bottom-bar .cart-icon {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

/* Корзина */
.mobile-bottom-bar .cart-icon img {
    width: 31.103px;
    height: 28.276px;
}

.mobile-bottom-bar .language-icon {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
}

/* Флажок */
.mobile-bottom-bar .language-icon img {
    width: 25.448px;
    height: 25.448px;
}



/* Бейдж корзины */
.mobile-bottom-bar__cart {
    position: relative;
}

/* Бейдж корзины — скрыт по умолчанию */
.mobile-bottom-bar__badge {
    display: none;
    /* Скрыт по умолчанию, JS покажет если > 0 */
    position: absolute;
    top: -16px;
    right: -21px;
    width: 24px;
    height: 24px;
    padding: 4.875px 6.5px;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    border-radius: 13px;
    background: #E61734;

    color: #FFF;
    text-align: center;
    font-family: "PT Astra Serif", serif;
    font-size: 13px;
    font-style: italic;
    font-weight: 800;
    line-height: 120%;
}

/* ===== MOBILE BOTTOM BAR — WISHLIST HEART ===== */

@keyframes pulse2 {
    0% {
        transform: scale(1)
    }

    20% {
        transform: scale(1.18)
    }

    40% {
        transform: scale(.95)
    }

    60% {
        transform: scale(1.14)
    }

    80% {
        transform: scale(.98)
    }

    100% {
        transform: scale(1)
    }
}

/* Хедер — wishlist */
.wishlist-header.has-items svg path {
    fill: #005C67;
    stroke: #005C67;
}

.wishlist-header.is-burst svg {
    transform-origin: center;
    animation: pulse2 .42s ease-out;
}

/* Mobile bottom bar — wishlist без товаров */
.mobile-bottom-bar .wishlist-header svg path {
    stroke: rgba(255, 255, 255, 0.60);
    fill: none;
    transition: stroke 0.2s ease, fill 0.2s ease;
    stroke-width: 2.828px;
}

/* Mobile bottom bar — wishlist с товарами */
.mobile-bottom-bar .wishlist-header.has-items svg path {
    fill: #F6881B;
    stroke: #F6881B;
    stroke-width: 2.828px;
}

/* Mobile bottom bar — анимация */
.mobile-bottom-bar .wishlist-header.is-burst svg {
    transform-origin: center;
    animation: pulse2 .42s ease-out;
}

/* ===== MOBILE BOTTOM BAR — LANGUAGE POPUP ===== */
.mobile-bottom-bar__language {
    position: relative;
}

.mobile-bottom-bar__language .language-icon {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
}

/* ===== MOBILE BOTTOM BAR — LANGUAGE POPUP FIX ===== */
.mobile-bottom-bar__language .language-popup {
    position: absolute;
    bottom: calc(100% + 65px);
    left: auto;
    right: -14px;
    top: auto;
    transform: none;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mobile-bottom-bar__language .language-popup.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Убираем затемнение — всегда */
.mobile-bottom-bar__language img {
    opacity: 1 !important;
}

.mobile-bottom-bar__language .language-icon:hover,
.mobile-bottom-bar__language .language-icon:active,
.mobile-bottom-bar__language .language-icon:focus {
    opacity: 1;
    background: none;
}

.mobile-bottom-bar__language .language-popup__arrow {
    bottom: -28px;
    top: auto;
    left: auto;
    right: 16px;
    transform: rotate(180deg);
    border-left: 14px solid transparent;
    border-right: 14px solid transparent;
}

@media (max-width: 1540px) {


    .header-inner {
        max-width: 100%;
        padding: 0 40px;
        gap: 32px;
    }

    .header-actions {
        flex: 0 0 auto;
        margin-left: auto;
    }

    .nav {
        flex: 1 1 auto;
        justify-content: center;
    }

    .nav ul {
        gap: 32px;
    }
}

/* ===== 1450px — сжимаем левую часть ===== */
@media (max-width: 1450px) {

    .header-left-outer,
    .header-left {
        flex-shrink: 1;
    }

    .logo-box img {
        max-height: 70px;
    }

    .tagline {
        font-size: 16px;
        line-height: 16px;
    }

    .tagline-box {
        width: 140px;
    }

    .divider {
        width: 56px;
        margin: 0 -15px;
    }

    .header-left {
        gap: 12px;
    }

    .nav ul {
        gap: 24px;
    }
}

/* ===== 1350px ===== */
@media (max-width: 1350px) {
    .header-inner {
        gap: 16px;
        padding: 0 24px;
    }

    .header-left {
        gap: 8px;
    }

    .logo-box img {
        max-height: 60px;
    }

    .nav ul {
        gap: 16px;
    }

    .language-box {
        width: 60px;
        margin-right: 16px;
    }

    .header-actions {
        margin-left: 16px;
    }

    .header-icons {
        gap: 16px;
    }

    .actions-icons {
        gap: 16px;
        padding: 6px 12px;
    }
}

/* ===== 1150px ===== */
@media (max-width: 1150px) {
    .logo-box img {
        max-height: 50px;
    }

    .header-left {
        gap: 6px;
    }

    .language-box {
        width: 50px;
        margin-right: 12px;
    }

    .header-icons {
        gap: 12px;
    }

    .actions-icons {
        gap: 12px;
        padding: 6px 8px;
    }
}

/* ===== 1080px — последнее сжатие перед бургером ===== */
/* ===== 1080px — последнее сжатие перед бургером ===== */
@media (max-width: 1080px) {
    .header-inner {
        gap: 12px;
        padding: 0 16px;
    }

    .logo-box img {
        max-height: 45px;
    }

    .header-left {
        gap: 4px;
    }

    .nav ul {
        gap: 12px;
    }

    .language-box {
        width: 44px;
        margin-right: 8px;
    }

    .header-icons {
        gap: 8px;
    }

    .actions-icons {
        gap: 8px;
        padding: 6px 4px;
    }
}



@media (max-width: 1024px) {
    .header-wrapper {
        height: auto;
    }

    html,
    body {
        overflow-x: clip;
    }

    .page {
        overflow-x: clip;
    }

    .header-inner {
        flex-wrap: wrap;
        max-width: 90%;
        padding: 16px 0;
        gap: 16px;
        margin: 0 auto;
    }

    /* Лого + tagline — плавное сжатие через clamp */
    .header-left-outer,
    .header-left {
        flex-shrink: 1;
    }

    .header-left {
        gap: clamp(8px, 2vw, 19px);
    }

    .logo-box img {
        max-height: clamp(50px, 8vw, 87px);
    }

    .tagline {
        font-size: clamp(14px, 2vw, 20px);
        line-height: 1.2;
    }

    .tagline-box {
        width: clamp(110px, 18vw, 173px);
    }


    /* Иконки справа */
    .header-actions {
        flex: 0 0 auto;
        margin-left: auto;
    }

    .language-box {
        width: auto;
        margin-right: clamp(12px, 2.5vw, 24px);
    }

    .header-icons {
        gap: clamp(12px, 2vw, 20px);
    }

    .actions-icons {
        gap: clamp(12px, 2vw, 20px);
        padding: 6px clamp(8px, 1.5vw, 16px);
    }

    /* Меню снизу — на всю ширину */
    .nav {
        flex: 1 0 100%;
        order: 3;
    }

    .main-menu {
        width: 100%;
    }

    .main-menu__list {
        display: flex;
        justify-content: space-between;
        width: 100%;
        gap: 0;
    }
}

/* ===== 768px — планшет по макету ===== */
/* ===== 768px — планшет по макету ===== */
/* ===== 768px — планшет по макету ===== */
/* ===== 768px — планшет по макету ===== */
/* ===== 768px — планшет по макету ===== */
/* ===== 790px — меню толкает лого ===== */


@media (max-width: 768px) {
    .header-inner {
        max-width: 690px;
        padding: 16px 0;
    }

    html {
        --page-padding: 16px;
    }

    /* Принудительно разрешаем сжатие */
    .header-left-outer {
        flex: 1 1 0;
        /* 0 вместо auto */
        flex-shrink: 1;
        min-width: 0;
        overflow: hidden;
    }

    .header-left {
        flex-shrink: 1;
        gap: 8px;
        min-width: 0;
    }

    .logo-box {
        flex: 0 1 auto;
        /* Может сжиматься */
        min-width: 0;
    }

    .logo-box img {
        max-height: 55px;
        max-width: 100%;
        /* ← Ключевое! */
        min-width: 60px;
        width: auto;
        object-fit: contain;
    }

    .divider {
        width: 54px;
    }

    .tagline-box {
        flex: 0 1 auto;
        /* Сжимается */
        min-width: 0;
        max-width: 120px;
    }

    .tagline {
        font-size: 14px;
        line-height: 1.2;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Иконки прибиты вправо */
    .header-actions {
        flex: 0 0 auto;
        margin-left: clamp(8px, 2vw, 24px);
    }

    .language-box {
        margin-right: 12px;
    }

    .header-icons {
        gap: 12px;
    }

    .actions-icons {
        gap: 12px;
        padding: 6px 8px;
    }
}

/* ===== 610px — плавное сжатие всего ===== */
/* ===== 610px — плавное сжатие всего ===== */
/* ===== 610px — плавное сжатие всего ===== */
/* ===== 610px — плавное сжатие всего ===== */
@media (max-width: 610px) {
    .header-inner {
        padding: 12px 0;
        gap: 12px;
        flex-wrap: wrap;
    }

    .header-left-outer {
        flex: 1 1 0;
        min-width: 0;
    }

    .header-left {
        gap: 6px;
        min-width: 0;
        flex-wrap: nowrap;
    }

    .header-actions {
        flex: 0 0 auto;
        margin-left: auto;
    }

    .logo-box {
        padding-left: 0;
        flex-shrink: 1;
        min-width: 0;
    }

    .logo-box img {
        max-height: clamp(45px, 10vw, 55px);
        max-width: 100%;
        min-width: 70px;
    }

    .divider {
        width: 56px;
        margin: 0 -15px;
        flex-shrink: 0;
    }

    .tagline-box {
        flex: 0 0 auto;
        /* Не сжимается */
    }

    .tagline {
        font-size: clamp(12px, 2.5vw, 14px);
        white-space: nowrap;
        overflow: visible;
        /* Не обрезаем */
        text-overflow: clip;
        /* Без ... */
    }

    .language-box {
        margin-right: clamp(6px, 2vw, 12px);
    }

    .header-icons {
        gap: clamp(6px, 2vw, 12px);
    }

    .actions-icons {
        gap: clamp(6px, 2vw, 12px);
        padding: 4px clamp(4px, 1.5vw, 8px);
    }

    .actions-bottom {
        padding-right: 16px;
    }
}


/* ===== 540px — бургер вместо меню и иконок ===== */
/* ===== 540px — бургер вместо меню и иконок ===== */
@media (max-width: 540px) {

    .burger {
        display: flex;
        margin-left: 50px;
        flex-shrink: 0;
    }

    .nav,
    .header-actions {
        display: none;
    }

    .mobile-bottom-bar {
        display: flex;
    }

    /* Контент 375px */
    .header-inner {
        max-width: 100%;
        width: 100%;
        padding: 12px 16px;
        gap: 0;
    }

    .header-left-outer {
        flex: 1 1 auto;
        min-width: 0;
    }

    .header-left {
        gap: 12px;
    }

    .logo-box img {
        max-height: 60px;
    }

    .tagline-box {
        width: auto;
        max-width: none;
        flex: 0 0 auto;
    }

    .tagline {
        font-size: 14px;
        line-height: 1.3;
        white-space: nowrap;
    }

    .divider {
        width: 39px;
    }

    .page {
        padding-bottom: 60px;
    }
}

/* ===== 510px — уменьшаем отступ до бургера ===== */
@media (max-width: 510px) {
    .burger {
        margin-left: clamp(16px, 5vw, 50px);
    }

    .header-left {
        gap: 8px;
    }

    .logo-box img {
        max-height: 55px;
    }

    .divider {
        width: 39px;
    }

    .tagline {
        font-size: 14px;
        line-height: 1.3;
        white-space: nowrap;
    }

}

/* ===== 480px — мобилка ===== */
/* ===== 480px — мобилка по макету ===== */
/* ===== 480px — мобилка по макету ===== */
@media (max-width: 480px) {
    html {
        --page-padding: 12px;
    }

    .header-inner {
        padding: 12px 0;
    }

    .header-left {
        gap: 6px;
    }

    .logo-box img {
        max-width: 126px;
        max-height: none;
        height: auto;
    }

    .divider {
        width: 39px;
    }

    .tagline {
        font-size: 14px;
        line-height: 1.3;
        white-space: nowrap;
    }


    .burger {
        margin-left: clamp(12px, 4vw, 24px);
    }
}

/* ===== 370px — ещё меньше ===== */
/* ===== 370px — ещё меньше ===== */
@media (max-width: 370px) {
    .logo-box img {
        max-width: clamp(80px, 28vw, 100px);
    }

    .divider {
        width: 39px;
        margin: 0 -10px;
    }

    .tagline {
        font-size: clamp(12px, 3vw, 12px);
    }

    .header-left {
        gap: 4px;
    }

    .burger {
        margin-left: 12px;
    }
}