/* ============================================================
   KERAMO PROJECT
   Типографика и палитра сняты с сайта-образца:
   геометрический гротеск, тонкие заголовки, зелёный акцент.
   ============================================================ */

:root {
    --bg:        #ffffff;
    --bg-soft:   #eaeaea;
    --bg-dark:   #1c1c1c;
    /* фон тёмного баннера — на 10% светлее основного чёрного */
    --promo-dark: #333333;
    --hero-dark: #3a3a3a;
    --ink:       #1d1d1d;
    --ink-2:     #3c3c3c;
    --muted:     #949494;
    --line:      #e6e4e1;
    --accent:    #87a386;   /* зелёный: кнопки, активное меню, значок цены */
    --accent-dk: #6d8a6c;
    --rose:      #e2aab2;   /* розовый: выделение в заголовках */

    --font: 'Jost', 'Noto Sans Georgian', 'Segoe UI', sans-serif;
    --container: 1100px;
    --gutter: 30px;
    --header-h: 100px;
    --ease: cubic-bezier(.35, .1, .2, 1);
}

.lang-ka { --font: 'Noto Sans Georgian', 'Jost', 'Segoe UI', sans-serif; }

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--muted);
    font-family: var(--font);
    font-size: 16px;
    font-weight: 300;
    line-height: 1.64;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
p { margin: 0 0 1.2em; }
h1, h2, h3 { margin: 0; font-weight: 100; line-height: 1.1; color: var(--ink); letter-spacing: -0.01em; }
.rich p:last-child { margin-bottom: 0; }
.icon { flex: none; }

