/* =========================================================
   TON 618 — HEADER
   Clean structure:
   1. Topbar
   2. Header base and icons
   3. Desktop navigation and mega menu
   4. Desktop transparent state
   5. Tablet/mobile layout
   6. Mobile transparent states
   7. Mobile menu
   8. Search dropdown
========================================================= */

/* =========================================================
   TOPBAR
========================================================= */

.topbar {
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    background: var(--color-primary);
    color: #ffffff;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 300;
    line-height: 1;
    text-align: center;
    text-decoration: none;
}

/* =========================================================
   HEADER BASE
========================================================= */

.site-header {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--header-height);
    background: var(--color-background);
    transition:
        top 0.22s ease,
        background-color 0.22s ease,
        border-color 0.22s ease;
}

.header-inner {
    position: relative;
    height: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    padding: 0 64px;
}

.header-left {
    display: none;
}

.header-nav {
    height: 100%;
    justify-self: start;
}

.header-logo {
    width: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    justify-self: center;
    text-decoration: none;
}

.header-logo img {
    width: 100%;
    height: auto;
    max-height: 42px;
    display: block;
    object-fit: contain;
    transition: filter 0.22s ease;
}

.header-actions {
    display: flex;
    align-items: center;
    justify-self: end;
    gap: 34px;
}

.header-burger {
    display: none;
}

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

.header-icon-button {
    position: relative;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 24px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #000000;
    cursor: pointer;
    text-decoration: none;
    appearance: none;
}

.header-icon {
    width: 22px;
    height: 22px;
    display: block;
    background-color: currentColor;
}

.header-icon-search {
    -webkit-mask: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='10.8' cy='10.8' r='6.8'/%3E%3Cpath d='M16 16L21 21'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='10.8' cy='10.8' r='6.8'/%3E%3Cpath d='M16 16L21 21'/%3E%3C/svg%3E") center / contain no-repeat;
}

.header-icon-account {
    -webkit-mask: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 12.5C14.2 12.5 16 10.7 16 8.5C16 6.3 14.2 4.5 12 4.5C9.8 4.5 8 6.3 8 8.5C8 10.7 9.8 12.5 12 12.5Z'/%3E%3Cpath d='M5 21C5.8 17.3 8.4 15 12 15C15.6 15 18.2 17.3 19 21'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 12.5C14.2 12.5 16 10.7 16 8.5C16 6.3 14.2 4.5 12 4.5C9.8 4.5 8 6.3 8 8.5C8 10.7 9.8 12.5 12 12.5Z'/%3E%3Cpath d='M5 21C5.8 17.3 8.4 15 12 15C15.6 15 18.2 17.3 19 21'/%3E%3C/svg%3E") center / contain no-repeat;
}

