/* Витрина. Спокойный нейтральный фон, белые карточки с воздухом между ними, цвета с логотипа:
   тёмно-синий для действий, оранжевый для акцентов. На оранжевой заливке текст только тёмный: белый даёт всего 3:1.
   Оранжевый текст только затемнённый --sun-ink: чистый оранжевый на светлом фоне не читается.
   Ссылки и подсветка при наведении тоже --sun-ink: тёмно-синий почти не отличить от основного текста.

   Шкала, вне которой значений быть не должно:
   шрифт 12 13 14 15 16 18 20 24 30 38 60; отступы 4 8 12 16 24 32 48 64; радиус 8 миниатюры и метки, 12 управление, 16 карточки, 24 панели, 999 чипы;
   высота управления 40 компактная, 48 обычная, 56 главная. Наведение только внутри @media (hover: hover): на касании оно залипает. */
:root {
  --bg: #f4f4ef;
  --surface: #ffffff;
  --surface-2: #f2f2ed;
  --ink: #101c2e;
  --ink-2: #465267;
  --ink-3: #626d80;
  --line: #e5e5de;
  --line-2: #cdcec6;
  --field-line: #8a919e; /* граница поля: 3:1 к белому, иначе поле не видно на дешёвом экране */
  --brand: #0a1f3d;
  --brand-dark: #021528; /* заливка логотипа */
  --brand-hover: #17345f; /* при наведении светлее: темнее уже некуда, разницы не видно */
  --brand-soft: #e7ecf3;
  --sun: #fd5b0f; /* уголок логотипа */
  --sun-ink: #c2410c;
  --sun-soft: #fdecd5; /* буква на логотипе */
  --night: #0a1f3d; /* светлее плитки логотипа, иначе в подвале плитка сливается с фоном */
  --ok: #157a52;
  --err: #b3261e;
  --sans: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --r-lg: 24px;
  --r: 16px;
  --r-sm: 12px;
  --r-xs: 8px;
  --shadow-sm: 0 0 0 1px rgba(2, 21, 40, .05), 0 1px 3px rgba(2, 21, 40, .07);
  --shadow: 0 10px 28px rgba(2, 21, 40, .1);
  --shadow-lg: 0 24px 60px rgba(2, 21, 40, .2);
  --gutter: 16px;
  --sticky: 54px; /* высота закреплённой части шапки */
}
@media (min-width: 720px) { :root { --gutter: 24px; --sticky: 64px; } }
@media (min-width: 960px) { :root { --sticky: 76px; } }
@media (min-width: 1200px) { :root { --gutter: 40px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--sticky) + 16px); scrollbar-gutter: stable; }
html:has(body.is-locked), html:has(dialog[open]) { background: var(--surface); overflow: hidden; }
@media (max-width: 959px) {
  /* фокус не должен прятаться под закреплёнными полосами */
  html:has(.toolbar) { scroll-padding-top: calc(var(--sticky) + 76px); }
  html:has(.buybar.is-on) { scroll-padding-bottom: 78px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
body { margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); color: var(--ink); font: 400 16px/1.5 var(--sans); }
main { flex: 1 0 auto; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a, button, label, summary { touch-action: manipulation; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-weight: 700; line-height: 1.2; margin: 0; letter-spacing: -.018em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
s { color: var(--ink-3); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: 1400px; margin: 0 auto; padding: 0 var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--surface); padding: 12px 16px; border-radius: var(--r-sm); box-shadow: var(--shadow); }
.skip:focus { left: 8px; }
.i { width: 22px; height: 22px; flex: none; display: inline-block; vertical-align: -5px; }
.muted { color: var(--ink-3); font-size: 14px; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 600; color: var(--sun-ink); }

/* Миниатюра на подложке: у половины фото белые поля, на белой панели они сливались с ней */
.ph { display: block; overflow: hidden; background: var(--surface-2); border-radius: var(--r-xs); }
.ph > img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.95); }

/* кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 8px 20px; border: 1.5px solid transparent; border-radius: var(--r-sm); background: none; font-weight: 600; font-size: 15px; line-height: 1.3; cursor: pointer; transition: background .15s, color .15s, border-color .15s, box-shadow .15s, transform .1s; text-align: center; }
.btn--lg { min-height: 56px; padding: 12px 24px; font-size: 16px; }
.btn--sm { min-height: 40px; padding: 4px 16px; font-size: 14px; }
.btn--wide { width: 100%; }
.btn--primary { background: var(--brand); color: #fff; }
.btn--ghost { border-color: var(--line-2); color: var(--ink); background: var(--surface); }
.btn:active, .btn-cat:active, .card__buy:active, .chip:active, .pager a:active, .fopt-chip:active > span, .icon-btn:active, .stepper button:active { transform: translateY(1px); }
.btn--primary:active, .btn-cat:active { background: var(--brand-dark); }
.btn--ghost:active { background: var(--surface-2); }
.btn:disabled, .btn[aria-busy=true], .card__buy[aria-busy=true] { opacity: .6; cursor: progress; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; border-radius: 50%; transition: background .15s; }
@media (hover: hover) {
  .btn--primary:hover { background: var(--brand-hover); }
  .btn--ghost:hover { border-color: var(--ink); }
  .icon-btn:hover { background: var(--surface-2); }
}

/* верхние полосы */
.testbar { background: var(--sun); color: var(--ink); text-align: center; font-size: 13px; line-height: 1.3; font-weight: 600; padding: 4px var(--gutter); }
.topline { background: var(--surface); border-bottom: 1px solid var(--line); color: var(--ink-2); font-size: 13px; line-height: 1.3; }
.topline__in { display: flex; justify-content: center; gap: 24px; padding-top: 4px; padding-bottom: 4px; white-space: nowrap; overflow: hidden; }
.topline__in > span { overflow: hidden; text-overflow: ellipsis; }
.topline__side { display: none; }
/* на ПК эта строка переезжает в ряд разделов, а на маленьком экране важнее товар */
@media (min-width: 960px), (max-height: 700px) { .topline { display: none; } }

/* шапка: на телефоне логотип уезжает при прокрутке, а каталог, поиск и корзина остаются */
.head { position: sticky; top: -38px; z-index: 40; background: var(--surface); box-shadow: 0 1px 0 var(--line); }
.head__in { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: 'logo logo phone' 'cat search cart'; column-gap: 8px; align-items: center; padding-bottom: 8px; }
.logo { grid-area: logo; display: inline-flex; align-items: center; height: 38px; justify-self: start; }
.logo__img { width: auto; height: 28px; }
.btn-cat { grid-area: cat; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px; background: var(--brand); color: #fff; border: 0; border-radius: var(--r-sm); font-weight: 600; font-size: 14px; cursor: pointer; transition: background .15s, transform .1s; }
.btn-cat[aria-expanded="true"] { background: var(--brand-hover); }
.search { grid-area: search; position: static; display: flex; min-width: 0; }
.search input { flex: 1; min-width: 0; height: 44px; padding: 8px 40px 8px 12px; background: var(--surface); border: 1px solid var(--field-line); border-radius: var(--r-sm); transition: border-color .15s, box-shadow .15s; text-overflow: ellipsis; }
.search input:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.search input::placeholder { color: var(--ink-3); }
.search > button { position: relative; flex: none; margin-left: -44px; width: 44px; height: 44px; background: none; border: 0; cursor: pointer; color: var(--ink-2); }
/* подсказки от края до края: от поля они вылезали за экран вместе с ценами */
.suggest { position: absolute; left: var(--gutter); right: var(--gutter); top: calc(100% - 4px); background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-lg); z-index: 50; max-height: 70vh; max-height: 70dvh; overflow-y: auto; overscroll-behavior: contain; padding: 4px; }
.suggest a { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; min-height: 48px; padding: 4px 8px; font-size: 14px; line-height: 1.3; border-radius: var(--r-xs); }
.suggest a:focus-visible, .suggest a.is-on { outline-offset: -2px; background: var(--brand-soft); }
.suggest .ph { width: 44px; height: 44px; }
.suggest b { white-space: nowrap; }
.suggest small { display: block; color: var(--ink-3); font-size: 13px; margin-top: 2px; }
.suggest__all { display: flex !important; align-items: center; font-weight: 600; color: var(--sun-ink); }
.suggest__picks { padding: 8px; font-size: 14px; }
.suggest__picks a { display: block; min-height: 0; padding: 8px 0; color: var(--sun-ink); font-weight: 500; }
.head__phone { grid-area: phone; justify-self: end; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.head__cart { grid-area: cart; position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; min-width: 44px; padding: 0 4px; font-weight: 600; font-size: 15px; border-radius: var(--r-sm); transition: background .15s; }
.head__cart-label { display: none; }
.head__cart .badge { position: absolute; top: 2px; right: 0; }
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 4px; background: var(--sun); color: var(--ink); border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 1; }
@media (hover: hover) {
  .btn-cat:hover { background: var(--brand-hover); }
  .suggest a:hover { background: var(--surface-2); }
  .head__cart:hover { background: var(--surface-2); }
}
@media (min-width: 720px) {
  .head { top: 0; }
  .head__in { grid-template-columns: auto auto minmax(0, 1fr) auto auto; grid-template-areas: 'logo cat search phone cart'; column-gap: 12px; padding-top: 8px; padding-bottom: 8px; }
  .search { position: relative; }
  .suggest { left: 0; right: 0; top: calc(100% + 8px); max-width: 640px; }
  .head__cart-label { display: inline; }
  /* счётчик стоит над значком: в потоке он сужал поле поиска при первом товаре */
  .head__cart { padding: 0 12px; margin-right: -12px; }
  .head__cart .badge { left: 26px; top: 2px; right: auto; }
  .logo__img { height: 32px; }
}
@media (min-width: 960px) {
  .head__in { column-gap: 16px; padding-top: 14px; padding-bottom: 14px; }
  .logo { height: 48px; margin-right: 8px; }
  .logo__img { height: 38px; }
  .btn-cat, .search input, .search > button, .head__cart { height: 48px; }
  .btn-cat { padding: 0 16px 0 12px; font-size: 15px; }
  .search input { padding-left: 16px; }
}
@media (max-height: 500px) { .head { position: static; } }