.container { width: min(var(--container), 100% - var(--gutter) * 2); margin-inline: auto; }
.empty { text-align: center; padding: 4rem 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ==================================================================
   АНИМАЦИИ ПОЯВЛЕНИЯ
   Одна кривая на всё — cubic-bezier(.16, 1, .3, 1), режим both.
   ================================================================== */

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-40px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(40px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes scaleIn {
    from { opacity: 0; transform: scale(.9); }
    to   { opacity: 1; transform: scale(1); }
}
@keyframes wordReveal {
    from { opacity: 0; transform: translateY(100%); filter: blur(4px); }
    to   { opacity: 1; transform: translateY(0); filter: blur(0); }
}

:root { --reveal: cubic-bezier(.16, 1, .3, 1); }

/* --- шапка: появляется один раз при загрузке --- */
.header { animation: fadeIn .7s var(--reveal) both; }
.header .logo { animation: slideInLeft .8s var(--reveal) both .2s; }
.header .nav__list { animation: fadeIn .7s var(--reveal) both .4s; }
.header .nav__meta { animation: slideInRight .8s var(--reveal) both .3s; }

/* ------------------------------------------------------------- кнопки */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .6em;
    padding: 1.55em 2.3em;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 2.4px;
    text-transform: uppercase;
    border: 1px solid transparent;
    transition: background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
}
.btn--dark { background: var(--bg-dark); color: #fff; }
.btn--dark:hover { background: var(--accent-dk); }
.btn--green { background: var(--accent); color: #fff; }
.btn--green:hover { background: var(--accent-dk); }
.btn--black { background: #232323; color: #fff; }
.btn--black:hover { background: var(--accent); }
.btn--ghost { border-color: var(--ink); color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; }
.btn--wide { width: 100%; }

/* текстовая кнопка со стрелкой — как на сайте-образце */
.btn--link { padding: 0; color: var(--accent); gap: .7em; }
.btn--link:hover { color: var(--accent-dk); gap: 1.1em; }

/* -------------------------------------------------------------- шапка */

.header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: var(--bg);
}
/*
   На главной шапка лежит поверх слайдера.

   Подложка под текстом рисуется ТОЛЬКО до 960px — на телефоне и планшете
   шапка приходится на тёмную часть снимка, без подложки меню не читается.
   На десктопе подложки нет вообще: ::before там не создаётся, поэтому
   ни светлого пятна, ни размытия под шапкой быть не может.
*/
.header--overlay {
    position: absolute;
    inset: 0 0 auto 0;
    background: transparent;
}
@media (max-width: 960px) {
    .header--overlay::before {
        content: '';
        position: absolute;
        inset: 0;
        pointer-events: none;
        background: linear-gradient(180deg, rgba(24, 22, 20, .55) 0%, rgba(24, 22, 20, 0) 100%);
        -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 55%, transparent 100%);
        mask-image: linear-gradient(180deg, #000 0%, #000 55%, transparent 100%);
    }
}
.header--overlay .header__inner { position: relative; z-index: 1; }

/*
   Десктоп: пункты «Магазин» и «Индивидуальный заказ» скрыты,
   в мобильном меню (до 960px) они остаются как были.
*/
@media (min-width: 961px) {
    .nav__item--mobile { display: none; }

    /*
       Подложки нет: меню, соцсети, корзина и языки лежат на фотографии —
       делаем их белыми. Логотип остаётся тёмным: он стоит на светлой
       половине слайда, белым его было бы не видно.
    */
    .header--overlay .nav { color: #fff; }
}

.header__inner {
    width: min(1400px, 100% - var(--gutter) * 2);
    margin-inline: auto;
    min-height: var(--header-h);
    display: flex;
    align-items: center;
    gap: 2rem;
}

.logo { display: grid; gap: .4rem; margin-right: auto; color: var(--ink); }
/* высота задана явно: .logo — грид, и картинке без ширины в атрибутах
   (обычный экспорт SVG) иначе достаётся нулевая ширина */
.logo img { height: 54px; width: auto; max-width: 100%; display: block; justify-self: start; }
.logo__name {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 27px;
    font-weight: 600;
    letter-spacing: .02em;
    text-transform: uppercase;
    line-height: 1;
    color: inherit;
}
.logo__tagline {
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 4.4px;
    text-transform: uppercase;
    opacity: .85;
}

.nav { display: flex; align-items: center; gap: 2.6rem; }
.nav__list { display: flex; align-items: center; gap: 2.2rem; list-style: none; margin: 0; padding: 0; }
.nav__link {
    position: relative;
    display: block;
    padding: .5rem 0;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: inherit;
    white-space: nowrap;
    transition: color .3s var(--ease);
}
/* подчёркивание выезжает слева направо */
.nav__link::after {
    content: '';
    position: absolute;
    left: 0;
    right: 100%;
    bottom: .15rem;
    height: 1px;
    background: currentColor;
    transition: right .4s var(--ease);
}
.nav__link:hover { color: var(--accent); }
.nav__link:hover::after { right: 0; }
.nav__link.is-active { color: var(--accent); }
.nav__link.is-active::after { right: 0; }

.nav__meta { display: flex; align-items: center; gap: 1.6rem; }
.socials { display: flex; align-items: center; gap: 1.1rem; }
.socials a { opacity: .8; transition: opacity .3s var(--ease), color .3s var(--ease); }
.socials a:hover { opacity: 1; color: var(--accent); }
.socials__soon { display: inline-flex; opacity: .45; cursor: default; }

.langs { display: flex; align-items: center; gap: .45rem; font-size: 11px; letter-spacing: 1.4px; }
.langs__item { opacity: .5; }
.langs__item.is-active, .langs__item:hover { opacity: 1; }

.nav-toggle, .nav__close { display: none; }

/* Instagram, WhatsApp и языки прямо в шапке — только для телефона, на всех страницах */
.header-quick { display: none; }
@media (max-width: 960px) {
    .header-quick { display: flex; align-items: center; gap: .9rem; flex: none; }
    .header-quick .socials { gap: .9rem; }
    .header-quick .socials a, .header-quick .socials__soon { display: inline-flex; opacity: 1; }
    .header-quick .langs { gap: .4rem; font-size: 11px; }

    /* места в шапке меньше — поля уже, а логотип уменьшается без сплющивания */
    .header__inner:has(.header-quick) { width: calc(100% - 32px); gap: .8rem; }
    .header__inner:has(.header-quick) .logo { flex: 1 1 auto; min-width: 0; }
    .header__inner:has(.header-quick) .logo img { width: 100%; height: auto; max-height: 54px; object-fit: contain; object-position: left center; }
    .header__inner:has(.header-quick) .cart-link { margin-left: 0; }
}
.nav-backdrop { position: fixed; inset: 0; background: rgba(20,20,20,.45); z-index: 70; }
/* Меню живёт внутри шапки (z-index 60), и затемнение (70) ложилось поверх
   него — ни одна кнопка меню не нажималась. Пока меню открыто, шапка выше затемнения. */
.nav-opened .header { z-index: 90; }

/* ---------------------------------------------------------- слайдер */

.hero { position: relative; overflow: hidden; }
.hero__stage { position: relative; height: 100vh; min-height: 720px; container-type: inline-size; }

.hero__slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    background: var(--slide-bg, #ebebeb);
    opacity: 0;
    visibility: hidden;
    /* уходящий слайд гаснет чуть дольше, чем появляется новый:
       так переход мягче и между слайдами нет провала в пустоту */
    transition: opacity 1.6s var(--ease), visibility 1.6s;
}
/*
   Слайды сменяются плавным перетеканием: новый проявляется поверх
   старого, пока тот ещё виден.
*/
.hero__slide.is-active {
    opacity: 1;
    visibility: visible;
    transition: opacity 1.2s var(--ease), visibility 0s;
    z-index: 2;
}

/* экран делится пополам: слева текст, справа фотография */
.hero__slide {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
}

.hero__half { display: flex; align-items: center; height: 100%; padding-top: var(--header-h); }

/* текст выравнивается по левому краю контейнера — как логотип в шапке */
/* 100cqw — ширина слайдера без полосы прокрутки, поэтому текст
   встаёт ровно по левому краю контейнера, как на остальных блоках */
.hero__half--text {
    padding-left: max(var(--gutter), calc((100cqw - var(--container)) / 2));
    padding-right: clamp(1.5rem, 3vw, 3rem);
}
.hero__text { width: 100%; }

/* правая половина — фотография во всю площадь, без полей */
.hero__half--media {
    position: relative;
    padding: 0;
    overflow: hidden;
    border-left: 1px solid rgba(29, 29, 29, .1);
}

.hero__title {
    font-size: clamp(2.6rem, 4.8vw, 4rem);
    font-weight: 200;
    line-height: 1.14;
    letter-spacing: -0.005em;
    color: var(--ink);
    margin-bottom: 2.6rem;
}
.hero__title .accent { color: var(--accent-dk); }

/* заголовок разбит на слова: каждое выезжает снизу из-под маски */
.hero__title .line { display: block; }
.hero__title .word {
    display: inline-block;
    overflow: hidden;
    vertical-align: bottom;
    padding-bottom: .14em;
    margin-bottom: -.14em;
}
.hero__title .word > span { display: inline-block; }

/* анимации запускаются заново каждый раз, когда слайд становится активным */
.hero__slide.is-active .hero__title .word > span {
    animation: wordReveal .7s var(--reveal) both;
    animation-delay: calc(.3s + var(--i) * .1s);
}
/* подпись и кнопка — один блок, всплывают вместе на 0.6s */
.hero__slide.is-active .hero__subtitle,
.hero__slide.is-active .hero__text .btn { animation: fadeUp .8s var(--reveal) both .6s; }

/* фотография товара — 0.7s на десктопе, 0.8s на мобильном */
.hero__slide.is-active .hero__media { animation: scaleIn 1s var(--reveal) both .7s; }
.hero__slide.is-active .price-badge { animation: scaleIn 1s var(--reveal) both 1s; }

/* стрелки и полоски слайдера */
.hero__arrows { animation: fadeIn .7s var(--reveal) both .9s; }
.hero__dots { animation: fadeIn .7s var(--reveal) both 1s; }

/* --- появление блоков при прокрутке --- */
.js [data-reveal] { opacity: 0; }
.js [data-reveal].is-revealed {
    animation: fadeUp .8s var(--reveal) both;
    animation-delay: var(--d, 0s);
}

.hero__subtitle {
    font-size: 1.22rem;
    font-weight: 300;
    line-height: 1.5;
    max-width: 24ch;
    margin-bottom: 3.2rem;
}

/* Фотография заполняет правую половину целиком — от края до края. */
.hero__media {
    position: relative;
    flex: none;
    width: 100%;
    height: 100%;
}
.hero__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;        /* кадр заполняется, лишнее обрезается по краям */
    object-position: center;
    display: block;
}

/* цена в зелёном круге поверх фотографии */
.price-badge {
    position: absolute;
    left: 69%;
    top: 12%;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: .12em;
    font-weight: 300;
}
.price-badge__cur { font-style: normal; font-size: 17px; }
.price-badge__num { font-size: 38px; font-weight: 300; line-height: 1; }
.price-badge__cents { font-style: normal; font-size: 15px; }

/* PREV / NEXT вертикально у левого края, между ними стрелки */
.hero__arrows {
    position: absolute;
    left: max(.9rem, calc((100vw - var(--container)) / 2 - 68px));
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .9rem;
    z-index: 3;
}
.hero__arrow {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 2.6px;
    text-transform: uppercase;
    color: var(--ink);
    opacity: .8;
    transition: opacity .3s var(--ease);
}
.hero__arrow:hover { opacity: 1; }

/* тонкая линия со стрелкой на конце */
.hero__tick { position: relative; width: 1px; height: 62px; background: rgba(29,29,29,.35); }
.hero__tick::before {
    content: '';
    position: absolute;
    left: -3px;
    width: 7px;
    height: 7px;
    border-left: 1px solid rgba(29,29,29,.55);
    border-top: 1px solid rgba(29,29,29,.55);
}
.hero__tick--up::before { top: 0; transform: rotate(45deg); }
.hero__tick--down::before { bottom: 0; transform: rotate(-135deg); }

.hero__dots { position: absolute; left: 50%; bottom: 1.6rem; transform: translateX(-50%); display: flex; gap: .45rem; z-index: 3; }
.hero__dot { width: 34px; height: 5px; background: var(--ink); opacity: .18; transition: opacity .3s var(--ease); }
.hero__dot.is-active { opacity: 1; }

/* -------------------------------------------------- инфо-баннеры */

/*
   Два баннера рядом. Правый шире исходных 347 px: его фотография
   показывается целиком, и выключателю нужно больше места по горизонтали.
*/
.banners {
    display: grid;
    grid-template-columns: minmax(0, 600fr) minmax(0, 470fr);
    gap: 30px;
    padding: clamp(2.5rem, 5vw, 4.5rem) 0 0;
}

.promo {
    position: relative;
    display: flex;
    align-items: center;
    height: 232px;
    overflow: hidden;
    background-size: cover;
    background-position: center right;
    background-repeat: no-repeat;
}

/* баннер-ссылка */
a.promo { text-decoration: none; transition: box-shadow .35s ease; }
a.promo:hover { box-shadow: 0 10px 28px rgba(0, 0, 0, .14); }

/* фотография целиком, без обрезки — для баннеров с предметом в кадре */
.promo--contain {
    /* фотография целиком: во всю высоту баннера и вплотную к правому краю */
    background-size: auto 100%;
    background-position: right center;
}
/* фотография прижата вправо, поэтому текст держим в свободной части слева */
.promo--contain .promo__text { max-width: 52%; }
.promo--light { background-color: var(--bg-soft); color: var(--ink); }
.promo--dark  { background-color: var(--promo-dark); color: #fff; }

/* мягкая подложка слева, чтобы текст читался на любой фотографии */
.promo::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, var(--promo-scrim, rgba(234,234,234,.96)) 0%, var(--promo-scrim, rgba(234,234,234,.9)) 34%, transparent 68%);
}
.promo--dark::before { --promo-scrim: rgba(51,51,51,.94); }

.promo__text { position: relative; z-index: 2; padding: 1.6rem clamp(1.4rem, 3vw, 3.2rem); max-width: 62%; }
.promo__title { font-size: clamp(1.35rem, 2vw, 1.9rem); font-weight: 200; line-height: 1.34; color: inherit; }
.promo__title .accent { color: var(--accent-dk); }
.promo--dark .promo__title .accent { color: var(--rose); }

/* ------------------------------------------------------------ секции */

.section { text-align: center; margin-bottom: 3.2rem; }
.section__title { font-size: clamp(1.9rem, 3vw, 3.05rem); font-weight: 100; }
.section__text { margin-top: .9rem; }

.page-head { padding: clamp(3rem, 6vw, 6rem) 0 2.2rem; text-align: center; }
.page-head__title { font-size: clamp(2.2rem, 4.6vw, 3.9rem); font-weight: 100; }
.page-head__text { margin: 1.1rem auto 0; max-width: 58ch; }

.catalog { padding: clamp(3.2rem, 6vw, 6.5rem) 0; }

/* ==================================================================
   ХИТЫ ПРОДАЖ — ЛЕНТА ТОВАРОВ ПОД ГЛАВНЫМ СЛАЙДЕРОМ
   Фон белый, фотографии сняты на светлом, поэтому подложка карточки
   такая же светлая — предмет как будто лежит прямо на странице.
================================================================== */

.top { background: #fff; padding: clamp(3.4rem, 6vw, 6.5rem) 0 clamp(2.6rem, 5vw, 5rem); }
.section--center { text-align: center; }

/* лента шире остальной страницы — предмет в карточке крупнее */
.top .container { width: min(1560px, 100% - var(--gutter) * 2); }

.top__slider { position: relative; }

/*
   Лента прокручивается по-настоящему, и каждая карточка встаёт на место
   сама — за это отвечает scroll-snap. Полосу прокрутки прячем: листают
   стрелками, точками или пальцем.
*/
.top__viewport {
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}
.top__viewport::-webkit-scrollbar { display: none; }

.top__track {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}
.top__item {
    flex: 0 0 33.3333%;
    min-width: 0;
    padding: 0 clamp(.5rem, 1.4vw, 1.1rem);
    scroll-snap-align: start;
}

.top__card { display: grid; text-align: center; }

.top__media {
    display: block;
    aspect-ratio: 1 / 1;
    background: #fff;   /* фон у всех фотографий товаров белый */
    overflow: hidden;
}
.top__media img { width: 100%; height: 100%; object-fit: contain; transition: transform .7s var(--ease); }
.top__card:hover .top__media img { transform: scale(1.12); }

.top__name {
    margin-top: 1.3rem;
    font-size: 1.16rem;
    font-weight: 300;
    color: var(--ink);
    transition: color .3s var(--ease);
}
.top__card:hover .top__name { color: var(--accent); }

.top__meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .8rem;
    margin-top: .5rem;
    font-size: .97rem;
    color: var(--ink-2);
}
/*
   Свободная строчка под ценой. Регистр не трогаем: как заказчик
   написал в товар.txt, так и показываем — заглавными или строчными.
*/
.top__note {
    margin-top: .45rem;
    font-size: .92rem;
    line-height: 1.45;
    color: var(--muted);
    text-transform: none;
}

.top__link {
    margin-top: .9rem;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--muted);
    transition: color .3s var(--ease);
}
.top__card:hover .top__link { color: var(--ink); }

/* стрелки тёмные и крупные — раньше белый кружок на белом фоне терялся */
.top__arrow {
    position: absolute;
    top: calc((100% - 5.4rem) / 2);
    z-index: 2;
    display: grid;
    place-items: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--ink);
    color: #fff;
    box-shadow: 0 6px 22px rgba(0, 0, 0, .22);
    transition: opacity .3s var(--ease), background .3s var(--ease), transform .3s var(--ease);
}
.top__arrow:hover { background: var(--accent); transform: scale(1.08); }
.top__arrow--prev { left: calc(var(--gutter) * -1); }
.top__arrow--next { right: calc(var(--gutter) * -1); }
.top__arrow:disabled { opacity: .22; cursor: default; transform: none; }
.top__slider.is-single .top__arrow,
.top__slider.is-single .top__dots { display: none; }

