/* «Yabloko» — тёмная премиальная тема. */

:root {
  --bg: #08090a;
  --bg-2: #0e0f11;
  --surface: #121316;
  --surface-2: #17181c;
  --line: #24262b;
  --line-soft: #1c1e22;
  --text: #f5f6f7;
  --muted: #9a9da4;
  --accent: #3ddc84;
  --accent-hover: #2fc971;
  --accent-ink: #07130b;
  --danger: #ff6b6b;
  --radius: 18px;
  --radius-sm: 12px;
  --container: 1320px;
  --gutter: 24px;
  --shadow: 0 18px 40px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* Фон у корня обязателен: при оттягивании страницы браузер показывает
     область за пределами документа, и без фона у корня она заливалась
     светлым. Цвет берём из переменной, чтобы он всегда совпадал с фоном
     шапки и body (--bg: #08090a). */
  background-color: var(--bg);
  color-scheme: dark;
  /* Жест «потянуть вниз для обновления» оставлен рабочим.
     Раньше здесь стояло overscroll-behavior-y: none — им я глушил мерцание
     внизу баннера. Замер на телефоне показал, что причина была в другом
     (отсутствие фона у html, пересборка слоёв и мой баг с max-width у фото),
     и после их устранения протяжка новой светлой полосы не даёт:
     с включённой и выключенной протяжкой скачок яркости на границе баннера
     одинаков (66 против 66). Поэтому правило убрано, свайп работает снова.
     Если мерцание вернётся — вернуть строку overscroll-behavior-y: none. */
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0 0 .55em; line-height: 1.2; letter-spacing: -.01em; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: none; }
img, svg { display: block; max-width: 100%; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.icon { flex: none; }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text);
  font: 600 15px/1 inherit;
  /* Надпись кнопки не переносится: телефон и «Позвонить» должны читаться
     одной строкой, иначе последние цифры номера уезжают вниз. */
  white-space: nowrap;
  cursor: pointer;
  transition: transform .16s ease, background .16s ease, border-color .16s ease, color .16s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { background: var(--accent-hover); }

.btn-ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-lg { padding: 15px 26px; font-size: 16px; border-radius: 14px; }
.btn-block { width: 100%; }

.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }

.chip b { margin-left: 3px; font-weight: 600; opacity: .8; }