.header-icon-cart {
    -webkit-mask: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6.5 8.5H17.5L18.5 21H5.5L6.5 8.5Z'/%3E%3Cpath d='M9 8.5C9 5.8 10.2 4 12 4C13.8 4 15 5.8 15 8.5'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6.5 8.5H17.5L18.5 21H5.5L6.5 8.5Z'/%3E%3Cpath d='M9 8.5C9 5.8 10.2 4 12 4C13.8 4 15 5.8 15 8.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

.header-cart-count {
    position: absolute;
    top: -6px;
    right: -7px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #040D1A;
    color: #ffffff;
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
}

/* =========================================================
   DESKTOP NAVIGATION
========================================================= */

.header-menu,
.header-menu ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.header-menu {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 25px;
}

.header-menu > li {
    height: 100%;
    display: flex;
    align-items: center;
}

.header-menu > li > a {
    height: 100%;
    display: flex;
    align-items: center;
    color: #000000;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 400;
    line-height: 1;
    letter-spacing: 0.18px;
    text-transform: uppercase;
    text-decoration: none;
    transition: opacity 0.2s ease, color 0.2s ease;
}

.header-menu > li > a:hover {
    opacity: 0.65;
}


/* =========================================================
   DESKTOP MEGA MENU
========================================================= */

@media (min-width: 869px) {

    .header-menu > li.has-mega-menu {
        position: static;
    }


    /* =====================================================
       MEGA MENU — FULL-WIDTH BACKGROUND
    ===================================================== */

    .header-menu
    > li.has-mega-menu
    > .sub-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 120;

        display: none;

        width: 100%;
        min-height: 280px;

        grid-template-columns:
            repeat(3, minmax(160px, 240px));

        align-items: start;
        justify-content: center;

        column-gap: 90px;
        row-gap: 28px;

        padding: 54px 64px 90px;

        background: var(--color-cream);

        border-top: 1px solid var(--color-border);
        border-bottom: 1px solid var(--color-border);

        box-sizing: border-box;
    }


    /* =====================================================
       MEGA MENU WITH PROMOTIONS
    ===================================================== */

    .header-menu
    > li.has-mega-menu.has-mega-promotions
    > .sub-menu {
        width: 100%;

        height: 328px;
        min-height: 328px;
        max-height: 328px;

        grid-template-columns:
            repeat(4, minmax(150px, 200px))
            338px;

        grid-template-rows: minmax(0, 1fr);

        align-items: start;
        justify-content: center;

        column-gap: 40px;
        row-gap: 0;

        padding: 20px 64px 40px;

        overflow: hidden;
    }


    /* Open state */

    .header-menu
    > li.has-mega-menu.is-mega-active
    > .sub-menu {
        display: grid;
    }


    /* First-level mega-menu items */

    .header-menu
    > li.has-mega-menu
    > .sub-menu
    > li {
        display: block;

        min-width: 0;
    }

    .header-menu
    > li.has-mega-menu
    > .sub-menu
    > li:not(.mega-menu-promotions):not(.mega-catalog-link) {
        width: 100%;
        min-width: 0;
        max-width: 200px;
    }


    /* =====================================================
       COLUMN TITLES
    ===================================================== */

    .header-menu
    > li.has-mega-menu
    > .sub-menu
    > li:not(.mega-menu-promotions):not(.mega-catalog-link)
    > a {
        display: block;

        height: auto;
        margin: 0 0 24px;

        color: #666666;

        font-family: var(--font-body);
        font-size: 12px;
        font-weight: 300;
        line-height: 1;
        letter-spacing: 0.18px;
        text-transform: uppercase;
        text-decoration: none;

        pointer-events: none;
        cursor: default;
    }


    /* =====================================================
       NESTED COLUMN LINKS
    ===================================================== */

    .header-menu
    > li.has-mega-menu
    > .sub-menu
    > li
    > .sub-menu {
        position: static;

        display: grid;
        gap: 15px;

        margin: 0;
        padding: 0;

        background: transparent;
        border: 0;
        box-shadow: none;
    }

    .header-menu
    > li.has-mega-menu
    > .sub-menu
    > li
    > .sub-menu
    > li {
        display: block;
    }

    .header-menu
    > li.has-mega-menu
    > .sub-menu
    > li
    > .sub-menu
    > li
    > a {
        display: inline-flex;

        height: auto;

        color: #000000;

        font-family: var(--font-body);
        font-size: 14px;
        font-weight: 300;
        line-height: 1.25;
        text-transform: none;
        text-decoration: none;

        transition: opacity 0.2s ease;
    }

    .header-menu
    > li.has-mega-menu
    > .sub-menu
    > li
    > .sub-menu
    > li
    > a:hover {
        opacity: 0.55;
    }

    .header-menu
    > li.has-mega-menu
    > .sub-menu
    > li
    > .sub-menu
    > li.mega-all-link
    > a {
        margin-top: 8px;

        color: var(--color-primary);
        font-style: italic;
    }


    /* Hide ordinary dropdowns */

    .header-menu
    > li:not(.has-mega-menu)
    > .sub-menu {
        display: none;
    }


    /* =====================================================
       PROMOTION CARDS
    ===================================================== */

    .header-menu
    > li.has-mega-menu
    > .sub-menu
    > li.mega-menu-promotions {
        grid-column: 5;
        grid-row: 1;

        width: 338px;
        min-width: 338px;
        max-width: 338px;

        align-self: start;
        justify-self: start;

        margin: 0;
        padding: 0;

        overflow: hidden;
    }

    .mega-menu-promotions__grid {
        width: 338px;

        display: grid;
        grid-template-columns: repeat(2, 155px);

        align-items: start;
        justify-content: start;

        gap: 28px;
    }

    .mega-menu-promotions--count-1
    .mega-menu-promotions__grid {
        grid-template-columns: 155px;
        justify-content: start;
    }

    .mega-menu-promotion-card {
        width: 155px;
        min-width: 155px;
        max-width: 155px;

        display: flex;
        flex-direction: column;

        margin: 0;
        padding: 0;

        color: #040D1A;
        text-decoration: none;
        text-transform: none;

        pointer-events: auto;
        cursor: pointer;
    }

    .mega-menu-promotion-card__media {
        position: relative;

        width: 155px;
        min-width: 155px;
        max-width: 155px;

        height: 217px;
        min-height: 217px;
        max-height: 217px;

        display: block;
        flex: 0 0 217px;

        margin: 0;
        padding: 0;

        overflow: hidden;

        background: #e9e5df;

        box-sizing: border-box;
    }

    .mega-menu-promotion-card
    .mega-menu-promotion-card__media
    .mega-menu-promotion-card__image {
        position: absolute;
        inset: 0;

        display: block;

        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;

        height: 100% !important;
        min-height: 100% !important;
        max-height: 100% !important;

        margin: 0 !important;
        padding: 0 !important;

        object-fit: cover !important;
        object-position: center;

        border: 0;

        box-sizing: border-box;

        transition: transform 0.45s ease;
    }

    .mega-menu-promotion-card__title {
        width: 155px;

        display: block;

        margin-top: 10px;

        color: #040D1A;

        font-family: var(--font-body);
        font-size: 12px;
        font-weight: 400;
        line-height: 1.2;
        letter-spacing: 0.18px;
        text-transform: uppercase;
    }

    .mega-menu-promotion-card:hover
    .mega-menu-promotion-card__image {
        transform: scale(1.035);
    }

    .mega-menu-promotion-card:hover
    .mega-menu-promotion-card__title {
        text-decoration: underline;
        text-underline-offset: 3px;
    }


    /* =====================================================
       CATALOG BUTTON
    ===================================================== */

    .header-menu
    > li.has-mega-menu
    > .sub-menu
    > li.mega-catalog-link {
        position: absolute;
        left: 50%;
        bottom: 28px;

        margin: 0;

        transform: translateX(-50%);
    }

    .header-menu
    > li.has-mega-menu
    > .sub-menu
    > li.mega-catalog-link
    > a {
        min-width: 220px;
        height: 52px;

        display: inline-flex;
        align-items: center;
        justify-content: center;

        margin: 0;
        padding: 0 34px;

        border: 1px solid #040D1A;

        background: transparent;
        color: #040D1A;

        font-family: var(--font-body);
        font-size: 12px;
        font-weight: 600;
        line-height: 1;
        letter-spacing: 0.14em;
        text-transform: uppercase;
        text-decoration: none;

        pointer-events: auto;
        cursor: pointer;

        transition:
            background-color 0.25s ease,
            color 0.25s ease;
    }

    .header-menu
    > li.has-mega-menu
    > .sub-menu
    > li.mega-catalog-link
    > a:hover {
        background: #040D1A;
        color: #ffffff;

        opacity: 1;
    }
}


