/* ==========================================================================
   Furni Store — Stage 1.5. Уточнённая система Concept C.
   Основа: прототип concept-c-architectural.html.
   Что изменилось и почему (требования владельца к этапу 1.5):
     — земля стала тёплой костяной, а не серо-голубой: бумага #F4F1E9,
       чернила с тёплым подтоном. Холод уходил из палитры, а не из фотографии.
     — добавлен второй акцент, глина #9C4A22, и у него строго своя зона:
       коммерческий слой (цена, действие, избранное). Прусская синь #1F4B99
       остаётся слоем чертежа (размеры, отметки, спецификация). Два акцента —
       два регистра, а не два цвета в одном.
     — скругления 2–3px, никаких «призрачных карточек»: либо линия, либо тень.
     — один авторский момент на страницу, не по движению на каждый блок.
   ========================================================================== */

:root {
  /* Поверхности */
  --sheet:    #F4F1E9;   /* земля — тёплая костяная бумага */
  --sheet-2:  #EAE6DA;   /* заглублённое поле */
  --sheet-3:  #DED9CA;   /* приподнятое поле */
  --paper:    #FBF9F4;   /* белая карточка на земле */

  /* Текст */
  --ink:      #191712;   /* почти чёрный с тёплым подтоном */
  --ink-2:    #55503F;   /* вторичный — 7.1:1 на --sheet */
  --ink-3:    #6B6554;   /* третичный — 5.1:1 на --sheet, только мелкие подписи */

  /* Акценты — по слоям */
  --draft:    #1F4B99;   /* прусская синь: слой чертежа */
  --draft-soft: #E3E8F2;
  --clay:     #9C4A22;   /* глина: слой торговли */
  --clay-soft:#F2E4DB;

  --rule:     #CBC5B6;
  --rule-2:   #DDD8C9;

  --ok:       #3F6B3A;
  --warn:     #8A6A1F;

  /* Ритм */
  --gap:      28px;
  --pad:      72px;
  --maxw:     1560px;
  --radius:   3px;
  --ease:     cubic-bezier(.22,1,.36,1);
  --dur:      .32s;
}

/* ---- базовый слой ------------------------------------------------------- */