/* точки-переключатели: полоски вместо еле заметных крапинок */
.top__dots { display: flex; justify-content: center; gap: .6rem; margin-top: 2.6rem; }
.top__dot {
    width: 30px;
    height: 4px;
    padding: 0;
    border-radius: 2px;
    background: #d5d3d0;
    transition: background .3s var(--ease), width .3s var(--ease);
}
.top__dot:hover { background: var(--muted); }
.top__dot.is-active { background: var(--ink); width: 52px; }

/*
   Последняя карточка ленты — переход ко всему каталогу. Раньше вместо
   неё под лентой всплывала мелкая надпись, и её легко было не заметить.
*/
.top__all-card {
    align-content: center;
    text-align: center;
}
.top__all-inner {
    display: grid;
    justify-items: center;
    gap: 1.1rem;
    aspect-ratio: 1 / 1;
    align-content: center;
    background: var(--bg-soft);
    transition: background .4s var(--ease);
}
.top__all-card:hover .top__all-inner { background: var(--line); }

.top__all-text {
    max-width: 12ch;
    font-size: 1.16rem;
    font-weight: 300;
    line-height: 1.3;
    color: var(--ink);
}
.top__all-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--ink);
    color: #fff;
    transition: background .3s var(--ease), transform .3s var(--ease);
}
.top__all-card:hover .top__all-icon { background: var(--accent); transform: translateX(4px); }