/* =========================================================
   MEGA MENU — SMALLER DESKTOP
   869px–1279px
========================================================= */

@media (min-width: 869px) and (max-width: 1199px) {

    .header-menu
    > li.has-mega-menu
    > .sub-menu {
        justify-content: stretch;

        padding-right: 28px;
        padding-left: 28px;
    }

    .header-menu
    > li.has-mega-menu.has-mega-promotions
    > .sub-menu {
        height: 328px;
        min-height: 328px;
        max-height: 328px;

        grid-template-columns:
            repeat(4, minmax(100px, 1fr))
            322px;

        column-gap: 20px;

        padding: 20px 28px 40px;
    }

    .header-menu
    > li.has-mega-menu
    > .sub-menu
    > li:not(.mega-menu-promotions):not(.mega-catalog-link) {
        max-width: none;
    }

    .header-menu
    > li.has-mega-menu
    > .sub-menu
    > li.mega-menu-promotions {
        width: 322px;
        min-width: 322px;
        max-width: 322px;
    }

    .mega-menu-promotions__grid {
        width: 322px;

        grid-template-columns: repeat(2, 155px);

        gap: 12px;
    }

    .mega-menu-promotions--count-1
    .mega-menu-promotions__grid {
        grid-template-columns: 155px;
    }

    .mega-menu-promotion-card__title {
        font-size: 11px;
    }
}


/* =========================================================
   MEGA MENU — LARGE AND ULTRA-WIDE DESKTOP
========================================================= */

@media (min-width: 1280px) {

    .header-menu
    > li.has-mega-menu.has-mega-promotions
    > .sub-menu {
        grid-template-columns:
            repeat(4, 200px)
            338px;

        justify-content: center;

        column-gap: clamp(32px, 2vw, 56px);
    }
}


/* =========================================================
   MOBILE MENU — GLOBAL PROMOTION CARDS
========================================================= */

.mobile-menu-promotions {
    display: none;
}

@media (max-width: 868px) {
    .mobile-menu-promotions {
        width: 100%;

        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
        gap: 20px;

        padding: 12px 18px 30px;

        background: var(--color-cream);
        box-sizing: border-box;
    }


    .mobile-menu-promotions--count-1 {
        grid-template-columns:
            minmax(0, calc((100% - 20px) / 2));
    }

    .mobile-menu-promotion-card {
        min-width: 0;

        display: flex;
        flex-direction: column;

        color: #040D1A;
        text-decoration: none;

        cursor: pointer;
    }

    .mobile-menu-promotion-card__media {
        position: relative;

        width: 100%;
        aspect-ratio: 6 / 7;

        display: block;
        overflow: hidden;

        background: #e9e5df;
    }

    .mobile-menu-promotion-card__image {
        width: 100%;
        height: 100%;

        display: block;
        object-fit: cover;
        object-position: center;

        transition: transform 0.35s ease;
    }

    .mobile-menu-promotion-card__title {
        display: block;
        margin-top: 10px;

        color: #040D1A;
        font-family: var(--font-body);
        font-size: 12px;
        font-weight: 300;
        line-height: 1.2;
        letter-spacing: 0.2px;
        text-transform: uppercase;
    }

    .mobile-menu-promotion-card:active
    .mobile-menu-promotion-card__image {
        transform: scale(1.025);
    }
}

@media (max-width: 380px) {
    .mobile-menu-promotions {
        gap: 12px;
        padding-right: 16px;
        padding-bottom: 24px;
        padding-left: 16px;
    }

    .mobile-menu-promotions--count-1 {
        grid-template-columns:
            minmax(0, calc((100% - 12px) / 2));
    }

    .mobile-menu-promotion-card__title {
        font-size: 11px;
    }
}


/* =========================================================
   DESKTOP TRANSPARENT HEADER
========================================================= */