html { background: var(--sheet); }
body {
  margin: 0;
  background: var(--sheet);
  color: var(--ink);
  font-family: 'Onest', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.58;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

h1,h2,h3,h4 { margin: 0; font-weight: 600; line-height: 1.08; letter-spacing: -.028em; }
h1 { font-size: clamp(34px, 4.6vw, 68px); font-weight: 600; }
h2 { font-size: clamp(24px, 2.7vw, 42px); font-weight: 500; letter-spacing: -.022em; }
h3 { font-size: clamp(18px, 1.6vw, 24px); letter-spacing: -.014em; }
h4 { font-size: 15px; letter-spacing: -.01em; }
p  { margin: 0; max-width: 66ch; color: var(--ink-2); }
ul,ol { margin: 0; padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
figure { margin: 0; }

.label {
  font-size: 10.5px; font-weight: 600; letter-spacing: .15em;
  text-transform: uppercase; color: var(--ink-2);
}
.dim { color: var(--ink-2); font-size: 13px; }
.draft { color: var(--draft); }
.clay { color: var(--clay); }
.num { font-variant-numeric: tabular-nums; }

.rule-top { border-top: 1px solid var(--rule); }

/* Ссылка с подчёркиванием, а не «просто ссылка». */
.link {
  text-decoration: underline; text-underline-offset: 4px;
  text-decoration-color: var(--rule); text-decoration-thickness: 1px;
  transition: text-decoration-color .18s var(--ease);
}
.link:hover { text-decoration-color: var(--ink); }

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: inherit; font-size: 15px; font-weight: 600; letter-spacing: -.005em;
  padding: 15px 26px; border-radius: var(--radius);
  background: var(--ink); color: var(--sheet); border: 1px solid var(--ink);
  cursor: pointer; transition: background .2s var(--ease), color .2s var(--ease);
}
.btn:hover { background: var(--clay); border-color: var(--clay); }
.btn--clay { background: var(--clay); border-color: var(--clay); color: #fff; }
.btn--clay:hover { background: #7E3A19; border-color: #7E3A19; }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--sheet); border-color: var(--ink); }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .38; cursor: not-allowed; }
.btn[disabled]:hover { background: var(--ink); border-color: var(--ink); color: var(--sheet); }

/* ---- каркас страницы ---------------------------------------------------- */

.shell {
  max-width: var(--maxw); margin: 0 auto;
  padding: 0 var(--pad);
  display: grid;
  grid-template-columns: 260px minmax(0,1fr);
  gap: 56px;
  align-items: start;
}
.shell--wide { grid-template-columns: minmax(0,1fr); }

/* Общая полоса страницы: та же ширина и отступы, что у .shell.
   Имя класса намеренно не `page`: WordPress вешает класс `page` на <body>
   у статических страниц, и одноимённое правило сдвигало бы всю вёрстку влево. */
.ostov-page {
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad);
}

/* Внутри <main> отступ страницы задаёт сам main — вложенная полоса его не повторяет. */
main.ostov-page > .shell,
main.ostov-page > .ostov-page {
  padding-left: 0; padding-right: 0;
}

@media (max-width: 1080px){
  :root { --pad: 28px; }
  .shell { grid-template-columns: minmax(0,1fr); gap: 0; }
}

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

.masthead {
  border-bottom: 1px solid var(--ink);
  position: sticky; top: 0; z-index: 40;
  background: var(--sheet);
}
.masthead__row {
  max-width: var(--maxw); margin: 0 auto; padding: 16px var(--pad);
  display: grid; grid-template-columns: auto 1fr auto; gap: 32px; align-items: center;
}
.brand { display: flex; align-items: baseline; gap: 10px; }
.brand__mark {
  font-size: 21px; font-weight: 700; letter-spacing: .19em; line-height: 1;
  text-transform: uppercase;
}
.brand__note {
  font-size: 10px; font-weight: 600; letter-spacing: .15em; text-transform: uppercase;
  color: var(--ink-2);
}
.nav { display: flex; gap: 26px; font-size: 14.5px; font-weight: 500; }
.nav a { padding: 4px 0; border-bottom: 1px solid transparent; }
.nav a:hover, .nav a[aria-current] { border-bottom-color: var(--ink); }
.masthead__end { display: flex; gap: 22px; align-items: center; font-size: 14.5px; font-weight: 500; }
.masthead__end a:hover { color: var(--clay); }
@media (max-width: 1080px){
  .masthead__row { grid-template-columns: minmax(0,1fr) auto; row-gap: 12px; }
  .nav { grid-column: 1 / -1; order: 3; gap: 20px; overflow-x: auto; padding-bottom: 4px; min-width: 0; }
  .masthead__end { justify-self: end; min-width: 0; }
}
@media (max-width: 560px){
  .masthead__end a.masthead__opt { display: none; }
  .brand__note { display: none; }
}

/* ---- указатель помещений ------------------------------------------------ */

.rooms { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 1px; background: var(--rule); }
.rooms li { background: var(--sheet); padding: 20px 18px; }
@media (max-width: 760px){ .rooms { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 420px){ .rooms { grid-template-columns: minmax(0,1fr); } }

/* ---- указатель модели --------------------------------------------------- */

.model-note {
  display: flex; gap: 10px; align-items: baseline;
  padding: 9px 0; border-bottom: 1px solid var(--rule-2);
  font-size: 12px; color: var(--ink-2);
}
.model-note b { color: var(--ink); font-weight: 600; }

/* ---- рельс фасетов ------------------------------------------------------ */

.rail { position: sticky; top: 88px; padding: 28px 0 40px; }
.rail__group { border-top: 1px solid var(--rule); padding: 18px 0; }
.rail__group:last-child { border-bottom: 1px solid var(--rule); }
.rail__title {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 13px; font-weight: 600; margin-bottom: 12px;
}
.rail__reset {
  font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-2); background: none; border: 0; padding: 0; cursor: pointer;
}
.rail__reset:hover { color: var(--clay); }
.opt {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 0; font-size: 14px; color: var(--ink-2); cursor: pointer;
}
.opt input[type="checkbox"] { position: absolute; opacity: 0; width: 0; height: 0; }
.opt__box {
  width: 15px; height: 15px; border: 1px solid var(--ink-3); border-radius: 2px;
  flex: 0 0 auto; position: relative; background: var(--sheet);
  transition: background .16s var(--ease), border-color .16s var(--ease);
}
.opt input[type="checkbox"]:checked + .opt__box { background: var(--clay); border-color: var(--clay); }
.opt input[type="checkbox"]:checked + .opt__box::after {
  content: ''; position: absolute; left: 4px; top: 1px;
  width: 5px; height: 9px; border: solid #fff; border-width: 0 1.6px 1.6px 0;
  transform: rotate(42deg);
}
.opt input[type="checkbox"]:focus-visible + .opt__box { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Ползунок цены — отдельный элемент, а не «флажок с подписью». */
.opt--range { display: block; padding-bottom: 10px; }
.opt__label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 8px; }
.opt__range { display: block; width: 100%; accent-color: var(--clay); margin: 0; }
.opt:hover { color: var(--ink); }
.opt__n { margin-left: auto; font-size: 12px; color: var(--ink-3); }
.opt.is-empty { opacity: .45; }
.swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.swatch-dot {
  width: 20px; height: 20px; border-radius: 50%;
  border: 1px solid var(--rule); cursor: pointer; padding: 0;
  box-shadow: inset 0 0 0 2px var(--sheet);
}
.swatch-dot[aria-pressed="true"] { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ---- полоса коммерческих условий (узкий экран) -------------------------- */

/* На широком экране условия читаются из рельса и из подвалов карточек.
   На узком — их нужно показать сразу, поэтому они вынесены под редакционный
   первый экран. Числа приходят из слоя данных. */
.catnote { display: none; }
@media (max-width: 1080px){
  .catnote {
    display: grid; gap: 5px; margin-top: 24px; padding-top: 15px;
    border-top: 1px solid var(--rule);
    font-size: 13px; line-height: 1.45; color: var(--ink-2);
  }
  .catnote b { color: var(--ink); font-weight: 600; }
}

/* ---- панель управления каталогом ---------------------------------------- */

.toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 22px 0; border-bottom: 1px solid var(--ink);
  flex-wrap: wrap;
}
.toolbar__count { font-size: 14px; color: var(--ink-2); }
.toolbar__count b { color: var(--ink); font-weight: 600; }
.toolbar__right { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.select {
  font-family: inherit; font-size: 14px; color: var(--ink);
  background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 9px 12px; cursor: pointer; min-width: 0; max-width: 100%;
}
.select:hover { border-color: var(--ink-3); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; padding: 14px 0 0; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; padding: 5px 8px 5px 11px;
  border: 1px solid var(--rule); border-radius: 999px; background: var(--paper);
}
.chip button {
  font-size: 15px; line-height: 1; color: var(--ink-2); background: none;
  border: 0; cursor: pointer; padding: 0 2px;
}
.chip button:hover { color: var(--clay); }
.filters-open { display: none; }
@media (max-width: 1080px){
  .filters-open {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: inherit; font-size: 14px; font-weight: 600; padding: 10px 16px;
    border: 1px solid var(--ink); border-radius: var(--radius); background: var(--sheet);
    cursor: pointer;
  }
  /* На узком экране фильтры живут в листе — дубль в потоке страницы убираем,
     иначе до первой плиты приходится листать через весь список граней. */
  .rail { display: none; }
  .toolbar__right { width: 100%; gap: 12px; }
  .toolbar__right .select { flex: 1 1 150px; }
  .toolbar__right label { flex: 0 0 auto; }
}
@media (max-width: 560px){
  .toolbar__right label span:not(.sr-only) { display: none; }
  .toolbar { padding: 16px 0; }
}

/* ---- витрина: асимметричная сетка плит --------------------------------- */

.plates {
  display: grid;
  grid-template-columns: repeat(12, minmax(0,1fr));
  gap: 56px 28px;
  padding: 44px 0 20px;
}
.plate { grid-column: span 4; }
.plate--wide { grid-column: span 7; }
.plate--tall { grid-column: span 5; }
.plate--half { grid-column: span 6; }
.plate--full { grid-column: span 12; }

.plate__frame { display: block; position: relative; overflow: hidden; background: var(--sheet-2); }
.plate__frame img { width: 100%; height: 100%; object-fit: cover; }
.plate__frame--4x5 { aspect-ratio: 4/5; }
.plate__frame--1x1 { aspect-ratio: 1/1; }
.plate__frame--3x2 { aspect-ratio: 3/2; }
.plate__frame--4x3 { aspect-ratio: 4/3; }
.plate__frame--3x2 { aspect-ratio: 3/2; }

.plate__tags { position: absolute; left: 0; bottom: 0; display: flex; gap: 0; }
.plate__tag {
  font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  padding: 6px 10px; background: var(--sheet); color: var(--ink);
}
.plate__tag--draft { background: var(--draft); color: #fff; }
.plate__tag--order { background: var(--clay); color: #fff; }

.plate__body { padding-top: 14px; }
.plate__name { font-size: 17px; font-weight: 600; letter-spacing: -.012em; }
.plate__name a:hover { color: var(--clay); }
.plate__meta { font-size: 13px; color: var(--ink-2); margin-top: 3px; }
.plate__dots { display: flex; gap: 5px; margin-top: 9px; align-items: center; }
.plate__dot { width: 12px; height: 12px; border-radius: 50%; border: 1px solid var(--rule); }
.plate__dots span { font-size: 12px; color: var(--ink-3); margin-left: 4px; }

.plate__foot {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  flex-wrap: wrap;
  margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--rule-2);
}
.plate__price { font-size: 19px; font-weight: 600; letter-spacing: -.015em; white-space: nowrap; flex: 0 0 auto; }
.plate__price small { font-size: 12.5px; font-weight: 400; color: var(--ink-3); text-decoration: line-through; margin-left: 7px; }
.plate__lead { font-size: 12.5px; color: var(--ink-2); text-align: right; white-space: nowrap; margin-left: auto; }
.plate__lead b { display: block; color: var(--ink); font-weight: 600; font-size: 13px; }

@media (max-width: 1080px){
  .plates { gap: 34px 16px; }
  .plate, .plate--wide, .plate--tall, .plate--half { grid-column: span 6; }
}
@media (max-width: 620px){
  .plate, .plate--wide, .plate--tall, .plate--half { grid-column: span 12; }
}

/* ---- редакционный блок-разворот ---------------------------------------- */

.feature {
  display: grid; grid-template-columns: repeat(12, minmax(0,1fr));
  gap: 28px; align-items: end;
  padding-top: 46px;
}
.feature__text { grid-column: 1 / span 5; padding-bottom: 8px; }
.feature__text h2 { margin-bottom: 18px; }
.feature__text p { font-size: 16.5px; }
.feature__media { grid-column: 7 / span 6; position: relative; }
.feature__media img { width: 100%; aspect-ratio: 4/5; object-fit: cover; }
.feature__caption {
  margin-top: 10px; font-size: 12px; color: var(--ink-2);
  display: flex; justify-content: space-between; gap: 16px;
}
@media (max-width: 1080px){
  .feature__text, .feature__media { grid-column: 1 / -1; }
  .feature__media { margin-top: 22px; }
}

/* ---- полоса во всю ширину ----------------------------------------------- */

.band { margin: 68px 0 0; }
.band__img { width: 100%; aspect-ratio: 16/7; object-fit: cover; }
.band__note {
  display: flex; gap: 24px; justify-content: space-between; flex-wrap: wrap;
  padding: 13px 0 0; font-size: 12.5px; color: var(--ink-2);
}
@media (max-width: 760px){ .band__img { aspect-ratio: 4/3; } }

/* ---- паспорт изделия: рельс спецификации -------------------------------- */

.spec { border-top: 1px solid var(--ink); }
.spec__row {
  display: grid; grid-template-columns: 1fr auto; gap: 18px;
  padding: 11px 0; border-bottom: 1px solid var(--rule-2);
  font-size: 14px;
}
.spec__row dt { color: var(--ink-2); }
.spec__row dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.spec__row dd.is-draft { color: var(--draft); }

/* ---- галерея ------------------------------------------------------------ */

.gallery { display: grid; grid-template-columns: 84px minmax(0,1fr); gap: 16px; }
.gallery__thumbs { display: flex; flex-direction: column; gap: 10px; }
.gallery__thumb {
  padding: 0; border: 1px solid var(--rule); border-radius: 2px; overflow: hidden;
  background: var(--sheet-2); cursor: pointer; aspect-ratio: 1/1;
}
.gallery__thumb[aria-current="true"] { border-color: var(--ink); }
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery__stage {
  position: relative; overflow: hidden; background: var(--sheet-2);
  aspect-ratio: 4/5;
}
.gallery__stage img { width: 100%; height: 100%; object-fit: cover; }
/* Авторский момент страницы: при смене кадра снимок «встаёт на место».
   Это единственное движение на карточке товара. */
.gallery__stage.is-swapping img {
  animation: resolve .42s var(--ease) both;
}
@keyframes resolve {
  from { opacity: .25; transform: scale(1.012); }
  to   { opacity: 1;   transform: scale(1); }
}
.gallery__badge {
  position: absolute; left: 0; bottom: 0;
  font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  padding: 7px 11px; background: var(--sheet); color: var(--ink-2);
}
@media (max-width: 760px){
  .gallery { grid-template-columns: minmax(0,1fr); }
  .gallery__thumbs { order: 2; flex-direction: row; overflow-x: auto; }
  .gallery__thumb { width: 68px; flex: 0 0 auto; }
}

/* ---- панель покупки ----------------------------------------------------- */

.buy { border-top: 1px solid var(--ink); padding-top: 22px; }
.buy__price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.buy__price b { font-size: 30px; font-weight: 600; letter-spacing: -.022em; }
.buy__price s { font-size: 15px; color: var(--ink-3); }
.buy__vat { font-size: 12px; color: var(--ink-2); margin-top: 4px; }

.buy__rows { margin: 20px 0 0; }
.buy__row {
  display: flex; justify-content: space-between; gap: 16px; align-items: baseline;
  padding: 9px 0; border-bottom: 1px solid var(--rule-2); font-size: 14px;
}
.buy__row dt { color: var(--ink-2); }
.buy__row dd { margin: 0; font-weight: 600; text-align: right; }
.buy__row--total { border-bottom: 0; padding-top: 12px; }
.buy__row--total dt { color: var(--ink); font-weight: 600; }
.buy__row--total dd { font-size: 19px; }

.lead-note {
  display: flex; gap: 10px; align-items: flex-start;
  margin-top: 16px; padding: 13px 15px;
  background: var(--sheet-2); border-top: 1px solid var(--draft);
  font-size: 13.5px; color: var(--ink-2);
}
.lead-note b { color: var(--ink); }

/* ---- выбор варианта ----------------------------------------------------- */

.variant { margin-top: 26px; }
.variant__head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 13px; font-weight: 600; margin-bottom: 11px;
}
.variant__head span { font-weight: 400; color: var(--ink-2); }
.variant__opts { display: flex; gap: 8px; flex-wrap: wrap; }
.variant__opt {
  font-family: inherit; font-size: 14px; font-weight: 500;
  padding: 10px 15px; border: 1px solid var(--rule); border-radius: var(--radius);
  background: var(--paper); cursor: pointer; color: var(--ink);
  transition: border-color .16s var(--ease), background .16s var(--ease);
}
.variant__opt:hover { border-color: var(--ink-3); }
.variant__opt[aria-pressed="true"] {
  border-color: var(--ink); background: var(--ink); color: var(--sheet);
}
.variant__opt[aria-pressed="true"] .variant__delta { color: var(--sheet-2); }
.variant__delta { font-size: 12px; color: var(--ink-3); margin-left: 6px; }

.variant--swatches .variant__opts { gap: 12px; }
.variant--swatches .variant__opt {
  width: 42px; height: 42px; padding: 0; border-radius: 50%;
  border: 1px solid var(--rule); box-shadow: inset 0 0 0 3px var(--sheet);
}
.variant--swatches .variant__opt[aria-pressed="true"] { box-shadow: inset 0 0 0 3px var(--sheet), 0 0 0 2px var(--ink); }

.variant--cards .variant__opts { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.variant--cards .variant__opt {
  display: block; text-align: left; padding: 0; overflow: hidden; background: var(--paper);
}
.variant--cards .variant__opt[aria-pressed="true"] { border-color: var(--ink); }
.variant--cards img { width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.variant--cards .variant__name {
  display: block; padding: 8px 10px; font-size: 13px; font-weight: 600;
}
.variant--cards .variant__opt[aria-pressed="true"] .variant__name { color: var(--ink); }
.variant__name { font-weight: 600; }

.qty { display: flex; align-items: center; gap: 14px; margin-top: 22px; }
.qty__ctrl { display: flex; align-items: center; border: 1px solid var(--rule); border-radius: var(--radius); }
.qty__ctrl button {
  width: 40px; height: 44px; font-size: 18px; line-height: 1; cursor: pointer;
  color: var(--ink); background: var(--paper);
}
.qty__ctrl button:hover { color: var(--clay); }
.qty__ctrl output { min-width: 44px; text-align: center; font-weight: 600; }

/* ---- чертёж ------------------------------------------------------------- */

.drawing { background: var(--paper); border: 1px solid var(--rule); }
.drawing svg { display: block; width: 100%; height: auto; }
.drawing .dim { stroke: var(--draft); stroke-width: 1.1; fill: none; }
.drawing .ext { stroke: var(--ink-3); stroke-width: .8; fill: none; }
.drawing .tick { stroke: var(--draft); stroke-width: 1.1; }
.drawing text {
  fill: var(--draft); font-family: 'Onest', sans-serif; font-size: 12px; font-weight: 600;
  letter-spacing: .06em;
}
.drawing .fill-draft { fill: var(--draft); }
.drawing__cap {
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  padding: 11px 0 0; font-size: 12.5px; color: var(--ink-2);
}

/* ---- липкая панель на мобильном ---------------------------------------- */

.buybar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: none; align-items: center; gap: 14px;
  padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
  background: var(--paper); border-top: 1px solid var(--ink);
}
.buybar__info { flex: 1; min-width: 0; }
.buybar__price { font-size: 18px; font-weight: 600; letter-spacing: -.015em; }
.buybar__lead { font-size: 12px; color: var(--ink-2); }
.buybar .btn { padding: 13px 20px; }
@media (max-width: 900px){ .buybar { display: flex; } body { padding-bottom: 78px; } }

/* ---- мобильный лист фильтров ------------------------------------------- */

.sheet { border: 0; padding: 0; max-width: none; max-height: 88svh; width: 100%; background: var(--sheet); }
.sheet::backdrop { background: rgba(25,23,18,.45); }
.sheet__head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 20px; border-bottom: 1px solid var(--rule);
}
.sheet__body { padding: 0 20px 18px; overflow-y: auto; max-height: 62svh; }
.sheet__note { font-size: 12.5px; line-height: 1.5; color: var(--ink-2); padding: 16px 0 4px; }
.sheet__foot {
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--ink); display: flex; gap: 12px; align-items: center;
}
.sheet__foot .btn { flex: 1; }

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

.footer { margin-top: 76px; border-top: 1px solid var(--ink); }
.footer__grid {
  display: grid; grid-template-columns: repeat(12, minmax(0,1fr));
  gap: 28px; padding: 40px 0 26px;
}
.footer__brand { grid-column: span 4; }
.footer__col { grid-column: span 2; font-size: 13.5px; line-height: 1.9; }
.footer__col h4 { font-size: 10.5px; letter-spacing: .15em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 10px; font-weight: 600; }
.footer__col a:hover { color: var(--clay); }
.footer__legal {
  border-top: 1px solid var(--rule); padding: 16px 0 34px;
  font-size: 12px; color: var(--ink-2);
}
@media (max-width: 900px){
  .footer__brand { grid-column: span 12; }
  .footer__col { grid-column: span 6; }
}

/* ---- доступность -------------------------------------------------------- */

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 10px 16px; background: var(--ink); color: var(--sheet); border-radius: 2px;
}
.skip:focus { top: 12px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

:where(a, button, input, select, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px;
}

/* Выделение текста и каретка — часть мира, а не дефолт браузера. */
::selection { background: var(--clay); color: #fff; }
:focus { caret-color: var(--clay); }

@media (prefers-reduced-motion: reduce){
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important;
      transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .gallery__stage.is-swapping img { animation: none; }
}