/* ==================================================================
   ВИДЕО О КОМПАНИИ
   До клика на странице лежит обложка: сам YouTube грузится позже.
================================================================== */

.video { padding: clamp(3rem, 6vw, 6rem) 0; }

.video__frame {
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--bg-soft);
    overflow: hidden;
}
.video__poster { width: 100%; height: 100%; object-fit: cover; }

.video__play {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    width: 100%;
    background: rgba(24, 22, 20, .18);
    color: #fff;
    transition: background .4s var(--ease);
}
.video__play::before {
    content: '';
    position: absolute;
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .7);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    transition: transform .4s var(--ease), background .4s var(--ease);
}
.video__play .icon { position: relative; transform: translateX(3px); }
.video__play:hover { background: rgba(24, 22, 20, .28); }
.video__play:hover::before { transform: scale(1.09); background: rgba(255, 255, 255, .26); }

.video__player { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* свой файл вписываем целиком: кадр бывает шире или уже блока */
video.video__player { object-fit: contain; background: #000; }
.video__frame.is-playing .video__poster,
.video__frame.is-playing .video__play { display: none; }

/* обложки нет — вместо неё ровный тёмный фон под кнопкой */
.video__frame--nocover { background: var(--bg-dark); }

/* ----------------------------------------------------------- фильтры */

.filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2.4rem;
    margin-bottom: 3.4rem;
}
.filters__item {
    position: relative;
    padding: .35rem 0;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: var(--muted);
    transition: color .3s var(--ease), transform .3s var(--ease);
}
.filters__item::after {
    content: '';
    position: absolute;
    left: 0; right: 100%; bottom: 0;
    height: 1px;
    background: currentColor;
    transition: right .4s var(--ease);
}
.filters__item:hover { color: var(--ink); transform: translateY(-2px); }
.filters__item:hover::after { right: 0; }
.filters__item.is-active { color: var(--ink); }
.filters__item.is-active::after { right: 0; }

/* карточки заново всплывают при переключении фильтра */
.js .card.is-filtering { opacity: 0; }
.js .card.is-filtered-in {
    animation: fadeUp .55s var(--reveal) both;
    animation-delay: var(--fd, 0s);
}

/* ------------------------------------------------------------ карточки */

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 2.4rem 1.9rem; }

.card { display: flex; flex-direction: column; }
/* фильтр каталога прячет карточки атрибутом hidden — display: flex выше его перебивал */
.card[hidden] { display: none; }
/* пропорция фото товара 330×360 — как в оригинале */
/* карточки каталога: белая подложка и предмет целиком, без обрезки —
   фотографии бывают и квадратные, и вытянутые */
/* ------------------------- фотографии и точки в карточке товара */

/*
   Снимки лежат стопкой один на другом, показывается активный.
   Точки под снимком переключают их и появляются при наведении;
   на телефоне наведения нет, поэтому там они видны всегда.
*/
.card__media { display: block; aspect-ratio: 330 / 360; background: #fff; overflow: hidden; position: relative; }
.card__media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform .7s var(--ease), opacity .4s var(--ease);
}
.card:hover .card__media img { transform: scale(1.12); }