@media (min-width: 869px) {
    .site-header.is-transparent {
        position: fixed;
        left: 0;
        right: 0;
        top: var(--topbar-height);
        background: transparent;
    }

    .site-header.is-transparent.is-scrolled {
        top: 0;
    }

    .site-header.is-transparent .header-menu > li > a,
    .site-header.is-transparent .header-icon-button {
        color: #ffffff;
    }

    .site-header.is-transparent .header-logo img {
        filter: brightness(0) invert(1);
    }

    .site-header.is-transparent:not(.is-scrolled):not(.mega-open):not(:hover) .header-cart-count {
        background: #ffffff;
        color: #040D1A;
    }

    .site-header.is-transparent:hover,
    .site-header.is-transparent.mega-open,
    .site-header.is-transparent.is-scrolled {
        background: var(--color-cream);
        border-bottom-color: var(--color-border);
    }

    .site-header.is-transparent:hover .header-menu > li > a,
    .site-header.is-transparent:hover .header-icon-button,
    .site-header.is-transparent.mega-open .header-menu > li > a,
    .site-header.is-transparent.mega-open .header-icon-button,
    .site-header.is-transparent.is-scrolled .header-menu > li > a,
    .site-header.is-transparent.is-scrolled .header-icon-button {
        color: #000000;
    }

    .site-header.is-transparent:hover .header-logo img,
    .site-header.is-transparent.mega-open .header-logo img,
    .site-header.is-transparent.is-scrolled .header-logo img {
        filter: none;
    }

    .site-header.is-transparent .header-menu > li.has-mega-menu > .sub-menu a {
        color: #040D1A;
    }
}

/* =========================================================
   TABLET / MOBILE HEADER LAYOUT
========================================================= */

@media (max-width: 868px) {
    .site-header {
        position: sticky;
        top: 0;
        height: 64px;
        background: var(--color-cream);
        border-bottom-color: transparent;
    }

    .header-inner {
        grid-template-columns: 1fr auto 1fr;
        padding: 0 20px;
    }

    .header-nav {
        display: none;
    }

    .header-left {
        display: flex;
        align-items: center;
        justify-self: start;
        gap: 18px;
    }

    .header-logo {
        width: 112px;
    }

    .header-actions {
        gap: 18px;
    }

    .header-search-desktop {
        display: none;
    }

    .header-burger {
        position: relative;
        width: 24px;
        height: 24px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .header-burger span {
        position: absolute;
        left: 2px;
        width: 20px;
        height: 1px;
        background: currentColor;
        transition: transform 0.25s ease, opacity 0.25s ease;
    }

    .header-burger span:nth-child(1) {
        transform: translateY(-7px);
    }

    .header-burger span:nth-child(2) {
        transform: translateY(0);
    }

    .header-burger span:nth-child(3) {
        transform: translateY(7px);
    }

    .header-icon {
        width: 20px;
        height: 20px;
    }

    .header-cart-count {
        top: -7px;
        right: -8px;
    }
}

@media (max-width: 767px) {
    .topbar {
        padding: 0 12px;
    }

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

    .header-logo {
        width: 106px;
    }
}


/* =========================================================
   MOBILE TRANSPARENT HEADER
========================================================= */

@media (max-width: 868px) {

    body:not(.search-open) .site-header.is-transparent,
    body:not(.search-open) .site-header.is-product-mobile-transparent {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;

        background: transparent;
        border-bottom-color: transparent;
    }

    body:not(.search-open)
    .site-header.is-transparent.has-topbar:not(.is-scrolled),
    body:not(.search-open)
    .site-header.is-product-mobile-transparent.has-topbar:not(.is-scrolled) {
        top: var(--topbar-height);
    }

    /* =====================================================
       ГОЛОВНА — БІЛІ ЕЛЕМЕНТИ
    ===================================================== */

    body:not(.search-open)
    .site-header.is-transparent:not(.is-scrolled)
    .header-icon-button {
        color: #ffffff;
    }

    body:not(.search-open)
    .site-header.is-transparent:not(.is-scrolled)
    .header-logo img {
        filter: brightness(0) invert(1);
    }

    body:not(.search-open)
    .site-header.is-transparent:not(.is-scrolled)
    .header-cart-count {
        background: #ffffff;
        color: #040D1A;
    }

    /* =====================================================
       КАРТКА ТОВАРУ — ТЕМНІ ЕЛЕМЕНТИ
    ===================================================== */

    body:not(.search-open)
    .site-header.is-product-mobile-transparent:not(.is-scrolled)
    .header-icon-button {
        color: #040D1A;
    }

    body:not(.search-open)
    .site-header.is-product-mobile-transparent:not(.is-scrolled)
    .header-logo img {
        filter: none;
    }

    body:not(.search-open)
    .site-header.is-product-mobile-transparent:not(.is-scrolled)
    .header-cart-count {
        background: #040D1A;
        color: #ffffff;
    }

    /* =====================================================
       ПІСЛЯ ПРОКРУЧУВАННЯ
    ===================================================== */

    body:not(.search-open)
    .site-header.is-transparent.is-scrolled,
    body:not(.search-open)
    .site-header.is-product-mobile-transparent.is-scrolled {
        top: 0;
        background: var(--color-cream);
    }

    body:not(.search-open)
    .site-header.is-transparent.is-scrolled
    .header-icon-button,
    body:not(.search-open)
    .site-header.is-product-mobile-transparent.is-scrolled
    .header-icon-button {
        color: #040D1A;
    }

    body:not(.search-open)
    .site-header.is-transparent.is-scrolled
    .header-logo img,
    body:not(.search-open)
    .site-header.is-product-mobile-transparent.is-scrolled
    .header-logo img {
        filter: none;
    }

    body:not(.search-open)
    .site-header.is-transparent.is-scrolled
    .header-cart-count,
    body:not(.search-open)
    .site-header.is-product-mobile-transparent.is-scrolled
    .header-cart-count {
        background: #040D1A;
        color: #ffffff;
    }
}

/* =========================================================
   MOBILE MENU
========================================================= */

.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 10000;

    background: rgba(0, 0, 0, 0.28);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity 0.28s ease,
        visibility 0s linear 0.4s;
}

