/* DreamART — каталог аренды. Белый фон, фирменный зелёный #00fe78, системная типографика.
   Заливки — чистым фирменным цветом с тёмным текстом; текстовые акценты в светлой теме —
   затемнённым оттенком (--accent), иначе неон не читается на белом. */

:root {
  color-scheme: light dark;

  --ground: #ffffff;
  --surface: #ffffff;
  --panel: #f5f5f7;
  --panel-2: #e8e8ed;
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --line: rgba(0, 0, 0, 0.1);
  --line-strong: rgba(0, 0, 0, 0.18);
  --brand: #00fe78;
  --brand-hover: #00e56c;
  --on-brand: #042413;
  --accent: #008040;
  --accent-hover: #009a4e;
  --accent-soft: rgba(0, 254, 120, 0.14);
  --on-accent: #ffffff;
  --glow: rgba(0, 254, 120, 0.16);
  --bar: rgba(255, 255, 255, 0.8);
  --shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.3);
  --thumb-ink: rgba(0, 0, 0, 0.14);

  --font: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Unbounded", "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, "Roboto Mono", monospace;

  --wrap: 1180px;
  --pad: clamp(16px, 4vw, 40px);
  --r-card: 18px;
  --r-btn: 980px;
  --bar-h: 52px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #000000;
    --surface: #1d1d1f;
    --panel: #2c2c2e;
    --panel-2: #3a3a3c;
    --ink: #f5f5f7;
    --ink-2: #86868b;
    --line: rgba(255, 255, 255, 0.14);
    --line-strong: rgba(255, 255, 255, 0.26);
    --brand: #00fe78;
    --brand-hover: #4dffa0;
    --on-brand: #042413;
    --accent: #00fe78;
    --accent-hover: #4dffa0;
    --accent-soft: rgba(0, 254, 120, 0.12);
    --on-accent: #042413;
    --glow: rgba(0, 254, 120, 0.1);
    --bar: rgba(0, 0, 0, 0.72);
    --shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.85);
    --thumb-ink: rgba(255, 255, 255, 0.2);
  }
}

:root[data-theme="dark"] {
  --ground: #000000;
  --surface: #1d1d1f;
  --panel: #2c2c2e;
  --panel-2: #3a3a3c;
  --ink: #f5f5f7;
  --ink-2: #86868b;
  --line: rgba(255, 255, 255, 0.14);
  --line-strong: rgba(255, 255, 255, 0.26);
  --brand: #00fe78;
  --brand-hover: #4dffa0;
  --on-brand: #042413;
  --accent: #00fe78;
  --accent-hover: #4dffa0;
  --accent-soft: rgba(0, 254, 120, 0.12);
  --on-accent: #042413;
  --glow: rgba(0, 254, 120, 0.1);
  --bar: rgba(0, 0, 0, 0.72);
  --shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.85);
  --thumb-ink: rgba(255, 255, 255, 0.2);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  overflow-x: clip;   /* свечение героя выходит за край, но не даёт скролла */
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.028em; text-wrap: balance; }
p { margin: 0; }
ul, dl { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }

svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

::selection { background: rgba(0, 254, 120, 0.3); }

.skip {
  position: absolute; left: -9999px; top: 8px; z-index: 60;
  background: var(--surface); padding: 10px 16px; border-radius: 10px; text-decoration: none;
}
.skip:focus { left: 12px; }

/* ---------- Шапка ---------- */

.topbar {
  position: sticky; top: 0; z-index: 40;
  background: var(--bar);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
  /* собственный слой композитора: содержимое страницы не может «всплыть» поверх шапки */
  transform: translateZ(0);
}

.topbar__inner {
  max-width: var(--wrap); margin: 0 auto; min-height: var(--bar-h);
  padding: 0 var(--pad);
  display: flex; align-items: center; gap: 12px;
}

.wordmark {
  text-decoration: none; font-family: var(--font-display);
  font-size: 14.5px; font-weight: 700; letter-spacing: 0;
  white-space: nowrap; color: var(--ink);
}

.wordmark__accent { color: var(--accent); }