/* несколько снимков — все, кроме активного, спрятаны */
.card__media img[data-photo] { position: absolute; inset: 0; opacity: 0; }
.card__media img[data-photo].is-active { opacity: 1; }

.card__dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: .6rem;
    z-index: 2;
    display: flex;
    justify-content: center;
    gap: .45rem;
    opacity: 0;
    transition: opacity .3s var(--ease);
}
.card__dot {
    width: 7px;
    height: 7px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(29, 29, 29, .25);
    cursor: pointer;
    transition: background .25s var(--ease), transform .25s var(--ease);
}
.card__dot:hover { background: rgba(29, 29, 29, .55); }
.card__dot.is-active { background: var(--ink); transform: scale(1.35); }

.card:hover .card__dots,
.top__item:hover .card__dots { opacity: 1; }

/* в ленте хитов снимки тоже лежат стопкой */
.top__media { position: relative; }
.top__media img[data-photo] { position: absolute; inset: 0; opacity: 0; transition: transform .7s var(--ease), opacity .4s var(--ease); }
.top__media img[data-photo].is-active { opacity: 1; }

@media (hover: none) {
    /* пальцем навести нельзя — показываем точки постоянно */
    .card__dots { opacity: 1; }
}

/* название, цена и подпись — по центру под фотографией */
.card__title { font-size: 1.19rem; font-weight: 300; color: var(--ink); margin: 1.3rem 0 .8rem; text-align: center; }
.card__title a:hover { color: var(--accent); }
.card__meta { display: flex; align-items: center; justify-content: center; gap: 1.1rem; }
.card__price { color: var(--ink-2); font-size: .98rem; }

.card__colors { display: flex; align-items: center; gap: .3rem; }
/* свободная строчка под ценой — регистр как написан в админке */
.card__note { margin: .5rem 0 0; font-size: .92rem; line-height: 1.45; color: var(--muted); text-transform: none; text-align: center; }
.dot { width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(0,0,0,.14); display: inline-block; }

.catalog__more { display: flex; justify-content: center; margin-top: 3.4rem; }

/* ------------------------------------------------------ блок студии */

.studio { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg-soft); }
.studio__media { position: relative; overflow: hidden; min-height: 620px; background: #e4e2df; }
.studio__media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: filter 1.2s var(--ease);
}
.studio:hover .studio__media img { filter: grayscale(0); }

.studio__panel { display: flex; align-items: center; padding: clamp(2.5rem, 5vw, 5rem) clamp(1.6rem, 6vw, 7rem); }
.studio__body { width: 100%; max-width: 620px; }
.studio__title { font-size: clamp(1.6rem, 2.4vw, 2.05rem); font-weight: 200; margin-bottom: 2.4rem; }
.studio__text { line-height: 1.9; margin-bottom: 2.8rem; }
/* подпись от руки под текстом; PNG прозрачный, поэтому фон панели виден */
.studio__signature { width: clamp(180px, 34%, 260px); height: auto; margin: -.8rem 0 2.4rem; }

.facts { display: flex; flex-wrap: wrap; gap: 3rem; margin-bottom: 3rem; }
.fact { display: flex; align-items: center; gap: 1.1rem; }
.fact__icon { color: var(--accent); display: flex; }
.fact__icon .icon { stroke-width: 1; }
.fact__body { display: grid; gap: .25rem; }
.fact__body strong {
    font-weight: 400;
    font-size: 14px;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: var(--ink);
}
.fact__body em { font-style: normal; font-size: .88rem; }
.fact__body a:hover { color: var(--accent); }

/* строка-ссылка: Instagram и WhatsApp на странице контактов */
.fact--link { transition: color .3s var(--ease); }
.fact--link:hover .fact__body strong { color: var(--accent); }
.fact--link:hover .fact__icon { transform: scale(1.08); }
.fact--link .fact__icon { transition: transform .3s var(--ease); }

/* подписка внутри блока студии */
.subscribe__row { display: flex; }
.subscribe input[type=email] {
    flex: 1 1 auto;
    min-width: 0;
    font: inherit;
    font-size: 1rem;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-right: 0;
    padding: 1.35rem 1.6rem;
}
.subscribe input[type=email]::placeholder { color: var(--muted); }
.subscribe input[type=email]:focus { outline: none; border-color: var(--ink); }
.subscribe .btn { flex: none; padding-inline: 2.2rem; }

/* ---------------------------------------------------------- отзывы */

.quotes { padding: clamp(3.2rem, 6vw, 6.5rem) 0; }
.quotes__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2.4rem; margin-top: 3rem; }
.quote { margin: 0; display: grid; gap: 1.2rem; }
.quote blockquote { margin: 0; font-size: 1.05rem; font-weight: 300; }
.quote figcaption { display: grid; gap: .1rem; }
.quote figcaption strong { font-weight: 400; font-size: 12px; letter-spacing: 1.8px; text-transform: uppercase; color: var(--ink); }
.quote figcaption em { font-style: normal; font-size: .88rem; }

/* --------------------------------------------------- страница товара */

.product { padding: 2.5rem 0 clamp(3rem, 6vw, 6rem); }

.crumbs {
    display: flex;
    gap: .5rem;
    font-size: 11px;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    margin-bottom: 2.2rem;
}
.crumbs a:hover { color: var(--accent); }

.product__layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(2rem, 4vw, 4.5rem); align-items: start; }

.product__stage { aspect-ratio: 1 / 1; background: #fff; overflow: hidden; }
.product__stage img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform .7s var(--ease);
}
/* наведение мышью приближает предмет — деталь видно лучше */
.product__stage:hover img { transform: scale(1.35); }
.product__thumbs { display: flex; gap: .7rem; margin-top: .7rem; flex-wrap: wrap; }
.thumb {
    width: 80px; height: 80px;
    padding: 0;
    overflow: hidden;
    background: #fff;
    outline: 1px solid transparent;
    outline-offset: 2px;
    opacity: .78;
    transition: outline-color .3s var(--ease), opacity .3s var(--ease);
}
.thumb img { width: 100%; height: 100%; object-fit: contain; transition: transform .5s var(--ease); }
.thumb:hover img { transform: scale(1.14); }
.thumb.is-active, .thumb:hover { outline-color: var(--ink); opacity: 1; }