.mobile-menu.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;

    transition:
        opacity 0.28s ease,
        visibility 0s linear 0s;
}

.mobile-menu-panel {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;

    z-index: 10001;

    width: min(430px, 100%);
    max-width: 100%;
    height: auto;

    overflow-x: hidden;
    overflow-y: auto;

    background: var(--color-cream);
    color: #000000;

    transform: translate3d(-100%, 0, 0);

    transition:
        transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);

    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.mobile-menu.is-active .mobile-menu-panel {
    transform: translate3d(0, 0, 0);
}

body.menu-open {
    overflow: hidden;
}

.mobile-menu-head {
    position: sticky;
    top: 0;
    z-index: 2;
    height: 64px;
    display: grid;
    grid-template-columns: 28px 28px 1fr 28px 28px;
    align-items: center;
    gap: 16px;
    padding: 0 18px;
    background: var(--color-cream);
}

.mobile-menu-close {
    position: relative;
    width: 28px;
    height: 28px;
}

.mobile-menu-close span {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 22px;
    height: 1px;
    background: currentColor;
    transform-origin: center;
}

.mobile-menu-close span:first-child {
    transform: translate(-50%, -50%) rotate(45deg);
}

.mobile-menu-close span:last-child {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.mobile-menu-logo {
    width: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    justify-self: center;
    text-decoration: none;
}

.mobile-menu-logo img {
    width: 100%;
    height: auto;
    display: block;
}

.mobile-menu-nav {
    padding: 22px 18px 0;
    background: var(--color-cream);
}

.mobile-menu-list,
.mobile-menu-list ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.mobile-menu-list li {
    position: relative;
}

.mobile-menu-list > li {
    border-bottom: 1px solid var(--color-border);
}

.mobile-menu-list a {
    min-height: 46px;
    display: flex;
    align-items: center;
    padding-right: 52px;
    color: #000000;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 300;
    line-height: 1.25;
    text-transform: uppercase;
    text-decoration: none;
}

.mobile-menu-list .sub-menu {
    display: none;
    padding: 0 0 14px 14px;
}

.mobile-menu-list .menu-item-has-children.is-open > .sub-menu {
    display: block;
}

.mobile-menu-list > li > .sub-menu {
    padding-left: 0;
}

.mobile-menu-list > li > .sub-menu > li > a {
	min-height: 34px;
    color: #040D1A;
    font-size: 14px;
    font-weight: 300;
    text-transform: none;
    padding: 10px;
}

.mobile-menu-list > li > .sub-menu > li > .sub-menu {
    padding-left: 14px;
    padding-bottom: 12px;
}

.mobile-menu-list > li > .sub-menu > li > .sub-menu a {
	min-height: 32px;
    font-size: 14px;
    font-weight: 300;
    text-transform: none;
    margin-bottom: 2px;
}

/* =========================================================
   MOBILE MENU — TOPBAR OFFSET
========================================================= */

@media (max-width: 868px) {
    body.menu-below-topbar .mobile-menu {
        top: var(
            --mobile-menu-top-offset,
            var(--topbar-height)
        );
    }
}


/* =========================================================
   MOBILE SUBMENU CHEVRON
========================================================= */

.mobile-menu-list
.menu-item-has-children
> a {
    position: relative;
    width: 100%;
    min-height: 46px;
    padding-right: 52px;
    box-sizing: border-box;
    cursor: pointer;
    user-select: none;
}

.mobile-menu-list
.menu-item-has-children
> a::after {
    content: "";

    position: absolute;
    top: 50%;
    right: 5px;

    width: 7px;
    height: 7px;

    border-right: 1px solid #040D1A;
    border-bottom: 1px solid #040D1A;

    transform:
        translateY(-70%)
        rotate(45deg);

    transform-origin: center;

    transition:
        transform 0.22s ease;

    pointer-events: none;
}

.mobile-menu-list
.menu-item-has-children.is-open
> a::after {
    transform:
        translateY(-30%)
        rotate(-135deg);
}

.mobile-menu-list
.mobile-submenu-toggle {
    display: none !important;
}

.mobile-menu-extra {
	padding: 12px 18px;
    background: var(--color-cream);
}

.mobile-menu-extra a {
    color: #000000;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 300;
    text-decoration: none;
}

@media (max-width: 767px) {
    .mobile-menu-panel {
        width: 100vw;
    }
}


/* =========================================================
   HEADER — TABLET DESKTOP MENU
   869px — 1199px
========================================================= */

@media (min-width: 869px) and (max-width: 1199px) {
    .site-header {
        height: 80px;
    }

    .site-header .header-inner {
        display: grid;
        align-items: center;
        column-gap: 16px;
        width: 100%;
        height: 100%;

        padding: 0 28px;
        box-sizing: border-box;
    }

    .site-header .header-nav {
        display: block;
        width: 100%;
        min-width: 0;
        height: 100%;
    }

    .site-header .header-menu {
        display: flex;
        flex-flow: row nowrap;
        align-items: center;

        width: 100%;
        height: 100%;

        gap: clamp(8px, 1.1vw, 14px);
    }

    .site-header .header-menu > li {
        flex: 0 0 auto;
        height: 100%;
    }

    .site-header .header-menu > li > a {
        height: 100%;

        font-size: 10px;
        line-height: 1;
        letter-spacing: 0;

        white-space: nowrap;
    }

    .site-header .header-left {
        display: none;
    }

    .site-header .header-logo {
        width: 92px;
        min-width: 92px;
    }

    .site-header .header-logo img {
        width: 100%;
        max-height: 36px;
    }

    .site-header .header-actions {
        display: flex;
        gap: 6px;

        min-width: max-content;
    }

    .site-header .header-icon-button {
        width: 31px;
        height: 31px;
        flex: 0 0 31px;
    }

    .site-header .header-icon {
        width: 19px;
        height: 19px;
    }
}


/* =========================================================
   SEARCH DROPDOWN
========================================================= */

.search-modal {
    position: fixed;
    left: 0;
    right: 0;
    top: var(--header-height, 72px);
    z-index: 11000;
    background: #f7f4f0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px);
    transition:
        opacity 0.32s ease,
        visibility 0.32s ease,
        transform 0.32s ease;
}

.search-modal.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.search-modal-inner {
    position: relative;
    width: 100%;
    margin: 0;
    padding: 60px 56px 0;
    background: #f7f4f0;
    box-sizing: border-box;
}

.search-modal-close {
    display: none !important;
}

.search-modal-form {
    position: relative;
    width: min(912px, 100%);
    height: 50px;
    margin: 0 auto;
}

.search-modal-form input[type="search"] {
    width: 100%;
    height: 50px;
    padding: 0 70px 0 18px;
    border: 1px solid transparent;
    border-radius: 0;
    background: #f1eee8;
    color: #040D1A;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 400;
    outline: none;
    box-shadow: none;
    appearance: none;
    -webkit-appearance: none;
    text-transform: uppercase;
    letter-spacing: 0.18px;
    box-sizing: border-box;
}

.search-modal-form input[type="search"]::placeholder {
    color: #6a6259;
    opacity: 1;
}

.search-modal-form input[type="search"]:focus {
    border-color: #040D1A;
}

/* Прибираємо стандартний хрестик у полі пошуку */

.search-modal-form input[type="search"]::-webkit-search-cancel-button,
.search-modal-form input[type="search"]::-webkit-search-decoration,
.search-modal-form input[type="search"]::-webkit-search-results-button,
.search-modal-form input[type="search"]::-webkit-search-results-decoration {
    display: none;
    appearance: none;
    -webkit-appearance: none;
}

.search-modal-form input[type="search"]::-ms-clear,
.search-modal-form input[type="search"]::-ms-reveal {
    display: none;
    width: 0;
    height: 0;
}

.search-modal-form button[type="submit"] {
    position: absolute;
    top: 50%;
    right: 18px;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #040D1A;
    transform: translateY(-50%);
    cursor: pointer;
}

.search-modal-results {
    width: 100%;
    max-height: calc(100vh - 210px);
    margin-top: 30px;
    padding: 0 0 30px;
    overflow-y: auto;
    background: #f8f5ef;
    box-sizing: border-box;
}

.search-results-layout {
    max-width: 1680px;
    display: grid;
    grid-template-columns: 165px minmax(0, 1fr);
    align-items: start;
    gap: 45px;
    margin: 0 auto;
}

.search-results-collections {
    min-height: 565px;
    padding: 6px 36px 0 8px;
    border-right: 1px solid #e3ded7;
}

.search-results-collections-title {
    margin: 0 0 18px;
    color: #8b847c;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 400;
    line-height: 1;
    letter-spacing: 0.18px;
    text-transform: uppercase;
}

.search-results-collections-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.search-results-collections-list li {
    margin-bottom: 10px;
}

.search-results-collections-list a {
    color: #000000;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 300;
    line-height: 1.35;
    text-decoration: none;
}

.search-results-collections-list a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.search-see-all {
    display: inline-block;
    margin: 0 0 17px;
    color: #666666;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 300;
    line-height: 1.3;
    letter-spacing: 0.24px;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* =========================================================
   SEARCH RESULTS — HORIZONTAL SLIDER
========================================================= */

.search-results-main {
    width: 100%;
    min-width: 0;
    overflow: hidden;
}

.search-results-grid {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;

    width: 100%;
    min-width: 0;

    margin: 0;
    padding: 0 0 20px;

    gap: 1px;

    overflow-x: auto;
    overflow-y: hidden;

    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    overscroll-behavior-x: contain;

    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;

    touch-action: pan-x pan-y;
}

.search-results-grid::-webkit-scrollbar {
    display: none;
}

.search-result-card-shell {
    flex: 0 0 calc((100% - 4px) / 5);

    width: calc((100% - 4px) / 5);
    min-width: 220px;

    scroll-snap-align: start;
    scroll-snap-stop: always;

    background: var(--color-background);
}

.search-result-card {
    display: block;
    width: 100%;

    color: #000000;
    text-decoration: none;
}

.search-result-image {
    position: relative;

    width: 100%;
    height: auto;
    aspect-ratio: 223 / 312;

    overflow: hidden;
    background: #e9e5df;
}

.search-result-image img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center;
}

.search-result-card h3 {
    margin: 10px;
    color: #000000;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 300;
    line-height: 1.25;
}

.search-result-price {
    padding: 0 10px;
    color: #666666;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 300;
    line-height: 1.35;
}

.search-result-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 12px 10px 0;
}