.chip {
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: 500 14px/1 inherit;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.chip:hover { color: var(--text); border-color: #3a3d44; }
.chip.is-active { background: rgba(61, 220, 132, .12); border-color: rgba(61, 220, 132, .5); color: var(--accent); }
.chip--reset { color: var(--muted); }
.chip--reset:hover { color: var(--danger); border-color: rgba(255, 107, 107, .5); }
.chip--toggle { margin-left: 6px; }

/* ---------- уведомление ---------- */

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  max-width: 340px;
  padding: 14px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
  box-shadow: var(--shadow);
  font-size: 15px;
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}
.toast.is-visible { opacity: 1; transform: none; }

.badge {
  position: absolute;
  top: -7px;
  right: -9px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 700;
  line-height: 19px;
  text-align: center;
}
.badge[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .btn:hover { transform: none; }
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(8, 9, 10, .92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}

.header-top { display: flex; align-items: center; gap: 28px; min-height: 78px; }

.brand { display: flex; align-items: center; gap: 12px; flex: none; }
.brand__logo { color: var(--text); }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__text b { font-size: 23px; font-weight: 700; letter-spacing: -.02em; }
.brand__text small { color: var(--muted); font-size: 12px; }

.search {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  max-width: 640px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(61, 220, 132, .12); }
.search input {
  flex: 1;
  min-width: 0;
  padding: 14px 18px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  outline: none;
}
.search input::placeholder { color: #6d7178; }
.search input::-webkit-search-cancel-button { display: none; }
.search__btn {
  display: grid;
  place-items: center;
  width: 48px;
  height: 46px;
  border: 0;
  border-radius: 0 13px 13px 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.search__btn:hover { color: var(--accent); }

.header-actions { display: flex; align-items: center; gap: 26px; margin-left: auto; }
.action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
.action__icon { position: relative; display: grid; place-items: center; color: var(--muted); transition: color .16s ease; }
.action:hover .action__icon { color: var(--accent); }
.action__label { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.action:hover .action__label { color: var(--text); }

/* ---------- телефоны магазина в шапке ----------
   Два номера столбиком. Видны всем — и гостю, и владельцу
   (см. index.html и syncAuthAction в js/app.js). */
.owner-phones {
  display: flex; flex-direction: column; gap: 3px;
  padding-right: 18px; margin-right: 2px;
  border-right: 1px solid var(--line);
}
.owner-phones[hidden] { display: none; }
.owner-phones__row {
  display: flex; align-items: baseline; gap: 7px;
  color: var(--text); text-decoration: none; white-space: nowrap;
  transition: color .16s ease;
}
.owner-phones__row:hover { color: var(--accent); }
.owner-phones__label { color: var(--muted); font-size: 11.5px; min-width: 62px; }
.owner-phones__row b { font-size: 13px; font-weight: 600; }

/* На узком экране два блока с номерами не влезают в шапку рядом с иконками.
   Оставляем номера, но убираем подписи «Позвонить/WhatsApp» и сжимаем отступы —
   покупателю с телефона номер нужен важнее всего, прятать его нельзя. */
@media (max-width: 880px) {
  .owner-phones { padding-right: 10px; margin-right: 0; gap: 2px; }
  .owner-phones__label { display: none; }
  .owner-phones__row b { font-size: 12px; }
}

/* На совсем узких экранах столбик из двух номеров уже мешает кнопкам —
   показываем одной строкой и прячем WhatsApp, оставляя звонок. */
@media (max-width: 560px) {
  .owner-phones { flex-direction: row; gap: 8px; align-items: center; }
  .owner-phones__row[href^="https://wa.me"] { display: none; }
}

/* Кнопка админки — заметная, чтобы владелец сразу её находил. */
.action--admin .action__icon, .action--admin .action__label { color: var(--accent); }
.action--admin:hover .action__icon { color: #6ff0a8; }
.action--admin[hidden] { display: none; }

/* ---------- плавающая кнопка «Связаться» ----------
   После начала прокрутки выезжает справа (состояние переключает js/app.js).
   По нажатию раскрывает «Позвонить» и «WhatsApp». z-index ниже модальных
   окон (60+), но выше содержимого страницы. */
.fab {
  position: fixed; right: 18px; top: 50%; z-index: 55;
  display: flex; flex-direction: column-reverse; align-items: flex-end; gap: 12px;
  /* Закрытое состояние: уехала за правый край и не ловит клики. */
  transform: translate(calc(100% + 28px), -50%);
  opacity: 0; pointer-events: none;
  transition: transform .45s cubic-bezier(.22, .72, .24, 1), opacity .3s ease;
  /* Тянуть кнопку можно вбок, прокрутку страницы вниз это не ломает.
     Текст не выделяется: свайп не должен подчёркивать подписи. */
  touch-action: pan-y;
  -webkit-user-select: none; user-select: none;
}
.fab.is-visible { transform: translate(0, -50%); opacity: 1; pointer-events: auto; }
/* Во время перетаскивания кнопка идёт строго за пальцем — без анимации. */
.fab.is-dragging { transition: none; }
.fab.is-dragging .fab__item { transition: none; }

.fab__main {
  position: relative;
  width: 56px; height: 56px; border-radius: 50%; border: 0; cursor: grab;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), #22b268);
  color: var(--accent-ink);
  box-shadow: 0 12px 28px rgba(61, 220, 132, .32);
  transition: transform .2s ease, box-shadow .2s ease;
  /* touch-action не наследуется: без явного none браузер сам забирает
     жест и шлёт pointercancel — свайп на телефоне из-за этого срывался. */
  touch-action: none;
}
.fab__main:hover { transform: scale(1.06); box-shadow: 0 14px 32px rgba(61, 220, 132, .42); }
.fab.is-dragging .fab__main { cursor: grabbing; }
.fab__main:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.fab__main .icon { transition: transform .3s ease; }
.fab.is-open .fab__main .icon { transform: rotate(135deg) scale(.9); }

/* Мягкая пульсация вокруг кнопки: заметно, но не отвлекает. */
.fab__main::after {
  content: ''; position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid rgba(61, 220, 132, .45);
  animation: fab-ring 2.8s ease-out infinite;
}
.fab.is-open .fab__main::after { animation: none; opacity: 0; }
@keyframes fab-ring {
  0%   { transform: scale(.9); opacity: .7; }
  70%  { transform: scale(1.35); opacity: 0; }
  100% { transform: scale(1.35); opacity: 0; }
}

.fab__menu {
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
  pointer-events: none;
}
.fab.is-open .fab__menu { pointer-events: auto; }

.fab__item {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 11px 16px; border-radius: 999px;
  font-size: 13.5px; font-weight: 600; white-space: nowrap;
  text-decoration: none; color: var(--accent-ink);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .38);
  touch-action: none;
  /* Закрытое состояние: подъезжает справа. */
  opacity: 0; transform: translateX(22px) scale(.94);
  transition: opacity .24s ease, transform .28s cubic-bezier(.22, .72, .24, 1);
}
.fab.is-open .fab__item { opacity: 1; transform: none; }
.fab.is-open .fab__item:nth-child(1) { transition-delay: .05s; }
.fab.is-open .fab__item:nth-child(2) { transition-delay: .11s; }
.fab__item--call { background: var(--accent); }
.fab__item--wa { background: #25d366; }
.fab__item:hover { filter: brightness(1.06); }

/* Открыто окно «Связаться» — кнопку уводим, чтобы не мешала. */
body.is-modal .fab { opacity: 0; pointer-events: none; }

@media (max-width: 560px) {
  .fab { right: 12px; gap: 10px; }
  .fab__main { width: 52px; height: 52px; }
  .fab__item { padding: 10px 14px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .fab, .fab__item { transition: none; }
  .fab__main::after { animation: none; }
}

.badge.is-bump { animation: bump .45s ease; }
@keyframes bump {
  0% { transform: scale(1); }
  45% { transform: scale(1.28); }
  100% { transform: scale(1); }
}

.burger {
  display: none;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.site-nav { border-top: 1px solid var(--line-soft); }
.site-nav__inner { display: flex; align-items: center; gap: 26px; height: 52px; }
.site-nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 100%;
  color: var(--muted);
  font-size: 15px;
  border-bottom: 2px solid transparent;
  transition: color .16s ease, border-color .16s ease;
}
.site-nav a:hover { color: var(--text); }
/* Активным может быть только один пункт — тот, чья категория сейчас открыта. */
.site-nav a.is-active { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------- секции и заголовки ---------- */

.section { padding: 56px 0; }
.section--tight { padding: 34px 0; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}
.section-title { font-size: clamp(24px, 2.4vw, 30px); }
.section-link { color: var(--muted); font-size: 15px; }
.section-link:hover { color: var(--accent); }

.page-title { font-size: clamp(28px, 3vw, 38px); margin-bottom: 6px; }
.page-sub { color: var(--muted); margin: 0; }

.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 22px; color: var(--muted); font-size: 14px; }
.crumbs-sep { opacity: .5; }
.crumbs a:hover { color: var(--accent); }

/* ---------- главный баннер ---------- */

.hero {
  position: relative;
  min-height: clamp(460px, 62vh, 620px);
  padding: 0;
  overflow: hidden;                 /* наезд фото не даёт прокрутки */
  /* Изоляция слоя. Внутри баннера идут непрерывные анимации (наезд фото,
     подъём текста). Без изоляции браузер при перерисовке страницы
     пересобирал и слои баннера — на границе обрезки это давало мерцание.
     contain: paint — рисуем поддерево баннера отдельно;
     isolation — свой контекст наложения, фон страницы под ним стабилен. */
  contain: paint;
  isolation: isolate;
  /* Сплошной цвет страницы под градиентами. Градиенты прозрачны у нижнего
     края, и в момент перерисовки под баннером мог проступить не тот цвет.
     Теперь под ними всегда фон страницы — стык неотличим. */
  background-color: var(--bg);
  background-image:
    radial-gradient(560px 320px at 12% 6%, rgba(58, 122, 255, .14), transparent 60%),
    radial-gradient(620px 340px at 88% 4%, rgba(61, 220, 132, .12), transparent 62%);
}

/* ---------- слайды баннера ----------
   Слайды лежат друг на друге (position: absolute) и меняются плавным
   затуханием. Скрывать их через hidden нельзя: display:none обрывает
   переход, поэтому состояние держим классом is-active.
   Вертикаль отдаём прокрутке страницы, горизонталь — листанию. */

.hero-stage { position: relative; min-height: inherit; touch-action: pan-y; }

.hero-slide {
  position: absolute; inset: 0;
  display: flex; align-items: center;
  opacity: 0; pointer-events: none;
  transition: opacity 1.3s ease;
  /* Слой не «переворачивается» при перерисовке: снимает дрожание
     и мерцание кромок, когда браузер пересобирает страницу при прокрутке. */
  backface-visibility: hidden;
}
.hero-slide.is-active { opacity: 1; pointer-events: auto; }

.hero-media { position: absolute; inset: 0; overflow: hidden; }
.hero-photo { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Режим side — для вертикальных снимков. В полноэкранный баннер такой
   кадр не влезает: cover срезал бы три четверти высоты. Поэтому фото
   стоит в правой панели и показывается целиком (object-fit: contain).
   Ширина в процентах, но не шире 560px — иначе на большом мониторе
   панель заберёт пол-экрана. */
.hero-media--side { inset: 0 0 0 auto; width: min(44%, 560px); }

/* Панель заполняет размытая копия того же снимка: тогда фон не зависит
   от того, светлое фото или тёмное. Край панели растворяем маской -
   иначе виден вертикальный стык с фоном баннера. */
.hero-photo--bg {
  position: absolute; top: -14%; left: -14%; width: 128%; height: 128%;
  object-fit: cover;
  /* Как и у .hero-photo--fg: общее правило img { max-width: 100% } срезало
     ширину до 100 %, а сдвиг left: -14% оставался — справа открывалась
     полоса панели без подложки. */
  max-width: none;
  filter: blur(32px) saturate(1.15) brightness(.55);
  -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, #000 30%);
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, #000 30%);
}
/* Снимок показываем целиком — так вертикальный кадр не обрезается. */
.hero-photo--fg { position: relative; object-fit: contain; }

/* Средние экраны: текст и фото разводим по сторонам, иначе подпись
   длинной строкой наезжает на снимок. */
@media (min-width: 641px) and (max-width: 1240px) {
  .hero-media--side { width: min(40%, 420px); }
  .hero-slide .hero-copy > * { max-width: 46%; }
}

/* Фото едет само: медленный наезд с лёгким смещением. Двигается только
   активный слайд — иначе браузер считал бы анимацию для всех сразу.
   Векторный запасной вариант двигается так же: движение видно и до того,
   как появятся фотографии. */
.hero-slide.is-active .hero-photo,
.hero-slide.is-active .hero-vector { animation: heroKen 24s ease-in-out infinite alternate; }
@keyframes heroKen {
  from { transform: scale(1.05); }
  to   { transform: scale(1.16) translate3d(-1.6%, -1.2%, 0); }
}

/* Снимку в панели (side) наезд не подходит: он выходил бы за края панели
   и обрезал кадр, который мы как раз бережём. Вместо наезда — лёгкий
   подъём. Правило стоит после heroKen, поэтому оно его и перебивает. */
.hero-slide.is-active .hero-photo--fg { animation: heroDrift 26s ease-in-out infinite alternate; }
@keyframes heroDrift {
  from { transform: scale(1); }
  to   { transform: scale(1.03) translate3d(0, -1.2%, 0); }
}

/* Затемнение внутри баннера: слева плотнее (там подписи), справа почти
   прозрачное — снимок остаётся открытым.

   Низ намеренно выходит за кромку на 6px (bottom: -6px), лишнее
   обрезается самим баннером. Причина: высота баннера (330px) при
   дробном масштабе экрана даёт нецелые точки (например
   2,625 × 330 = 866,25). Последняя видимая строка получает частичное
   покрытие, и затемнение в ней смешивалось со светлым снимком под ним:
   внизу баннера проступала светлая полоса.
   С запасом вниз обрезка приходится на прозрачный край затемнения:
   последняя видимая строка накрыта им целиком, смешивать нечего. */
.hero-scrim {
  position: absolute; inset: 0 0 -6px 0;
  background: linear-gradient(90deg, rgba(6, 8, 10, .84) 0%, rgba(6, 8, 10, .5) 38%, rgba(6, 8, 10, .04) 100%);
}

/* Страховка для телефонов: нижние 6px баннера — сплошной цвет фона.

   Обрезка самой полосы лежит вне видимой части (−6px сверху и снизу от
   кромки), поэтому в видимой области она перекрывает кромку целиком —
   независимо от того, как конкретный браузер сглаживает край градиента.
   Здесь это невидимо: к низу баннера затемнение и так доходит до цвета
   фона (см. блок 640px ниже). На широком экране правило не работает
   намеренно: там снимок у нижней кромки светлый, и полоса была бы видна. */
@media (max-width: 640px) {
  .hero::after {
    content: '';
    position: absolute; left: 0; right: 0; bottom: -6px; height: 12px;
    background: var(--bg);
    z-index: 2;
    pointer-events: none;
  }
}

/* Светлый снимок (белый фон товара) — отдельный случай: под обычным
   затемнением белое пятно становится серым, и подписи на нём теряются.
   Поэтому такой снимок приглушаем целиком, а в полноэкранном режиме
   затемняем под текстом плотнее. В режиме side (текст стоит слева от
   панели) сильное затемнение не нужно: снимок в панели и должен быть
   виден. Узкий экран разбирается отдельно, внутри его секции. */
.hero-slide--light .hero-media:not(.hero-media--side) .hero-photo {
  filter: brightness(.6) saturate(1.05);
}
@media (min-width: 641px) {
  .hero-slide--light:not(.hero-slide--side) .hero-scrim {
    background: linear-gradient(90deg,
      rgba(6, 8, 10, .94) 0%, rgba(6, 8, 10, .86) 44%,
      rgba(6, 8, 10, .34) 72%, rgba(6, 8, 10, .22) 100%);
  }
}

/* Векторный запасной вариант: когда фото ещё нет, картинка стоит в центре.
   Она тоже медленно едет (см. heroKen выше), поэтому "живой" фон виден
   и без фотографий. */
.hero-vector { position: absolute; inset: 0; display: grid; place-items: center; opacity: .85; }
.hero-vector .hero-art__svg { width: min(560px, 78%); height: auto; }

/* На широком экране текст ушёл влево — картинку отводим вправо, иначе
   они накладываются друг на друга и фона не видно. */
@media (min-width: 1100px) {
  .hero-vector { place-items: center end; padding-right: 7%; }
  .hero-vector .hero-art__svg { width: min(520px, 44%); }
}

.hero-copy {
  position: relative; z-index: 2;
  width: 100%; max-width: var(--container);
  margin: 0 auto; padding: 0 var(--gutter);
}
.hero-copy > * { max-width: 520px; }

/* На широком экране текст сдвигаем влево и чуть ниже центра: справа
   освобождается место под картинку, и видно её движение. На узком
   сдвиг не нужен — там подпись занимает всю ширину. */
@media (min-width: 1100px) {
  .hero-copy { transform: translate(-44px, 30px); }
}

/* Текст подъезжает снизу — мягко, чтобы не спорить с движением фото. */
.hero-slide.is-active .hero-copy > * { animation: rise .9s cubic-bezier(.22, .72, .24, 1) both; }
.hero-slide.is-active .hero-lead { animation-delay: .12s; }
.hero-slide.is-active .hero-text { animation-delay: .22s; }
.hero-slide.is-active .hero-copy .btn { animation-delay: .32s; }

/* Кому в системе мешает движение — фото и текст стоят на месте. */
@media (prefers-reduced-motion: reduce) {
  .hero-slide.is-active .hero-photo { animation: none; }
  .hero-slide.is-active .hero-copy > * { animation: none; }
}

/* Текст баннера: размер умеренный, чтобы за ним была видна картинка. */
.hero-title { font-size: clamp(26px, 3.3vw, 42px); letter-spacing: -.02em; margin: 0 0 .16em; }
.hero-lead { font-size: clamp(16px, 1.7vw, 20px); color: #e2e5ea; margin: 0 0 10px; }
.hero-text { color: #b9bec6; font-size: 15px; max-width: 44ch; margin: 0 0 22px; }

/* Точки лежат поверх фото у нижнего края — так они не отнимают высоту. */
.hero-dots {
  position: absolute; left: 0; right: 0; bottom: 20px; z-index: 3;
  display: flex; justify-content: center; gap: 9px;
  padding: 0 var(--gutter);
}
/* Точки лежат поверх фото: полупрозрачные, чтобы читались на любом снимке. */
.hero-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .38);
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}
.hero-dot:hover { background: rgba(255, 255, 255, .6); }
.hero-dot.is-active { background: var(--accent); transform: scale(1.2); }

/* На телефоне подписи уходят в левый нижний угол и становятся мелкими:
   фото остаётся главным. Затемняется только нижняя полоса под текстом,
   верх кадра не трогаем — иначе снимок выглядит залитым тёмным. */
@media (max-width: 640px) {
  /* Высота баннера 400 → 330px (−18%). Кадр остаётся главным, но экран
     больше не уходит целиком под один слайд. */
  .hero { min-height: 330px; }
  /* Подписи прижимаем к нижнему краю, а не к середине. */
  .hero-slide { align-items: flex-end; }
  /* Отступ снизу оставляет место точкам-переключателям. */
  .hero-copy { padding-bottom: 38px; }
  /* Иерархия сверху вниз: название → серия → описание → кнопка.
     Ступенька кегля и насыщенности видна без лишних разделителей. */
  .hero-title { font-size: 19px; font-weight: 700; line-height: 1.15; margin-bottom: 2px; }
  .hero-lead { font-size: 13px; line-height: 1.3; color: #e6e9ee; margin-bottom: 3px; }
  /* Абзац в углу занимал бы пол-экрана: оставляем его начало, две строки. */
  .hero-text {
    font-size: 11.5px; line-height: 1.4; margin-bottom: 12px;
    display: -webkit-box; -webkit-box-orient: vertical;
    -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
  }
  /* Кнопка — главное действие: палец должен попадать без прицеливания. */
  .hero-copy .btn { padding: 11px 18px; font-size: 13.5px; border-radius: 11px; }
  .hero-dots { bottom: 12px; }
  /* Было затемнение на всю высоту (.74 → .88) — из-за него снимок выглядел
     закрашенным. Теперь тёмная нижняя полоса под текстом и короткий
     подъём у верхней кромки: кадр «входит» в тёмную шапку, а не лежит
     поверх страницы отдельной картинкой.
     Последняя ступень — сплошной цвет фона страницы (#08090a), а не
     rgba(...,.92). При .92 низ баннера выходил светлее фона: у снимка
     Android разница достигала rgb(26,28,30) против rgb(8,9,10), и под
     баннером проступала серая полоса. Сплошной цвет убирает стык:
     нижняя строка кадра точно совпадает с фоном следующей секции. */
  .hero-scrim {
    background:
      linear-gradient(180deg, rgba(6, 8, 10, .5) 0%, rgba(6, 8, 10, 0) 14%),
      linear-gradient(180deg, rgba(6, 8, 10, 0) 38%, rgba(6, 8, 10, .55) 52%,
        rgba(6, 8, 10, .88) 66%, rgba(8, 9, 10, .97) 88%, rgba(8, 9, 10, 1) 100%);
  }
  /* Панель разворачиваем во весь баннер: обрезка по центру кадра читается
     лучше, чем узкая полоска фото рядом с текстом. */
  .hero-media--side { inset: 0; width: auto; }
  .hero-media--side .hero-photo--bg { display: none; }
  /* Кадру даём запас по размеру — по 3% с каждой стороны, рамка его обрежет.
     Так нижняя кромка снимка не лежит ровно на краю рамки, и щели
     из-за субпиксельного округления взяться неоткуда.
     ВАЖНО: max-width: none обязателен. Общее правило выше
     (img, svg { max-width: 100% }) срезало ширину обратно до 100%,
     а сдвиг left: -3% при этом оставался — справа открывался
     вертикальный просвет, который вдобавок менялся вместе с анимацией
     кен-бёрнса и мерцал. Снимаем лимит — ширина и сдвиг снова согласованы. */
  .hero-photo--fg {
    object-fit: cover;
    max-width: none;
    width: 106%; height: 106%;
    top: -3%; left: -3%;
  }
  /* Затемняет низ, а не весь снимок (см. .hero-scrim выше), поэтому
     приглушение светлого фото здесь слабое: снимок остаётся светлым. */
  .hero-slide--light .hero-media:not(.hero-media--side) .hero-photo,
  .hero-slide--light .hero-photo--fg { filter: brightness(.88) saturate(1.05); }
}

.hero-features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  padding: 28px 0 34px;
  border-bottom: 1px solid var(--line-soft);
}
.hero-feature { display: flex; align-items: center; gap: 14px; }
.hero-feature-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); color: var(--accent); flex: none; }
.hero-feature-text { display: flex; flex-direction: column; color: var(--muted); font-size: 14px; }
.hero-feature-text b { color: var(--text); font-size: 15px; font-weight: 600; }

/* ---------- товары ---------- */

.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(218px, 1fr)); gap: 18px; }

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.product-card:hover { border-color: #3a3e46; transform: translateY(-4px); box-shadow: var(--shadow); }

.product-media {
  position: relative;
  display: grid;
  place-items: center;
  height: 188px;
  padding: 16px;
  background: radial-gradient(circle at 50% 30%, rgba(255, 255, 255, .05), transparent 70%);
  border-bottom: 1px solid var(--line-soft);
}
.product-media .art { width: 112px; height: 124px; }
/* Фото товара вместо векторной картинки */
.product-photo { width: 100%; height: 100%; object-fit: cover; }

/* С фото карточка заполняется снимком целиком, без отступов вокруг. */
.product-media--photo { padding: 0; background: var(--bg-2); }
.product-media--photo .product-link { width: 100%; height: 100%; }

.badge--hit { background: rgba(61, 220, 132, .16); color: var(--accent); }
.badge--new { background: rgba(58, 122, 255, .18); color: #7fb1ff; }
.badge--sale { background: rgba(255, 107, 107, .16); color: #ff9b9b; }
.badge--used { background: rgba(255, 255, 255, .1); color: #d6d8dc; }
.badge--sold { background: rgba(255, 255, 255, .12); color: #f0f1f3; }

/* Товар уже продан (stock = 0): плашка, приглушение, неактивная кнопка. */
.product-card.is-sold { opacity: .55; }
.product-card.is-sold:hover { transform: none; box-shadow: none; border-color: var(--line); }
.btn-buy[disabled] { background: #2a2c31; color: var(--muted); cursor: not-allowed; transform: none; }

/* ---------- окно «Связаться» (вместо корзины) ---------- */
.contact-modal { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px; }
.contact-modal[hidden] { display: none; }
.contact-modal__overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, .65); }

/* ---------- окно «кто смотрел товар» (только владельцу) ----------

   Шире модалки связи: внутри таблица из пяти столбцов, и в узкой коробке
   IP с городом начали бы переноситься. На телефоне окно занимает почти
   весь экран, а таблица прокручивается вбок. */
.views-modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .7); }
.views-modal__box {
  position: relative;
  width: min(760px, 100%);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  padding: 22px 22px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel, #16181c);
  box-shadow: var(--shadow);
  animation: contact-in .18s ease;
}
.views-modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.views-modal__title { margin: 0; font-size: 19px; }
.views-modal__sub { margin: 3px 0 0; color: var(--muted); font-size: 14px; }
.views-modal__close {
  flex: none; display: grid; place-items: center; width: 34px; height: 34px;
  border: 1px solid var(--line); border-radius: 50%;
  background: transparent; color: var(--muted); cursor: pointer;
  transition: color .16s ease, border-color .16s ease;
}
.views-modal__close:hover { color: var(--text); border-color: var(--accent); }
.views-modal__body { overflow: auto; }
.views-load { margin: 8px 0; color: var(--muted); font-size: 14.5px; line-height: 1.5; }

/* Сводка: крупное число и подпись под ним. */
.views-summary { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.views-summary__big { font-size: 32px; font-weight: 700; line-height: 1; }
.views-summary__cap { color: var(--muted); font-size: 14px; }

/* Города: показываем короткими ярлыками, а не столбиком. */
.views-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.views-chip { padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; color: var(--muted); }
.views-chip b { color: var(--text); }

.views-scroll { overflow-x: auto; }
.views-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.views-table th { text-align: left; padding: 8px 10px; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--line); white-space: nowrap; }
.views-table td { padding: 8px 10px; border-bottom: 1px solid rgba(255, 255, 255, .05); white-space: nowrap; }
.views-table tr:last-child td { border-bottom: 0; }
/* IP моноширинным: так легче сравнивать адреса между строками. */
.views-ip { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; color: var(--muted); }
.views-me { color: var(--accent); font-weight: 600; }
.views-guest { color: var(--muted); }

/* ---------- то же окно на телефоне ----------

   Здесь была ошибка: таблица из пяти колонок с запретом переноса
   (white-space: nowrap) шире экрана телефона. Окно растягивалось
   по содержимому и выезжало за край — вместе с кнопкой «Закрыть».
   Отсюда и «крестика не видно».

   Что делаем:
     1) окну — потолок по ширине экрана, и прокрутка только внутри таблицы;
     2) шапку окна делаем липкой: заголовок и крестик остаются на виду,
        как бы далеко ни прокрутился список;
     3) уменьшаем отступы, чтобы таблице досталось больше места. */
@media (max-width: 640px) {
  .views-modal { padding: 10px; }

  .views-modal__box {
    /* min(760px, 100%) могло оказаться шире окна из-за таблицы;
       здесь жёстко привязываем к экрану. */
    width: 100%;
    max-width: 100%;
    max-height: 92vh;
    padding: 16px 14px 14px;
    overflow: hidden;
  }

  .views-modal__head { margin-bottom: 10px; }
  .views-modal__title { font-size: 17px; }
  .views-modal__sub { font-size: 13px; }

  /* Крестик крупнее: по нему надо попасть пальцем, а не мышью. */
  .views-modal__close { width: 40px; height: 40px; }

  .views-summary__big { font-size: 26px; }
  .views-table { font-size: 12.5px; }
  .views-table th, .views-table td { padding: 7px 8px; }

  /* Прокрутка списка — внутри окна, по горизонтали и вертикали.
     Само окно при этом остаётся на месте. */
  .views-modal__body { overflow: auto; -webkit-overflow-scrolling: touch; }
  .views-scroll { overflow-x: auto; }
}
.contact-modal__box {
  position: relative;
  width: min(420px, 100%);
  padding: 26px 24px 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel, #16181c);
  box-shadow: var(--shadow);
  animation: contact-in .18s ease;
}
@keyframes contact-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.contact-modal__close {
  position: absolute; top: 12px; right: 12px;
  display: grid; place-items: center; width: 36px; height: 36px;
  border: 1px solid var(--line); border-radius: 50%;
  background: transparent; color: var(--muted); cursor: pointer;
  transition: color .16s ease, border-color .16s ease;
}
.contact-modal__close:hover { color: var(--text); border-color: var(--accent); }
.contact-modal__title { margin: 0 40px 4px 0; font-size: 20px; line-height: 1.25; }
.contact-modal__price { margin: 0 0 12px; color: var(--accent); font-size: 17px; font-weight: 700; }
.contact-modal__note { margin: 0 0 16px; color: var(--muted); font-size: 14px; line-height: 1.45; }
.contact-modal__foot { margin: 14px 0 0; color: var(--muted); font-size: 13px; text-align: center; }
.contact-options { display: flex; flex-direction: column; gap: 10px; }
.contact-option {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 13px 15px; border: 1px solid var(--line); border-radius: 14px;
  background: rgba(255, 255, 255, .02); color: var(--text);
  font: inherit; text-align: left; text-decoration: none; cursor: pointer;
  transition: border-color .16s ease, background .16s ease;
}
.contact-option:hover { border-color: var(--accent); background: rgba(61, 220, 132, .07); }
.contact-option__icon { display: grid; place-items: center; width: 38px; height: 38px; flex: none;
  border-radius: 11px; background: rgba(61, 220, 132, .14); color: var(--accent); }
.contact-option__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.contact-option__body b { font-size: 15px; }
.contact-option__body small { color: var(--muted); font-size: 12.5px; }
/* ---------- поле пароля с кнопкой «показать» ----------

   Обёртка нужна, чтобы кнопка стояла внутри поля, у правого края.
   Без неё глазу пришлось бы вставать рядом, и он сдвигал бы поле. */
.pass-wrap { position: relative; display: block; }
.pass-wrap input { padding-right: 44px; }
.pass-eye {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color .16s ease;
}
.pass-eye:hover { color: var(--text); }
/* Пароль раскрыт — кнопка подсвечена, чтобы было понятно состояние. */
.pass-eye.is-on { color: var(--accent); }

/* Смена пароля в кабинете: кнопка, по которой раскрывается форма. */
.pass-change { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.pass-change__form { margin-top: 16px; max-width: 420px; }
.pass-change__form[hidden] { display: none; }
.pass-change__form .field { margin-bottom: 14px; }

body.is-modal { overflow: hidden; }

/* ---------- значок просмотров товара (только владельцу) ----------

   Стоит в левом верхнем углу карточки, зеркально сердечку справа.
   Это кнопка, а не просто цифра: по нажатию открывается список — кто
   смотрел, сколько раз, откуда.

   Ноль показываем приглушённо, а не скрываем: владельцу важно сразу
   видеть товары, которыми никто не интересовался. */
.product-eye {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(14, 15, 17, .85);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .16s ease, color .16s ease;
}
.product-eye:hover { border-color: var(--accent); color: var(--accent); }
.product-eye__icon { display: inline-flex; opacity: .8; }
.product-eye__num { line-height: 1; }
/* Сегодняшний прирост: показываем только когда он есть. */
.product-eye__today { color: var(--accent); font-size: 12px; }
/* Никто не смотрел — значок тусклый, чтобы бросалось в глаза. */
.product-eye.is-zero { color: var(--muted); border-color: rgba(255, 255, 255, .08); }

@media (max-width: 640px) {
  .product-eye { top: 7px; left: 7px; height: 26px; padding: 0 8px; font-size: 12px; }
}

.fav-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(14, 15, 17, .8);
  color: var(--muted);
  cursor: pointer;
  transition: color .16s ease, border-color .16s ease;
}
.fav-btn:hover { color: var(--danger); border-color: rgba(255, 107, 107, .45); }
/* В избранном сердечко становится красным, чтобы это было видно сразу. */
.fav-btn.is-on, .fav-btn.is-fav { color: var(--danger); border-color: rgba(255, 107, 107, .6); }
.btn-ghost.is-fav { border-color: rgba(255, 107, 107, .6); color: var(--danger); }

.product-body { display: flex; flex-direction: column; flex: 1; padding: 16px 18px 18px; }
.product-link { display: flex; flex-direction: column; gap: 4px; }
.product-name { font-size: 16px; font-weight: 600; }
.product-spec { color: var(--muted); font-size: 13.5px; }

/* Состояние товара в списке: сразу видно, новый он или б/у. */
.product-cond {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 5px;
  margin: 3px 0 4px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
}
.product-cond::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.product-cond--new { color: #3ddc84; background: rgba(61, 220, 132, .12); }
.product-cond--used { color: #f3b544; background: rgba(243, 181, 68, .15); }

.price-row { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.price { font-size: 19px; font-weight: 700; }
.price--big { font-size: 34px; }
.price-old { color: #6f737a; font-size: 14px; text-decoration: line-through; }
.price-off { padding: 3px 8px; border-radius: 8px; background: rgba(255, 107, 107, .14); color: #ff9b9b; font-size: 12px; font-weight: 600; }

.product-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }

/* «Далее» в конце списка популярных товаров: раскрывает следующую порцию
   на той же странице. Стрелка справа повёрнута вниз — значит «раскрыть
   дальше», а не «перейти». */
.more-row { display: flex; justify-content: center; margin-top: 22px; }
.btn-more { display: inline-flex; align-items: center; gap: 9px; padding: 12px 26px; font-size: 15px; border-radius: 12px; }
.btn-more .icon { transform: rotate(90deg); transition: transform .2s ease; }
.btn-more:hover { border-color: var(--accent); color: var(--accent); }
.btn-more:hover .icon { transform: rotate(90deg) translateX(2px); }

.btn-buy { padding: 10px 22px; border-radius: 12px; background: var(--accent); color: var(--accent-ink); border: 0; font: 600 15px/1 inherit; cursor: pointer; transition: background .16s ease, transform .16s ease; }
.btn-buy:hover { background: var(--accent-hover); transform: translateY(-1px); }

.empty-state { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 64px 20px; text-align: center; }
.empty-icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
.empty-state h2 { font-size: 20px; margin: 6px 0 0; }
.empty-state p { color: var(--muted); margin: 0 0 10px; }

.app.is-entering > * { animation: rise .34s ease both; }
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.product-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(255, 255, 255, .08);
  color: var(--text);
}

/* ---------- плитки категорий ---------- */

.section--tiles { padding-top: 10px; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 18px 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  text-align: center;
  transition: border-color .18s ease, transform .18s ease, background .18s ease;
}
.tile:hover { border-color: #3a3e46; transform: translateY(-3px); background: var(--surface-2); }
/* Картинка крупная и по центру — это главный элемент плитки. */
.tile-art { flex: none; width: 132px; height: 132px; display: flex; align-items: center; justify-content: center; }
.tile-art .art { width: 118px; height: 118px; }
/* Снимок категории: PNG с прозрачным фоном, поэтому лежит прямо на плитке.
   contain сохраняет пропорции — ни одна модель не обрежется. */
.tile-photo { width: 132px; height: 132px; object-fit: contain; display: block; }
.tile-body { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.tile-title { font-size: 15.5px; font-weight: 600; }
.tile-sub { color: var(--muted); font-size: 12.5px; }

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

.filters {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  margin-bottom: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.filters-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.filters-row--chips { gap: 10px; }
.filters-label { color: var(--muted); font-size: 13.5px; }

.filters-search {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 260px;
  padding: 10px 14px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
}
.filters-search input { flex: 1; min-width: 0; border: 0; background: none; color: var(--text); font: inherit; outline: none; }

.filters-price, .filters-sort {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13.5px;
}
.filters-price input {
  width: 94px;
  padding: 10px 12px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  outline: none;
}
.filters-sort select {
  padding: 10px 12px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  outline: none;
  cursor: pointer;
}
.filters-search:focus-within, .filters-price input:focus, .filters-sort select:focus { border-color: var(--accent); }

/* ---------- блок ремонта на главной ---------- */

.repair-banner {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  align-items: center;
  gap: 30px;
  margin: 12px 0 44px;
  padding: 28px;
  background: linear-gradient(120deg, var(--surface) 0%, #101319 60%, #12161c 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.repair-info { display: flex; flex-direction: column; }
.repair-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(19px, 1.9vw, 24px);
  margin-bottom: .4em;
}
.repair-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: rgba(61, 220, 132, .12);
  color: var(--accent);
  flex: none;
}
.repair-text { color: var(--muted); font-size: 14px; max-width: 52ch; margin: 0 0 20px; }
.repair-features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 22px; }
.repair-item { display: flex; align-items: flex-start; gap: 12px; color: var(--muted); font-size: 14.5px; }
.repair-item svg { color: var(--accent); margin-top: 2px; }
.repair-item-text { display: flex; flex-direction: column; }
.repair-item-text b { color: var(--text); font-weight: 600; font-size: 14.5px; }
.repair-logo {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 15px;
  background: rgba(61, 220, 132, .1);
  border: 1px solid rgba(61, 220, 132, .28);
  color: var(--accent);
  flex: none;
}
.repair-art { display: grid; place-items: center; }
.repair-art .art { width: 100%; max-width: 320px; height: auto; }

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

.pdp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 40px; }
.pdp-media {
  position: relative;
  display: grid;
  place-items: center;
  padding: 40px;
  min-height: 420px;
  background: radial-gradient(circle at 50% 35%, rgba(255, 255, 255, .06), transparent 68%), var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.pdp-media .art { width: 260px; height: 286px; }
.pdp-media .product-photo { max-width: 100%; max-height: 420px; }

/* Когда у товара есть фото — рамка заполняется целиком, без пустых полей. */
.pdp-media--photo {
  padding: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--bg-2);
}
.pdp-media--photo .gallery { width: 100%; }
/* Один снимок — рамка по его форме: горизонтальный показывается
   горизонтально, вертикальный — вертикально, без обрезки и растяжения. */
.pdp-media--photo .gallery__stage { min-height: 0; }
.pdp-media--photo .gallery--single .gallery__stage { aspect-ratio: auto; }
.pdp-media--photo .gallery--single .gallery__img { position: static; height: auto; }
/* Несколько снимков — рамка одна на всех, иначе карточка «прыгала» бы
   по высоте при листании. Фото всё равно видно целиком (contain). */
.pdp-media--photo .gallery:not(.gallery--single) .gallery__stage { aspect-ratio: 4 / 3; }
.pdp-media--photo .gallery__thumbs { padding: 0 14px 14px; margin-top: 12px; }

/* ---------- галерея фото в карточке товара ----------
   Без библиотек: стрелки, точки, миниатюры и свайп.
   Тени мягкие, углы скруглённые — в общем стиле сайта. */

.gallery { position: relative; width: 100%; }

.gallery__stage {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 320px;
  border-radius: calc(var(--radius) - 4px);
  overflow: hidden;
  cursor: grab;
  /* Вертикальную прокрутку оставляем пальцу, горизонталь забирает галерея. */
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}
.gallery__stage:active { cursor: grabbing; }

/* Слайды лежат друг на друге: карточка не «прыгает» по высоте при листании.
   object-fit: contain — снимок виден целиком, в своих пропорциях:
   раньше стоял cover, и фото обрезалось по краям, а мелкие детали
   растягивались и выглядели крупнее, чем есть на самом деле. */
.gallery__img {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: calc(var(--radius) - 4px);
  opacity: 0;
  transform: scale(.985);
  transition: opacity .26s ease, transform .26s ease;
  pointer-events: none;
  -webkit-user-drag: none;
}
.gallery__img.is-active { opacity: 1; transform: none; }

.gallery__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(14, 15, 17, .72);
  color: var(--text);
  cursor: pointer;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .35);
  transition: color .16s ease, border-color .16s ease, transform .16s ease;
}
.gallery__nav:hover { color: var(--accent); border-color: rgba(61, 220, 132, .5); }
.gallery__nav:active { transform: translateY(-50%) scale(.94); }
.gallery__nav--prev { left: 8px; }
.gallery__nav--next { right: 8px; }
.gallery__nav--prev svg { transform: rotate(180deg); }

.gallery__counter {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(14, 15, 17, .72);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12.5px;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.gallery__dots {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  display: flex;
  gap: 7px;
}
.gallery__dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .28);
  cursor: pointer;
  transition: background .18s ease, width .18s ease;
}
.gallery__dot:hover { background: rgba(255, 255, 255, .5); }
.gallery__dot.is-active { width: 20px; border-radius: 999px; background: var(--accent); }

/* Миниатюры под основным снимком */
.gallery__thumbs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
}
.gallery__thumb {
  width: 60px;
  height: 60px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
  transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.gallery__thumb:hover { transform: translateY(-2px); }
.gallery__thumb.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(61, 220, 132, .25), 0 4px 14px rgba(0, 0, 0, .25);
}
.gallery__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* На телефоне кнопки и миниатюры чуть меньше, отступы компактнее. */
@media (max-width: 880px) {
  .pdp-media { padding: 22px; min-height: auto; }
  .pdp-media--photo { padding: 0; }
  .gallery__nav { width: 36px; height: 36px; }
  .gallery__thumb { width: 52px; height: 52px; border-radius: 10px; }
  .gallery__dots { bottom: 12px; }
}
.pdp-info { display: flex; flex-direction: column; gap: 14px; }
.pdp-brand { color: var(--muted); font-size: 13.5px; margin: 0; }
.pdp-title { font-size: clamp(26px, 3vw, 36px); margin: 0; }
.pdp-spec { color: var(--muted); margin: 0; }
.pdp-rating { display: flex; align-items: center; gap: 8px; color: var(--accent); font-size: 14px; }
.pdp-rating span { color: var(--muted); }
.pdp-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { padding: 6px 13px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.pdp-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; margin: 6px 0; }
.pdp-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.pdp-usps { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; color: var(--muted); font-size: 14.5px; }
.pdp-usps li { display: flex; align-items: center; gap: 10px; }
.pdp-usps svg { color: var(--accent); }

.qty {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.qty button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.qty button:hover { background: var(--surface-2); color: var(--accent); }
.qty span, .qty-input { min-width: 34px; text-align: center; font-size: 15px; }
.qty-input { width: 44px; border: 0; background: transparent; color: var(--text); font: inherit; outline: none; }

.pdp-condition { margin: 12px 0 0; color: var(--muted); font-size: 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pdp-condition b { color: var(--text); }
.pdp-condition .cond-badge { padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pdp-condition--new .cond-badge { color: #3ddc84; background: rgba(61, 220, 132, .12); }
.pdp-condition--used .cond-badge { color: #f3b544; background: rgba(243, 181, 68, .15); }

/* Телефон магазина на странице оформления. */
.checkout-seller { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.checkout-seller b { color: var(--text); }

/* Вход и регистрация: узкая форма по центру страницы. */
.auth-layout { max-width: 460px; margin: 0 auto; }
.auth-layout .form-card { width: 100%; }

/* ---------- правка товара прямо на странице (только владелец) ----------
   Скрыто от покупателей: блоки появляются лишь у админа. */

.pdp-admin { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.pdp-admin__hint { color: var(--muted); font-size: 12.5px; }

.site-edit { margin-top: 12px; }
.site-edit[hidden] { display: none; }
.site-edit__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.site-edit label { display: flex; flex-direction: column; gap: 5px; }
.site-edit label > span { color: var(--muted); font-size: 12.5px; }
.site-edit input {
  width: 100%; padding: 11px 12px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px;
  color: var(--text); font: inherit; outline: none;
}
.site-edit input:focus { border-color: var(--accent); }
.site-edit select {
  width: 100%; padding: 11px 12px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px;
  color: var(--text); font: inherit; outline: none;
}
.site-edit select:focus { border-color: var(--accent); }
/* Название и описание — на всю ширину: они длиннее остальных полей. */
.site-edit__wide { grid-column: 1 / -1; }
.site-edit__sub { margin: 16px 0 6px; color: var(--muted); font-size: 12.5px; }
.site-edit__note { color: var(--muted); font-size: 13px; }

/* Фото в режиме правки: миниатюры с крестиком и кнопка добавления. */
.site-edit__photos { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.site-photo { position: relative; width: 76px; height: 76px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.site-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.site-photo__del {
  position: absolute; top: 4px; right: 4px; display: grid; place-items: center;
  width: 22px; height: 22px; padding: 0; border: none; border-radius: 50%;
  background: rgba(0, 0, 0, .62); color: #fff; font: 600 14px/1 inherit; cursor: pointer;
}
.site-photo__del:hover { background: var(--danger); }

/* Опасные действия внизу блока правки */
.site-edit__danger { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.site-edit__danger [data-site-delete] { color: #ff9b9b; border-color: rgba(255, 107, 107, .4); }

/* ---------- окно «Добавить товар» ----------
   Одна разметка на две страницы: владелец добавляет товар и с сайта,
   и из панели. Разметку создаёт js/addproduct.js. */

.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 14px; }
.modal[hidden] { display: none; }
.modal__shade { position: absolute; inset: 0; background: rgba(0, 0, 0, .62); }
.modal__card {
  position: relative; width: min(760px, 100%); max-height: 92vh; overflow: auto;
  padding: 20px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.modal__head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.modal__head h2 { font-size: 18px; margin: 0; }
.modal__x {
  margin-left: auto; display: grid; place-items: center;
  width: 34px; height: 34px; padding: 0;
  border: 1px solid var(--line); border-radius: 10px;
  background: transparent; color: var(--muted);
  font: 600 18px/1 inherit; cursor: pointer;
}
.modal__x:hover { color: var(--text); border-color: var(--accent); }
.modal__sub { margin: 18px 0 10px; font-size: 15px; }
.modal__sub small { font-weight: 400; }

/* Подсказки фирмы: чипы пересобираются на каждый ввод в поле бренда. */
.brand-chips { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.brand-chip {
  padding: 7px 14px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--bg-2); color: var(--text);
  font: inherit; font-size: 13.5px; cursor: pointer;
}
.brand-chip:hover { border-color: var(--accent); color: var(--accent); }
/* Единственное совпадение — подсвечиваем: ввели «sam», жми и готово. */
.brand-chip.is-guess { border-color: var(--accent); color: var(--accent); background: rgba(61, 220, 132, .12); }

.modal .field--wide { grid-column: 1 / -1; }
body.modal-open { overflow: hidden; }

/* Поля окна: те же, что у формы, но без внутренних отступов формы. */
.modal .form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.modal .field { display: flex; flex-direction: column; gap: 6px; }
.modal .field > span { color: var(--muted); font-size: 12.5px; }
.modal .field input, .modal .field select {
  width: 100%; padding: 12px 13px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px;
  color: var(--text); font: inherit; outline: none;
}
.modal .field input:focus, .modal .field select:focus { border-color: var(--accent); }
.modal .admin-note { color: var(--muted); font-size: 12.5px; }
.modal .row-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.modal .btn-mini { padding: 8px 14px; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--text); font: inherit; font-size: 13.5px; cursor: pointer; }
.modal .btn-mini:hover { border-color: var(--accent); color: var(--accent); }

/* Своя характеристика в окне: название, значение, удалить. */
.modal .spec-edit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto; gap: 8px; margin-top: 8px; }
.modal .spec-edit input {
  width: 100%; padding: 11px 12px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px;
  color: var(--text); font: inherit; outline: none;
}
.modal .spec-edit input:focus { border-color: var(--accent); }
.modal .spec-edit__del {
  display: grid; place-items: center; width: 44px; padding: 0;
  border: 1px solid var(--line); border-radius: 10px;
  background: transparent; color: var(--muted);
  font: 600 16px/1 inherit; cursor: pointer;
}
.modal .spec-edit__del:hover { color: #ff9b9b; border-color: rgba(255, 107, 107, .5); }

/* Таблица характеристик: обычный вид и вид для правки. */
.specs-edit { display: none; }
.pdp.is-editing .specs[data-specs-view] { display: none; }
.pdp.is-editing .specs-edit { display: grid; gap: 10px; }

.spec-line { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) auto; gap: 8px; }
.spec-line input {
  width: 100%; padding: 12px 13px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  color: var(--text); font: inherit; outline: none;
}
.spec-line input:focus { border-color: var(--accent); }
.spec-line__del {
  display: grid; place-items: center;
  width: 44px; padding: 0;
  border: 1px solid var(--line); border-radius: 10px;
  background: transparent; color: var(--muted);
  font: 600 16px/1 inherit; cursor: pointer;
}
.spec-line__del:hover { color: #ff9b9b; border-color: rgba(255, 107, 107, .5); }

.site-edit-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.site-edit-actions[hidden] { display: none; }
.site-edit-msg { font-size: 13.5px; }
.site-edit-msg.is-ok { color: var(--accent); }
.site-edit-msg.is-error { color: var(--danger); }

.specs { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.spec-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 14px 18px; background: var(--surface); }
.spec-key { color: var(--muted); font-size: 14px; }
.spec-val { font-size: 14.5px; text-align: right; }

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

.cart-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 26px; align-items: start; }
.cart-lines { display: flex; flex-direction: column; gap: 14px; }
.cart-line {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.cart-line__art .art { width: 92px; height: 92px; }
.cart-line__body { display: flex; flex-direction: column; gap: 6px; }
.cart-line__name { font-weight: 600; }
.cart-line__name:hover { color: var(--accent); }
.cart-line__spec { color: var(--muted); font-size: 13.5px; margin: 0; }
.cart-line__controls { display: flex; align-items: center; gap: 16px; }
.cart-line__price { font-size: 18px; font-weight: 700; white-space: nowrap; }
.cart-remove { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 13.5px; cursor: pointer; }
.cart-remove:hover { color: var(--danger); }

.cart-summary {
  position: sticky;
  top: 150px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.cart-summary__title { font-size: 20px; margin: 0; }
.cart-summary__note { color: var(--muted); font-size: 13px; margin: 0; }

.promo { display: flex; flex-direction: column; gap: 8px; }
.promo__label { color: var(--muted); font-size: 13.5px; }
.promo__row { display: flex; gap: 8px; }
.promo__row input {
  flex: 1;
  min-width: 0;
  padding: 11px 14px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  outline: none;
}
.promo__row input:focus { border-color: var(--accent); }
.promo__note { color: var(--muted); font-size: 12.5px; margin: 0; }

.totals { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.totals > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.totals dt { color: var(--muted); font-size: 14.5px; }
.totals dd { margin: 0; font-size: 15px; }
.totals__discount dd { color: var(--accent); }
.totals__total { padding-top: 12px; border-top: 1px solid var(--line); }
.totals__total dt { color: var(--text); font-size: 16px; }
.totals__total dd { font-size: 24px; font-weight: 700; }

.mini-list { display: flex; flex-direction: column; gap: 8px; }
.mini-list li { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; color: var(--muted); font-size: 14px; }
.mini-list b { color: var(--text); white-space: nowrap; }

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

.form-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.form-card__title { font-size: 19px; margin: 0; }
.form-card__note { color: var(--muted); font-size: 14px; margin: -8px 0 0; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field > span { color: var(--muted); font-size: 13.5px; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--text);
  font: inherit;
  outline: none;
  transition: border-color .16s ease;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); }
.field input::placeholder, .field textarea::placeholder { color: #6d7178; }

.check { display: flex; align-items: flex-start; gap: 10px; color: var(--muted); font-size: 13.5px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--accent); }

.form-msg { margin: 0; font-size: 14.5px; }
.form-msg.is-ok { color: var(--accent); }
.form-msg.is-error { color: var(--danger); }

.radio-list { display: grid; gap: 10px; }
.radio-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease;
}
.radio-card:hover { border-color: #3a3e46; }
.radio-card input { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.radio-card__body { display: flex; flex-direction: column; }
.radio-card__body small { color: var(--muted); font-size: 12.5px; }
.radio-card__price { margin-left: auto; color: var(--muted); font-size: 14px; white-space: nowrap; }
.radio-card:has(input:checked) { border-color: rgba(61, 220, 132, .55); background: rgba(61, 220, 132, .05); }

.checkout-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 26px; align-items: start; }

/* ---------- ремонт: услуги и заявка ----------

   Услуги разделены на два раздела: компьютеры и телефоны. Они идут
   друг под другом — сначала компьютерные, ниже телефонные. У каждого
   раздела свой цвет и своя картинка, так видно с первого взгляда,
   что где. Все рисунки векторные (SVG), без картинок-файлов. */

/* Секции идут в один столбец: при двух узких колонках название услуги
   обрезалось, поэтому вертикальный порядок надёжнее.
   Ширину ограничиваем — иначе на большом мониторе строка услуги
   растягивалась бы на весь экран и цена уезжала от названия. */
.repair-columns { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; align-items: start; max-width: 900px; }

/* Страница ремонта: всё содержимое — одна колонка 900px по центру.
   Раньше блоки стояли по левому краю: на мониторе 1320px справа
   оставалась пустая полоса шире 400px. Ширину по-прежнему ограничиваем
   900px (см. комментарий выше), но теперь её центр совпадает с центром
   страницы. На телефоне окно уже 900px, поэтому там ничего не меняется. */
.repair-page > .section-head,
.repair-page > .repair-edit,
.repair-page > .repair-columns,
.repair-page > .repair-side,
.repair-page > .contact-cta {
  max-width: 900px;
  margin-inline: auto;
}

.repair-col {
  position: relative;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
/* Мягкое свечение в углу — задаёт цвет колонки. */
.repair-col::before {
  content: '';
  position: absolute;
  inset: -40% 40% 60% -20%;
  background: radial-gradient(closest-side, var(--col-glow), transparent 70%);
  opacity: .5;
  pointer-events: none;
}
.repair-col--pc { --col-accent: #a78bfa; --col-glow: rgba(124, 58, 237, .22); }
.repair-col--phone { --col-accent: #f0c452; --col-glow: rgba(201, 162, 39, .2); }

.repair-col__head { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.repair-col__art {
  flex: none;
  display: grid; place-items: center;
  width: 62px; height: 62px;
  border-radius: 16px;
  background: var(--bg-2);
  border: 1px solid var(--line);
}
.repair-col__art .art { width: 46px; height: auto; }
.repair-col__head-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.repair-col__title { font-size: 19px; margin: 0; }
.repair-col__lead { margin: 0; color: var(--muted); font-size: 13px; }
/* Число услуг в кружке — видно объём раздела. */
.repair-col__count {
  margin-left: auto; flex: none;
  display: grid; place-items: center;
  min-width: 30px; height: 30px; padding: 0 8px;
  border-radius: 999px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--col-accent);
  font-size: 13.5px; font-weight: 600;
}
.repair-col .services { grid-template-columns: 1fr; gap: 10px; }
.repair-col__empty { margin: 0; color: var(--muted); font-size: 14px; }
/* «Изменить» — над списком услуг своего раздела. Ширина по тексту,
   чтобы не растягивалась на всю строку. */
.repair-col__edit { margin: 0 0 14px; width: fit-content; }

/* Строка услуги: слева название, справа цена и срок. При наведении
   подсвечиваем краем со стороны колонки — понятно, куда нажали. */
.services { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.service-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 20px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color .18s ease, transform .18s ease;
}
.service-row::before {
  content: '';
  position: absolute;
  left: 0; top: 14px; bottom: 14px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--col-accent, var(--accent));
  opacity: .55;
}
.service-row:hover { border-color: var(--col-accent, var(--accent)); transform: translateX(2px); }
.service-row__main { display: flex; flex-direction: column; }
.service-row__main b { font-weight: 600; }
.service-row__main span { color: var(--muted); font-size: 13px; }
.service-row__meta { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.service-row__time { color: var(--muted); font-size: 12.5px; }
.service-row__price { color: var(--col-accent, var(--accent)); font-weight: 600; white-space: nowrap; }

/* ---------- панель «Изменить» на странице «Ремонт» (только владельцу) ----------
   Обычный посетитель её не видит: в разметку она попадает лишь при isAdmin,
   плюс скрыта атрибутом hidden до нажатия «Изменить». */

.repair-edit {
  margin: 0 0 22px; padding: 20px;
  background: var(--surface); border: 1px solid var(--accent);
  border-radius: var(--radius);
}
.repair-edit[hidden] { display: none; }
.repair-edit__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.repair-edit__title { margin: 0; font-size: 17px; }
.repair-edit__sub { margin: 22px 0 10px; font-size: 15px; padding-top: 16px; border-top: 1px solid var(--line); }
.repair-edit__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 14px 0; }
.repair-edit__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.repair-edit__msg { margin: 12px 0 0; font-size: 13.5px; }
.repair-edit__msg.is-ok { color: var(--accent); }
.repair-edit__msg.is-error { color: var(--danger); }

/* Общие поля панели (они же используются внутри формы). */
.service-row__field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.service-row__field > span { color: var(--muted); font-size: 11.5px; }
.service-row__field input, .service-row__field select {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface-2); color: var(--text); font: inherit; font-size: 14px;
}
.service-row__field input:focus, .service-row__field select:focus {
  outline: none; border-color: var(--accent);
}
.service-row__field--price input { border-color: rgba(61, 220, 132, .55); font-weight: 600; color: var(--accent); }
.btn-sm { padding: 9px 14px; font-size: 13.5px; border-radius: 10px; }
.btn-danger { background: rgba(255, 107, 107, .14); color: #ff9b9b; border-color: rgba(255, 107, 107, .35); }
.btn-danger:hover { background: rgba(255, 107, 107, .22); }

@media (max-width: 640px) {
  .repair-edit { padding: 16px; }
  .repair-edit__actions .btn { flex: 1 1 100%; }
}

.repair-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: 26px; align-items: start; }
.repair-side { display: flex; flex-direction: column; gap: 16px; padding: 26px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.repair-side h3 { font-size: 18px; margin: 0; }
.repair-steps { display: flex; flex-direction: column; gap: 12px; counter-reset: rs; }
.repair-steps li { position: relative; padding-left: 36px; color: var(--muted); font-size: 14.5px; counter-increment: rs; }
.repair-steps li::before {
  content: counter(rs);
  position: absolute;
  left: 0;
  top: -1px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(61, 220, 132, .12);
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 700;
}
.repair-side__contact { margin: 0; color: var(--muted); font-size: 14.5px; }
.repair-side__contact a { color: var(--accent); }

.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.info-card { display: flex; flex-direction: column; gap: 4px; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.info-card__icon { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 8px; border-radius: 11px; background: var(--surface-2); color: var(--accent); }
.info-card__label { color: var(--muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; }
.info-card__value { font-size: 15.5px; }
.info-card__value small { color: var(--muted); font-size: 13px; }

.contact-cta { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 32px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.contact-cta p { color: var(--muted); margin: 0; }
.contact-cta__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

.success { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; max-width: 620px; margin: 0 auto; padding: 40px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.success__icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: rgba(61, 220, 132, .14); color: var(--accent); }
.success__total { display: flex; align-items: baseline; justify-content: space-between; width: 100%; padding-top: 14px; border-top: 1px solid var(--line); }
.success__total b { font-size: 26px; }
.success__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- панель корзины ---------- */

.drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(4, 5, 6, .66);
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s ease, visibility .22s ease;
}
.drawer-overlay.is-open { opacity: 1; visibility: visible; }

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  width: min(420px, 100%);
  background: var(--bg-2);
  border-left: 1px solid var(--line);
  transform: translateX(102%);
  transition: transform .26s ease;
}
.drawer.is-open { transform: none; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 22px; border-bottom: 1px solid var(--line); }
.drawer__head h2 { margin: 0; font-size: 20px; }
.drawer__close { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 10px; background: none; color: var(--muted); cursor: pointer; }
.drawer__close:hover { color: var(--text); border-color: #3a3e46; }
.drawer__items { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding: 18px 22px; }
.drawer__foot { display: flex; flex-direction: column; gap: 12px; padding: 22px; border-top: 1px solid var(--line); }
.drawer__total { display: flex; align-items: baseline; justify-content: space-between; }
.drawer__total span { color: var(--muted); }
.drawer__total b { font-size: 22px; }
.drawer-empty { color: var(--muted); font-size: 15px; }

.drawer-item { display: grid; grid-template-columns: 62px 1fr auto; align-items: center; gap: 12px; }
.drawer-item__art .art { width: 62px; height: 62px; }
.drawer-item__body { display: flex; flex-direction: column; min-width: 0; }
.drawer-item__body b { font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer-item__body small { color: var(--muted); font-size: 13px; }
.drawer-item__remove { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 4px; }
.drawer-item__remove:hover { color: var(--danger); }

/* ---------- футер ---------- */

.site-footer { margin-top: 40px; border-top: 1px solid var(--line-soft); background: var(--bg-2); }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(2, minmax(0, .8fr)) 1.2fr minmax(0, .8fr); gap: 30px; padding: 46px var(--gutter) 34px; }
.footer-col { display: flex; flex-direction: column; gap: 9px; }
.footer-col h3 { font-size: 15px; color: var(--text); margin: 0 0 4px; }
.footer-col a, .footer-col span, .footer-col p { color: var(--muted); font-size: 14px; margin: 0; }
.footer-col a:hover { color: var(--accent); }
.footer-col--brand .brand--footer { margin-bottom: 6px; }
.footer-col--contacts a:first-of-type { color: var(--text); font-size: 16px; font-weight: 600; }
.footer-note { color: var(--muted); font-size: 12px; opacity: .8; }
.socials { display: flex; gap: 10px; }
.socials a { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 11px; color: var(--muted); }
.socials a:hover { color: var(--accent); border-color: rgba(61, 220, 132, .45); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px var(--gutter) 26px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 13.5px; }

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

/* Возврат к обычной раскладке: разделы уже стоят друг под другом,
   поэтому ужимать шрифты и строки больше не нужно. */
@media (max-width: 880px) {
  .repair-columns { gap: 18px; }
  .repair-col { padding: 18px; }
  .repair-col__title { font-size: 17px; }
  .service-row { padding: 14px 16px; gap: 12px; }
}

@media (max-width: 1200px) {
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1024px) {
  :root { --gutter: 20px; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .header-top { flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px; gap: 14px; }
  .pdp { grid-template-columns: 1fr; gap: 26px; }
  .cart-layout, .checkout-layout, .repair-grid { grid-template-columns: minmax(0, 1fr); }
  .cart-summary { position: static; }
  .repair-banner { grid-template-columns: 1fr; }
  .repair-art { order: -1; }
}

@media (max-width: 880px) {
  .burger { display: grid; margin-left: auto; }
  .header-actions { gap: 18px; }
  .action__label { display: none; }
  .site-nav { display: none; }
  .site-header.is-nav-open .site-nav { display: block; }
  .site-nav__inner { flex-direction: column; align-items: stretch; gap: 0; height: auto; padding: 6px 0 14px; }
  .site-nav a { height: auto; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
  .site-nav a.is-active { border-bottom-color: var(--line-soft); color: var(--accent); }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  /* Плитка вертикальная: картинка сверху, подпись снизу. Ужимаем картинку
     под ширину колонки, иначе на телефоне она вылезает за края. */
  .tile { gap: 8px; padding: 14px 10px 12px; }
  .tile-art { width: 104px; height: 104px; }
  .tile-art .art { width: 84px; height: 84px; }
  .tile-photo { width: 104px; height: 104px; }
  .tile-title { font-size: 14.5px; }
  .tile-sub { font-size: 12px; }
  .hero-features { grid-template-columns: 1fr; gap: 14px; }
  .products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .product-media { height: 134px; padding: 12px; }
  .product-media .art { width: 88px; height: 98px; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .section { padding: 32px 0; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 16px; }
  .section-title { font-size: 22px; }
}

@media (max-width: 520px) {
  :root { --gutter: 16px; }
  /* Кнопки во всю ширину: на узком экране «Позвонить +7…» не умещается
     в одну строку и уезжала за край — растягиваем её по колонке. */
  .contact-cta__actions { width: 100%; }
  .contact-cta__actions .btn { flex: 1 1 100%; }
  /* Самый узкий экран (320 px): «Позвонить +7 940 726-25-11» в одну строку
     влезает только уменьшенным шрифтом — иначе кнопка вылезает за край. */
  .contact-cta__actions .btn-lg { padding: 15px 14px; font-size: 14px; }
  .brand__text b { font-size: 20px; }
  .brand__text small { display: none; }
  .hero { padding-top: 0; }
  .hero-dots { justify-content: center; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Два товара в ряд. Карточку сжимаем: владелец просил, чтобы в экран
     телефона влезало четыре карточки, а не две с половиной. */
  .products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  /* Снимок 88 → 80px, отступы текста заданы явно (ниже): карточка
     падает с 284 на 239px, и в экран входит третий ряд товаров (6 штук
     вместо 4). Дальше снимок не режу: витрине нужен кадр, а не полоска. */
  .product-media { height: 80px; padding: 6px; }
  .product-media .art { width: 60px; height: 64px; }
  /* Метка и сердечко меньше: в узкой карточке они отнимали пол-снимка. */
  .product-tag { top: 8px; left: 8px; padding: 3px 8px; font-size: 10.5px; }
  .fav-btn { top: 7px; right: 7px; width: 30px; height: 30px; }
  .fav-btn svg { width: 16px; height: 16px; }
  .product-body { padding: 9px 9px 8px; text-align: center; align-items: center; }
  .product-link { align-items: center; gap: 2px; }
  /* Имя ограничено двумя строками: длинное название не растягивает карточку
     в одном ряду (лишнее заменяется многоточием). Минимальную высоту не
     задаём: высоту ряда выравнивает сетка, а низ карточки — margin-top: auto
     у .product-foot (иначе карточки выросли бы на 24px и перестали
     помещаться по четыре в экран). */
  .product-name {
    font-size: 13.5px; line-height: 1.25; margin: 0 0 4px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
  }
  /* Статус — второй уровень: зелёный, но скромнее по объёму. */
  .product-cond { font-size: 10.5px; padding: 1px 7px; margin: 0 0 4px; }
  /* Характеристики — третий уровень: серые и мелкие.
     Отступы заданы явно: у <p> в браузере свои поля (11px сверху и снизу),
     из-за которых вокруг характеристик зияло 22px пустоты. */
  .product-spec { font-size: 11px; line-height: 1.3; margin: 0; }
  /* Цена — самый крупный элемент карточки: её ищут глазами первой. */
  .product-card .price { font-size: 17px; line-height: 1.15; }
  .product-card .price-old { font-size: 11.5px; }
  /* Старая цена и скидка стоят второй строкой — в ряду с ценой они не
     помещаются. Поэтому кегль можно держать читаемым, а не 10px. */
  .product-card .price-off { font-size: 11px; padding: 1px 6px; border-radius: 6px; }
  /* В карточке шириной 174px цена со скидкой и кнопка в одну строку не
     влезают: кнопка уходила за край карточки (проверено замером).
     Кнопку ставим отдельной строкой во всю ширину — она и для пальца
     удобнее. Цена со старой ценой и скидкой может занять две строки. */
  /* Кнопка во всю ширину карточки. min-height 34px — удобная цель для пальца. */
  .btn-buy { width: 100%; padding: 9px 13px; font-size: 12.5px; border-radius: 10px; min-height: 34px; }
  /* width: 100% сам по себе не сработает: .product-body выравнивает детей
     по центру, и низ карточки сжимается по содержимому. Растягиваем его. */
  .product-foot { flex-direction: column; align-items: stretch; gap: 4px; width: 100%; }
  /* Вторая строка (старая цена и плашка скидки) имеет заданную высоту:
     тогда высота блока цен одинаковая и в карточке со скидкой, и в карточке
     без неё — кнопки в ряду стоят на одной линии с точностью до пикселя. */
  .product-card .price-row {
    display: grid;
    grid-template-columns: auto auto;
    grid-template-rows: auto 16px;
    justify-content: center;
    align-items: center;
    gap: 3px 8px;
  }
  .product-card .price-row .price { grid-column: 1 / -1; }
  /* Строгий межстрочный интервал: плашка скидки с отступами всё равно
     укладывается в 16px (11px × 1.2 + 4px). */
  .product-card .price-old,
  .product-card .price-off { line-height: 1.2; }

  /* Низ карточки прижат к нижнему краю — кнопки в ряду на одной линии.
     Значения те же, что в блоке 640px: там же и комментарий к ним. */
  .product-foot { margin-top: auto; padding-top: 5px; gap: 4px; }

  .price-row { justify-content: center; }
  .product-actions { justify-content: center; }
  .cart-line { grid-template-columns: 72px 1fr; }
  .cart-line__art .art { width: 72px; height: 72px; }
  .cart-line__price { grid-column: 2; text-align: right; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .toast { left: 16px; right: 16px; bottom: 16px; }
  /* Размер заголовка баннера задан выше (в блоке 640px) — здесь не повторяем,
     иначе правило перебивало его и на телефоне буквы оставались крупными. */
  .pdp-actions .btn-lg { flex: 1 1 100%; }
}

/* ---------- телефон: компактная шапка ----------
   Два ряда: первый — название, поиск и меню (то, чем пользуются постоянно),
   второй — тонкая полоса с телефоном магазина и иконками. Раньше в шапке
   было три ряда по 186px, теперь 88px: экран отдаём товарам.
   Привязки js/app.js (#auth-action, #admin-action, #fav-count,
   #owner-phones, data-nav-toggle) сохранены — меняется только раскладка.
   Блок идёт после блока 520px намеренно: он перебивает его размер
   шрифта названия. */
@media (max-width: 640px) {
  .header-top {
    flex-wrap: wrap; align-items: center;
    gap: 6px 8px; min-height: 0; padding-top: 8px; padding-bottom: 8px;
  }

  /* Первая строка: название, поиск, кнопка меню. */
  .brand { order: 1; gap: 7px; }
  .brand__logo svg { width: 22px; height: 22px; }
  .brand__text b { font-size: 15px; letter-spacing: -.01em; }
  .brand__text small { display: none; }

  /* Ширина поиска — не в пикселях, а от остатка строки: 320px и 430px
     получают разную ширину, но ничего не вылезает и не переносится.
     Высота 40px равна кнопке меню: в одной строке это одна панель. */
  .search {
    order: 2;
    /* flex-basis 0 (а не auto) — иначе браузер считает шириной поиска
       ширину подсказки и переносит его на вторую строку. С нулевой базой
       поиск встаёт рядом с названием и растягивается на остаток строки. */
    flex: 1 1 0; min-width: 0; max-width: none;
    height: 40px; border-radius: 12px;
  }
  .search input { height: 100%; padding: 0 10px; font-size: 14px; text-overflow: ellipsis; }
  .search__btn { width: 32px; height: 100%; border-radius: 0 11px 11px 0; }

  .burger { order: 3; margin-left: 0; width: 40px; height: 40px; }

  /* Вторая строка: телефон магазина и иконки — по краям. Сама полоса
     тонкая (24px), но зона нажатия у иконок 32×36px: padding расширяет
     её, а отрицательный margin не даёт строке вырасти. */
  .header-actions {
    order: 4; flex-basis: 100%;
    justify-content: space-between; gap: 12px;
  }
  .header-actions .action { padding: 6px; margin-block: -6px; }
  .owner-phones__row { padding-block: 6px; margin-block: -6px; }
  /* Логотип с названием — тоже ссылка: добавляем ей высоту вместо 22px. */
  .brand { padding-block: 7px; }
  .action__icon svg { width: 20px; height: 20px; }
  .owner-phones__row b { font-size: 12.5px; }

  /* Отступы секций: на телефоне 40px давали пустые полосы между блоками.
     Ниже всё ещё воздух, но меньше служебного. */
  .section { padding: 28px 0; }
  /* Панель фильтров в каталоге занимала 405px — больше, чем три карточки
     товара, и отодвигала сетку от начала экрана. Убираем воздух: те же
     поля и кегли, но плотнее. Функции фильтров не меняются. */
  .filters { padding: 12px; gap: 10px; margin-bottom: 16px; }
  .filters-row { gap: 8px; }
  .filters-row--chips { gap: 6px; }
  .filters-label { font-size: 12.5px; }
  .filters-search { flex-basis: 100%; padding: 8px 12px; }
  .filters-price, .filters-sort { font-size: 12.5px; gap: 6px; }
  .filters-price input { width: 78px; padding: 8px 10px; }
  .filters-sort { flex: 1 1 100%; justify-content: space-between; }
  .filters-sort select { padding: 8px 10px; }
  .filters .chip { padding: 5px 11px; font-size: 12.5px; }
  /* Плитки категорий идут сразу за баннером: отступ только 12px (иначе
     между кадром и категориями зияла полоса в 40px). */
  .section--tiles { padding-top: 12px; }
  .section-title { font-size: 21px; }
  .crumbs { padding-top: 14px; font-size: 13px; }
  .page-title { font-size: 22px; margin-bottom: 4px; }
  .page-sub { font-size: 13.5px; }

  /* Низ карточки прижат к нижнему краю, а имя ограничено двумя строками:
     в одном ряду обе карточки выглядят ровно — цена и кнопка на одной
     линии, даже если название длинное.
     gap 4px намеренно: правило ниже в блоке 520px задаёт те же значения,
     а это перебивает его для экранов 521–640px. */
  .product-foot { flex-wrap: nowrap; gap: 4px; margin-top: auto; padding-top: 5px; }
  .product-card .price,
  .product-card .price-old,
  .product-card .price-off { white-space: nowrap; }
  .product-name {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
  }
  /* Цена — первой строкой, старая цена и скидка — второй. Высота второй
     строки задана, поэтому блок цен одинаков в карточке со скидкой и без. */
  .product-card .price-row {
    display: grid;
    grid-template-columns: auto auto;
    grid-template-rows: auto 16px;
    justify-content: center;
    align-items: center;
    gap: 4px 8px;
  }
  .product-card .price-row .price { grid-column: 1 / -1; }
  .product-card .price-old,
  .product-card .price-off { line-height: 1.2; }
}

/* ---------- контейнер контента страниц ----------
   Шаблоны страниц (js/views.js) отдают секции прямо в #app, поэтому ограничение
   ширины и боковые отступы заданы здесь: разметка остаётся без лишних обёрток,
   а контент перестаёт упираться в края окна. */

.app > .section,
.app > .crumbs,
.hero-slide,
.hero-dots,
.hero-features {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- очень узкий экран (320–360px) ----------
   На 320px название занимало 121px из 288, и на поиск оставалось 75px —
   внутрь не влезала даже короткая подсказка. Уменьшаем логотип и
   название: имя остаётся в шапке, но поиск получает больше половины
   строки. Блок стоит последним намеренно: он уточняет правила 640px. */
@media (max-width: 360px) {
  .brand { gap: 6px; }
  .brand__logo svg { width: 20px; height: 20px; }
  .brand__text b { font-size: 13px; }
  .search input { padding: 0 8px; font-size: 13.5px; }
  .search__btn { width: 30px; }
  .owner-phones__row b { font-size: 12px; }
}