.product__info { position: sticky; top: calc(var(--header-h) + .5rem); }
.product__title { font-size: clamp(1.9rem, 3.2vw, 2.9rem); margin-bottom: .9rem; }
.product__price { font-size: 1.3rem; color: var(--ink-2); margin-bottom: 1.9rem; }

.product__label { display: block; font-size: 12px; letter-spacing: 1.8px; text-transform: uppercase; margin-bottom: .8rem; }
.product__label b { color: var(--ink); font-weight: 400; }

/* картинка, собранная из слоёв */
.layers { position: relative; width: 100%; height: 100%; }
.layers.is-photo { background-size: cover; background-position: center; }
.layers.is-photo .layers__item { display: none; }
.layers__item {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* выбор сборки: розетка или выключатель */
.product__branches { display: flex; gap: 0; border: 1px solid var(--line); background: #fff; }
.branch {
    flex: 1;
    padding: .85rem 1rem;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: var(--muted);
    transition: background .3s var(--ease), color .3s var(--ease);
}
.branch.is-active { background: var(--ink); color: #fff; }
.branch:not(.is-active):hover { color: var(--ink); }

/* выбор типа части */
.types { display: flex; flex-wrap: wrap; gap: .5rem; }
.type {
    padding: .45rem .9rem;
    font-size: 12px;
    letter-spacing: .06em;
    color: var(--muted);
    border: 1px solid var(--line);
    background: #fff;
    transition: border-color .3s var(--ease), color .3s var(--ease);
}
.type:hover { color: var(--ink); }
.type.is-active { border-color: var(--ink); color: var(--ink); }

/* конструктор: по строке цветов на каждую часть товара */
.product__config { display: grid; gap: 1.5rem; margin-bottom: 2.2rem; }
.product__part { display: grid; gap: .8rem; }

.product__part .product__label {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-bottom: 0;
}
.product__part-icon {
    width: 34px;
    height: 34px;
    flex: none;
    object-fit: contain;
}
.product__part-name { color: var(--ink); font-weight: 400; }
.product__part .product__label b {
    margin-left: auto;
    text-transform: none;
    letter-spacing: 0;
    font-size: .95rem;
    color: var(--muted);
}
.product__colors { margin-bottom: 2rem; }

/* ------------------------------------------------------------- корзина */

/* корзина стоит в самой шапке, поэтому она видна и с закрытым меню */
.cart-link { position: relative; display: inline-flex; align-items: center; flex: none; }
.cart-link:hover { color: var(--accent); }
.cart-link__count {
    position: absolute;
    top: -6px;
    right: -8px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    font-size: 10px;
    font-weight: 500;
    line-height: 16px;
    text-align: center;
}

/* количество: − 1 + */
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); background: #fff; }
.qty__btn { width: 38px; height: 38px; font-size: 17px; line-height: 1; color: var(--muted); }
.qty__btn:hover { color: var(--ink); }
.qty__value { min-width: 34px; text-align: center; font-size: .95rem; }
.qty--lg .qty__btn { width: 46px; height: 62px; }
.qty--lg .qty__value { min-width: 40px; }

.product__buy { display: flex; gap: .8rem; align-items: stretch; }
.product__buy .btn { flex: 1; }
.product__added { margin: .9rem 0 0; font-size: .92rem; color: var(--accent-dk); }
.product__added a { text-decoration: underline; }

.cart { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(2rem, 4vw, 4rem); padding-bottom: clamp(3rem, 6vw, 6rem); align-items: start; }
.cart__body { display: contents; }
.cart__subtitle { font-size: 1.25rem; font-weight: 300; margin-bottom: 1.4rem; }
.cart__intro { margin-bottom: 1.8rem; }
.cart__form { background: var(--bg-soft); padding: clamp(1.4rem, 3vw, 2.6rem); }
.cart__continue { margin-top: 1.6rem; }
.cart__link { text-decoration: underline; color: var(--muted); }
.cart__link:hover { color: var(--ink); }
.cart__empty { grid-column: 1 / -1; text-align: center; }

.cart__total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding: 1.1rem 0;
    margin-top: .6rem;
    border-top: 1px solid var(--line);
    font-size: 1.05rem;
}
.cart__total b { font-weight: 400; color: var(--ink); font-size: 1.2rem; }

.cart-item {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr) auto;
    gap: 1.2rem;
    align-items: center;
    padding: 1.1rem 0;
    border-bottom: 1px solid var(--line);
}
.cart-item__media { display: block; background: var(--bg-soft); }
.cart-item__media img { width: 92px; height: 100px; object-fit: cover; }

/* собранный вариант в корзине — те же слои стопкой */
.cart-item__layers { position: relative; display: block; width: 92px; height: 100px; }
.cart-item__layers img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.cart-item__body { display: grid; gap: .3rem; }
.cart-item__title { font-size: 1.05rem; font-weight: 300; }
.cart-item__title a:hover { color: var(--accent); }
.cart-item__config { margin: 0; font-size: .86rem; color: var(--muted); line-height: 1.4; }
.cart-item__price { font-size: .95rem; color: var(--ink-2); }
.cart-item__actions { display: grid; gap: .5rem; justify-items: end; }
.cart-item__remove {
    font-size: 11px;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--muted);
}
.cart-item__remove:hover { color: #b4483c; }

@media (max-width: 960px) {
    .cart { grid-template-columns: 1fr; }
    .cart-item { grid-template-columns: 72px minmax(0, 1fr); }
    .cart-item__media img { width: 72px; height: 80px; }
    .cart-item__actions { grid-column: 1 / -1; justify-items: start; grid-auto-flow: column; align-items: center; gap: 1.2rem; }
}

/* выбранная сборка в форме заявки */
.form__summary {
    display: grid;
    gap: .25rem;
    padding: .9rem 1.1rem;
    background: #fff;
    border-left: 3px solid var(--accent);
}
.form__summary-label {
    font-size: 11px;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: var(--muted);
}
.form__summary b { font-weight: 400; color: var(--ink); }
.swatches { display: flex; flex-wrap: wrap; gap: .75rem; }
.swatch {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--swatch, #ccc);
    border: 1px solid rgba(0,0,0,.15);
    outline: 1px solid transparent;
    outline-offset: 3px;
    transition: outline-color .3s var(--ease);
}
.swatch.is-active { outline-color: var(--ink); }

.product__description { margin-bottom: 1.8rem; }

/* ------------------------------------------------ характеристики товара */

.specs { margin: 0 0 2rem; }
.specs__title {
    margin: 1.6rem 0 .7rem;
    font-size: .98rem;
    font-weight: 500;
    color: var(--ink);
    letter-spacing: 0;
}
.specs .specs__title:first-child { margin-top: 0; }

.specs__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.specs__row {
    display: flex;
    gap: .5rem;
    font-size: .95rem;
    line-height: 1.5;
}
/* точка перед пунктом — как в списке характеристик у поставщика */
.specs__row::before { content: '•'; color: var(--muted); flex: none; }
.specs__label { color: var(--ink-2); }
.specs__label::after { content: ':'; }
.specs__value { color: var(--muted); }

.product__specs { margin: 0 0 2rem; display: grid; gap: .45rem; }
.product__specs > div { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); padding-bottom: .45rem; }
.product__specs dt { font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase; }
.product__specs dd { margin: 0; color: var(--ink-2); font-size: .95rem; }