.search {
  flex: 1; min-width: 0; position: relative;
  display: flex; align-items: center; gap: 8px;
  max-width: 460px; margin: 0 auto;
  background: var(--panel); border-radius: 999px; padding: 0 12px;
  height: 34px;
  transition: box-shadow 0.2s ease;
}
.search:focus-within { box-shadow: 0 0 0 3.5px var(--accent-soft); }
.search__icon { width: 16px; height: 16px; color: var(--ink-2); flex: none; }
.search input {
  flex: 1; min-width: 0; border: 0; background: none; font-size: 14px; outline: none;
  padding: 0;
}
.search input::-webkit-search-cancel-button { display: none; }
.search__clear {
  border: 0; background: none; padding: 4px; cursor: pointer; color: var(--ink-2);
  display: grid; place-items: center; border-radius: 999px;
}
.search__clear svg { width: 14px; height: 14px; }
.search__clear[hidden] { display: none; }

.kit-btn {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--line-strong); background: none; cursor: pointer;
  height: 34px; padding: 0 13px; border-radius: 999px; font-size: 14px;
  white-space: nowrap; transition: background 0.18s ease, border-color 0.18s ease;
}
.kit-btn:hover { background: var(--panel); }
.kit-btn svg { width: 17px; height: 17px; }
.kit-btn__count {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--brand); color: var(--on-brand); font-size: 12px; font-weight: 600;
  display: grid; place-items: center; font-variant-numeric: tabular-nums;
}
.kit-btn__count[hidden] { display: none; }

/* ---------- Герой ---------- */

.hero {
  position: relative;
  /* герой рисуется одним слоем строго под шапкой: его анимации не мигают поверх topbar */
  isolation: isolate;
  max-width: var(--wrap); margin: 0 auto;
  padding: clamp(56px, 10vw, 120px) var(--pad) clamp(36px, 6vw, 64px);
  display: flex; flex-direction: column; gap: 18px; align-items: center; text-align: center;
}

/* мягкое фирменное свечение, медленно плывущее за заголовком */
.hero::before,
.hero::after {
  content: ""; position: absolute; z-index: -1; border-radius: 50%;
  background: var(--glow); filter: blur(64px); pointer-events: none;
}
.hero::before {
  width: min(420px, 70vw); height: min(420px, 70vw); top: -60px; left: 8%;
  animation: drift-a 16s ease-in-out infinite alternate;
}
.hero::after {
  width: min(340px, 55vw); height: min(340px, 55vw); top: 60px; right: 6%;
  animation: drift-b 20s ease-in-out infinite alternate;
}

/* backwards, а не both: после появления анимация отпускает элемент и слой снимается */
.hero__title, .hero__lead, .hero__actions {
  animation: rise 0.6s cubic-bezier(0.22, 0.7, 0.3, 1) backwards;
}
.hero__lead { animation-delay: 0.08s; }
.hero__actions { animation-delay: 0.16s; }

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4.6vw, 2.9rem); line-height: 1.14; letter-spacing: -0.01em;
  font-weight: 700;
}

.hero__lead { max-width: 44ch; color: var(--ink-2); font-size: clamp(15px, 1.7vw, 19px); }

.hero__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; padding-top: 6px; }

/* ---------- Баннеры ---------- */

/* лента идёт во всю ширину окна: соседние баннеры уходят за края экрана,
   а не упираются в границу контентной колонки чёрной рамкой */
.banners {
  padding: clamp(8px, 2vw, 24px) 0 0;
}

.banners__track {
  display: flex; gap: 14px;
  overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 4px 0;
  margin: -4px 0;
  cursor: grab;
  user-select: none; -webkit-user-select: none;
}
.banners__track::-webkit-scrollbar { display: none; }
/* во время перетаскивания мышью снап отключён — лента идёт ровно за курсором */
.banners__track.is-dragging { cursor: grabbing; scroll-snap-type: none; }

.banner {
  position: relative; overflow: hidden; flex: 0 0 auto;
  width: min(calc(var(--wrap) - 2 * var(--pad)), calc(100% - 2 * clamp(28px, 9vw, 170px)));
  /* кадр 11:4 — ровно пропорции подложки 2200 × 800: картинка показывается целиком
     и на компьютере (1100 × 400), и на смартфоне, без отдельного мобильного макета */
  aspect-ratio: 11 / 4; max-height: 400px;
  scroll-snap-align: center;
  border-radius: clamp(18px, 3vw, 28px);
  display: flex; align-items: center;
}