.search-result-swatch {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    display: block;
    overflow: hidden;
    border: 1px solid transparent;
    border-radius: 0;
    background-color: #e9e5df;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    box-sizing: border-box;
    transition:
        border-color 0.2s ease,
        opacity 0.2s ease;
}

.search-result-swatch:hover {
    border-color: rgba(4, 13, 26, 0.5);
}

.search-result-swatch.is-active {
    border-color: #040D1A;
}

.search-no-results {
    margin: 0;
    padding: 0;
    font-size: 18px;
    font-style: italic;
    font-weight: 300;
}

/* =========================================================
   SEARCH OPEN STATE
========================================================= */

body.search-open {
    overflow: auto;
}

body.search-open [data-search-open] {
    position: relative;
    z-index: 11040;
    pointer-events: auto;
}

body.search-open .site-header {
    z-index: 11030;
    background: #f7f4f0;
}

body.search-open .site-header.is-transparent,
body.search-open .site-header.is-product-mobile-transparent {
    top: 0;
    background: #f8f5ef;
}

body.search-open .site-header .header-menu > li > a,
body.search-open .site-header .header-icon-button {
    color: #040D1A;
}

body.search-open .site-header .header-logo img {
    filter: none;
}

body.search-open .site-header .header-cart-count {
    background: #040D1A;
    color: #ffffff;
}

