/* le-garderob — каталог одежды */

@font-face { font-family: 'Inter Tight'; font-style: normal; font-weight: 300 600; font-display: swap;
  src: url(fonts/inter-tight-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Inter Tight'; font-style: normal; font-weight: 300 600; font-display: swap;
  src: url(fonts/inter-tight-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter Tight'; font-style: normal; font-weight: 300 600; font-display: swap;
  src: url(fonts/inter-tight-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #fff;
  --ink: #111;
  --muted: #8a8a8a;
  --line: #e4e4e4;
  --media: #f2f1ee;
  --sale: #a2301f;
  --font: 'Inter Tight', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --gutter: 16px;
  --hdr-row: 52px;   /* первый ряд шапки */
  --hdr-h: 52px;     /* вся липкая шапка: на десктопе два ряда */
  --top: var(--hdr-h);
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}
@media (min-width: 900px) { :root { --gutter: 24px; --hdr-row: 60px; --hdr-h: 100px; } }

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--hdr-h) + 16px); overflow-x: clip; }
body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  letter-spacing: .005em;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
fieldset { border: 0; padding: 0; min-width: 0; }
h1, h2, h3 { font-size: inherit; font-weight: 400; }
[hidden] { display: none !important; }
:focus-visible { outline: 1px solid var(--ink); outline-offset: 2px; }