.banner__img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block;
}
/* баннер с картинкой — только картинка: тексты вшиты в неё самим макетом */
.banner__link { display: block; width: 100%; height: 100%; text-decoration: none; color: inherit; }
.banner__link:focus-visible { outline-offset: -4px; }

/* подложка с названием — её видно, только пока картинка не загружена */
.banner__text {
  position: relative; z-index: 2;
  padding: clamp(20px, 4.5vw, 52px);
  max-width: 70%;
  display: flex; flex-direction: column; gap: clamp(6px, 1.2vw, 12px);
}
.banner__title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1rem, 2.2vw, 1.6rem); line-height: 1.22; letter-spacing: -0.005em;
}

/* фоны заглушек: фиксированные, одинаковые в обеих темах */
.banner--about { background: linear-gradient(120deg, #0c1013, #16211b); color: #f5f7f6; }
.banner--park { background: linear-gradient(120deg, #00fe78, #7dffb8); color: #042413; }
.banner--how { background: var(--panel); color: var(--ink); }
.banner--cinema { background: linear-gradient(120deg, #0d1114, #14231a); color: #f5f7f6; }
.banner--light { background: linear-gradient(120deg, #0e2417, #17492c); color: #f2fff7; }

.banners__dots { display: flex; gap: 7px; justify-content: center; padding-top: 14px; }
.banners__dots button {
  width: 8px; height: 8px; border-radius: 999px; border: 0; padding: 0; cursor: pointer;
  background: var(--line-strong);
  transition: width 0.25s ease, background 0.25s ease;
}
.banners__dots button[aria-current="true"] { width: 24px; background: var(--brand); }

@media (max-width: 760px) {
  .banner { width: calc(100% - 48px); }
  .banner__text { max-width: 88%; }
}

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 22px; border-radius: var(--r-btn);
  border: 1px solid transparent; background: none; cursor: pointer;
  font-size: 15px; font-weight: 500; text-decoration: none; white-space: nowrap;
  transition: background 0.18s ease, border-color 0.18s ease, opacity 0.18s ease,
    transform 0.18s ease, box-shadow 0.18s ease;
}
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn--primary { background: var(--brand); color: var(--on-brand); font-weight: 600; }
.btn--primary:hover {
  background: var(--brand-hover); transform: translateY(-1px);
  box-shadow: 0 10px 26px -12px rgba(0, 254, 120, 0.55);
}
.btn--ghost { border-color: var(--line-strong); }
.btn--ghost:hover { background: var(--panel); }
.btn--quiet { color: var(--ink-2); font-size: 14px; height: 38px; padding: 0 12px; }
.btn--quiet:hover { background: var(--panel); color: var(--ink); }
.btn--block { width: 100%; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.icon-btn {
  width: 34px; height: 34px; border-radius: 999px; border: 0; background: var(--panel);
  cursor: pointer; display: grid; place-items: center; color: var(--ink-2);
}
.icon-btn:hover { color: var(--ink); }
.icon-btn svg { width: 16px; height: 16px; }

/* ---------- Рельс категорий ---------- */

/* каталог — отдельный раздел: отбивается воздухом и собственной шапкой */
.catalog-head {
  max-width: var(--wrap); margin: 0 auto;
  padding: clamp(34px, 5vw, 56px) var(--pad) clamp(18px, 2.4vw, 26px);
  scroll-margin-top: var(--bar-h);
}
.catalog-head__eyebrow {
  font-family: var(--font-display); color: var(--accent);
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
}
.catalog-head__title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.4rem, 2.6vw, 1.9rem); line-height: 1.15; letter-spacing: -0.015em;
  padding-top: 7px;
}
.catalog-head__sub { color: var(--ink-2); font-size: 14px; padding-top: 7px; }
.catalog-head__sub:empty { display: none; }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line-strong); background: none; cursor: pointer;
  height: 32px; padding: 0 14px; border-radius: 999px; font-size: 13.5px;
  white-space: nowrap; color: var(--ink-2);
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}
.pill:hover { color: var(--ink); background: var(--panel); }
.pill[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--on-brand); font-weight: 560; }
.pill small { font-size: 11.5px; opacity: 0.7; font-variant-numeric: tabular-nums; }

/* ---------- Витрина: колонка категорий слева, панель фильтров и список справа ---------- */

.catalog-layout {
  max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad);
  display: grid; grid-template-columns: 224px minmax(0, 1fr); gap: 40px; align-items: start;
  animation: fade 0.5s ease 0.1s both;
}

/* Липкая колонка категорий. Зелёная подложка — один элемент, который переезжает
   к выбранному пункту; на коротких экранах колонка прокручивается внутри себя. */
.side {
  position: sticky; top: calc(var(--bar-h) + 16px); min-width: 0;
  max-height: calc(100vh - var(--bar-h) - 24px); overflow-y: auto; scrollbar-width: thin;
}
.side__nav { position: relative; display: flex; flex-direction: column; gap: 2px; }
.side__hl {
  position: absolute; left: 0; right: 0; top: 0; height: 38px; border-radius: 12px;
  background: var(--brand); z-index: 0; opacity: 0;
  transition: transform 0.34s cubic-bezier(0.22, 0.7, 0.3, 1), opacity 0.2s ease;
}
.side__item {
  position: relative; z-index: 1; display: flex; align-items: center; gap: 10px;
  height: 38px; padding: 0 12px; border-radius: 12px; border: 0; background: none;
  cursor: pointer; width: 100%; text-align: left; font-size: 14px; color: var(--ink-2);
  transition: color 0.22s ease, background 0.16s ease;
}
.side__item svg { width: 18px; height: 18px; flex: none; transition: transform 0.3s cubic-bezier(0.22, 0.7, 0.3, 1); }
.side__item span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side__item small { margin-left: auto; font-size: 12px; font-variant-numeric: tabular-nums; opacity: 0.75; }
.side__item:hover { color: var(--ink); background: var(--panel); }
.side__item[aria-current="true"] { color: var(--on-brand); font-weight: 600; background: none; }
.side__item[aria-current="true"] svg { transform: scale(1.1); }
.side__sep { height: 1px; background: var(--line); margin: 8px 0; flex: none; }

.catalog-main { min-width: 0; }

.cat-head { padding: 2px 0 12px; scroll-margin-top: calc(var(--bar-h) + 12px); }
.cat-head__title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.25rem, 2.2vw, 1.6rem); letter-spacing: -0.01em; line-height: 1.15;
}
.cat-head__sub { color: var(--ink-2); font-size: 14px; padding-top: 4px; }
.cat-head__sub:empty { display: none; }