.related { margin-top: clamp(3.2rem, 6vw, 6rem); }
.related .section__title { text-align: center; margin-bottom: 2.4rem; }

/* -------------------------------------------------------------- формы */

.request { margin-top: clamp(3rem, 6vw, 6rem); background: var(--bg-soft); padding: clamp(1.6rem, 4vw, 3.4rem); max-width: 860px; }
/* отступ до полей держит сам заголовок: пояснения под ним может не быть */
.request__title { font-size: clamp(1.5rem, 2.4vw, 2.1rem); margin-bottom: 1.9rem; }
.request__intro { margin: -1.2rem 0 1.9rem; max-width: 56ch; }

.form { display: grid; gap: 1.3rem; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.3rem; }
.form__field { display: grid; gap: .45rem; }
.form__field--narrow { max-width: 150px; }

.form label, .subscribe label { font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase; }
.form input, .form textarea, .subscribe input {
    font: inherit;
    font-size: 1rem;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    padding: .85rem 1rem;
    width: 100%;
    transition: border-color .3s var(--ease);
}
.form input:focus, .form textarea:focus, .subscribe input:focus { outline: none; border-color: var(--ink); }
.form textarea { resize: vertical; min-height: 120px; }
.form__error { color: #b4483c; font-size: .82rem; }
.form .btn { justify-self: start; }

.notice { padding: 1rem 1.2rem; background: #fff; border-left: 3px solid var(--accent); margin: 0; }
.notice--error { border-left-color: #b4483c; }

/* ----------------------------------------------------------- подписка */

.subscribe { background: var(--bg-soft); padding: clamp(2.6rem, 5vw, 4.5rem) 0; }
.subscribe__inner { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.6rem, 4vw, 4rem); align-items: center; }
.subscribe__title { font-size: clamp(1.6rem, 2.6vw, 2.3rem); margin-bottom: .7rem; }
.subscribe__text p { margin: 0; }
.subscribe__form { display: flex; flex-wrap: wrap; gap: .8rem; align-items: stretch; }
.subscribe__form input { flex: 1 1 220px; }
.subscribe__form .btn { padding-inline: 2rem; }
.subscribe__form .form__error { flex-basis: 100%; }

/* ------------------------------------------------- контакты и custom */

.contact { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(2rem, 4vw, 4.5rem); padding-bottom: clamp(3rem, 6vw, 6rem); align-items: start; }
.contact__info { display: grid; gap: 1.7rem; justify-items: start; }
.contact__socials { display: grid; gap: .5rem; }
.contact__form .request { margin-top: 0; max-width: none; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 4vw, 4.5rem); align-items: center; padding-bottom: clamp(3rem, 6vw, 6rem); }
.split__media { background: var(--bg-soft); aspect-ratio: 4 / 3; overflow: hidden; }
.split__media img { width: 100%; height: 100%; object-fit: cover; }
/* два фото: второе лежит поверх первого и проявляется при наведении / касании */
.split__media--swap { position: relative; cursor: pointer; }
.split__media-alt { position: absolute; inset: 0; opacity: 0; transition: opacity .6s var(--ease); }
.split__media--swap.is-flipped .split__media-alt { opacity: 1; }
@media (hover: hover) {
    .split__media--swap:hover .split__media-alt { opacity: 1; }
}
.split__body .btn { margin-top: 1.3rem; }

.error-page { padding-bottom: clamp(4rem, 7vw, 7rem); }
.error-page .btn { margin-top: 1.5rem; }

/* -------------------------------------------------------------- подвал */

.footer { background: var(--bg-dark); color: #a8aaa7; }
.footer__inner { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 2.5rem; padding: clamp(2.8rem, 5vw, 4.5rem) 0 2.5rem; }
.footer .logo__name { color: #fff; font-size: 22px; display: block; }
.footer .logo__tagline { display: block; margin-top: .4rem; }
/* подвал тёмный — чёрный логотип перекрашивается в белый */
.footer__logo { display: block; height: 58px; width: auto; max-width: 100%; filter: brightness(0) invert(1); }
.footer__about { margin: 1.2rem 0 0; font-size: .92rem; max-width: 34ch; }
.footer__nav { display: grid; gap: .8rem; align-content: start; }
.footer__nav a { font-size: 12px; font-weight: 500; letter-spacing: 1.8px; text-transform: uppercase; transition: color .3s var(--ease); }
.footer__nav a:hover { color: #fff; }
.footer__contacts { display: grid; gap: .7rem; align-content: start; font-size: .95rem; }
.footer__contacts a:hover { color: var(--accent); }
.footer__contacts .socials { margin-top: .4rem; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 1.3rem 0; font-size: .82rem; }

.to-top {
    position: fixed;
    right: 1.4rem; bottom: 1.4rem;
    z-index: 40;
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-dark);
    color: #fff;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.to-top.is-visible { opacity: 1; pointer-events: auto; transform: none; }

/* ------------------------------------------------------------ адаптив */

@media (max-width: 1200px) {
    .nav { gap: 1.6rem; }
    .nav__list { gap: 1.4rem; }
    .nav__meta { gap: 1rem; }

    /* стрелкам ленты не хватает места по краям — заводим их внутрь */
    .top__arrow--prev { left: 0; }
    .top__arrow--next { right: 0; }
}

/* планшет — две карточки в ленте, телефон — одна */
@media (max-width: 860px) {
    .top__item { flex-basis: 50%; }

    /*
       На узком экране стрелки убираются из-под фотографии вниз, в один
       ряд с точками. Раньше они лежали поверх снимка и закрывали товар,
       а сам переключатель было плохо видно.
    */
    .top__slider {
        display: grid;
        grid-template-columns: auto 1fr auto;
        grid-template-areas:
            'lenta lenta lenta'
            'nazad tochki vpered';
        align-items: center;
        column-gap: 1rem;
    }
    .top__viewport { grid-area: lenta; }
    .top__arrow { position: static; grid-area: nazad; margin-top: 1.8rem; }
    .top__arrow--next { grid-area: vpered; }
    /*
       Точек столько же, сколько карточек. Когда их много, ряд кнопок
       раньше распирал сетку шире экрана и появлялась горизонтальная
       прокрутка страницы. Теперь точки переносятся на вторую строку.
    */
    .top__dots {
        grid-area: tochki;
        margin-top: 1.8rem;
        min-width: 0;
        flex-wrap: wrap;
        row-gap: .5rem;
    }
}

@media (max-width: 560px) {
    /*
       Один товар на экран, и он примагничивается серединой к середине
       ленты. Поэтому куда бы ни оборвался свайп, карточка доезжает
       до центра, а не замирает между двумя.
    */
    .top__item { flex-basis: 100%; padding: 0; scroll-snap-align: center; }
    .top__arrow { width: 52px; height: 52px; }
    .top__dot { width: 24px; }
    .top__dot.is-active { width: 40px; }
}

@media (max-width: 960px) {
    :root { --header-h: 76px; }

    .nav {
        position: fixed;
        top: 0; right: 0; bottom: 0;
        width: min(330px, 86vw);
        z-index: 80;
        background: #fff;
        color: var(--ink);
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 2.4rem;
        padding: 4rem 2rem;
        transform: translateX(100%);
        transition: transform .4s var(--ease);
    }
    .nav.is-open { transform: none; }
    .nav__list { flex-direction: column; align-items: flex-start; gap: 1.3rem; }
    .nav__link { font-size: 13px; }

    /* корзина рядом с кнопкой меню, слева от неё */
    .header__inner { gap: 1.2rem; }
    .cart-link { margin-left: auto; }
    .nav-toggle { display: flex; margin-left: 0; }
    .nav__close { display: flex; position: absolute; top: 1.2rem; right: 1.2rem; }

    .banners, .studio, .product__layout, .contact, .split, .footer__inner, .subscribe__inner {
        grid-template-columns: 1fr;
    }
    .banners { gap: 20px; }
    .promo { height: 200px; }
    .promo__text { max-width: 78%; }
    /* на телефоне фото студии целиком, в своих пропорциях — без обрезки */
    .studio__media { min-height: 0; }
    .studio__media img { position: static; height: auto; }
    /* и на «Индивидуальном заказе» тоже — фото целиком */
    .split__media { aspect-ratio: auto; }
    .split__media > img:first-child { height: auto; }
    .product__info { position: static; }

    /* ------------------------------------------------------------------
       МОБИЛЬНЫЙ БАННЕР
       Фотография разворачивается на весь экран, текст лежит поверх неё
       по центру — как в присланном образце.
       ------------------------------------------------------------------ */
    .hero__arrows { display: none; }
    .hero__stage { height: 100svh; min-height: 540px; }

    .hero__slide {
        display: block;
        padding: 0;
    }

    .hero__half { position: absolute; inset: 0; padding: 0; height: auto; }

    /* фотография — фон слайда */
    .hero__half--media { border-left: 0; z-index: 0; }
    .hero__media { width: 100%; height: 100%; }
    /* затемнение, чтобы белый текст читался на любом снимке */
    .hero__half--media::after {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(180deg, rgba(24, 22, 20, .42) 0%, rgba(24, 22, 20, .34) 45%, rgba(24, 22, 20, .68) 100%);
    }

    /* текст поверх фотографии, по центру */
    .hero__half--text {
        z-index: 2;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: calc(var(--header-h) + 1rem) var(--gutter) 5rem;
        text-align: center;
    }
    .hero__text { max-width: 30rem; }
    .hero__title { color: #fff; }
    .hero__subtitle { color: rgba(255, 255, 255, .85); max-width: 30ch; margin: 0 auto 2.4rem; }
    .hero__text .btn { width: 100%; max-width: 320px; }

    /* на мобильном фотография появляется чуть позже — 0.8s */
    .hero__slide.is-active .hero__media { animation-delay: .8s; }

    .price-badge { left: auto; right: 1rem; top: auto; bottom: 5.5rem; width: 104px; height: 104px; }
    .price-badge__num { font-size: 29px; }
    .hero__dots { bottom: 1.6rem; }
    .hero__dot { background: #fff; }

    /* шапка лежит на тёмном снимке — логотип и кнопка меню белые */
    .header--overlay { color: #fff; }
    .header--overlay .logo { color: #fff; }
    .header--overlay .logo img { filter: brightness(0) invert(1); }
    .header--overlay .nav-toggle { color: #fff; }
    /* сама подложка задана выше, в блоке про .header--overlay */
}

@media (max-width: 560px) {
    .grid { grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 1.6rem 1.1rem; }
    .card__title { font-size: 1rem; }
    .form__row { grid-template-columns: 1fr; }
    .filters { gap: 1.3rem; justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; }
    .filters__item { white-space: nowrap; }
    .facts { gap: 1.4rem; }
    .btn { padding: 1.1em 2rem; }
    .hero { min-height: 560px; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
    html { scroll-behavior: auto; }
}