body.search-open .header-search-desktop .header-icon-search,
body.search-open .header-search-mobile .header-icon-search {
    position: relative;
    width: 22px;
    height: 22px;
    background: transparent !important;
    -webkit-mask-image: none !important;
    mask-image: none !important;
}

body.search-open .header-search-desktop .header-icon-search::before,
body.search-open .header-search-desktop .header-icon-search::after,
body.search-open .header-search-mobile .header-icon-search::before,
body.search-open .header-search-mobile .header-icon-search::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 22px;
    height: 1px;
    background: currentColor;
    transform-origin: center;
}

body.search-open .header-search-desktop .header-icon-search::before,
body.search-open .header-search-mobile .header-icon-search::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

body.search-open .header-search-desktop .header-icon-search::after,
body.search-open .header-search-mobile .header-icon-search::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}


/* =========================================================
   SEARCH — TABLET AND MOBILE SLIDER
========================================================= */
@media (min-width: 1200px) {
    .search-results-grid {
        cursor: grab;
    }

    .search-results-grid.is-dragging {
        cursor: grabbing;
        scroll-behavior: auto;
        user-select: none;
    }

    .search-results-grid.is-dragging * {
        user-select: none;
        pointer-events: none;
    }
}


@media (max-width: 1199px) {
    .search-modal-inner {
        padding: 44px 24px 0;
    }

    .search-modal-results {
        overflow-x: hidden;
    }

    .search-results-layout {
        display: grid;
        grid-template-columns: 1fr;
        gap: 24px;

        width: 100%;
        min-width: 0;
    }

    .search-results-collections {
        min-height: 0;

        padding: 0 0 18px;

        border-right: 0;
        border-bottom: 1px solid #e3ded7;
    }

    .search-results-main {
        width: 100%;
        min-width: 0;
        overflow: hidden;
    }

    .search-results-grid {
        display: flex;
        flex-wrap: nowrap;
        align-items: flex-start;

        grid-template-columns: none;

        gap: 1px;

        width: 100%;
        min-width: 0;

        margin: 0;
        padding: 0 0 18px;

        overflow-x: auto;
        overflow-y: hidden;

        scroll-snap-type: x mandatory;
        scroll-padding-left: 0;
        scroll-behavior: smooth;

        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;

        scrollbar-width: none;

        touch-action: pan-x pan-y;
    }

    .search-results-grid::-webkit-scrollbar {
        display: none;
    }

    .search-result-card-shell {
        flex: 0 0 clamp(190px, 24vw, 230px);

        width: auto;
        min-width: 0;

        scroll-snap-align: start;
        scroll-snap-stop: always;

        background: var(--color-background);
    }

    .search-result-card {
        display: block;
        width: 100%;
    }

    .search-result-image {
        width: 100%;
        height: auto;

        aspect-ratio: 223 / 312;

        overflow: hidden;
    }

    .search-result-image img {
        width: 100%;
        height: 100%;

        object-fit: cover;
    }
}