.toolbar {
  position: sticky; top: var(--bar-h); z-index: 30; background: var(--ground);
  display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line);
}
.brands { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; padding: 2px; }
.brands::-webkit-scrollbar { display: none; }

/* Полосы, которые прокручиваются вбок (бренды, а на узком экране и категории): край
   растворяется там, где список продолжается. Обрезанная посередине кнопка иначе читается
   как сломанная вёрстка. Классы ставит app.js по фактической прокрутке. */
.brands, .side__nav { --fade: clamp(32px, 6vw, 56px); --fade-l: 0px; --fade-r: 0px; }
.is-scroll-start, .is-scroll-end {
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--fade-l),
    #000 calc(100% - var(--fade-r)), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 var(--fade-l),
    #000 calc(100% - var(--fade-r)), transparent 100%);
}
.is-scroll-start { --fade-l: var(--fade); }
.is-scroll-end { --fade-r: var(--fade); }
/* полосу, которая не помещается, можно тянуть мышью (app.js: dragScroll) */
.brands.is-dragging, .side__nav.is-dragging { cursor: grabbing; user-select: none; -webkit-user-select: none; }
.brands.is-dragging .pill, .side__nav.is-dragging .side__item { pointer-events: none; }
.brands .pill { height: 30px; padding: 0 12px; font-size: 13px; }
.tools { display: flex; gap: 8px; flex: none; margin-left: auto; }