/* строка разделов: не переносится и не прячет последний раздел, лишнее уезжает вбок */
.secnav { display: none; }
@media (min-width: 720px) and (min-height: 600px), (min-width: 960px) {
  .secnav { display: block; background: var(--surface); border-bottom: 1px solid var(--line); }
  .secnav__in { display: flex; gap: 16px; height: 44px; align-items: center; overflow-x: auto; scrollbar-width: none; }
  .secnav__in::-webkit-scrollbar { display: none; }
  .secnav a { flex: none; line-height: 44px; font-size: 14px; font-weight: 500; color: var(--ink-2); white-space: nowrap; transition: color .15s; }
  .secnav a:focus-visible { outline-offset: -4px; }
  .secnav a.is-on { color: var(--brand); font-weight: 600; box-shadow: inset 0 -2px 0 var(--sun); }
  .secnav__note { display: none; margin-left: auto; line-height: 44px; font-size: 13px; color: var(--ink-3); white-space: nowrap; }
}
@media (min-width: 1100px) { .secnav__in { gap: 24px; } .secnav a { font-size: 15px; } }
@media (min-width: 1400px) { .secnav__note { display: block; } }
@media (hover: hover) { .secnav a:hover { color: var(--sun-ink); } }

/* меню каталога */
.mega { position: fixed; inset: 0; z-index: 60; background: var(--surface); overflow-y: auto; overscroll-behavior: contain; }
.mega__in { padding-bottom: 32px; }
.mega__top { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: center; padding: 8px 0; background: var(--surface); }
.mega__title { font-weight: 700; font-size: 24px; letter-spacing: -.02em; }
.mega__all { display: flex; align-items: center; min-height: 48px; font-weight: 600; color: var(--sun-ink); border-bottom: 1px solid var(--line); }
.mega__col { border-bottom: 1px solid var(--line); }
.mega__row { display: flex; align-items: center; gap: 8px; }
.mega__head { flex: 1; display: flex; align-items: baseline; gap: 8px; padding: 12px 0; font-weight: 600; font-size: 16px; }
.mega__head small { font-weight: 500; font-size: 13px; color: var(--ink-3); }
.mega__more .i { transition: transform .2s; }
.mega__col.is-open .mega__more .i { transform: rotate(180deg); }
.mega__col ul { display: none; padding-bottom: 8px; }
.mega__col.is-open ul { display: block; }
.mega__col li a { display: block; padding: 10px 0; color: var(--ink-2); }
@media (min-width: 720px) and (max-width: 959px) {
  .mega__grid { columns: 2; column-gap: 32px; }
  .mega__col { break-inside: avoid; }
}
@media (min-width: 960px) {
  .mega { position: absolute; inset: 100% 0 auto; max-height: calc(100vh - 110px); box-shadow: var(--shadow-lg); border-top: 1px solid var(--line); border-radius: 0 0 var(--r-lg) var(--r-lg); clip-path: inset(0 -100px -100px -100px); }
  .mega__top { display: none; }
  .mega__in { padding-top: 24px; padding-bottom: 24px; }
  .mega__all { min-height: 0; margin-bottom: 16px; border: 0; }
  .mega__grid { columns: 3; column-gap: 48px; }
  .mega__col { border: 0; break-inside: avoid; padding-bottom: 24px; }
  .mega__more { display: none; }
  .mega__head { padding: 0 0 4px; }
  .mega__col ul { display: block; padding: 0; }
  .mega__col li a { padding: 4px 0; font-size: 14px; }
}
@media (hover: hover) {
  .mega__head:hover, .mega__col li a:hover, .mega__all:hover { color: var(--sun-ink); }
}

/* главный экран */
.hero { background: var(--surface); }
.hero__in { display: grid; gap: 24px; padding-top: 24px; padding-bottom: 24px; }
.hero__text { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; min-width: 0; }
.hero h1 { font-size: clamp(30px, 4.5vw, 60px); line-height: 1.1; letter-spacing: -.03em; text-wrap: balance; }
.hl { background: linear-gradient(transparent 81%, var(--sun) 81% 91%, transparent 91%); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.hero__lead { font-size: clamp(16px, 1.4vw, 18px); color: var(--ink-2); max-width: 46ch; }
.hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; width: 100%; }
.hero__link { display: none; font-weight: 600; color: var(--ink); text-decoration: underline; text-decoration-color: var(--sun); text-underline-offset: 4px; text-decoration-thickness: 2px; }
.hero__facts { display: none; flex-direction: column; gap: 4px; font-size: 14px; color: var(--ink-2); }
.hero__facts li { display: inline-flex; align-items: center; gap: 8px; }
.hero__facts .i { width: 18px; height: 18px; color: var(--brand); }
@media (max-width: 479px) { .hero__cta .btn { width: 100%; } }
/* на телефоне важнее увидеть фото на первом экране */
@media (min-width: 720px) {
  .hero__link { display: inline; }
  .hero__facts { display: flex; }
  .hero__in { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 24px; align-items: center; }
}
@media (min-width: 960px) { .hero__in { gap: 32px; padding-top: 32px; padding-bottom: 48px; } }
@media (min-width: 1200px) { .hero__in { gap: 48px; } }
@media (min-width: 1400px) { .hero__facts { flex-direction: row; flex-wrap: wrap; gap: 4px 16px; } }