@view-transition { navigation: auto; }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 8px; top: -60px; z-index: 100; background: var(--ink); color: var(--bg); padding: 8px 12px; }
.skip:focus { top: 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.u { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.u:hover { text-decoration-color: var(--muted); }
.i { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }

/* ── Кнопки ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 48px; padding: 0 24px;
  background: var(--ink); color: var(--bg); border: 1px solid var(--ink);
  font-size: 14px; font-weight: 500; white-space: nowrap;
  transition: opacity .2s;
}
.btn:hover { opacity: .85; }
.btn:disabled { background: var(--bg); color: var(--muted); border-color: var(--line); cursor: not-allowed; opacity: 1; }
.btn--ghost { background: var(--bg); color: var(--ink); }
.btn--ghost:hover { opacity: 1; background: var(--media); }
.btn--wide { width: 100%; }
.link-btn { text-decoration: underline; text-underline-offset: 3px; padding: 8px 0; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; }

/* ── Шапка ── */
.hdr { position: sticky; top: 0; z-index: 30; background: var(--bg); }
.hdr__in { height: var(--hdr-row); padding: 0 var(--gutter); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.logo { grid-column: 2; font-size: 22px; font-weight: 500; letter-spacing: -.04em; line-height: 1; text-transform: lowercase; }
.hdr__d { display: none; }
div.hdr__m { display: flex; margin-left: -10px; }
.hdr__tools { grid-column: 3; justify-self: end; display: flex; align-items: center; gap: 22px; margin-right: -10px; }
.hdr__tools .icon-btn { margin-left: -16px; }
.hdr__link { font-size: 14px; white-space: nowrap; }
.hdr__link:hover { color: var(--muted); }
.count:not(:empty)::before { content: '\00a0'; }
.cnt { font-size: .85em; }
.hdr__bag .count { position: absolute; top: 15px; left: 0; right: 0; text-align: center; font-size: 9px; font-weight: 500; }
.hdr__bag .count::before { content: none; }
.hdr__cats, .search-panel { display: none; }
@media (min-width: 900px) {
  .logo { font-size: 26px; }
  .hdr__d { display: inline; }
  div.hdr__m, .hdr__tools .icon-btn { display: none; }
  .hdr__tools { margin-right: 0; }
  /* Поле поиска всегда на виду, слева */
  .hdr__search { grid-column: 1; grid-row: 1; width: 200px; border-bottom: 1px solid var(--line); transition: border-color .2s, width .2s; }
  .hdr__search:focus-within { border-color: var(--ink); width: 260px; }
  .hdr__search input { width: 100%; border: 0; outline: none; background: none; padding: 6px 0; }
  .hdr__search input::-webkit-search-cancel-button { display: none; }
  /* Второй ряд: разделы каталога на виду, а не за словом «Каталог» */
  .hdr__cats { display: flex; justify-content: center; align-items: center; gap: 26px; height: calc(var(--hdr-h) - var(--hdr-row)); padding: 0 var(--gutter); border-bottom: 1px solid var(--line); position: relative; }
  .hdr__cats > a, .nav-item > a { display: inline-block; padding: 10px 0; white-space: nowrap; }
  .hdr__cats a:hover { color: var(--muted); }
  .hdr__cats [aria-current] { text-decoration: underline; text-underline-offset: 5px; }
  .hdr__cats-aside { position: absolute; right: var(--gutter); display: flex; gap: 18px; font-size: 13px; color: var(--muted); }
  .hdr__cats-aside a:hover { color: var(--ink); }
  .nav-item { position: relative; }
  .nav-drop { position: absolute; left: 50%; top: 100%; transform: translateX(-50%); min-width: 180px; padding: 10px 0; background: var(--bg); border: 1px solid var(--line); display: none; flex-direction: column; z-index: 1; }
  .nav-drop a { padding: 7px 18px; white-space: nowrap; }
  .nav-drop a:hover { color: var(--ink); background: var(--media); }
  .nav-item:hover .nav-drop, .nav-item:focus-within .nav-drop { display: flex; }
  /* Панель результатов под шапкой: сайт остаётся на месте */
  .search-panel { display: block; position: absolute; left: 0; right: 0; top: 100%; max-height: calc(100svh - var(--hdr-h) - 24px); overflow-y: auto; padding: 20px 0 28px; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: 0 24px 48px rgb(0 0 0 / .08); }
  .search-panel .search-grid { --cols: 4; }
}

/* ── Шторки: меню и поиск ── */
.sheet { position: fixed; inset: 0; z-index: 50; background: var(--bg); overflow-y: auto; overscroll-behavior: contain; animation: fade .25s var(--ease); }
@keyframes fade { from { opacity: 0; } }
.sheet__top { height: var(--hdr-row); padding: 0 var(--gutter); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.sheet__top .icon-btn:first-child { margin-left: -10px; }
.menu { display: flex; flex-direction: column; padding: 20px var(--gutter) 8px; font-size: 20px; line-height: 1.7; letter-spacing: -.01em; }
.menu > a, .menu__row { padding: 4px 0; }
.menu [aria-current] { text-decoration: underline; text-underline-offset: 5px; }
.menu__row { display: flex; align-items: center; justify-content: space-between; }
.menu__toggle { width: 44px; height: 44px; margin-right: -12px; display: grid; place-items: center; color: var(--muted); }
.menu__toggle .i { transition: transform .2s var(--ease); }
.menu__toggle[aria-expanded="true"] .i { transform: rotate(90deg); }
.menu__subs { display: flex; flex-direction: column; padding: 0 0 10px 18px; font-size: 16px; line-height: 2; }
.menu--small { font-size: 14px; line-height: 2.2; color: var(--muted); padding-top: 12px; border-top: 1px solid var(--line); margin-top: 8px; }
.search-bar { height: var(--hdr-row); padding: 0 var(--gutter); display: flex; align-items: center; gap: 16px; border-bottom: 1px solid var(--line); }
.search-field { flex: 1; }
.search-field input { width: 100%; border: 0; outline: none; background: none; font-size: 16px; }
.search-field input::-webkit-search-cancel-button { display: none; }
.search-body { padding: 16px 0 40px; }
.search-hint { display: flex; flex-wrap: wrap; gap: 4px 18px; padding: 0 var(--gutter) 16px; }
.search-hint a, .search-cats a { text-decoration: underline; text-underline-offset: 3px; }
.search-cats { display: flex; flex-wrap: wrap; gap: 6px 20px; padding: 0 var(--gutter) 18px; }
.search-grid > p { padding: 0 var(--gutter); }

.block { padding-top: 56px; }
.block__head { display: flex; justify-content: space-between; align-items: baseline; padding: 0 var(--gutter) 16px; }
.block__head h2 { font-size: 16px; font-weight: 500; }

/* ── Сетка товаров ── */
.grid {
  --cols: 2;
  display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  column-gap: 4px; row-gap: 32px; padding: 0 var(--gutter);
}
@media (min-width: 700px) { .grid { --cols: 3; } }
@media (min-width: 1000px) { .grid { --cols: 4; row-gap: 44px; } }
.grid[data-density="2"] { --cols: 1; }
@media (min-width: 700px) { .grid[data-density="2"] { --cols: 2; } }
.grid--home { --cols: 2; }
@media (min-width: 1000px) { .grid--home { --cols: 4; } }

.card { position: relative; }
.card__media { position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden; background: var(--media); }
.card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .4s var(--ease); }
.card__alt { opacity: 0; }
@media (hover: hover) { .card:hover .card__alt { opacity: 1; } }
.card--soldout .card__media img { opacity: .5; }
.card__tag { display: block; font-size: 12px; color: var(--muted); margin-bottom: 1px; }
.card__info { display: block; padding: 10px 8px 0; text-align: center; }
.card__name { font-size: 13px; }
.card__price { font-size: 13px; margin-top: 2px; }
.price-old { color: var(--muted); }
.price--sale { color: var(--sale); }

.fav { position: absolute; top: 2px; right: 2px; z-index: 2; width: 40px; height: 40px; display: grid; place-items: center; }
.fav .i { width: 18px; height: 18px; transition: fill .2s; }
.fav[aria-pressed="true"] .i { fill: currentColor; }
@media (hover: hover) {
  .card .fav { opacity: 0; transition: opacity .2s; }
  .card:hover .fav, .card .fav[aria-pressed="true"], .card .fav:focus-visible { opacity: 1; }
}

/* ── Каталог ── */
.plp-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 20px var(--gutter) 10px; }
.plp-head--crumbs { padding-top: 6px; }
main > .crumbs { padding: 16px var(--gutter) 0; margin: 0; }
.plp-title { font-size: 17px; font-weight: 500; }
.plp-title .muted { font-weight: 400; margin-left: 2px; }
.plp-tools { display: flex; align-items: baseline; gap: 22px; }
.density { display: flex; gap: 10px; }
.density button { color: var(--muted); }
.density [aria-pressed="true"] { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
/* Строка категорий: на телефоне прокручивается, справа градиент, пока есть скрытые пункты */
.cats-wrap { position: relative; }
.cats-wrap::after { content: ''; position: absolute; top: 0; bottom: 18px; right: 0; width: 56px; background: linear-gradient(to right, transparent, var(--bg) 70%); pointer-events: none; transition: opacity .2s; }
.cats-wrap.is-end::after { opacity: 0; }
.cats { display: flex; gap: 18px; padding: 0 var(--gutter) 18px; overflow-x: auto; scrollbar-width: none; white-space: nowrap; color: var(--muted); }
.cats::-webkit-scrollbar { display: none; }
.cats a:hover { color: var(--ink); }
.cats a[aria-current] { color: var(--ink); }
.cats a[aria-current="page"] { text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 900px) { .cats-wrap { display: none; } }
/* Подкатегории: «Все 12 · Пальто 5 · Тренчи 1» */
.subs { display: flex; flex-wrap: wrap; gap: 6px 22px; padding: 0 var(--gutter) 18px; }
.subs a { white-space: nowrap; }
.subs a:hover { color: var(--muted); }
.subs a[aria-current] { text-decoration: underline; text-underline-offset: 4px; }
.plp-desc { padding: 0 var(--gutter) 18px; max-width: 640px; color: var(--muted); }
.empty { padding: 64px var(--gutter); text-align: center; display: grid; justify-items: center; gap: 12px; }
.more { padding: 40px var(--gutter) 8px; text-align: center; display: grid; justify-items: center; gap: 14px; }
.more .btn { min-width: 220px; }

/* ── Выезжающие панели (фильтр, выбор размера) ── */
.drawer { position: fixed; inset: 0; z-index: 60; background: rgb(0 0 0 / .25); animation: fade .2s; }
.drawer__panel {
  position: absolute; right: 0; top: 0; bottom: 0; width: min(400px, 100%);
  display: flex; flex-direction: column; background: var(--bg);
  animation: from-right .3s var(--ease);
}
@keyframes from-right { from { transform: translateX(100%); } }
@keyframes from-bottom { from { transform: translateY(100%); } }
.drawer__head { height: var(--hdr-h); flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 var(--gutter); border-bottom: 1px solid var(--line); font-weight: 500; }
.drawer__body { flex: 1; overflow-y: auto; padding: 8px var(--gutter); }
.drawer__foot { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.fgroup { padding: 18px 0; border-bottom: 1px solid var(--line); }
.fgroup legend { font-weight: 500; margin-bottom: 12px; float: left; width: 100%; }
.fgroup legend + * { clear: both; }
.check { display: flex; align-items: center; gap: 10px; padding: 6px 0; cursor: pointer; }
.check input { width: 16px; height: 16px; margin: 0; accent-color: var(--ink); flex: none; }
@media (max-width: 699px) {
  .drawer__panel { top: auto; left: 0; width: 100%; max-height: 88svh; animation-name: from-bottom; }
}
.drawer--bottom .drawer__panel { top: auto; left: 0; width: 100%; max-height: 80svh; animation-name: from-bottom; }
@media (min-width: 700px) { .drawer--bottom .drawer__panel { left: auto; right: 0; top: 0; width: 400px; max-height: none; animation-name: from-right; } }

/* ── Размеры ── */
.sizes__list { display: flex; flex-wrap: wrap; gap: 4px; }
.size { position: relative; }
.size input { position: absolute; opacity: 0; pointer-events: none; }
.size span { display: grid; place-items: center; min-width: 48px; height: 40px; padding: 0 12px; border: 1px solid var(--line); cursor: pointer; transition: border-color .15s; }
.size:hover span { border-color: var(--ink); }
.size input:checked + span { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.size input:focus-visible + span { outline: 1px solid var(--ink); outline-offset: 2px; }
.size--out span, .size--out:hover span { color: var(--muted); border-color: var(--line); text-decoration: line-through; cursor: not-allowed; }
.sizes__err { color: var(--sale); margin-top: 8px; }
.sizes.shake .sizes__list { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.size-sheet { display: flex; flex-direction: column; padding: 4px 0; overflow-y: auto; }
.size-sheet button { display: flex; justify-content: space-between; padding: 15px var(--gutter); font-size: 14px; text-align: left; border-bottom: 1px solid var(--line); }
.size-sheet button:hover:not(:disabled) { background: var(--media); }
.size-sheet button:disabled { color: var(--muted); cursor: not-allowed; }
.size-sheet__link { display: block; padding: 16px var(--gutter) calc(16px + env(safe-area-inset-bottom)); }

/* ── Карточка товара ── */
/* Липкая строка под шапкой на телефоне: выход в раздел и соседние товары */
.pdp__bar { position: sticky; top: var(--hdr-h); z-index: 20; height: 40px; padding: 0 var(--gutter); display: flex; align-items: center; justify-content: space-between; background: var(--bg); border-bottom: 1px solid var(--line); }
.pdp__back { display: inline-flex; align-items: center; gap: 2px; margin-left: -6px; }
.pdp__back .i { width: 20px; height: 20px; }
.pdp__nav { display: inline-flex; align-items: center; gap: 2px; font-variant-numeric: tabular-nums; }
.pdp__arrow { display: inline-grid; place-items: center; width: 32px; height: 32px; }
.pdp__arrow .i { width: 18px; height: 18px; }
.pdp__arrow[aria-disabled] { color: var(--line); }
/* Галерея: лента фото; на телефоне свайп, на десктопе миниатюры слева, стрелки и фото в размер экрана */
.gallery__thumbs, .gallery__arrow { display: none; }
.gallery__main { position: relative; }
.gallery__track { position: relative; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gallery__track::-webkit-scrollbar { display: none; }
.gallery__item { flex: 0 0 100%; scroll-snap-align: start; aspect-ratio: 3 / 4; max-height: calc(100svh - var(--top) - 190px); background: var(--media); cursor: zoom-in; overflow: hidden; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; }
.gallery__count { position: absolute; right: 12px; bottom: 12px; font-size: 11px; background: rgb(255 255 255 / .85); padding: 2px 6px; font-variant-numeric: tabular-nums; }
.fav--gallery { top: 4px; right: 4px; background: rgb(255 255 255 / .0); }
.pdp__info { padding: 18px var(--gutter) 0; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; color: var(--muted); margin-bottom: 14px; }
.crumbs a + a::before { content: '/'; margin-right: 6px; }
.crumbs a:hover { color: var(--ink); }
.pdp__where { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.pdp__where .pdp__nav, .pdp__back--d { display: none; }
.pdp__title { font-size: 16px; font-weight: 500; letter-spacing: -.005em; }
.pdp__price { margin: 6px 0 2px; font-size: 16px; }
.buy { display: grid; gap: 12px; margin-top: 18px; }
.note { color: var(--muted); }
.buy__row { display: none; gap: 4px; }
.buy__hint { display: none; font-size: 13px; }
.fav--box { position: static; width: 48px; height: 48px; flex: none; border: 1px solid var(--ink); }
.acc { margin-top: 24px; border-bottom: 1px solid var(--line); }
.acc details { border-top: 1px solid var(--line); }
.acc summary { list-style: none; display: flex; justify-content: space-between; padding: 14px 0; cursor: pointer; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: '+'; color: var(--muted); }
.acc details[open] summary::after { content: '−'; }
.acc .prose { padding-bottom: 16px; font-size: 15px; }
/* Задать вопрос о товаре: кнопки мессенджеров под «Добавить в корзину» */
.ask { margin-top: 20px; }
.ask__title { margin-bottom: 8px; }
.ask__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); gap: 6px; }
.ask__btn { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px 10px; border: 1px solid var(--line); font-size: 12px; transition: border-color .15s; }
.ask__btn:hover { border-color: var(--ink); }
.ask__btn .i { width: 22px; height: 22px; }

@media (min-width: 900px) {
  .pdp { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: start; }
  .pdp__bar { display: none; }
  /* Галерея целиком помещается в экран и остаётся на месте, пока прокручивается описание */
  .gallery { position: sticky; top: var(--hdr-h); display: flex; gap: 14px; align-items: flex-start; justify-content: center; padding: 24px var(--gutter); --gallery-h: calc(100svh - var(--hdr-h) - 48px); }
  .gallery__thumbs { display: flex; flex-direction: column; gap: 8px; flex: none; max-height: var(--gallery-h); overflow-y: auto; scrollbar-width: none; }
  .gallery__thumbs::-webkit-scrollbar { display: none; }
  .gallery__thumb { width: 64px; aspect-ratio: 3 / 4; flex: none; background: var(--media); border: 1px solid transparent; opacity: .6; transition: opacity .2s, border-color .2s; }
  .gallery__thumb:hover { opacity: 1; }
  .gallery__thumb[aria-pressed="true"] { opacity: 1; border-color: var(--ink); }
  .gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
  .gallery__main { width: min(100%, calc(var(--gallery-h) * .75)); aspect-ratio: 3 / 4; }
  .gallery__track { height: 100%; }
  .gallery__item { max-height: none; }
  .gallery__arrow { display: grid; place-items: center; position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; background: rgb(255 255 255 / .85); opacity: 0; transition: opacity .2s; }
  .gallery__main:hover .gallery__arrow, .gallery__arrow:focus-visible { opacity: 1; }
  .gallery__arrow:disabled { opacity: 0 !important; cursor: default; }
  .gallery__arrow--prev { left: 8px; }
  .gallery__arrow--next { right: 8px; }
  .fav--gallery { display: none; }
  .pdp__info { display: flex; justify-content: center; padding: 40px 40px 48px; }
  .pdp__inner { width: 100%; max-width: 400px; }
  .pdp__where { margin-bottom: 12px; }
  .pdp__back--d { display: inline-flex; }
  .pdp__where .pdp__nav { display: inline-flex; margin-right: -8px; }
  .pdp__info .crumbs { margin-bottom: 20px; font-size: 13px; }
  .pdp__title, .pdp__price, .pdp__info > .pdp__inner > .muted { text-align: center; }
  .pdp .sizes__list { justify-content: center; }
  .buy__row { display: flex; }
  .buy__hint { display: block; text-align: center; }
  .sizes__err, .note { text-align: center; }
}

.buybar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
  padding: 8px var(--gutter) calc(8px + env(safe-area-inset-bottom));
  background: var(--bg); border-top: 1px solid var(--line);
}
@media (min-width: 900px) { .buybar { display: none !important; } }
@media (max-width: 899px) { body:has(.buybar:not([hidden])) .ftr { padding-bottom: calc(72px + env(safe-area-inset-bottom)); } }

.zoom { border: 0; padding: 0; margin: 0; width: 100%; max-width: 100%; height: 100%; max-height: 100%; background: var(--bg); overflow-y: auto; }
.zoom::backdrop { background: var(--bg); }
.zoom img { width: 100%; max-width: 1200px; margin: 0 auto 2px; }
.zoom__top { position: fixed; top: 0; left: 0; right: 0; z-index: 2; height: 48px; padding: 0 var(--gutter); display: flex; align-items: center; justify-content: space-between; }
.zoom__count, .zoom__x { background: rgb(255 255 255 / .85); padding: 6px 10px; font-variant-numeric: tabular-nums; }

/* ── Мини-корзина после добавления ── */
.minibag {
  position: fixed; z-index: 70; left: 0; right: 0; bottom: 0;
  display: grid; gap: 12px; padding: 0 var(--gutter) calc(16px + env(safe-area-inset-bottom));
  background: var(--bg); border-top: 1px solid var(--line); box-shadow: 0 -12px 40px rgb(0 0 0 / .08);
  animation: from-bottom .3s var(--ease);
}
.minibag__head { display: flex; justify-content: space-between; align-items: center; height: 48px; font-weight: 500; }
.minibag__item { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: start; }
.minibag__item img { width: 64px; aspect-ratio: 3 / 4; object-fit: cover; background: var(--media); }
.minibag .link-btn { justify-self: center; padding: 4px 0; }
@media (min-width: 700px) {
  .minibag { left: auto; right: var(--gutter); bottom: auto; top: calc(var(--hdr-h) + 8px); width: 360px; border: 1px solid var(--line); box-shadow: 0 16px 40px rgb(0 0 0 / .08); padding-bottom: 16px; animation: fade .2s; }
}

/* ── Корзина ── */
.cart { padding-bottom: 24px; }
@media (min-width: 900px) { .cart { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 48px; padding-right: var(--gutter); align-items: start; } }
.cart .plp-title { padding: 20px var(--gutter) 14px; }
.cart__items { padding: 0 var(--gutter); }
.line { display: grid; grid-template-columns: 90px 1fr; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.line:last-child { border-bottom: 1px solid var(--line); }
.line__img { aspect-ratio: 3 / 4; background: var(--media); overflow: hidden; }
.line__img img { width: 100%; height: 100%; object-fit: cover; }
.line__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.line__top { display: flex; justify-content: space-between; gap: 12px; }
.line__name { font-weight: 500; }
.line__warn { color: var(--sale); }
.line__bottom { margin-top: auto; display: flex; justify-content: space-between; align-items: center; padding-top: 10px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); height: 32px; }
.qty button { width: 32px; height: 30px; font-size: 15px; }
.qty button:disabled { color: var(--line); cursor: default; }
.qty output { min-width: 22px; text-align: center; }
.line__remove { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.line__size { border: 0; background: none; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 0; }
.cart__empty, .done, .fallback { padding: 24px var(--gutter) 48px; display: grid; justify-items: start; gap: 12px; max-width: 520px; }
.done:focus { outline: none; }
.done__title { font-size: 15px; font-weight: 500; }
.fallback__links { display: flex; flex-wrap: wrap; gap: 8px; }

.cart__side { padding: 32px var(--gutter) 0; }
@media (min-width: 900px) { .cart__side { position: sticky; top: var(--hdr-h); padding: 20px 0 0; } }
.order { display: grid; gap: 14px; }
.order__title { font-weight: 500; }
/* Прямая связь вместо формы */
.direct { display: grid; gap: 8px; }
.order__or { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.order__or::before, .order__or::after { content: ''; flex: 1; border-top: 1px solid var(--line); }
.direct__body { padding: 20px var(--gutter) calc(20px + env(safe-area-inset-bottom)); display: grid; gap: 14px; overflow-y: auto; }
.direct__code { font-size: 20px; }
.direct__code b { font-weight: 500; font-variant-numeric: tabular-nums; }
.direct__phone { font-size: 24px; letter-spacing: -.01em; font-variant-numeric: tabular-nums; text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.direct__links { display: grid; gap: 8px; }
.direct__body .link-btn { justify-self: start; }
.summary { display: grid; gap: 6px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.summary__row { display: flex; justify-content: space-between; }
.summary__total { font-weight: 500; padding-top: 6px; }
.field { display: grid; gap: 6px; color: var(--muted); }
.field legend { margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 0; background: var(--bg); color: var(--ink);
  padding: 11px 12px; font-size: 16px; transition: border-color .2s;
}
@media (min-width: 900px) { .field input, .field textarea { font-size: 15px; } }
.field textarea { resize: vertical; min-height: 64px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ink); }
.field input[aria-invalid="true"] { border-color: var(--sale); }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.seg { position: relative; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.seg span { display: grid; place-items: center; height: 40px; border: 1px solid var(--line); color: var(--ink); cursor: pointer; }
.seg input:checked + span { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.seg input:focus-visible + span { outline: 1px solid var(--ink); outline-offset: 2px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.check--consent { align-items: flex-start; color: var(--muted); }
.check--consent input { margin-top: 1px; }
.form-err { color: var(--sale); }

/* ── Тексты ── */
.text-page { padding: 0 var(--gutter) 24px; max-width: 680px; }
.text-page .plp-title { padding: 20px 0 18px; }
.prose > * + * { margin-top: .9em; }
.prose { font-size: 15px; line-height: 1.55; }
.prose h2 { font-size: 13px; font-weight: 500; margin-top: 2em; }
.prose h3 { font-weight: 500; margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li + li { margin-top: .3em; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose strong { font-weight: 500; }
.prose blockquote { padding: 10px 14px; background: var(--media); }
.table-wrap { overflow-x: auto; }
.prose table { border-collapse: collapse; width: 100%; font-size: 13px; font-variant-numeric: tabular-nums; }
.prose th, .prose td { text-align: left; padding: 8px 12px 8px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.prose th { color: var(--muted); font-weight: 400; }
.contacts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 24px; }
.contacts a { text-decoration: underline; text-underline-offset: 3px; }

/* ── Подвал ── */
.ftr { margin-top: 88px; border-top: 1px solid var(--line); font-size: 13px; }
.ftr__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px var(--gutter); padding: 32px var(--gutter); }
.ftr h2 { color: var(--muted); margin-bottom: 10px; }
.ftr nav, .ftr__grid > div { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.ftr a:hover { text-decoration: underline; text-underline-offset: 3px; }
.ftr__about { grid-column: 1 / -1; max-width: 340px; color: var(--muted); }
.ftr__about h2 { color: var(--muted); }
.ftr__bottom { display: flex; justify-content: space-between; gap: 12px; padding: 16px var(--gutter) 24px; color: var(--muted); }
@media (min-width: 900px) {
  .ftr__grid { grid-template-columns: repeat(3, 1fr) 1.4fr; }
  .ftr__about { grid-column: auto; }
}

/* ── Тост ── */
.toast {
  position: fixed; left: 50%; bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 80; transform: translateX(-50%);
  max-width: calc(100vw - 32px); padding: 10px 14px; background: var(--ink); color: var(--bg); font-size: 13px;
  animation: fade .2s;
}
@media (min-width: 900px) { .toast { bottom: 24px; } }
.toast a { text-decoration: underline; text-underline-offset: 3px; margin-left: 8px; }