.select { position: relative; display: inline-flex; align-items: center; }
.select select {
  height: 32px; border: 1px solid var(--line-strong); border-radius: 999px; background: none;
  padding: 0 28px 0 12px; font-size: 13px; color: var(--ink-2); cursor: pointer;
  -webkit-appearance: none; appearance: none;
  transition: background 0.16s ease, color 0.16s ease;
}
.select select:hover { color: var(--ink); background: var(--panel); }
.select svg { position: absolute; right: 10px; width: 12px; height: 12px; pointer-events: none; color: var(--ink-2); }

.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; padding: 2px; height: 32px; }
.seg button {
  border: 0; background: none; border-radius: 999px; width: 34px; color: var(--ink-2); cursor: pointer;
  display: grid; place-items: center; transition: background 0.16s ease, color 0.16s ease;
}
.seg button svg { width: 15px; height: 15px; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--panel-2); color: var(--ink); }

@media (max-width: 840px) {
  .catalog-layout { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  /* колонка становится липкой лентой пилюль под шапкой */
  .side {
    top: var(--bar-h); z-index: 31; max-height: none; overflow: visible;
    background: var(--bar);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    margin: 0 calc(-1 * var(--pad)); padding: 10px var(--pad); border-bottom: 1px solid var(--line);
  }
  .side__nav { flex-direction: row; gap: 8px; overflow-x: auto; scrollbar-width: none; }
  .side__nav::-webkit-scrollbar { display: none; }
  .side__hl, .side__sep { display: none; }
  .side__item {
    width: auto; height: 32px; gap: 6px; border: 1px solid var(--line-strong); border-radius: 999px;
    padding: 0 14px; font-size: 13.5px; white-space: nowrap;
  }
  .side__item svg { display: none; }
  .side__item small { margin-left: 0; }
  .side__item[aria-current="true"] { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
  .cat-head { scroll-margin-top: calc(var(--bar-h) + 62px); }
  .toolbar { position: static; flex-wrap: wrap; }
  .brands { order: 2; flex-basis: 100%; }
}

/* ---------- Каталог ---------- */

.catalog-zone:not([hidden]) { animation: rise 0.5s cubic-bezier(0.22, 0.7, 0.3, 1) both; }
.catalog-sentinel { height: 1px; }

.catalog { transition: opacity 0.14s ease, transform 0.14s ease; }
/* смена категории: старый список коротко гаснет, новый появляется каскадом */
.catalog.is-leaving { opacity: 0; transform: translateY(-6px); }
.enter > .card, .enter > .row { animation: rise 0.42s cubic-bezier(0.22, 0.7, 0.3, 1) both; animation-delay: calc(var(--i, 0) * 28ms); }
.enter > .row { animation-delay: calc(var(--i, 0) * 16ms); }

.group {
  padding: clamp(36px, 6vw, 64px) 0 0;
  scroll-margin-top: calc(var(--bar-h) * 2 + 16px);
}

.catalog > .group:first-child { padding-top: 22px; }
.group__head { padding-bottom: 8px; display: flex; align-items: center; gap: 10px; }
.group__head::before { content: ""; width: 9px; height: 9px; border-radius: 3px; background: var(--brand); flex: none; }
.section-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.1rem, 2vw, 1.5rem); letter-spacing: -0.01em;
}

.subgroup { padding-top: 24px; }
.subgroup__title {
  overflow-wrap: anywhere; font-size: 12px; font-weight: 590; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-2); padding-bottom: 12px; display: flex; align-items: baseline; gap: 8px;
}
.subgroup__title small { font-weight: 400; letter-spacing: 0; text-transform: none; opacity: 0.8; font-variant-numeric: tabular-nums; }