/* интерьеры */
.scenes { position: relative; aspect-ratio: 5 / 4; border-radius: var(--r-lg); overflow: hidden; background: var(--surface-2); min-width: 0; }
.scene { position: absolute; inset: 0; margin: 0; opacity: 0; visibility: hidden; transition: opacity .4s, visibility .4s; }
.scene.is-on { opacity: 1; visibility: visible; }
.scene > img { width: 100%; height: 100%; object-fit: cover; }
.scenes__tabs { position: absolute; left: 8px; top: 8px; display: flex; gap: 4px; padding: 4px; background: rgba(255, 255, 255, .94); border-radius: var(--r-sm); box-shadow: var(--shadow); max-width: calc(100% - 16px); overflow-x: auto; scrollbar-width: none; z-index: 2; }
.scenes__tabs::-webkit-scrollbar { display: none; }
.scenes__tab { flex: none; min-height: 36px; padding: 4px 12px; border: 0; background: none; border-radius: var(--r-xs); font-weight: 500; font-size: 14px; cursor: pointer; transition: background .15s, color .15s; }
.scenes__tab:focus-visible { outline-offset: -2px; }
.scenes__tab.is-on { background: var(--brand); color: #fff; }
.scene__foot { position: absolute; right: 8px; bottom: 8px; left: 8px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.scene__go { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 4px 12px; background: var(--brand); color: #fff; border-radius: var(--r-sm); font-weight: 600; font-size: 14px; }
.scene__go .i { width: 18px; height: 18px; }
.scene__card { align-self: stretch; display: flex; align-items: center; gap: 12px; padding: 8px 12px 8px 8px; background: rgba(255, 255, 255, .96); border-radius: var(--r-sm); box-shadow: var(--shadow); line-height: 1.3; }
.scene__card .ph { flex: none; width: 44px; height: 44px; }
.scene__card span:not(.ph) { flex: 1; min-width: 0; }
.scene__card small { display: block; font-size: 12px; color: var(--ink-3); }
.scene__card b { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scene__card em { font-style: normal; font-weight: 700; white-space: nowrap; font-size: 15px; text-align: right; }
.scene__card em small { font-weight: 400; }
@media (min-width: 720px) {
  .scenes__tabs { left: 12px; top: 12px; }
  .scene__foot { right: 12px; bottom: 12px; left: 12px; flex-direction: row; justify-content: space-between; align-items: flex-end; }
  .scene__card { align-self: auto; max-width: min(360px, 70%); }
}
@media (hover: hover) {
  .scenes__tab:hover:not(.is-on) { background: var(--surface-2); }
  .scene__go:hover { background: var(--brand-hover); }
}

/* секции */
.section { padding-top: 32px; }
.section:last-of-type { padding-bottom: 48px; }
.section__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 24px; margin-bottom: 16px; }
.section__head h2 { font-size: clamp(24px, 2.6vw, 30px); }
.section__sub { margin-top: 24px; margin-bottom: 12px; font-size: 18px; font-weight: 600; }
.link-arrow { display: inline-flex; align-items: center; gap: 4px; padding: 12px 0; margin: -12px 0; font-weight: 600; font-size: 15px; color: var(--sun-ink); }
.link-arrow .i { width: 18px; height: 18px; transition: transform .2s; }
.link-plain { color: var(--ink-2); font-weight: 500; font-size: 14px; line-height: 2; text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 960px) { .section { padding-top: 48px; } .section__head { margin-bottom: 24px; } }
@media (hover: hover) { .link-arrow:hover .i { transform: translateX(3px); } .link-plain:hover { color: var(--sun-ink); } }

/* разделы и поверхности на главной: компактно, картинка лишь подсказывает, что внутри */
.sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tile { display: flex; align-items: center; gap: 12px; padding: 8px; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-sm); transition: box-shadow .2s, transform .2s; min-width: 0; }
.tile .ph { flex: none; width: 44px; height: 44px; }
.tile span:not(.ph) { min-width: 0; line-height: 1.3; }
.tile b { display: block; font-weight: 600; font-size: 14px; }
.tile small { display: none; color: var(--ink-3); font-size: 13px; }
.tile > .i { display: none; }
.sections--small .ph { width: 36px; height: 36px; }
@media (max-width: 719px) { .sections .tile:last-child:nth-child(odd) { grid-column: 1 / -1; } }
@media (min-width: 720px) {
  .sections { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .tile { padding: 12px; gap: 16px; }
  .tile .ph { width: 64px; height: 64px; }
  .sections--small .ph { width: 44px; height: 44px; }
  .tile b { font-size: 16px; }
  .tile small { display: block; }
  .tile span:not(.ph) { flex: 1; }
  .tile > .i { display: block; color: var(--line-2); margin-right: 4px; transition: color .15s, transform .2s; }
}
@media (hover: hover) {
  .tile:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
  .tile:hover > .i { color: var(--sun-ink); transform: translateX(3px); }
}

/* образцы фактур */
.looks { display: grid; grid-auto-flow: column; grid-auto-columns: 70px; gap: 8px; overflow-x: auto; margin: 0 calc(-1 * var(--gutter)); padding: 4px var(--gutter) 8px; scrollbar-width: none; }
.looks::-webkit-scrollbar { display: none; }
.look { display: flex; flex-direction: column; align-items: center; gap: 8px; font-weight: 500; font-size: 13px; line-height: 1.2; text-align: center; }
.look:focus-visible { outline-offset: -2px; }
.look img { width: 66px; height: 66px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px var(--line), var(--shadow-sm); transition: transform .25s, box-shadow .2s; }
@media (min-width: 960px) {
  .looks { grid-auto-flow: row; grid-template-columns: repeat(8, auto); justify-content: space-between; gap: 8px; margin: 0; padding: 2px 0; overflow: visible; }
  .look { font-size: 15px; gap: 8px; }
  .look img { width: 104px; height: 104px; }
}
@media (hover: hover) { .look:hover img { transform: scale(1.06); box-shadow: 0 0 0 2px var(--brand); } }

/* полка товаров */
.shelf__nav { display: none; gap: 8px; margin-left: 16px; }
.shelf__nav .icon-btn { background: var(--surface); box-shadow: var(--shadow-sm); }
.shelf__nav .icon-btn:disabled { opacity: .35; cursor: default; box-shadow: none; }
.section__tools { display: flex; align-items: center; }
.shelf__track { display: grid; grid-auto-flow: column; grid-auto-columns: 46%; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; margin: -8px calc(-1 * var(--gutter)) -16px; padding: 8px var(--gutter) 16px; scroll-padding: var(--gutter); }
.shelf__track::-webkit-scrollbar { display: none; }
.shelf__track > * { scroll-snap-align: start; }
@media (min-width: 720px) { .shelf__track { grid-auto-columns: 30%; gap: 16px; } }
@media (min-width: 1100px) {
  .shelf__nav { display: flex; }
  /* ровно 4 карточки по краям сетки: обрез посреди пустого фона читался как ошибка */
  .shelf__track { margin: -8px -8px -16px; padding: 8px 8px 16px; scroll-padding: 8px; grid-auto-columns: calc((100% - 3 * 16px) / 4); gap: 16px; }
}
@media (hover: hover) { .shelf__nav .icon-btn:hover:not(:disabled) { box-shadow: var(--shadow); } }

/* сетка товаров */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 720px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; } }
@media (min-width: 1100px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 960px) { .grid--listing { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1360px) { .grid--listing { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 800px) and (max-height: 500px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.card { position: relative; display: flex; flex-direction: column; padding: 8px; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-sm); transition: box-shadow .2s, transform .2s; min-width: 0; }
.card__media { position: relative; display: block; aspect-ratio: 1; overflow: hidden; background: var(--surface-2); border-radius: var(--r-xs); }
.card__media > img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.95); }
.card--out .card__media > img { filter: brightness(.95) grayscale(.65) opacity(.7); }
.tag { position: absolute; left: 8px; top: 8px; padding: 4px 8px; background: var(--sun); color: var(--ink); font-size: 12px; font-weight: 700; border-radius: var(--r-xs); }
.tag--out { background: var(--ink); color: #fff; }
.card__title { margin: 8px 4px 0; font: inherit; letter-spacing: 0; }
/* вся карточка ведёт на товар: на телефоне нажимают куда попало, а половина её раньше молчала */
.card__name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; font-weight: 500; line-height: 1.3; transition: color .15s; }
.card__name::after { content: ''; position: absolute; inset: 0; z-index: 0; border-radius: inherit; }
.card__name:focus-visible { outline: 0; }
.card__name:focus-visible::after { outline: 2px solid var(--brand); outline-offset: 2px; }
.card__spec { margin: 4px 4px 0; font-size: 13px; line-height: 1.3; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card__foot { margin: auto 0 0 4px; padding-top: 8px; display: flex; align-items: flex-end; justify-content: space-between; gap: 4px; min-height: 52px; }
.card__foot form { position: relative; z-index: 1; }
.price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 4px; min-width: 0; line-height: 1.2; }
.price s { width: 100%; font-size: 13px; }
.price strong { font-size: 16px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; }
.price__unit { font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.price__m2 { width: 100%; font-size: 12px; color: var(--ink-3); white-space: nowrap; margin-top: 2px; }
.card--out .price strong { color: var(--ink-2); font-weight: 600; }
.card__buy { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; background: var(--brand-soft); color: var(--brand); border: 0; border-radius: var(--r-sm); cursor: pointer; transition: background .15s, color .15s, transform .1s; flex: none; }
.card__buy .i { width: 22px; height: 22px; }
.card__buy:active { background: var(--brand-dark); color: #fff; }
/* линии внутри ряда совпадают: название в одну или две строки не сдвигает размер и цену */
@supports (grid-template-rows: subgrid) {
  .grid { --row: 8px; row-gap: 0; margin-bottom: calc(-1 * var(--row)); }
  .card { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: subgrid; grid-row: span 4; row-gap: 0; margin-bottom: var(--row); }
  .card__media { grid-row: 1; }
  .card__title { grid-row: 2; }
  .card__spec { grid-row: 3; }
  .card__foot { grid-row: 4; align-self: end; margin-top: 0; }
  .shelf__track .card { display: flex; grid-row: auto; margin-bottom: 0; }
  .shelf__track .card__foot { margin-top: auto; }
}
@supports not (grid-template-rows: subgrid) {
  .card__title { min-height: 2.6em; }
  .card__spec { min-height: 1.5em; }
}
@media (min-width: 720px) {
  @supports (grid-template-rows: subgrid) { .grid { --row: 12px; } }
  .card__title { margin: 12px 4px 0; }
  .card__name { font-size: 15px; }
  .card__foot { padding-top: 12px; }
  .price strong { font-size: 18px; }
}
@media (min-width: 1100px) { @supports (grid-template-rows: subgrid) { .grid { --row: 16px; } } }
@media (hover: hover) {
  .card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
  .card:hover .card__name { color: var(--sun-ink); }
  .card__buy:hover { background: var(--brand); color: #fff; }
}
@media (max-width: 479px) { .card__name { -webkit-line-clamp: 3; } }

/* как подобрать */
.how { margin-top: 32px; background: var(--surface); }
.how__in { padding-top: 32px; padding-bottom: 32px; }
.how h2 { font-size: clamp(24px, 2.6vw, 30px); margin-bottom: 16px; }
.steps { display: grid; gap: 12px; counter-reset: st; }
.steps li { counter-increment: st; display: grid; grid-template-columns: 40px 1fr; column-gap: 12px; align-items: start; align-content: start; }
.steps li::before { content: counter(st); grid-row: span 2; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: var(--r-sm); background: var(--brand-soft); color: var(--brand); font-weight: 700; }
.steps b { font-weight: 600; font-size: 16px; line-height: 1.3; }
.steps span { color: var(--ink-2); font-size: 14px; line-height: 1.5; }
.steps a { color: var(--sun-ink); text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
@media (min-width: 960px) { .how { margin-top: 48px; } .how__in { padding-top: 48px; padding-bottom: 48px; } }

/* FAQ */
.faq__in { display: grid; gap: 16px; }
.faq h2 { font-size: clamp(24px, 2.6vw, 30px); }
.faq details { background: var(--surface); border-radius: var(--r); margin-bottom: 8px; box-shadow: var(--shadow-sm); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 12px 16px; font-weight: 600; font-size: 15px; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .i { color: var(--ink-3); transition: transform .2s; }
.faq details[open] summary .i { transform: rotate(180deg); }
.faq details p { padding: 0 16px 16px; color: var(--ink-2); font-size: 15px; max-width: 640px; }
.faq a { color: var(--sun-ink); text-decoration: underline; }
@media (min-width: 960px) { .faq__in { grid-template-columns: 4fr 8fr; gap: 48px; } }

/* шапка страниц */
.page-head { padding-top: 12px; padding-bottom: 12px; }
.page-head--tight { padding-bottom: 8px; }
.page-head h1 { font-size: clamp(26px, 3.4vw, 38px); margin-top: 8px; overflow-wrap: anywhere; }
.page-head__note { margin-top: 4px; font-size: 14px; color: var(--ink-2); max-width: 640px; }
.page-head__found { margin-top: 4px; font-size: 14px; color: var(--ink-2); }
.lead { color: var(--ink-2); font-size: 15px; margin-top: 4px; max-width: 640px; }
.seo-text { margin-top: 24px; color: var(--ink-3); font-size: 14px; max-width: 640px; }
.seo-block { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.seo-block > * { max-width: 640px; }
.seo-block > :first-child { margin-top: 0; }
.seo-block h3 { font-size: 16px; }
.picks { margin-top: 24px; }
.picks h2 { font-size: 18px; font-weight: 600; margin-bottom: 12px; }
.picks__row { display: flex; flex-wrap: wrap; gap: 8px; }
.picks .chip { white-space: normal; }
.home-picks { display: flex; flex-wrap: wrap; gap: 8px; }
.home-picks .chip { white-space: normal; }
.tips { display: grid; gap: 12px; }
@media (min-width: 720px) { .tips { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tip { display: block; padding: 16px; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-sm); transition: box-shadow .2s, transform .2s; }
.tip b { display: block; font-weight: 600; font-size: 16px; line-height: 1.3; color: var(--ink); }
.tip span { display: block; margin-top: 4px; font-size: 14px; color: var(--ink-3); line-height: 1.5; }
@media (hover: hover) { .tip:hover { box-shadow: var(--shadow); transform: translateY(-2px); } }
.article-lead { font-size: 18px; line-height: 1.5; color: var(--ink); margin: 0 0 16px; }
.article-goods { margin: 8px auto 64px; }
.article-goods .section__head h2 { font-size: 20px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 0 8px; font-size: 13px; color: var(--ink-3); }
.crumbs a { display: inline-block; padding: 12px 0; margin: -12px 0; }
.crumbs__here { color: var(--ink-2); max-width: min(56ch, 70vw); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* на телефоне только ближайший родитель: три строки крошек съедали первый экран */
@media (max-width: 719px) {
  .crumbs > span { display: none; }
  .crumbs > a { display: none; }
  .crumbs > a:nth-last-of-type(1) { display: inline-block; }
  .crumbs > a:nth-last-of-type(1)::before { content: '‹ '; }
}
@media (hover: hover) { .crumbs a:hover { color: var(--sun-ink); text-decoration: underline; } }
.chips { display: flex; gap: 8px; margin: 12px calc(-1 * var(--gutter)) 0; padding: 4px var(--gutter); overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
@media (min-width: 960px) { .chips { flex-wrap: wrap; overflow: visible; margin: 12px 0 0; padding: 0; } }
.chip { flex: none; display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 8px 16px; background: var(--surface); border-radius: 999px; font-size: 14px; font-weight: 500; line-height: 1.3; white-space: nowrap; box-shadow: var(--shadow-sm); transition: background .15s, color .15s, box-shadow .15s, transform .1s; }
.chip:focus-visible, .active a:focus-visible { outline-offset: -2px; }
.chip small { color: var(--ink-3); font-size: 12px; }
.chip--on { background: var(--brand); color: #fff; }
.chip--on:focus-visible { outline-color: #fff; outline-offset: -4px; }
.chip--on small { color: #c9d4e4; }
@media (min-width: 960px) { .chip { min-height: 36px; padding: 4px 16px; } }
@media (hover: hover) { .chip:hover:not(.chip--on) { box-shadow: 0 0 0 1.5px var(--brand); } }

/* каталог */
.listing { display: grid; gap: 12px; padding-bottom: 64px; }
.listing--bare { display: block; }
@media (min-width: 960px) { .listing:not(.listing--bare) { grid-template-columns: 272px minmax(0, 1fr); gap: 24px; align-items: start; } }
@media (min-width: 1200px) { .listing:not(.listing--bare) { grid-template-columns: 288px minmax(0, 1fr); } }

/* панель фильтров: на телефоне лист снизу, на ПК колонка слева */
.filters { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; background: var(--surface); border-radius: var(--r-lg) var(--r-lg) 0 0; height: 88vh; height: 88dvh; transform: translateY(102%); visibility: hidden; transition: transform .28s cubic-bezier(.2, .7, .2, 1), visibility .28s; box-shadow: var(--shadow-lg); }
/* visibility без задержки: иначе фокус нельзя поставить в момент открытия */
.filters.is-open { transform: none; visibility: visible; transition: transform .28s cubic-bezier(.2, .7, .2, 1), visibility 0s; }
.filters form { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.filters__top { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 8px 16px; border-bottom: 1px solid var(--line); }
.filters__title { font-size: 18px; font-weight: 600; letter-spacing: 0; }
.filters__body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 16px; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.filters__foot { flex: none; display: flex; gap: 8px; padding: 8px 16px calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.filters__foot .btn--primary { flex: 1; }
.btn--off { background: var(--line-2); color: var(--ink-2); pointer-events: none; }
@media (min-width: 960px) {
  .filters { position: sticky; top: calc(var(--sticky) + 12px); left: auto; right: auto; bottom: auto; z-index: 1; height: auto; max-height: calc(100vh - var(--sticky) - 28px); transform: none; visibility: visible; transition: none; border-radius: var(--r); box-shadow: var(--shadow-sm); overflow: hidden; display: flex; }
  .filters form { height: auto; flex: 1; min-width: 0; }
  .filters__top { padding: 12px 16px; }
  .filters__title { font-size: 16px; }
  .filters__top .icon-btn { display: none; }
  /* нижний край растворяется: иначе панель обрывается посреди группы и продолжения не видно */
  .filters__body { padding: 0 16px 20px; -webkit-mask-image: linear-gradient(#000 calc(100% - 20px), transparent); mask-image: linear-gradient(#000 calc(100% - 20px), transparent); }
  .filters__foot { display: none; }
  .toolbar__filter { display: none !important; }
}
.scrim { position: fixed; inset: 0; z-index: 65; background: rgba(2, 21, 40, .5); }

.fgroup { border-bottom: 1px solid var(--line); }
.fgroup:last-child { border-bottom: 0; }
.fgroup > summary { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 8px 0; font-weight: 600; font-size: 15px; cursor: pointer; list-style: none; }
.fgroup > summary::-webkit-details-marker { display: none; }
.fgroup > summary .i { margin-left: auto; width: 18px; height: 18px; color: var(--ink-3); transition: transform .2s; }
.fgroup[open] > summary .i { transform: rotate(180deg); }
.fgroup__n { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 4px; background: var(--brand); color: #fff; border-radius: 999px; font-size: 12px; font-weight: 700; }
.fgroup__body { padding-bottom: 16px; }
.fgroup__more { display: block; margin-top: 4px; padding: 12px 0; background: none; border: 0; color: var(--sun-ink); font-weight: 500; font-size: 14px; cursor: pointer; }
.opt-extra { display: none !important; }
.is-all .opt-extra { display: inline-flex !important; }
.is-all .fopt-look.opt-extra { display: flex !important; }
/* скрытый флажок занимает всю метку: так его находит скринридер при изучении касанием */
.fopt { position: relative; }
.fopt input, .fswitch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }

/* фактуры в фильтре */
.flooks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 8px; }
.fopt-look { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 13px; line-height: 1.2; text-align: center; cursor: pointer; }
.fopt-look img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px var(--line); transition: box-shadow .15s, transform .2s; }
.fopt-look input:checked ~ img { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--brand); }
.fopt-look input:checked ~ span { color: var(--brand); font-weight: 600; }
.fopt-look input:focus-visible ~ img { outline: 2px solid var(--brand); outline-offset: 4px; }
.fopt-look span { display: block; }
.fopt-look small { display: block; margin-top: 2px; color: var(--ink-3); font-size: 12px; font-weight: 400; }
@media (hover: hover) { .fopt-look:hover img { transform: scale(1.05); box-shadow: 0 0 0 2px var(--brand); } }

/* метки-значения, в том числе цвета: кружок без подписи нельзя понять на телефоне и при плохом цветовом зрении */
.fchips { display: flex; flex-wrap: wrap; gap: 8px; }
.fopt-chip { display: inline-flex; cursor: pointer; }
.fopt-chip > span { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 8px 12px; background: var(--surface-2); border-radius: 999px; font-size: 14px; line-height: 1.2; transition: background .15s, color .15s, transform .1s; }
.fopt-chip small { font-size: 12px; color: var(--ink-3); }
.fopt-chip .dot { margin-right: 2px; }
.fopt-chip input:checked ~ span { background: var(--brand); color: #fff; font-weight: 500; }
.fopt-chip input:checked ~ span small { color: #c9d4e4; }
.fopt-chip input:focus-visible ~ span { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (hover: hover) { .fopt-chip:hover input:not(:checked) ~ span { background: var(--brand-soft); } }
@media (min-width: 960px) { .fopt-chip > span { min-height: 32px; padding: 4px 12px; } }

/* переключатель наличия */
.fswitch { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 8px 0; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 15px; cursor: pointer; }
.fswitch i { position: relative; flex: none; width: 40px; height: 24px; background: #8a919e; border-radius: 12px; transition: background .15s; }
.fswitch i::after { content: ''; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; background: #fff; border-radius: 50%; box-shadow: var(--shadow-sm); transition: transform .15s; }
.fswitch input:checked ~ i { background: var(--brand); }
.fswitch input:checked ~ i::after { transform: translateX(16px); }
.fswitch input:focus-visible ~ i { outline: 2px solid var(--brand); outline-offset: 2px; }

/* цена: столбики показывают, сколько товаров в каждом диапазоне. Бегунки 28 px, зона касания 44 */
.fprice { padding-left: 4px; padding-right: 4px; }
.fprice__bars { display: flex; align-items: flex-end; gap: 2px; height: 36px; padding: 0 14px; }
.fprice__bars i { flex: 1; background: var(--line); border-radius: 2px 2px 0 0; transition: background .12s; }
.fprice__bars i.on { background: #b9c5d6; }
.fprice__track { position: relative; height: 44px; margin-top: -20px; margin-bottom: 4px; }
.fprice__line { position: absolute; left: 14px; right: 14px; top: 20px; height: 4px; background: #8a919e; border-radius: 2px; }
.fprice__fill { position: absolute; top: 20px; height: 4px; background: var(--brand); border-radius: 2px; }
.fprice__track input[type=range] { position: absolute; left: 0; right: 0; top: 0; width: 100%; height: 44px; margin: 0; background: none; pointer-events: none; -webkit-appearance: none; appearance: none; }
.fprice__track input[type=range]:focus { outline: 0; }
.fprice__track input[type=range]::-webkit-slider-runnable-track { background: none; height: 44px; }
.fprice__track input[type=range]::-moz-range-track { background: none; height: 44px; }
.fprice__track input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 28px; height: 28px; margin-top: 8px; background: #fff; border: 2px solid var(--brand); border-radius: 50%; box-shadow: var(--shadow-sm); cursor: grab; }
.fprice__track input[type=range]::-moz-range-thumb { pointer-events: auto; width: 24px; height: 24px; background: #fff; border: 2px solid var(--brand); border-radius: 50%; cursor: grab; }
.fprice__track input[type=range]:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--brand); outline-offset: 2px; }
.fprice__track input[type=range]:focus-visible::-moz-range-thumb { outline: 2px solid var(--brand); outline-offset: 2px; }
.fprice__nums { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; color: var(--ink-3); }
.fprice__nums input { width: 100%; min-width: 0; height: 40px; padding: 4px 12px; background: var(--surface); border: 1px solid var(--field-line); border-radius: var(--r-sm); -moz-appearance: textfield; }
.fprice__nums input::-webkit-inner-spin-button { -webkit-appearance: none; }
.fprice__nums input:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }

/* над товарами */
#results:focus { outline: 0; }
.results { min-width: 0; transition: opacity .15s; }
.results.is-loading { opacity: .45; }
.toolbar { position: sticky; top: var(--sticky); z-index: 20; display: flex; align-items: center; gap: 8px; margin: 0 calc(-1 * var(--gutter)); padding: 8px var(--gutter); background: var(--bg); }
.toolbar__count { display: none; color: var(--ink-2); font-size: 15px; }
.toolbar__sort { flex: 1 1 0; min-width: 0; }
.toolbar__filter { flex: 0 0 auto; gap: 8px; min-height: 44px; padding: 8px 12px; background: var(--surface); border-color: transparent; box-shadow: var(--shadow-sm); }
.toolbar__filter .badge { background: var(--brand); color: #fff; }
.toolbar__sort select { width: 100%; height: 44px; padding: 4px 32px 4px 12px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23465267' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center; border: 0; border-radius: var(--r-sm); font-weight: 600; font-size: 16px; text-overflow: ellipsis; box-shadow: var(--shadow-sm); -webkit-appearance: none; appearance: none; cursor: pointer; }
@media (max-height: 700px) { .toolbar { position: static; } }
@media (min-width: 960px) {
  .toolbar { position: static; margin: 0 0 8px; padding: 0; justify-content: space-between; background: none; }
  .toolbar__count { display: block; }
  .toolbar__sort { flex: 0 0 auto; }
  .toolbar__sort select { width: 216px; height: 48px; font-size: 15px; }
}
.active { display: flex; gap: 8px; margin: 0 calc(-1 * var(--gutter)) 8px; padding: 4px var(--gutter); overflow-x: auto; scrollbar-width: none; align-items: center; }
.active::-webkit-scrollbar { display: none; }
.active__chip { flex: none; display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 4px 8px 4px 12px; background: var(--brand-soft); color: var(--brand-dark); border-radius: 999px; font-size: 14px; font-weight: 500; white-space: nowrap; transition: background .15s; }
.active__chip .i { width: 16px; height: 16px; }
.active__reset { flex: none; display: inline-flex; align-items: center; min-height: 40px; padding: 4px 8px; font-size: 14px; font-weight: 500; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
@media (min-width: 960px) { .active { flex-wrap: wrap; overflow: visible; margin: 0 0 12px; padding: 0; } .active__chip, .active__reset { min-height: 32px; } }
@media (hover: hover) { .active__chip:hover { background: #d5dde9; } .active__reset:hover { color: var(--sun-ink); } }

.empty { padding: 48px 16px; text-align: center; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-sm); }
.wrap > .empty { margin-bottom: 64px; }
.empty h2 { font-size: 24px; margin-bottom: 8px; }
.empty p { color: var(--ink-2); margin-bottom: 16px; }
.empty__more { margin-top: 24px; text-align: left; }
.empty__more h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.empty--page { margin: 32px 0 64px; padding: 64px 16px; }
.empty--page h1 { font-size: clamp(26px, 4vw, 38px); margin: 8px 0; }
.empty--drawer { background: none; box-shadow: none; }

.more { display: flex; justify-content: center; margin-top: 24px; }
.more .btn { width: min(360px, 100%); }
.pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px; margin-top: 16px; }
.pager a, .pager__now { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 8px; background: var(--surface); border-radius: var(--r-sm); font-size: 14px; box-shadow: var(--shadow-sm); transition: box-shadow .15s, transform .1s; }
.pager__now { background: var(--brand); color: #fff; font-weight: 700; }
.pager__gap { padding: 0 4px; color: var(--ink-3); }
@media (max-width: 959px) { .more + .pager { display: none; } }
@media (hover: hover) { .pager a:hover { box-shadow: 0 0 0 1.5px var(--brand); } }

/* страница товара */
.pdp { display: grid; gap: 12px; padding-bottom: 16px; }
.gallery { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.gallery__stage { position: relative; min-width: 0; }
.gallery__track { display: flex; aspect-ratio: 1; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.gallery__track::-webkit-scrollbar { display: none; }
.gallery__slide { flex: 0 0 100%; padding: 0; border: 0; background: none; cursor: zoom-in; scroll-snap-align: center; scroll-snap-stop: always; }
.gallery__slide:focus-visible { outline-offset: -4px; }
.gallery__slide img { width: 100%; height: 100%; object-fit: contain; }
.gallery__count { position: absolute; right: 8px; bottom: 8px; padding: 4px 8px; border-radius: 999px; background: rgba(2, 21, 40, .72); color: #fff; font-size: 13px; line-height: 1.2; pointer-events: none; }
.gallery__thumbs { display: none; gap: 8px; overflow-x: auto; padding: 2px; scrollbar-width: none; }
.gallery__thumbs::-webkit-scrollbar { display: none; }
.thumb { flex: none; width: 68px; height: 68px; padding: 0; background: var(--surface-2); border: 0; border-radius: var(--r-xs); overflow: hidden; cursor: pointer; opacity: .8; transition: opacity .15s, box-shadow .15s; }
.thumb:focus-visible { outline-offset: -2px; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb--on { opacity: 1; box-shadow: 0 0 0 2px var(--brand); }
@media (hover: hover) { .thumb:hover { opacity: 1; } }
@media (min-width: 720px) { .gallery__thumbs { display: flex; } }
@media (min-width: 720px) and (max-width: 959px) {
  .pdp { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
}
@media (min-width: 960px) {
  .pdp { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 32px; align-items: start; }
  /* миниатюры колонкой слева: фото целиком на первом экране, и видно, что их несколько */
  .gallery { display: grid; grid-template-columns: 72px minmax(0, 1fr); column-gap: 12px; align-items: start; }
  .gallery__thumbs { grid-column: 1; grid-row: 1; flex-direction: column; max-height: min(640px, calc(100vh - 230px)); overflow: hidden auto; }
  .gallery__stage { grid-column: 2; grid-row: 1; width: min(100%, calc(100vh - 230px)); }
  .gallery__count { display: none; }
}
@media (max-height: 500px) {
  .gallery__stage { max-width: calc(100vh - var(--sticky) - 24px); }
}
/* на ПК описание под фото, а характеристики под покупкой: без пустой полосы под галереей. На телефоне после покупки сначала характеристики */
.pdp__main, .pdp__side { display: contents; }
.pdp .gallery { order: 1; }
.pdp .buy { order: 2; }
.pdp .specs { order: 3; }
.pdp .prose-box { order: 4; }
@media (min-width: 720px) {
  .pdp__main, .pdp__side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
}
.buy { min-width: 0; display: flex; flex-direction: column; gap: 12px; background: var(--surface); border-radius: var(--r-lg); padding: 16px; box-shadow: var(--shadow-sm); }
@media (min-width: 720px) { .buy { padding: 24px; gap: 16px; } }
.buy h1 { font-size: clamp(22px, 2vw, 30px); line-height: 1.25; letter-spacing: -.015em; font-weight: 700; }
.buy__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; font-size: 14px; color: var(--ink-3); }
.stock { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.stock .i { width: 18px; height: 18px; }
.stock--in { color: var(--ok); }
.stock--out { color: var(--err); }
.buy__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.buy__price strong { font-size: clamp(30px, 3.2vw, 38px); font-weight: 700; letter-spacing: -.02em; line-height: 1.1; white-space: nowrap; }
.buy__price span { color: var(--ink-2); }
.buy__price s { width: 100%; font-size: 15px; }
.buy__price small { flex-basis: 100%; font-size: 14px; color: var(--ink-3); }
/* размер и цвет простой строкой: как чипы они выглядели нажимаемыми */
.buy__specs { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 14px; color: var(--ink-2); }
.buy__specs li { display: inline-flex; align-items: center; gap: 4px; }
.buy__specs .buy__mount { flex-basis: 100%; color: var(--ink); font-weight: 500; }
.dot { display: inline-block; width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(2, 21, 40, .45); flex: none; }
.variants__title { font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.variants__row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.variant { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 1; border: 0; padding: 0; border-radius: var(--r-xs); background: var(--surface-2); overflow: hidden; font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; transition: box-shadow .15s; }
.variant::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(2, 21, 40, .1); pointer-events: none; }
.variant:focus-visible { outline-offset: -2px; }
.variant img { width: 100%; height: 100%; object-fit: cover; }
.variant--on { box-shadow: 0 0 0 2px var(--brand); cursor: default; }
/* нет в наличии: косая линия, а не серый цвет: обесцвеченный красный читался как лиловый */
.variant--out img { opacity: .5; }
.variant--out::after { background: linear-gradient(to top right, transparent 48%, var(--ink) 48% 52%, transparent 52%); }
.variant--extra { display: none; }
.variants.is-all .variant--extra { display: flex; }
.variants.is-all [data-variants-more] { display: none; }
@media (min-width: 720px) { .variants__row { grid-template-columns: repeat(8, minmax(0, 1fr)); } }
@media (hover: hover) { .variant:hover:not(.variant--on) { box-shadow: 0 0 0 2px var(--ink-3); } }
.calc { background: var(--brand-soft); border-radius: var(--r); }
.calc summary { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 8px 16px; font-weight: 600; font-size: 14px; cursor: pointer; list-style: none; color: var(--brand-dark); }
.calc summary::-webkit-details-marker { display: none; }
.calc summary .i:last-child { margin-left: auto; width: 18px; height: 18px; transition: transform .2s; }
.calc[open] summary .i:last-child { transform: rotate(180deg); }
.calc__body { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.calc__note { font-size: 14px; color: var(--ink-2); }
.calc__row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; width: 100%; }
.calc__row label:not(.check) { display: flex; flex-direction: column; gap: 4px; font-size: 14px; font-weight: 500; flex: 1 1 96px; min-width: 96px; }
.calc__times { padding-bottom: 12px; color: var(--ink-3); }
.calc__row input[type=text] { width: 100%; height: 48px; padding: 4px 12px; background: var(--surface); border: 1px solid var(--field-line); border-radius: var(--r-sm); font-size: 16px; }
.calc__row input[type=text]:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.calc__switch { padding: 4px 0; background: none; border: 0; color: var(--brand-dark); font-size: 14px; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.calc__out { font-size: 15px; }
.calc__out b { font-size: 16px; }
.check { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 0; cursor: pointer; font-size: 14px; line-height: 1.3; }
.check input { width: 20px; height: 20px; accent-color: var(--brand); flex: none; }
.buy__form { display: flex; gap: 8px; }
.buy__add { flex: 1 1 0; min-width: 0; padding-inline: 12px; white-space: nowrap; }
.buy__add .l-short { display: none; }
.stepper { flex: none; display: inline-flex; align-items: stretch; background: var(--surface); border: 1px solid var(--field-line); border-radius: var(--r-sm); height: 56px; }
.stepper:has(input:focus) { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.stepper button { width: 40px; background: none; border: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; border-radius: 11px; transition: background .15s, transform .1s; }
.stepper button:disabled { opacity: .35; cursor: default; }
.stepper input { width: 44px; border: 0; background: none; text-align: center; font-weight: 700; font-size: 16px; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.stepper input:focus { outline: 0; }
.stepper--sm { height: 44px; }
.stepper--sm button { width: 40px; }
.stepper--sm .i { width: 18px; height: 18px; }
.stepper--sm input { width: 44px; font-size: 16px; }
@media (hover: hover) { .stepper button:hover:not(:disabled) { background: var(--surface-2); } }
@media (max-width: 401px) { .buy__add .l-long { display: none; } .buy__add .l-short { display: inline; } }
@media (max-width: 359px) { .buy__add .i { display: none; } }
@media (min-width: 960px) and (max-width: 1100px) { .buy__form .stepper button { width: 36px; } .buy__form .stepper input { width: 38px; } .buy__add .l-long { display: none; } .buy__add .l-short { display: inline; } }
.buy__added { font-size: 14px; color: var(--ink-2); }
.buy__added a { color: var(--sun-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.notice { padding: 12px 16px; background: var(--sun-soft); border-radius: var(--r-sm); font-size: 14px; }
.notice a { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.notice--err { background: #fbe6e3; color: #7a150f; }
.notice--err a { color: inherit; }
.buy__facts { display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--ink-2); }
.buy__facts li { display: flex; gap: 8px; align-items: flex-start; line-height: 1.4; }
.buy__facts .i { color: var(--brand); width: 20px; height: 20px; }
.buy__facts b { color: var(--ink); font-weight: 600; }
.buy__facts a { text-decoration: underline; text-underline-offset: 3px; }
/* на телефоне цена, название и кнопка на первом экране, остальное ниже */
@media (max-width: 719px) {
  .buy__price { order: -3; }
  .buy h1 { order: -2; }
  .buy__form, .buy > .notice, .buy__added { order: 0; }
  .buy__meta { order: 1; }
  .buy__specs { order: 2; }
  .variants, .sizes { order: 3; }
  .calc { order: 4; }
  .buy__facts { order: 5; }
  .pdp { gap: 8px; }
}

/* панель покупки на телефоне, когда кнопка уехала за экран */
.buybar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 16px calc(8px + env(safe-area-inset-bottom)); background: var(--surface); box-shadow: 0 -6px 20px rgba(2, 21, 40, .1); transform: translateY(110%); visibility: hidden; transition: transform .2s, visibility .2s; }
.buybar.is-on { transform: none; visibility: visible; }
.buybar strong { font-size: 20px; font-weight: 700; white-space: nowrap; }
.buybar .btn { flex: 1; max-width: 240px; }
@media (min-width: 960px), (max-height: 500px) { .buybar { display: none; } }

.pdp-card { background: var(--surface); border-radius: var(--r-lg); padding: 16px; box-shadow: var(--shadow-sm); min-width: 0; }
@media (min-width: 720px) { .pdp-card { padding: 24px; } }
.pdp-card h2 { font-size: 24px; margin-bottom: 12px; }
.pdp-tips { margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); font-size: 15px; }
.pdp-tips b { display: block; margin-bottom: 4px; font-weight: 600; }
.pdp-tips a { display: block; padding: 4px 0; color: var(--sun-ink); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.prose { line-height: 1.55; overflow-wrap: anywhere; font-size: 15px; color: var(--ink-2); }
.prose p { margin: 0 0 12px; }
.prose h2, .prose h3, .prose h4 { font-size: 20px; font-weight: 700; margin: 24px 0 8px; color: var(--ink); letter-spacing: -.01em; line-height: 1.3; }
.pdp-card .prose h3, .pdp-card .prose h4 { font-size: 18px; margin-top: 16px; }
.seo-block.prose h2, .seo-block.prose h3 { font-size: 16px; }
.prose ul, .prose ol { padding-left: 20px; margin: 0 0 12px; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: 4px; }
.prose li p { margin: 0; display: inline; }
.prose a { color: var(--sun-ink); text-decoration: underline; }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose-box:focus { outline: 0; }
.prose-box.is-collapsed [data-expand-body] { max-height: 340px; overflow: hidden; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.prose-box .btn { margin-top: 12px; }
.specs dl { margin: 0; }
.specs dl > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.specs dl > div:last-child { border-bottom: 0; }
.specs dt { color: var(--ink-3); }
.specs dd { margin: 0; font-weight: 500; }
.text-card { max-width: 720px; margin-bottom: 64px; padding: 16px; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
@media (min-width: 720px) { .text-card { padding: 32px 40px; } }
.text-card .prose { font-size: 16px; }
.text-card .prose table { width: 100%; border-collapse: collapse; margin: 0 0 16px; font-size: 14px; overflow-wrap: normal; }
.text-card .prose th, .text-card .prose td { padding: 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.text-card .prose th { font-weight: 600; color: var(--ink); }
.text-card .prose td:first-child { font-weight: 600; color: var(--ink); white-space: nowrap; padding-left: 0; }

/* увеличенное фото: на весь экран и с той же лентой, на телефоне окно было меньше фото на странице */
.lightbox { position: fixed; inset: 0; width: 100%; max-width: 100%; height: 100%; max-height: 100%; margin: 0; padding: 0; border: 0; background: var(--brand-dark); color: #fff; overflow: hidden; }
.lightbox::backdrop { background: var(--brand-dark); }
.lightbox__track { display: flex; width: 100%; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.lightbox__track::-webkit-scrollbar { display: none; }
.lightbox__slide { flex: 0 0 100%; display: flex; align-items: center; justify-content: center; padding: 8px; scroll-snap-align: center; scroll-snap-stop: always; }
.lightbox__slide img { width: auto; max-width: 100%; height: auto; max-height: 100%; object-fit: contain; border-radius: var(--r-xs); background: #fff; touch-action: pan-x pinch-zoom; }
.lightbox__close, .lightbox__go { position: absolute; z-index: 2; width: 52px; height: 52px; background: rgba(255, 255, 255, .94); color: var(--ink); }
.lightbox__close { top: 12px; right: 12px; }
.lightbox__go { top: 50%; margin-top: -26px; display: none; }
.lightbox__go--prev { left: 12px; }
.lightbox__go--next { right: 12px; }
.lightbox__count { position: absolute; left: 50%; bottom: calc(12px + env(safe-area-inset-bottom)); transform: translateX(-50%); padding: 4px 12px; border-radius: 999px; background: rgba(255, 255, 255, .94); color: var(--ink); font-size: 14px; }
@media (min-width: 720px) { .lightbox__go { display: inline-flex; } .lightbox__go:disabled { opacity: .35; } }
@media (hover: hover) { .lightbox__close:hover, .lightbox__go:hover:not(:disabled) { background: #fff; } }

/* корзина */
.cart-layout { display: grid; gap: 12px; padding-bottom: 64px; }
@media (min-width: 960px) { .cart-layout { grid-template-columns: minmax(0, 1fr) 400px; gap: 24px; align-items: start; } }
.lines { background: var(--surface); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.line { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.line:last-child { border-bottom: 0; }
.line__img { display: block; width: 76px; height: 76px; }
.line__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.line__name { font-size: 15px; line-height: 1.3; font-weight: 500; }
.line__unit { font-size: 13px; color: var(--ink-3); }
.line__gone { font-size: 13px; color: var(--err); font-weight: 600; }
.line__err { font-size: 13px; color: var(--err); }
.line__ctrl { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.line__remove { width: 44px; height: 44px; margin: 0 -10px 0 auto; border: 0; background: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: var(--ink-3); border-radius: var(--r-sm); transition: color .15s, background .15s; }
.line__total { white-space: nowrap; font-size: 15px; font-weight: 700; }
.line--out .ph img { filter: brightness(.95) grayscale(.8) opacity(.6); }
.line--undo { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; background: var(--sun-soft); font-size: 14px; }
.line--undo button { min-height: 40px; margin: 0 -8px; padding: 4px 8px; border: 0; background: none; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
/* сумма справа сверху, корзина под ней: строка без суммы (товар кончился) не сдвигает значок */
@media (min-width: 480px) {
  .line__body { grid-column: 2 / -1; grid-row: 1; }
  .line__total { grid-column: 3; grid-row: 1; justify-self: end; }
  .line__name { padding-right: 96px; }
}
@media (max-width: 479px) {
  .line { grid-template-columns: 76px minmax(0, 1fr); }
  .line__img { grid-row: span 2; }
  .line__total { grid-column: 2; text-align: right; }
}
@media (hover: hover) { .line__name:hover { color: var(--sun-ink); } .line__remove:hover { color: var(--err); background: #fbe6e3; } }
.summary { display: flex; flex-direction: column; gap: 12px; padding: 16px; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); min-width: 0; }
.summary h2 { font-size: 20px; }
@media (min-width: 720px) { .summary { padding: 24px; } }
@media (min-width: 960px) { .summary { position: sticky; top: calc(var(--sticky) + 16px); } }
.sum { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; }
.sum > :last-child { text-align: right; }
.sum--total { padding-top: 12px; border-top: 1px solid var(--line-2); font-weight: 700; font-size: 16px; align-items: baseline; }
.sum--total b { font-size: 24px; white-space: nowrap; letter-spacing: -.01em; }
.sum__note { font-size: 13px; line-height: 1.4; color: var(--ink-3); }

/* панель корзины: край страницы виден, по нему закрывается */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(430px, calc(100vw - 28px)); z-index: 80; background: var(--surface); display: flex; flex-direction: column; transform: translateX(102%); visibility: hidden; transition: transform .28s cubic-bezier(.2, .7, .2, 1), visibility .28s; box-shadow: var(--shadow-lg); }
.drawer.is-open { transform: none; visibility: visible; transition: transform .28s cubic-bezier(.2, .7, .2, 1), visibility 0s; }
.drawer > div { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 8px 16px; border-bottom: 1px solid var(--line); }
.drawer__head h2 { font-size: 18px; font-weight: 600; letter-spacing: 0; }
.drawer__lines { flex: 1; overflow-y: auto; border-radius: 0; box-shadow: none; }
.drawer__foot { display: flex; flex-direction: column; gap: 8px; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.drawer__foot .sum { align-items: baseline; font-weight: 600; font-size: 15px; }
.drawer__foot .sum b { font-size: 20px; font-weight: 700; }
@media (max-height: 700px) { .drawer__foot .sum__note { display: none; } }
@media (max-height: 520px) {
  .drawer { width: min(560px, 100vw); }
  .drawer > div { display: block; overflow-y: auto; height: 100%; }
  .drawer__lines { overflow: visible; }
  .drawer__foot { flex-direction: row; flex-wrap: wrap; padding: 8px 12px; }
  .drawer__foot .sum { flex: 1 0 100%; }
  .drawer__foot .btn { flex: 1; min-height: 44px; font-size: 14px; }
  .filters { height: 100vh; height: 100dvh; border-radius: 0; }
  .filters form { display: block; overflow-y: auto; }
  .filters__body { overflow: visible; }
  .filters__foot { position: sticky; bottom: 0; background: var(--surface); }
}

/* оформление */
.checkout { display: grid; gap: 12px; padding-bottom: 64px; }
@media (min-width: 960px) { .checkout { grid-template-columns: minmax(0, 1fr) 400px; gap: 24px; align-items: start; } }
.checkout__form { min-width: 0; }
.checkout__mini { margin-bottom: 12px; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.checkout__mini summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; padding: 12px 16px; font-weight: 600; font-size: 15px; cursor: pointer; list-style: none; }
.checkout__mini summary::-webkit-details-marker { display: none; }
.checkout__mini summary .i { width: 18px; height: 18px; flex: none; transition: transform .2s; }
.checkout__mini[open] summary .i { transform: rotate(180deg); }
.checkout__mini .mini { padding: 0 16px 8px; }
.checkout__total { margin: 0 0 12px; padding: 0 4px; border: 0; }
.checkout__note { margin: -4px 4px 12px; }
.checkout__comment { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); margin-bottom: 12px; }
.checkout__comment summary { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 12px 16px; font-weight: 600; font-size: 15px; cursor: pointer; list-style: none; }
.checkout__comment summary::-webkit-details-marker { display: none; }
.checkout__comment summary .i { width: 18px; height: 18px; transition: transform .2s; }
.checkout__comment[open] summary .i { transform: rotate(180deg); }
.checkout__comment .field { padding: 0 16px 16px; }
.pay-note { padding: 16px; margin-bottom: 12px; background: var(--brand-soft); border-radius: var(--r-lg); font-size: 14px; }
.pay-note b { display: block; font-size: 15px; font-weight: 600; }
.pay-note span { color: var(--ink-2); }
@media (min-width: 960px) { .checkout__mini, .checkout__total, .checkout__note { display: none; } }
@media (max-width: 959px) { .summary--checkout { display: none; } }
.block { border: 0; background: var(--surface); border-radius: var(--r-lg); margin: 0 0 12px; padding: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; box-shadow: var(--shadow-sm); }
@media (min-width: 720px) { .block { padding: 24px; } }
.block legend { float: left; width: 100%; padding: 0; display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 18px; letter-spacing: -.012em; margin-bottom: 12px; }
.block legend + * { clear: both; }
.block legend i { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: 14px; font-style: normal; border-radius: var(--r-xs); }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; position: relative; }
.field label { font-size: 14px; font-weight: 500; }
.field label small { font-size: 13px; font-weight: 400; color: var(--ink-3); }
.field input, .field textarea { width: 100%; min-height: 48px; padding: 8px 12px; background: var(--surface); border: 1px solid var(--field-line); border-radius: var(--r-sm); transition: border-color .15s, box-shadow .15s; }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-3); }
.field input:focus, .field textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); outline: 0; }
.field--err input { border-color: var(--err); box-shadow: 0 0 0 1px var(--err); background: #fdf3f1; }
.field__err { color: var(--err); font-size: 14px; font-weight: 500; }
.field__hint { color: var(--ink-3); font-size: 13px; }
.field-row { display: grid; gap: 12px; }
@media (min-width: 640px) { .field-row { grid-template-columns: 1fr 1fr; } }
.combo { scroll-margin-top: calc(var(--sticky) + 8px); }
.combo__list { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 30; max-height: 280px; overflow-y: auto; overscroll-behavior: contain; background: var(--surface); border-radius: var(--r-sm); box-shadow: var(--shadow-lg); padding: 4px; }
.combo__list li { padding: 12px; cursor: pointer; font-size: 15px; line-height: 1.3; border-radius: var(--r-xs); }
.combo__list li.is-on { background: var(--brand); color: #fff; }
.combo__empty { color: var(--ink-3); cursor: default !important; }
@media (hover: hover) { .combo__list li:hover:not(.is-on):not(.combo__empty) { background: var(--surface-2); } }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.checkout__legal { margin-top: 8px; text-align: center; font-size: 13px; }
.checkout__legal a { text-decoration: underline; line-height: 2.2; }
.mini { display: flex; flex-direction: column; }
.mini li { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 1.3; }
.mini .ph { width: 52px; height: 52px; }
.mini small { display: block; font-size: 13px; color: var(--ink-3); margin-top: 2px; }
.mini b { white-space: nowrap; }
.mini + .sum--total { border-top: 0; padding-top: 4px; }

/* спасибо */
.thanks { max-width: 720px; margin-left: auto; margin-right: auto; padding-top: 32px; padding-bottom: 64px; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.thanks h1 { font-size: clamp(26px, 4vw, 38px); }
.thanks__mark { display: inline-flex; width: 56px; height: 56px; align-items: center; justify-content: center; background: var(--brand); color: #fff; border-radius: var(--r); }
.thanks__mark .i { width: 30px; height: 30px; }
.thanks__box { width: 100%; padding: 16px; background: var(--surface); border-radius: var(--r-lg); display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow-sm); }
@media (min-width: 720px) { .thanks__box { padding: 24px; } }
.thanks__box h2 { font-size: 18px; }
.thanks__row { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; }
.thanks__row span { color: var(--ink-3); flex: none; }
.thanks__row b { text-align: right; font-weight: 600; }
.thanks__steps { display: flex; flex-direction: column; gap: 8px; counter-reset: st; font-size: 15px; }
.thanks__steps li { counter-increment: st; display: grid; grid-template-columns: 28px 1fr; gap: 8px; }
.thanks__steps li::before { content: counter(st); display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; background: var(--brand-soft); color: var(--brand); border-radius: var(--r-xs); font-size: 14px; font-weight: 700; }

/* контакты: подпись рядом со значением, без карточки в карточке */
.contact-list { margin-top: 12px; border-top: 1px solid var(--line); }
.contact-list li { display: flex; flex-wrap: wrap; gap: 4px 24px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.contact-list li:last-child { border-bottom: 0; }
.contact-list span { flex: 0 0 120px; color: var(--ink-3); }
.contact-list a { color: var(--sun-ink); font-weight: 500; text-decoration: underline; }

/* подвал */
.foot { margin-top: 8px; background: var(--night); color: #d6deea; padding-top: 32px; font-size: 14px; }
.foot__grid { display: grid; gap: 24px 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); padding-bottom: 24px; }
.foot__brand { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 8px; }
.foot__brand .logo { align-self: flex-start; height: 44px; }
.foot__brand .logo__img { height: 32px; }
.foot h2 { font-weight: 600; font-size: 14px; letter-spacing: 0; color: #fff; margin-bottom: 4px; }
.foot li a { display: inline-block; padding: 8px 0; }
.foot :focus-visible { outline-color: #fff; }
.foot__legal { font-size: 13px; color: #a7b4c7; }
.foot__end { padding-top: 0; padding-bottom: 16px; font-size: 13px; color: #a7b4c7; }
.foot__end::before { content: ''; display: block; height: 1px; margin-bottom: 12px; background: rgba(255, 255, 255, .12); }
@media (min-width: 960px) {
  .foot { padding-top: 48px; }
  .foot__grid { grid-template-columns: 2fr 1.2fr 1.2fr 1fr; }
  .foot__brand { grid-column: auto; }
  .foot li a { padding: 4px 0; }
}
@media (hover: hover) { .foot a:hover { color: #fff; text-decoration: underline; } }

body.is-locked { overflow: hidden; }

/* контрастная тема Windows: без этого образцы цвета и выбор не видны */
@media (forced-colors: active) {
  .dot { forced-color-adjust: none; box-shadow: inset 0 0 0 1px CanvasText; }
  .fswitch i { border: 1px solid CanvasText; background: Canvas; }
  .fswitch i::after { background: CanvasText; }
  .fswitch input:checked ~ i { background: Highlight; }
  .fopt-chip > span { border: 1px solid CanvasText; }
  .fopt-chip input:checked ~ span { background: Highlight; color: HighlightText; forced-color-adjust: none; }
  .fprice__line, .fprice__fill { background: CanvasText; }
  .thumb--on, .variant--on { outline: 2px solid Highlight; }
}

@media print {
  .testbar, .topline, .head, .secnav, .foot, .filters, .toolbar, .buybar, .drawer, .scrim, .shelf__nav, .gallery__thumbs { display: none !important; }
  body { background: #fff; }
}
@media (min-width: 960px) { .page-head__found { display: none; } }
@media (max-width: 719px) { .home-picks .chip:nth-child(n+7) { display: none; } }
@media (min-width: 720px) { .head__cart .badge { left: 22px; top: 1px; min-width: 18px; height: 18px; } }

/* отсутствующие товары отделены от тех, что можно купить */
.grid__sep { grid-column: 1 / -1; margin: 8px 0 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: 16px; font-weight: 700; color: var(--ink-2); }
.buy__left, .line__left { font-size: 14px; color: var(--sun-ink); }
.line__left { display: block; margin-top: 4px; }
.buy__left { order: 0; margin: 0; }
@media (pointer: coarse) {
  .buy__added a { display: inline-flex; align-items: center; min-height: 44px; }
  .calc__switch { min-height: 44px; }
}

/* другой размер того же дизайна */
.sizes__row { display: flex; flex-wrap: wrap; gap: 8px; }
.sizes .chip { min-height: 40px; padding: 4px 12px; font-size: 14px; background: var(--surface-2); }
.chip--out { color: var(--ink-3); }
/* готовые подборки над результатами поиска */
.search-picks { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 16px; }
@media (max-width: 719px) { .search-pick { flex: 1 1 100%; } }
.search-pick { display: flex; flex-direction: column; min-height: 48px; padding: 8px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md, 12px); text-decoration: none; }
.search-pick b { font-size: 15px; font-weight: 600; }
.search-pick small { font-size: 13px; color: var(--ink-3); }
.suggest__link { display: flex !important; justify-content: space-between; font-weight: 600; }
.suggest__link small { font-weight: 400; color: var(--ink-3); }
/* сбой связи: остаёмся на странице */
.net-err { flex-basis: 100%; margin: 4px 0 0; font-size: 13px; color: var(--err); }
.checkout__gone { margin-bottom: 12px; }
/* кнопка покупки на планшете: длинная подпись не влезает */
@media (min-width: 720px) and (max-width: 819px) { .buy__add .l-long { display: none; } .buy__add .l-short { display: inline; } }
/* узкая карточка: цена ровно, размер не обрезан */
@media (max-width: 479px) { .price__unit { flex-basis: 100%; } .card__spec { white-space: normal; } }