/* =========================================================
   SEARCH — MOBILE
========================================================= */

@media (max-width: 767px) {
    .search-modal {
        top: 64px;
        bottom: 0;

        width: 100%;
        height: auto;

        overflow: hidden;
        background: #f7f4f0;
    }

    .search-modal-inner {
        display: flex;
        flex-direction: column;

        width: 100%;
        height: 100%;
        min-height: 0;

        padding: 40px 18px 0;

        overflow: hidden;
        background: #f7f4f0;
    }

    .search-modal-form {
        flex: 0 0 auto;

        width: 100%;
        height: 50px;
    }

    .search-modal-form input[type="search"] {
        height: 50px;
        padding: 0 54px 0 14px;
        font-size: 16px;
    }

    .search-modal-results {
        flex: 1 1 auto;

        width: 100%;
        min-height: 0;
        max-height: none;

        margin-top: 16px;
        padding-bottom:
            max(30px, env(safe-area-inset-bottom));

        overflow-x: hidden;
        overflow-y: auto;

        background: #f7f4f0;
        box-sizing: border-box;
    }

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

    .search-results-layout {
        gap: 20px;
    }

    .search-results-collections {
        padding-bottom: 16px;
    }

    .search-see-all {
        margin-bottom: 16px;
    }

    .search-results-grid {
        width: calc(100% + 18px);
        gap: 1px;

        padding-right: 18px;
        padding-bottom: 18px;
    }

    .search-result-card-shell {
        flex: 0 0 44vw;

        width: 44vw;
        min-width: 145px;
        max-width: 190px;
    }

    .search-result-card h3 {
        margin: 12px 10px 4px;
        font-size: 14px;
        line-height: 1.25;
    }

    .search-result-price {
        padding: 0 10px;
        font-size: 14px;
    }

    .search-result-swatches {
        flex-wrap: nowrap;

        gap: 6px;
        margin: 10px 10px 0;

        overflow-x: auto;
        scrollbar-width: none;
    }

    .search-result-swatches::-webkit-scrollbar {
        display: none;
    }

    .search-result-swatch {
        width: 16px;
        height: 16px;
        flex: 0 0 16px;
    }
}


/* =========================================================
   CHECKOUT — STICKY MINIMAL HEADER
========================================================= */

.checkout-minimal-header {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 9999;
    width: 100%;
    background: var(--color-background);
    box-sizing: border-box;
}

.checkout-minimal-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;

    width: min(1060px, calc(100% - 64px));
    max-width: 1060px;
    min-height: 80px;

    margin: 0 auto;

    box-sizing: border-box;
}


/* =========================================================
   CHECKOUT HEADER — LOGO
========================================================= */

.checkout-minimal-header__logo {
    display: inline-flex;
    align-items: center;

    margin: 0;
    padding: 0;

    line-height: 0;
    text-decoration: none;
}

.checkout-minimal-header__logo img {
    display: block;

    width: auto;
    max-width: 142px;
    height: auto;
    max-height: 60px;

    margin: 0;
}


/* =========================================================
   CHECKOUT HEADER — CART LINK
========================================================= */

.checkout-minimal-header__cart {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;
    flex: 0 0 42px;

    margin: 0;
    padding: 0;

    border: 0;
    background: transparent;
    color: #040D1A;

    text-decoration: none;

    transition: opacity 0.2s ease;
}

.checkout-minimal-header__cart
.header-icon {
    display: block;

    width: 24px;
    height: 24px;
}

.checkout-minimal-header__cart:hover,
.checkout-minimal-header__cart:focus-visible {
    color: #040D1A;
    opacity: 0.55;
}

.checkout-minimal-header__cart:focus-visible {
    outline: 1px solid #040D1A;
    outline-offset: 2px;
}


/* =========================================================
   CHECKOUT HEADER — TABLET
========================================================= */

@media (max-width: 1199px) {
    .checkout-minimal-header__inner {
        width: 100%;
        max-width: 100%;
        padding: 0 32px;
    }
}


/* =========================================================
   CHECKOUT HEADER — MOBILE
========================================================= */

@media (max-width: 767px) {
    .checkout-minimal-header__inner {
        min-height: 64px;
        padding: 0 24px;
    }

    .checkout-minimal-header__logo img {
        max-width: 108px;
        max-height: 46px;
    }

    .checkout-minimal-header__cart {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
    }

    .checkout-minimal-header__cart
    .header-icon {
        width: 22px;
        height: 22px;
    }
}