/* вид «список»: строка вместо карточки, управление то же */
.rows { display: flex; flex-direction: column; }
.row {
  /* последняя колонка вмещает степпер, чтобы он не наезжал на цену; кнопка «+» прижата вправо */
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto minmax(88px, auto); gap: 14px; align-items: center;
  padding: 9px 8px; border-bottom: 1px solid var(--line); border-radius: 10px;
  transition: background 0.16s ease;
}
.row[aria-pressed="true"] { background: var(--accent-soft); }
.row__ico {
  width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(160deg, var(--panel), var(--panel-2));
}
.row__ico svg { width: 20px; height: 20px; color: var(--thumb-ink); stroke-width: 1.3; }
.row__name { font-size: 14.5px; font-weight: 550; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; overflow-wrap: anywhere; }
.row__meta { font-size: 12px; color: var(--ink-2); overflow-wrap: anywhere; }
.row .price { text-align: right; }
.row .card__ctl { position: static; justify-self: end; }
@media (max-width: 560px) {
  .row { grid-template-columns: 36px minmax(0, 1fr) auto minmax(88px, auto); gap: 10px; padding: 8px 4px; }
  .row__ico { width: 36px; height: 36px; }
  .row__ico svg { width: 17px; height: 17px; }
}

.grid {
  display: grid; gap: clamp(12px, 1.6vw, 20px);
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}
@media (max-width: 560px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); }
  .kit-btn { padding: 0 10px; }
  .kit-btn__label { display: none; }
}

.card {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 10px 10px 14px; text-align: left;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.card[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }

.thumb {
  aspect-ratio: 4 / 3; border-radius: 12px;
  background: linear-gradient(160deg, var(--panel), var(--panel-2));
  display: grid; place-items: center; overflow: hidden; position: relative;
}
/* только иконка-заглушка (прямой потомок): в .thumb лежит ещё и плюс со своим svg,
   и общий селектор красил его в цвет фона кружка — плюс «исчезал» при наведении */
.thumb > svg {
  width: 42%; max-width: 74px; color: var(--thumb-ink); stroke-width: 1.2;
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.3, 1), color 0.35s ease;
}
.card[aria-pressed="true"] .thumb { background: var(--accent-soft); }
.thumb--photo { background: var(--panel); }
.thumb__img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.3, 1); }
.row__ico--photo { background: var(--panel); }
.row__img { width: 100%; height: 100%; object-fit: cover; display: block; }

.card__ctl { position: absolute; top: 8px; right: 8px; }
.card__ctl .stepper {
  background: var(--surface); border-color: var(--accent);
  box-shadow: 0 2px 10px -3px rgba(0, 0, 0, 0.5);
}

.card__body { display: flex; flex-direction: column; gap: 4px; padding: 12px 4px 0; flex: 1; }
.card__group { font-size: 11.5px; color: var(--ink-2); letter-spacing: 0.02em; overflow-wrap: anywhere; }
.card__name { font-size: 15px; line-height: 1.25; font-weight: 550; overflow-wrap: anywhere; }

.chips { display: flex; flex-wrap: wrap; gap: 4px; padding-top: 2px; }
.chip {
  font-size: 10.5px; letter-spacing: 0.04em; text-transform: uppercase;
  border: 1px solid var(--line); border-radius: 999px; padding: 2px 7px; color: var(--ink-2);
}

.card__kit { padding-top: 6px; display: flex; flex-direction: column; gap: 2px; }
.card__kit li { font-size: 11.5px; color: var(--ink-2); line-height: 1.35; overflow-wrap: anywhere; }

.card__foot { display: flex; align-items: baseline; padding: 12px 4px 0; margin-top: auto; }
.price { white-space: nowrap; font-size: 15px; font-weight: 590; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.price__unit { font-size: 11.5px; font-weight: 400; color: var(--ink-2); letter-spacing: 0; }

/* Кнопка «в набор» лежит поверх фотографии, поэтому у неё собственный фон,
   тень и жирный плюс: на светлом снимке тонкий контур почти не читался. */
.add {
  width: 30px; height: 30px; border-radius: 999px; flex: none;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 2px 10px -3px rgba(0, 0, 0, 0.5);
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease,
    transform 0.16s ease;
}
.add svg { width: 16px; height: 16px; stroke-width: 2.6; }

/* Подсветка при наведении — только там, где есть настоящее наведение (мышь, трекпад).
   На телефоне палец, скользящий по каталогу, «наводил» на карточки и плюс вспыхивал
   зелёным сам по себе. Клик по карточке ничего не делает, поэтому курсор-рука
   только у самого плюса и счётчика. */
@media (hover: hover) {
  .card:hover {
    border-color: var(--line-strong); transform: translateY(-4px);
    box-shadow: 0 16px 36px -22px rgba(0, 0, 0, 0.35);
  }
  .card:active { transform: translateY(-1px); transition-duration: 0.08s; }
  .card:hover .thumb > svg { transform: scale(1.1) rotate(-2deg); color: var(--accent); }
  .card:hover .thumb__img { transform: scale(1.04); }
  .row:hover { background: var(--panel); }
  .card:hover .add, .row:hover .add {
    background: var(--brand); border-color: var(--brand); color: var(--on-brand);
    transform: scale(1.06);
  }
  .add:hover { transform: scale(1.12); }
}
/* пальцу нужна цель побольше: плюс и кнопки счётчика на касании крупнее */
@media (hover: none) {
  .add { width: 36px; height: 36px; }
  .add svg { width: 18px; height: 18px; }
  .card__ctl .stepper button { width: 30px; height: 30px; }
}

.stepper {
  display: inline-flex; align-items: center; gap: 2px;
  border: 1px solid var(--line-strong); border-radius: 999px; padding: 2px;
}
.stepper button {
  width: 26px; height: 26px; border: 0; border-radius: 999px; background: none;
  cursor: pointer; font-size: 17px; font-weight: 600; line-height: 1; color: var(--ink);
}
.stepper button:hover { background: var(--accent-soft); }
.stepper span {
  min-width: 26px; text-align: center; font-size: 13.5px; font-weight: 560;
  font-variant-numeric: tabular-nums;
}
.stepper--lg button { width: 32px; height: 32px; font-size: 17px; }
.stepper--lg span { min-width: 62px; font-size: 14px; }

.empty-state {
  padding: 64px 0; text-align: center; color: var(--ink-2);
  display: flex; flex-direction: column; gap: 12px; align-items: center;
}

/* ---------- Контакты ---------- */

.contacts {
  max-width: var(--wrap); margin: 0 auto;
  padding: clamp(40px, 6vw, 72px) var(--pad) clamp(44px, 6vw, 76px);
}
.contacts__head { display: flex; flex-direction: column; gap: 5px; }
.contacts__head .section-title { display: flex; align-items: center; gap: 10px; }
.contacts__head .section-title::before {
  content: ""; width: 9px; height: 9px; border-radius: 3px;
  background: var(--brand); flex: none;
}
.contacts__sub { color: var(--ink-2); font-size: 14px; padding-left: 19px; }
.contacts__grid {
  display: grid; gap: 12px; padding-top: 24px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.card-plain {
  background: var(--panel); border-radius: var(--r-card);
  padding: 18px; display: flex; flex-direction: column; gap: 7px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card-plain:hover { transform: translateY(-3px); box-shadow: 0 16px 34px -24px rgba(0, 0, 0, 0.35); }

.card-plain__head { display: flex; align-items: center; gap: 10px; margin-bottom: 2px; }

.card-plain__icon {
  width: 34px; height: 34px; border-radius: 11px; flex: none;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center;
}
.card-plain__icon svg { width: 17px; height: 17px; }
.card-plain h3 { font-size: 15px; }
.card-plain p { color: var(--ink-2); font-size: 14px; }

.link-arrow {
  text-decoration: none; color: var(--accent); font-size: 14px; font-weight: 500;
  width: fit-content; display: inline-flex; align-items: center; gap: 4px;
}
.link-arrow::after { content: "→"; transition: transform 0.2s ease; }
.link-arrow:hover { text-decoration: underline; }
.link-arrow:hover::after { transform: translateX(3px); }

.hours { display: flex; flex-direction: column; gap: 5px; }
.hours div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.hours dt { font-size: 12.5px; color: var(--ink-2); flex: none; }
.hours dd { margin: 0; font-size: 13.5px; font-variant-numeric: tabular-nums; }

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

.footer {
  max-width: var(--wrap); margin: clamp(56px, 8vw, 96px) auto 0;
  padding: 28px var(--pad) calc(40px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 22px 32px;
  justify-content: space-between; align-items: flex-start;
  color: var(--ink-2); font-size: 13px;
}
.footer__col { display: flex; flex-direction: column; gap: 6px; }
.footer__mark { font-family: var(--font-display); font-size: 13px; font-weight: 700; letter-spacing: 0; color: var(--ink); }

.footer__social { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.social {
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none; color: var(--ink); font-size: 13.5px; font-weight: 500;
  transition: color 0.18s ease;
}
.social svg { width: 17px; height: 17px; flex: none; color: var(--accent); transition: transform 0.2s ease; }
.social:hover { color: var(--accent); }
.social:hover svg { transform: translateY(-2px); }

/* ---------- Мобильный док ---------- */

.dock {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 35; display: none; align-items: center; justify-content: space-between; gap: 12px;
  height: 52px; padding: 0 8px 0 18px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--brand); color: var(--on-brand); font-size: 14px;
  box-shadow: var(--shadow), 0 8px 30px -12px rgba(0, 254, 120, 0.4);
}
.dock__count { font-variant-numeric: tabular-nums; font-weight: 600; }
.dock__right {
  background: var(--surface); color: var(--ink); border-radius: 999px; padding: 0 16px;
  height: 38px; display: grid; place-items: center; font-weight: 560;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 760px) {
  .dock { display: flex; }
  .footer { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
}
.dock[hidden] { display: none; }

/* ---------- Набор ---------- */

.scrim {
  position: fixed; inset: 0; z-index: 45; background: rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(2px); opacity: 0; transition: opacity 0.24s ease;
}
.scrim.is-open { opacity: 1; }
.scrim[hidden] { display: none; }

.kit {
  position: fixed; top: 0; right: 0; z-index: 50;
  width: min(430px, 100%); height: 100dvh;
  background: var(--surface); border-left: 1px solid var(--line);
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
  box-shadow: var(--shadow);
}
.kit.is-open { transform: translateX(0); }
.kit[hidden] { display: none; }

.kit__head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 16px 12px; border-bottom: 1px solid var(--line);
}
.kit__head h2 { font-family: var(--font-display); font-size: 15px; font-weight: 700; }

.kit__body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 16px; }

.days {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--panel); border-radius: 14px; padding: 12px 12px 12px 16px;
}
.days__title { font-size: 14px; font-weight: 550; }

.kit__list { display: flex; flex-direction: column; }
.kit__list:empty { display: none; }

.kit-row {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.kit-row:first-child { padding-top: 0; }
.kit-row__name { font-size: 14px; font-weight: 530; line-height: 1.3; }
.kit-row__meta { font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.kit-row__sum { font-size: 13.5px; font-weight: 560; text-align: right; font-variant-numeric: tabular-nums; }
.kit-row__ctl { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.kit-row__drop {
  border: 0; background: none; color: var(--ink-2); cursor: pointer; padding: 4px;
  display: grid; place-items: center;
}
.kit-row__drop:hover { color: var(--ink); }
.kit-row__drop svg { width: 15px; height: 15px; }

.kit__empty { color: var(--ink-2); font-size: 14px; padding: 24px 0; }
.kit__empty[hidden] { display: none; }

.kit__foot {
  border-top: 1px solid var(--line); padding: 14px 16px calc(16px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 10px; background: var(--surface);
}
.totals { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.totals span { font-size: 13px; color: var(--ink-2); }
.totals strong { font-size: 19px; font-weight: 620; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.kit__foot-row { display: flex; gap: 8px; justify-content: space-between; }

/* ---------- Тост ---------- */

.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom));
  transform: translate(-50%, 12px); z-index: 60;
  background: var(--ink); color: var(--ground); border-radius: 999px;
  padding: 11px 20px; font-size: 14px; box-shadow: var(--shadow);
  opacity: 0; transition: opacity 0.2s ease, transform 0.2s ease; pointer-events: none;
  max-width: min(92vw, 460px); text-align: center;
}
.toast.is-open { opacity: 1; transform: translate(-50%, 0); }
.toast[hidden] { display: none; }

/* ---------- Анимации ---------- */

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
}
@keyframes fade {
  from { opacity: 0; }
}
@keyframes drift-a {
  to { transform: translate(60px, 40px) scale(1.15); }
}
@keyframes drift-b {
  to { transform: translate(-50px, -30px) scale(0.9); }
}

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