/* Оформление розничного сайта GG-AUTO.

   Один файл, без сборки. Цвета — переменные ниже: графит и пыльная роза из
   фирменного знака. Розовым на белом пишется только крупное и кнопки: кнопка
   действия — тёмная роза (--accent) с белым текстом, контраст 4,9 : 1.
   Значки — набор <symbol> в base.html, картинок-иконок нет. */

:root {
  --bg: #f4f5f7;
  --card: #fff;
  --ink: #1d2126;
  --muted: #69727d;
  --line: #e4e7eb;
  --line-strong: #d3d8de;
  --dark: #2b3036;
  --dark-2: #202428;
  --on-dark: #f3f4f6;
  --on-dark-muted: #a9b0b9;
  --rose: #c07492;
  --rose-soft: #d99bb3;
  --accent: #a9567b;
  --accent-hover: #904667;
  --accent-tint: #f7ecf1;
  --green: #17824a;
  --green-tint: #e6f4ec;
  --amber: #9c6208;
  --amber-tint: #fdf3e2;
  --red: #b42318;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 6px 18px rgba(16, 24, 40, .06);
  --shadow-up: 0 2px 4px rgba(16, 24, 40, .06), 0 14px 32px rgba(16, 24, 40, .1);
  --font: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
/* Скрытое скрыто, даже если у блока свой display: иначе «Принято. Менеджер
   перезвонит» стояло под каждой формой обращения до отправки (28.10.2026) */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 15px/1.5 var(--font);
  color: var(--ink);
  background: var(--bg);
  /* место под нижнюю панель телефона */
  padding-bottom: 0;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 12px; letter-spacing: -.01em; }
h1 { font-size: 30px; }
h2 { font-size: 22px; }
h3 { font-size: 17px; }
p { margin: 0 0 12px; }
button { font: inherit; color: inherit; }

.wrap { max-width: 1260px; margin: 0 auto; padding: 0 20px; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon--star { fill: #f5b301; stroke: #f5b301; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.link { color: var(--accent); font-weight: 500; }
.link:hover { text-decoration: underline; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font-weight: 500; }
.link-btn:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--rose-soft); outline-offset: 2px; }

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px;
  border: 1px solid var(--dark); border-radius: var(--radius-sm);
  background: var(--dark); color: #fff;
  font-weight: 600; font-size: 15px; line-height: 1.2; text-align: center;
  cursor: pointer; transition: background .15s, border-color .15s, color .15s, transform .1s;
}
.btn:hover { background: #3a4048; border-color: #3a4048; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn--accent { background: var(--accent); border-color: var(--accent); }
.btn--accent:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { background: #fff; border-color: var(--ink); color: var(--ink); }
.btn--light { background: #fff; color: var(--ink); border-color: #fff; }
.btn--light:hover { background: var(--accent-tint); border-color: var(--accent-tint); }
.btn--ghost-light { background: transparent; color: var(--on-dark); border-color: rgba(255, 255, 255, .28); }
.btn--ghost-light:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .5); }
.btn--sm { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn--lg { min-height: 52px; padding: 0 26px; font-size: 16px; }
.btn--wide { width: 100%; }
.btn .icon { width: 18px; height: 18px; }

/* ── Поля ───────────────────────────────────────────────────────────────── */

.input, .select, .field input, .field select, .field textarea {
  width: 100%; min-height: 46px; padding: 10px 14px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: #fff; color: var(--ink); font: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(169, 86, 123, .18);
}
.input.is-wrong, .field--error input { border-color: var(--red); }
.input--vin { text-transform: uppercase; letter-spacing: .06em; font-family: ui-monospace, Consolas, monospace; }
.select { appearance: none; padding-right: 38px; cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2369727d' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 14px center; }
.select--sm { min-height: 40px; font-size: 14px; width: auto; }
.field textarea { min-height: 90px; resize: vertical; }

.form .field { margin-bottom: 16px; }
.field label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 14px; }
.field__error { margin-top: 6px; color: var(--red); font-size: 13px; }
.field__hint { margin-top: 6px; color: var(--muted); font-size: 13px; }
.field--check label { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.field--check input { width: 18px; height: 18px; min-height: 0; margin-top: 2px; flex: none; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form__consent, .lead__note { margin: 10px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.form__consent a, .lead__note a { color: inherit; text-decoration: underline; }
.check { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; font-size: 14px; }
.check input { width: 18px; height: 18px; }

/* Переключатель «только в наличии» */
.switch { display: flex; align-items: center; gap: 10px; margin: 16px 0 4px; cursor: pointer; font-weight: 500; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch__track { width: 40px; height: 24px; border-radius: 12px; background: var(--line-strong); position: relative; flex: none; transition: background .15s; }
.switch__track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.switch input:checked + .switch__track { background: var(--green); }
.switch input:checked + .switch__track::after { transform: translateX(16px); }
.switch input:focus-visible + .switch__track { outline: 3px solid var(--rose-soft); outline-offset: 2px; }

.radios { display: grid; gap: 10px; margin-bottom: 16px; }
.radio { display: grid; grid-template-columns: 22px 1fr; gap: 2px 10px; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); cursor: pointer; background: #fff; }
.radio input { grid-row: span 2; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); }
.radio span { color: var(--muted); font-size: 13.5px; }
.radio:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); background: var(--accent-tint); }

.qty { display: inline-flex; align-items: stretch; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #fff; overflow: hidden; height: 52px; }
.qty button { width: 42px; border: 0; background: transparent; font-size: 20px; cursor: pointer; color: var(--muted); }
.qty button:hover { background: var(--bg); color: var(--ink); }
.qty input { width: 52px; border: 0; text-align: center; font: inherit; font-weight: 600; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty--sm { height: 40px; }
.qty--sm button { width: 34px; }
.qty--sm input { width: 40px; }

/* ── Верхняя строка и шапка ─────────────────────────────────────────────── */

.topline { background: var(--dark-2); color: var(--on-dark-muted); font-size: 13px; }
.topline__row { display: flex; align-items: center; gap: 20px; min-height: 34px; }
.topline__item { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.topline__item .icon { width: 15px; height: 15px; }
a.topline__item:hover { color: #fff; }
.topline__hint { opacity: .75; }
.topline__spacer { flex: 1; }
.topline__opt { color: var(--rose-soft); }
/* Строка про доставку и мессенджеры (05.11.2026) заполнили полосу: на 1280 px она
   была шире экрана. Подсказка «проложить маршрут» не нужна — адрес и есть ссылка
   на маршрут; ссылка на опт рознице второстепенна */
.topline { overflow: hidden; }
@media (max-width: 1360px) { .topline__hint { display: none; } }
@media (max-width: 1200px) { .topline__opt { display: none; } }

/* Слева графит, к правому краю — пыльная роза, как на картинке ссылки og.png
   (владелец, 04.11.2026). Свечение розы не сильнее .32: серые подписи справа
   («пусто», «Перезвоните мне») остаются читаемыми, не ниже 4,5 : 1 */
.hdr {
  background:
    radial-gradient(ellipse 55% 160% at 100% 0%, rgba(192, 116, 146, .32), transparent 70%),
    linear-gradient(90deg, var(--dark) 35%, #4a3541 100%);
  background-color: var(--dark);
  color: var(--on-dark); position: sticky; top: 0; z-index: 40; box-shadow: 0 2px 12px rgba(0, 0, 0, .18);
}
.hdr__row { display: flex; align-items: center; gap: 22px; min-height: 76px; }

.logo { display: inline-flex; align-items: center; flex: none; color: #fff; }
/* «GG Auto»: у картинки GG и слова одна высота — «A» во весь рост GG, строка
   на нижнем крае GG (retail/_logo.html). Круглые буквы чуть ниже строки —
   overflow, иначе низ «u» и «o» срезало бы полем рисунка */
/* max-width: none — с общим max-width: 100% картинка GG считалась сжимаемой,
   и колонка подвала выходила уже знака */
.logo__gg, .logo__word { height: 40px; width: auto; max-width: none; }
/* GG и слово чуть врозь — владелец 27.10.2026: «немного увеличить интервал» */
.logo__word { margin-left: 4px; overflow: visible; }
.logo--footer .logo__gg, .logo--footer .logo__word { height: 34px; }
.logo--footer .logo__word { margin-left: 3px; }

.search { flex: 1; position: relative; display: flex; min-width: 0; }
.search input {
  flex: 1; min-width: 0; height: 48px; padding: 0 16px;
  border: 2px solid transparent; border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  background: #fff; color: var(--ink); font: inherit; font-size: 15px;
}
.search input:focus { outline: none; border-color: var(--rose); }
.search button {
  display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 20px;
  border: 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--accent); color: #fff; font-weight: 600; cursor: pointer;
}
.search button:hover { background: var(--accent-hover); }

/* Подсказки поиска: детали с ценой и наличием, машины */
.suggest {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 60;
  background: #fff; color: var(--ink); border-radius: var(--radius); box-shadow: var(--shadow-up);
  overflow: hidden; max-height: min(70vh, 560px); overflow-y: auto;
}
.suggest__group { padding: 8px 14px 4px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.suggest__item { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; padding: 8px 14px; }
.suggest__item:hover, .suggest__item.on { background: var(--bg); }
.suggest__photo { width: 52px; height: 40px; border-radius: 6px; background: var(--bg); object-fit: cover; }
.suggest__name { font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.suggest__meta { font-size: 12.5px; color: var(--muted); }
.suggest__meta .in { color: var(--green); font-weight: 600; }
.suggest__price { font-weight: 700; white-space: nowrap; text-align: right; }
.suggest__car { display: flex; gap: 10px; align-items: center; padding: 9px 14px; font-weight: 500; }
.suggest__car:hover, .suggest__car.on { background: var(--bg); }
.suggest__all { display: block; padding: 12px 14px; border-top: 1px solid var(--line); color: var(--accent); font-weight: 600; }
.suggest__all:hover, .suggest__all.on { background: var(--accent-tint); }
.suggest__empty { padding: 14px; color: var(--muted); font-size: 14px; }

.hdr__contact { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; flex: none; }
.hdr__phone { font-size: 18px; font-weight: 700; color: #fff; white-space: nowrap; }
.hdr__callback { font-size: 13px; color: var(--rose-soft); border-bottom: 1px dashed currentColor; }
.hdr__callback:hover { color: #fff; }
.hdr__actions { display: flex; gap: 6px; flex: none; }
.hdr__btn { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: var(--radius-sm); color: var(--on-dark); }
.hdr__btn:hover { background: rgba(255, 255, 255, .08); }
.hdr__btn .icon { width: 24px; height: 24px; }
.hdr__btn-text { display: flex; flex-direction: column; line-height: 1.2; font-size: 14px; }
.hdr__btn-text small { color: var(--on-dark-muted); font-size: 12.5px; }
.hdr__cart--full { background: rgba(192, 116, 146, .18); }
.hdr__cart--full .icon { color: var(--rose-soft); }

.nav { background: #fff; color: var(--ink); border-bottom: 1px solid var(--line); }
.nav__row { display: flex; align-items: center; gap: 4px; min-height: 48px; overflow-x: auto; scrollbar-width: none; }
.nav__row::-webkit-scrollbar { display: none; }
.nav__item { padding: 13px 12px; font-weight: 600; font-size: 14.5px; white-space: nowrap; border-bottom: 2px solid transparent; }
.nav__item:hover { color: var(--accent); }
.nav__item--on { border-bottom-color: var(--accent); color: var(--accent); }
.nav__spacer { flex: 1; }

.garage { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border-radius: 999px; background: var(--green-tint); color: var(--green); font-weight: 600; font-size: 14px; white-space: nowrap; }
.garage .icon { width: 18px; height: 18px; }
.garage form { display: flex; }
.garage__clear { display: grid; place-items: center; width: 26px; height: 26px; border: 0; border-radius: 50%; background: transparent; color: var(--green); cursor: pointer; }
.garage__clear:hover { background: rgba(23, 130, 74, .14); }
.garage__clear .icon { width: 15px; height: 15px; }
.garage--empty { background: var(--accent-tint); color: var(--accent); padding: 8px 14px; }
.garage__paint { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px;
  background: rgba(23, 130, 74, .12); font-size: 12.5px; font-weight: 600; }
.garage__paint .swatch { width: 12px; height: 12px; }
.garage__paint:hover { background: rgba(23, 130, 74, .2); }
.garage--empty:hover { background: #f1dde7; }

.viewas { background: #fff4d6; color: #5c4400; font-size: 14px; }
.viewas__in { display: flex; gap: 16px; align-items: center; justify-content: space-between; min-height: 44px; }
.viewas__back { border: 0; border-radius: 8px; padding: 6px 12px; background: #5c4400; color: #fff; cursor: pointer; }

/* ── Основа страницы ────────────────────────────────────────────────────── */

.main { padding-top: 22px; padding-bottom: 48px; min-height: 50vh; }
.main--home { padding-top: 34px; }
.messages { display: grid; gap: 8px; margin-bottom: 16px; }
.message { padding: 12px 16px; border-radius: var(--radius-sm); background: #fff; border: 1px solid var(--line); }
.message--success { background: var(--green-tint); border-color: #bfe3cd; color: #0f5f35; }
.message--error { background: #fdecea; border-color: #f5c2bc; color: var(--red); }
.message--warning, .message--info { background: var(--amber-tint); border-color: #f2d7a8; color: #6b4304; }

.crumbs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; font-size: 13px; color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.crumbs span:last-child { color: var(--ink); }

.panel { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.panel--pad { padding: 24px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.page-head__count { color: var(--muted); }
.narrow { max-width: 520px; margin: 0 auto; }
.or { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--muted); font-size: 13px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }

.block { margin-top: 44px; }
.block:first-child { margin-top: 0; }
.block__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.block__head h2 { margin: 0; }

.empty { padding: 40px 24px; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); text-align: center; }
.empty b { display: block; font-size: 19px; margin-bottom: 8px; }
.empty p { color: var(--muted); max-width: 560px; margin: 0 auto 16px; }
.empty__actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.empty__form { max-width: 560px; margin: 22px auto 0; text-align: left; }
.empty--page { max-width: 720px; margin: 20px auto; }

/* ── Первый экран главной ───────────────────────────────────────────────── */

.hero { position: relative; overflow: hidden; background: linear-gradient(140deg, #23272c 0%, #2c3137 55%, #31303a 100%); color: var(--on-dark); }
.hero__glow { position: absolute; inset: 0; pointer-events: none; }
.hero__glow span { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; }
.hero__glow span:nth-child(1) { width: 520px; height: 520px; background: radial-gradient(circle, rgba(192, 116, 146, .75), transparent 65%); top: -160px; right: -60px; animation: drift1 26s ease-in-out infinite alternate; }
.hero__glow span:nth-child(2) { width: 420px; height: 420px; background: radial-gradient(circle, rgba(97, 118, 150, .6), transparent 65%); bottom: -180px; left: 8%; animation: drift2 32s ease-in-out infinite alternate; }
.hero__glow span:nth-child(3) { width: 300px; height: 300px; background: radial-gradient(circle, rgba(217, 155, 179, .45), transparent 65%); top: 30%; left: 45%; animation: drift3 22s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(-140px, 90px) scale(1.15); } }
@keyframes drift2 { to { transform: translate(160px, -60px) scale(1.2); } }
@keyframes drift3 { to { transform: translate(-90px, -70px) scale(.85); } }
@media (prefers-reduced-motion: reduce) { .hero__glow span { animation: none; } }

/* Машина за первым экраном: «морда» по центру, еле видна, края и низ растворяются
   (владелец, 04.11.2026). Снимок — tools/build_retail_hero.py */
.hero__ghost {
  position: absolute; left: 50%; top: 50%; width: min(680px, 92vw); height: auto; max-width: none;
  transform: translate(-50%, -50%); opacity: .14; pointer-events: none; user-select: none;
  /* лёгкая размытость: фон, а не картинка — надпись на номере не читается */
  filter: blur(1.2px) grayscale(.4);
  -webkit-mask-image: radial-gradient(ellipse 60% 62% at 50% 45%, #000 55%, transparent 100%);
  mask-image: radial-gradient(ellipse 60% 62% at 50% 45%, #000 55%, transparent 100%);
}

.hero__row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 40px; align-items: center; padding-top: 52px; padding-bottom: 56px; }
.hero__kicker { display: inline-block; margin-bottom: 14px; padding: 5px 12px; border-radius: 999px; background: rgba(255, 255, 255, .08); color: var(--rose-soft); font-size: 13.5px; font-weight: 600; }
.hero h1 { font-size: 44px; line-height: 1.08; margin-bottom: 16px; color: #fff; letter-spacing: -.02em; }
.hero h1 span { color: var(--rose-soft); }
.hero__lead { max-width: 600px; font-size: 17px; color: #d5d9de; margin-bottom: 24px; }

.hero__search { position: relative; display: flex; align-items: center; max-width: 640px; background: #fff; border-radius: var(--radius); padding: 6px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.hero__search > .icon { margin: 0 6px 0 10px; color: var(--muted); }
.hero__search input { flex: 1; min-width: 0; height: 48px; border: 0; padding: 0 8px; font: inherit; font-size: 16px; color: var(--ink); background: transparent; }
.hero__search input:focus { outline: none; }
.hero__search .btn { min-height: 48px; }
.hero__search--light { margin: 18px auto 0; box-shadow: var(--shadow); border: 1px solid var(--line); }

.hero__car { display: flex; align-items: center; gap: 10px; max-width: 640px; margin-top: 14px; flex-wrap: wrap; }
.hero__car-label { display: flex; flex-basis: 100%; align-items: center; gap: 8px; color: var(--on-dark-muted); font-size: 14px; }
.hero__car .car-pick { flex: 1; min-width: 300px; }
.hero__car .select { height: 48px; border: 0; }
.hero__car .select:disabled { background-color: #d9dde2; }
.hero__car .btn { min-height: 48px; }

/* Цвет кузова — сразу после модели (владелец, 05.11.2026): кружки под формой, выбранный — белый */
.hero__paints { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; flex-basis: 100%; margin-top: 6px; order: 1; }
.pchips__title { flex-basis: 100%; color: var(--on-dark); font-size: 14px; font-weight: 600; }
.pchips__title small { color: var(--on-dark-muted); font-size: 13px; font-weight: 400; }
.pchip { position: relative; display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 6px 13px;
  border: 1px solid rgba(255, 255, 255, .24); border-radius: 999px; background: rgba(255, 255, 255, .07);
  color: var(--on-dark); font-size: 14px; font-weight: 600; cursor: pointer; transition: background .15s, border-color .15s; }
.pchip:hover { border-color: rgba(255, 255, 255, .5); }
.pchip input { position: absolute; opacity: 0; pointer-events: none; }
.pchip .swatch { width: 16px; height: 16px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25), 0 0 0 1px rgba(255, 255, 255, .35); }
.pchip--on { background: #fff; border-color: #fff; color: var(--ink); }
.pchip:focus-within { outline: 2px solid var(--rose-soft); outline-offset: 2px; }
.pchip--more { border-style: dashed; background: none; font-family: inherit; }

/* Марка и модель рядом, как на auto.ru: модель открывается, когда выбрана марка */
.car-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.select:disabled { cursor: not-allowed; color: var(--muted); background-color: var(--bg); }
.filters .car-pick { grid-template-columns: minmax(0, 1fr); gap: 8px; }

.hero__trust { display: flex; flex-wrap: wrap; gap: 10px 24px; list-style: none; margin: 26px 0 0; padding: 0; color: #d5d9de; font-size: 14px; }
.hero__trust li { display: inline-flex; align-items: center; gap: 8px; }
.hero__trust .icon { width: 18px; height: 18px; color: var(--rose-soft); }
.hero__trust .icon--star { color: #f5b301; }

.hero__card { background: #fff; color: var(--ink); border-radius: 18px; padding: 22px; box-shadow: 0 20px 50px rgba(0, 0, 0, .3); }
.hero__card-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 14px; }
.hero__card-head .icon { width: 40px; height: 40px; padding: 8px; border-radius: 12px; background: var(--accent-tint); color: var(--accent); }
.hero__card-head b { display: block; font-size: 17px; line-height: 1.25; }
.hero__card-head span { color: var(--muted); font-size: 14px; }

/* ── Форма обращения ────────────────────────────────────────────────────── */

.lead__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.lead__fields { display: grid; gap: 10px; }
.lead__field span { display: block; margin-bottom: 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
/* «(необязательно)» у полей подбора по VIN: обязательны только имя и телефон (владелец, 05.11.2026) */
.lead__opt { font-size: 12.5px; font-weight: 400; opacity: .85; }
.lead__submit { width: 100%; min-height: 48px; }
.lead__error { margin-top: 8px; padding: 10px 12px; border-radius: 8px; background: #fdecea; color: var(--red); font-size: 13.5px; }
.lead__done { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: var(--radius-sm); background: var(--green-tint); color: #0f5f35; }
.lead__done .icon { width: 26px; height: 26px; color: var(--green); stroke-width: 2.4; }
.lead.is-sent .lead__fields, .lead.is-sent .lead__note, .lead.is-sent .lead__error { display: none; }

.lead--compact .lead__fields { grid-template-columns: 1fr 1fr auto; align-items: end; }
.lead--compact .lead__submit { width: auto; padding: 0 22px; }

/* Полоса «Не нашли нужную деталь?» перед подвалом */
.help { background: linear-gradient(120deg, var(--accent-tint), #f2f0f6); border-top: 1px solid var(--line); }
.help__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 32px; align-items: center; padding-top: 30px; padding-bottom: 30px; }
.help__text b { display: block; font-size: 22px; margin-bottom: 4px; }
.help__text span { color: var(--muted); }
.help .lead__note { margin-top: 8px; }

/* ── Блоки главной ──────────────────────────────────────────────────────── */

.brands { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.brand { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; transition: box-shadow .15s, transform .15s; }
.brand:hover { box-shadow: var(--shadow-up); transform: translateY(-2px); }
.brand__name { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-weight: 700; font-size: 17px; }
.brand__name span { color: var(--muted); font-weight: 500; font-size: 13px; }
.brand__name:hover { color: var(--accent); }
.brand__models { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 8px; font-size: 13.5px; color: var(--muted); }
.brand__models a:hover { color: var(--accent); }

.sections { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.section-tile { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); border-left: 4px solid var(--rose); transition: box-shadow .15s, transform .15s; }
.section-tile:hover { box-shadow: var(--shadow-up); transform: translateY(-2px); }
.section-tile b { font-size: 16px; }
.section-tile span { color: var(--muted); font-size: 13.5px; }

.why { padding: 30px; border-radius: 20px; background: var(--dark); color: var(--on-dark); }
.why h2 { color: #fff; margin-bottom: 20px; }
.why__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.why__item .icon { width: 44px; height: 44px; padding: 10px; border-radius: 12px; background: rgba(192, 116, 146, .18); color: var(--rose-soft); margin-bottom: 12px; }
.why__item b { display: block; font-size: 16.5px; margin-bottom: 6px; color: #fff; }
.why__item p { color: var(--on-dark-muted); font-size: 14.5px; margin: 0; }

/* «Фото после ремонта» (наши детали на машинах клиентов): на главной — снимок после
   замены, в углу — до */
.wgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.wcard { display: flex; flex-direction: column; gap: 3px; color: var(--ink); }
.wcard__img { position: relative; display: block; aspect-ratio: 4 / 3; margin-bottom: 8px; border-radius: var(--radius); overflow: hidden; background: var(--line); box-shadow: var(--shadow); }
.wcard__after { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.wcard:hover .wcard__after { transform: scale(1.03); }
.wcard__before { position: absolute; left: 10px; bottom: 10px; width: 38%; aspect-ratio: 4 / 3; object-fit: cover; border: 2px solid #fff; border-radius: 8px; box-shadow: 0 4px 14px rgba(16, 24, 40, .35); }
.wcard__tag { position: absolute; left: 10px; top: 10px; padding: 3px 9px; border-radius: 999px; background: rgba(16, 24, 40, .62); color: #fff; font-size: 12px; font-weight: 700; }
.wcard b { font-size: 15px; }
.wcard__parts { color: var(--muted); font-size: 14px; }

.works-lead { max-width: 760px; margin: -6px 0 22px; color: var(--muted); }
.work { margin-bottom: 18px; padding: 18px; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); scroll-margin-top: 90px; }
.work__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 14px; }
.work__head h2 { margin: 0; font-size: 18px; font-weight: 500; }
.work__head h2 b { font-weight: 700; }
.work__photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.work__photo { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: var(--radius-sm); overflow: hidden; background: var(--line); }
.work__photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.work__photo:hover img { transform: scale(1.03); }
.work__stage { position: absolute; left: 8px; top: 8px; padding: 2px 9px; border-radius: 999px; color: #fff; font-size: 12px; font-weight: 700; }
.work__stage--before { background: rgba(180, 35, 24, .88); }
.work__stage--after { background: rgba(23, 130, 74, .92); }

.reviews__row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.reviews__frame { width: 100%; height: 560px; border: 0; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }

.place { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.place__title { display: block; font-size: 18px; margin-bottom: 12px; }
.place__line { display: flex; gap: 10px; align-items: flex-start; color: var(--ink); }
.place__line .icon { color: var(--accent); margin-top: 1px; }
.place__line a { font-weight: 700; font-size: 17px; }
.place__map { width: 100%; height: 300px; border: 0; border-radius: var(--radius-sm); margin-top: 8px; background: var(--bg); }
.place--big .place__map { height: 380px; }
.place__route { margin: 4px 0 8px; }

.address { display: inline-flex; gap: 10px; align-items: flex-start; }
.address__pin { width: 20px; height: 20px; color: var(--accent); flex: none; margin-top: 1px; }
.address__body { display: flex; flex-direction: column; }
.address__text { font-weight: 600; }
.address__hint { font-size: 13px; color: var(--accent); }
.address:hover .address__hint { text-decoration: underline; }

/* ── Карточка товара в плитке ───────────────────────────────────────────── */

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.pcard { display: flex; flex-direction: column; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: box-shadow .15s, transform .15s; }
.pcard:hover { box-shadow: var(--shadow-up); transform: translateY(-2px); }
.pcard__photo { position: relative; display: block; aspect-ratio: 4 / 3; background: #f0eef1; }
.pcard__photo img { width: 100%; height: 100%; object-fit: cover; }
.pcard__fit { position: absolute; left: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px 3px 6px; border-radius: 999px; background: var(--green); color: #fff; font-size: 12px; font-weight: 600; }
.pcard__fit .icon { width: 14px; height: 14px; stroke-width: 2.6; }
/* Снимок этой же детали в другом цвете (своего у цвета нет, 05.11.2026) */
.pcard__note { position: absolute; left: 8px; top: 8px; max-width: calc(100% - 16px); padding: 2px 8px; border-radius: 999px; background: rgba(32, 36, 40, .78); color: #fff; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard__body { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 14px; flex: 1; }
.pcard__meta { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--muted); }
.pcard__brand { padding: 1px 7px; border-radius: 6px; background: var(--bg); color: var(--ink); font-weight: 600; }
.pcard__name { font-weight: 600; font-size: 14.5px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; min-height: 3.9em; }
.pcard__name:hover { color: var(--accent); }

/* Цвета крашеной детали кружками (одна карточка на деталь во всех цветах, 04.11.2026).
   Кружок «под покраску» — серый грунт в косую полоску */
.swatches { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.swatch { width: 18px; height: 18px; border-radius: 50%; flex: none; background: var(--swatch, #9aa0a6);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18); }
a.swatch:hover { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18), 0 0 0 2px var(--accent); }
.swatch--primer { background: repeating-linear-gradient(135deg, #d4d6d9 0 3px, #b9bcc0 3px 6px); }
.swatches__count { margin-left: 2px; color: var(--muted); font-size: 12.5px; }
.swatch--mine { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18), 0 0 0 2px var(--card), 0 0 0 4px var(--green); }
.price__from { color: var(--muted); font-size: 13px; font-weight: 600; }
.pcard__bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 6px; }
.pcard__buy { display: flex; }
.btn--cart { padding: 0 12px; }
.btn--cart .icon { width: 18px; height: 18px; }

.nophoto { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: 100%; height: 100%; color: #a39aa3; font-size: 13px; text-align: center; }
.nophoto .icon { width: 30px; height: 30px; }
.nophoto--big { min-height: 320px; font-size: 15px; }

.stock { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.stock i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.stock--in { color: var(--green); }
.stock--wait { color: var(--amber); }
.stock--none { color: var(--muted); }

.price b { font-size: 19px; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; }
.price s { margin-left: 6px; color: var(--muted); font-size: 13px; }
.price--none { color: var(--muted); font-size: 14px; font-weight: 600; }

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

.listing { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 24px; align-items: start; }
.filters { position: sticky; top: 140px; display: grid; gap: 14px; }
.filters__box { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.filters__box summary { font-weight: 700; font-size: 16px; cursor: pointer; list-style: none; margin-bottom: 12px; }
.filters__box summary::-webkit-details-marker { display: none; }
.filters__label { display: block; margin: 10px 0 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.filters__garage { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--green); font-weight: 600; font-size: 14px; }
.filters__garage .icon { width: 17px; height: 17px; }
.filters__sections { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; max-height: 420px; overflow-y: auto; }
.filters__sections a { display: flex; justify-content: space-between; gap: 8px; padding: 7px 10px; border-radius: 8px; font-size: 14px; }
.filters__sections a span { color: var(--muted); font-size: 12.5px; }
.filters__sections a:hover { background: var(--bg); }
.filters__sections a.on { background: var(--accent-tint); color: var(--accent); font-weight: 600; }
.filters__reset { display: inline-block; margin-top: 12px; font-size: 14px; }

.side-help { display: grid; gap: 8px; padding: 16px; border-radius: var(--radius); background: var(--accent-tint); }
.side-help b { font-size: 15.5px; }
.side-help span { color: #5d4552; font-size: 14px; }

.results__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.results__head h1 { margin: 0 0 4px; font-size: 26px; }
.results__count { color: var(--muted); font-size: 14px; }
.results__garage { display: flex; align-items: center; gap: 8px; padding: 10px 14px; margin: 0 0 16px; border-radius: var(--radius-sm); background: var(--green-tint); color: var(--green); font-weight: 600; font-size: 14px; }

.pager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 28px; }
.pager a, .pager span { min-width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; padding: 0 12px; border-radius: var(--radius-sm); background: #fff; box-shadow: var(--shadow); font-weight: 600; font-size: 14px; }
.pager a:hover { color: var(--accent); }
.pager .current { background: var(--dark); color: #fff; }
.pager .gap { background: none; box-shadow: none; }

/* ── Страница товара ────────────────────────────────────────────────────── */

.product { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.product__media { position: sticky; top: 140px; }
.gallery__main { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; border-radius: 18px; background: #f0eef1; overflow: hidden; box-shadow: var(--shadow); }
.gallery__main img { width: 100%; height: 100%; object-fit: contain; }
.gallery__own { position: absolute; left: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: rgba(32, 36, 40, .78); color: #fff; font-size: 12.5px; }
.gallery__own .icon { width: 15px; height: 15px; }
.gallery__thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.gallery__thumbs button { flex: none; width: 76px; height: 58px; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: #f0eef1; cursor: pointer; }
.gallery__thumbs button.on { border-color: var(--accent); }
.gallery__thumbs img { width: 100%; height: 100%; object-fit: cover; }

.product__head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.brandtag { padding: 3px 10px; border-radius: 8px; background: var(--dark); color: #fff; font-weight: 700; font-size: 13px; letter-spacing: .02em; }
.product__art { color: var(--muted); font-size: 14px; }
.product__art b { color: var(--ink); }
.product__info h1 { font-size: 27px; margin-bottom: 12px; }

.fit { display: flex; gap: 8px; align-items: center; padding: 10px 14px; border-radius: var(--radius-sm); font-weight: 600; font-size: 14.5px; }
.fit .icon { width: 20px; height: 20px; stroke-width: 2.4; }
.fit--yes { background: var(--green-tint); color: var(--green); }
.fit--no { background: var(--amber-tint); color: var(--amber); }
.fit--no a { text-decoration: underline; }

/* Выбор цвета на странице товара: плитка — ссылка на страницу этого цвета */
.paints { margin: 14px 0 4px; }
.paints__head { margin-bottom: 8px; font-size: 14.5px; }
.paints__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.paint { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 2px 8px; padding: 8px 10px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--card); font-size: 13.5px; line-height: 1.25; }
.paint .swatch { grid-row: span 3; width: 22px; height: 22px; }
.paint b { font-size: 13.5px; }
.paint small { color: var(--amber); font-size: 12px; }
.paint:hover { border-color: var(--accent); }
.paint--on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); background: var(--accent-tint); }
.paints__note { margin-top: 8px; color: var(--muted); font-size: 13px; }
/* Цвет машины покупателя (garage_paint): подсказка, отметка «ваш», «запомнить» */
.paints__mine { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; padding: 10px 12px;
  border-radius: var(--radius-sm); background: var(--green-tint); color: var(--green); font-size: 14px; }
.paints__mine .icon { width: 18px; height: 18px; margin-left: auto; flex: none; }
.paints__mine:hover { text-decoration: underline; }
.paint__mine { padding: 0 6px; border-radius: 999px; background: var(--green-tint); color: var(--green);
  font-size: 11.5px; font-style: normal; font-weight: 700; }
.paints__save { margin-top: 6px; }
.paints__save .link { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-size: 13.5px; cursor: pointer; text-decoration: underline; }
.paints__hint { margin: 10px 0 16px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--bg); font-size: 14px; }
.paints__list--pick { margin-bottom: 14px; }
.paints__list--pick form { display: contents; }
.paints__list--pick .paint { width: 100%; text-align: left; cursor: pointer; font: inherit; font-size: 13.5px; color: inherit; }
.paints__reset { margin-bottom: 10px; }

/* Комплект на странице товара («С этим покупают» с галочками): сама деталь отмечена,
   внизу — сколько отмечено и на сколько, всё уходит в корзину одной кнопкой */
.kit__lead { color: var(--muted); font-size: 14px; }
.kit { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.kit__list { list-style: none; margin: 0; padding: 0; }
.kit__row { display: grid; grid-template-columns: auto 64px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 10px 16px; border-bottom: 1px solid var(--line); }
.kit__row--on { background: var(--accent-tint); }
/* углы — у первой строки и у итога: overflow у блока не годится, итог липкий */
.kit__row:first-child { border-radius: var(--radius) var(--radius) 0 0; }
.kit__check { width: 20px; height: 20px; accent-color: var(--accent); cursor: pointer; }
.kit__photo { width: 64px; height: 48px; border-radius: 8px; overflow: hidden; background: var(--bg); cursor: pointer; }
.kit__photo img { width: 100%; height: 100%; object-fit: cover; }
.kit__photo .nophoto { display: grid; place-items: center; height: 100%; color: var(--muted); }
.kit__info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kit__name { font-weight: 600; font-size: 14.5px; line-height: 1.3; cursor: pointer; }
a.kit__name:hover { color: var(--accent); }
.kit__name em { margin-left: 4px; padding: 1px 7px; border-radius: 999px; background: var(--dark); color: #fff;
  font-size: 11.5px; font-style: normal; font-weight: 700; white-space: nowrap; }
.kit__price { font-weight: 800; white-space: nowrap; cursor: pointer; }
.kit__total { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 14px 16px; background: var(--bg); font-weight: 700; }
.kit__total .btn:disabled { opacity: .5; cursor: not-allowed; }
/* итог с кнопкой стоит внизу экрана, пока список комплекта на виду: в нём до 11 строк */
.kit__total { position: sticky; bottom: 0; z-index: 2; border-top: 1px solid var(--line);
  border-radius: 0 0 var(--radius) var(--radius); }

.buybox { margin-top: 14px; padding: 22px; border-radius: 18px; background: #fff; box-shadow: var(--shadow); }
.buybox__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.buybox__price b { font-size: 34px; font-weight: 800; letter-spacing: -.02em; }
.buybox__price s { margin-left: 8px; color: var(--muted); }
.buybox__price--none { font-size: 22px; font-weight: 700; color: var(--muted); }
.buybox__discount { margin-left: 8px; padding: 2px 8px; border-radius: 6px; background: var(--accent-tint); color: var(--accent); font-size: 12.5px; font-weight: 700; }
.buybox__terms { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; color: #3c434b; font-size: 14px; }
.buybox__terms li { display: flex; gap: 8px; align-items: flex-start; }
.buybox__terms .icon { width: 18px; height: 18px; color: var(--green); margin-top: 1px; }
.buybox__buy { display: flex; gap: 10px; }
.buybox__buy .btn { flex: 1; }
.quick { margin-top: 10px; }
.quick summary { list-style: none; }
.quick summary::-webkit-details-marker { display: none; }
.quick[open] summary { display: none; }
.quick__form { display: grid; gap: 10px; padding: 16px; border-radius: var(--radius-sm); background: var(--accent-tint); }
.buybox__ask { display: grid; gap: 6px; padding: 16px; border-radius: var(--radius-sm); background: var(--accent-tint); }
.buybox__ask > b { font-size: 16.5px; }
.buybox__ask > span { color: #5d4552; font-size: 14px; margin-bottom: 6px; }
.buybox__ask-msg { display: flex; gap: 6px 16px; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }

/* Кнопки мессенджеров: значок и название (карточка товара, «Контакты», «Написать»
   на телефоне). Кнопка белая: белый текст на зелёном WhatsApp читается хуже 4,5 : 1 */
.msg-buttons { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
.msg { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 7px 14px 7px 8px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); font-size: 14px; font-weight: 700; text-decoration: none; }
.msg:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
/* Размеры значков — на 5 % меньше первых (владелец, 05.11.2026: «немного поменьше на 5%») */
.msg__icon { flex: none; width: 22.8px; height: 22.8px; }
.btn .msg__icon { width: 19px; height: 19px; margin-left: -4px; }

/* Значки без подписи (владелец, 05.11.2026: «ТГ и Max под телефоном, иконками»):
   под телефоном в шапке, а где телефона в шапке нет (до 1180 px) — в верхней полосе */
.mi { display: inline-flex; flex: none; width: 24.7px; height: 24.7px; border-radius: 50%; transition: transform .15s; }
.mi svg { width: 100%; height: 100%; }
.mi:hover { transform: scale(1.1); }
.hdr__sub { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.hdr__msg { display: inline-flex; gap: 6px; }
.topline__msg { display: none; gap: 8px; }
.topline__msg .mi { width: 19px; height: 19px; }

.product__block { margin-top: 26px; }
.product__block h2 { font-size: 18px; margin-bottom: 10px; }
.fitments { display: flex; flex-wrap: wrap; gap: 8px; }
.fitments__item { padding: 7px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line-strong); font-size: 14px; font-weight: 500; }
.fitments__item span { color: var(--muted); }
.fitments__item:hover { border-color: var(--accent); color: var(--accent); }
.fitments__item--mine { background: var(--green-tint); border-color: #bfe3cd; color: var(--green); }
.product__codes { display: flex; flex-wrap: wrap; gap: 8px; }
.product__codes span { padding: 5px 10px; border-radius: 8px; background: #fff; border: 1px dashed var(--line-strong); font-family: ui-monospace, Consolas, monospace; font-size: 14px; }
.vin-check { padding: 20px; border-radius: 18px; background: #fff; box-shadow: var(--shadow); }

.grid--row { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }

/* Машина по зонам (страница модели): переключатель и блоки «Кузов спереди», «сбоку»… */
/* Годы выпуска: версии до и после рестайлинга (05.11.2026) */
.periods { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 2px 0 14px; }
.periods__label { color: var(--muted); font-size: 14px; }
.periods__item { padding: 6px 12px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-size: 14px; font-weight: 600; }
.periods__item:hover { border-color: var(--accent); }
.periods__item.on { border-color: var(--accent); background: var(--accent); color: #fff; }
.zones { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 18px; }
.zones__item { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--card); font-size: 14px; font-weight: 600; white-space: nowrap; }
.zones__item span { color: var(--muted); font-weight: 500; font-size: 13px; }
.zones__item:hover { border-color: var(--accent); }
.zones__item.on { border-color: var(--dark); background: var(--dark); color: #fff; }
.zones__item.on span { color: var(--on-dark-muted); }
.zone { margin-bottom: 28px; }
.zone__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.zone__head h2 { font-size: 21px; margin: 0; }
.zone__head h2 a:hover { color: var(--accent); }
.zone__head span { color: var(--muted); font-size: 13.5px; }
.zone__all { display: inline-flex; align-items: center; gap: 4px; flex: none; color: var(--accent); font-weight: 700; font-size: 14px; }
.zone__all .icon { width: 16px; height: 16px; }
/* Ссылки на страницы «машина + деталь»: «Бампер передний 12 · Фары 8» */
.zone__parts { display: flex; flex-wrap: wrap; gap: 6px 8px; margin: -4px 0 12px; }
.zone__parts a { display: inline-flex; align-items: baseline; gap: 5px; padding: 4px 10px; border-radius: 999px;
  background: var(--accent-tint); color: var(--accent); font-size: 13.5px; font-weight: 600; }
.zone__parts a span { color: var(--muted); font-weight: 500; font-size: 12.5px; }
.zone__parts a:hover { background: #f1dde7; }
.results__intro { max-width: 760px; margin-top: 6px; color: var(--muted); font-size: 14.5px; }
.fitments__more { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; font-size: 14px; }

/* ── Корзина и оформление ───────────────────────────────────────────────── */

.cart, .checkout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.cart__lines { display: grid; gap: 12px; }
.cline { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto auto 36px; gap: 16px; align-items: center; padding: 14px; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.cline--none { opacity: .7; }
.cline__photo { width: 96px; height: 72px; border-radius: 10px; overflow: hidden; background: #f0eef1; display: block; }
.cline__photo img { width: 100%; height: 100%; object-fit: cover; }
.cline__name { font-weight: 600; line-height: 1.35; }
.cline__name:hover { color: var(--accent); }
.cline__meta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 4px; font-size: 13px; color: var(--muted); }
.cline__gone { margin-top: 6px; font-size: 13.5px; color: var(--amber); }
.cline__sum { text-align: right; min-width: 110px; }
.cline__sum b { display: block; font-size: 18px; }
.cline__sum span { color: var(--muted); font-size: 12.5px; }
.remove { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.remove:hover { background: #fdecea; color: var(--red); }
.cart__tools { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; margin-top: 6px; }

.summary { position: sticky; top: 140px; padding: 22px; border-radius: 18px; background: #fff; box-shadow: var(--shadow); display: grid; gap: 12px; }
.summary__title { font-weight: 700; font-size: 17px; }
.summary__row { display: flex; justify-content: space-between; gap: 12px; font-size: 14.5px; }
.summary__row--muted { color: var(--muted); }
.summary__total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.summary__total b { font-size: 26px; font-weight: 800; }
.summary__notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 13.5px; color: var(--muted); }
.summary__notes li { display: flex; gap: 8px; align-items: flex-start; }
.summary__notes .icon { width: 17px; height: 17px; color: var(--green); margin-top: 1px; }
.summary__item { display: grid; grid-template-columns: 48px 1fr auto; gap: 10px; align-items: center; font-size: 14px; line-height: 1.3; }
.summary__item img { width: 48px; height: 36px; border-radius: 6px; object-fit: cover; }
.summary__item span { display: block; color: var(--muted); font-size: 12.5px; }

.checkout__step { display: flex; align-items: center; gap: 10px; margin: 6px 0 14px; font-weight: 700; font-size: 17px; }
.checkout__step span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--dark); color: #fff; font-size: 14px; }
/* «Доставка — для заказов от 8 000 ₽: добавьте ещё…» — под самовывозом и в итоге корзины */
.checkout__note { display: flex; gap: 10px; align-items: flex-start; margin: -4px 0 18px; padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--amber-tint); color: #5c3d06; font-size: 14px; }
.checkout__note .icon { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--amber); }
.summary__notes .summary__short { color: #5c3d06; }
.summary__notes .summary__short .icon { color: var(--amber); }
.checkout__form .btn--lg { margin-top: 8px; }

.done { max-width: 640px; margin: 10px auto; text-align: center; }
.done__icon { display: grid; place-items: center; width: 72px; height: 72px; margin: 0 auto 16px; border-radius: 50%; background: var(--green-tint); color: var(--green); }
.done__icon .icon { width: 38px; height: 38px; stroke-width: 2.6; }
.done__lead { color: var(--muted); font-size: 16.5px; }
.done__card, .done__place { margin-top: 18px; padding: 20px; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); text-align: left; display: grid; gap: 10px; }
.done__actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }
.done__hint { margin-top: 16px; }

/* ── Контакты, тексты, VIN, кабинет ─────────────────────────────────────── */

.contacts-page { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 24px; align-items: start; }
.contacts-page--narrow { grid-template-columns: minmax(0, 560px); justify-content: center; }
.contacts-page__phone a { font-size: 26px; font-weight: 800; }
.contacts-page__messengers { display: flex; gap: 8px; flex-wrap: wrap; }
.contacts-page__sub { margin-top: 18px; font-size: 18px; }

.page-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.article { line-height: 1.65; }
.article h2 { margin-top: 24px; font-size: 20px; }
.article ul { padding-left: 20px; }
.article a { color: var(--accent); text-decoration: underline; }
.page-aside { position: sticky; top: 140px; }

.vin-page { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 32px; align-items: start; }
.vin-page h1 { font-size: 34px; }
.vin-page__lead { font-size: 17px; color: #3c434b; }
.steps { list-style: none; counter-reset: step; margin: 22px 0; padding: 0; display: grid; gap: 14px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 40px 1fr; gap: 2px 14px; }
.steps li::before { content: counter(step); grid-row: span 2; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--accent-tint); color: var(--accent); font-weight: 800; }
.steps b { font-size: 16px; }
.steps span { color: var(--muted); font-size: 14.5px; }

.cars { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.car { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.car__brand { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.car__brand a { font-size: 18px; font-weight: 800; }
.car__brand a:hover { color: var(--accent); }
.car__brand span { color: var(--muted); font-size: 13px; }
.car__models { display: flex; flex-wrap: wrap; gap: 6px; }
.car__models form { display: contents; }
.car__model { padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: #fff; cursor: pointer; font-size: 14px; font-weight: 500; }
.car__model span { color: var(--muted); font-size: 12.5px; }
.car__model:hover { border-color: var(--accent); color: var(--accent); }
.car__model--mine { background: var(--green-tint); border-color: #bfe3cd; color: var(--green); }

.acc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-bottom: 28px; }
.acc__name { font-size: 22px; font-weight: 800; }
.acc__discount { margin: 12px 0 0; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--accent-tint); }
.acc__actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.acc__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.acc__head h2 { margin: 0; font-size: 18px; }
.places { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.places__item { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.places__actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 14px; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; background: var(--bg); font-size: 12.5px; font-weight: 600; }
.badge--new { background: var(--amber-tint); color: var(--amber); }
.badge--confirmed, .badge--invoiced, .badge--paid { background: var(--green-tint); color: var(--green); }
.badge--cancelled { background: #fdecea; color: var(--red); }
.orders { display: grid; gap: 8px; }
.order-row { display: grid; grid-template-columns: 130px 100px 80px 120px 1fr auto; gap: 12px; align-items: center; padding: 14px 16px; border-radius: var(--radius-sm); background: #fff; box-shadow: var(--shadow); }
.order-row__num { font-weight: 700; color: var(--accent); }

/* Общие страницы витрины без розничного шаблона: пароль, адрес, оповещение */
.props { border-collapse: collapse; width: 100%; }
.props td { padding: 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.props td:first-child { color: var(--muted); width: 40%; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.table-wrap { overflow-x: auto; }
.ptable { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.ptable th, .ptable td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; font-size: 14px; }
.ptable th { color: var(--muted); font-weight: 600; font-size: 13px; background: #fafbfc; }
.num { text-align: right; }

/* ── Подвал и нижняя панель ─────────────────────────────────────────────── */

.footer { background: var(--dark-2); color: var(--on-dark-muted); font-size: 14px; }
/* Первая колонка не уже знака: длинный знак на 1024 px наезжал бы на «Каталог» */
.footer__row { display: grid; grid-template-columns: minmax(min-content, 1.3fr) 1fr 1fr 1.2fr; gap: 32px; padding-top: 40px; padding-bottom: 28px; }
.footer__brand p { margin-top: 14px; }
.footer__rating { display: inline-flex; align-items: center; gap: 6px; color: var(--on-dark); }
.footer__rating .icon { fill: #f5b301; stroke: #f5b301; width: 18px; height: 18px; }
.footer__title { margin-bottom: 12px; color: #fff; font-weight: 700; font-size: 15px; }
.footer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.footer a:hover { color: #fff; }
.footer__phone { font-size: 20px; font-weight: 800; color: #fff; }
.footer__line { display: flex; gap: 10px; align-items: flex-start; }
.footer__line .icon { width: 18px; height: 18px; margin-top: 2px; color: var(--rose-soft); }
.footer .address__text { color: var(--on-dark); }
.footer .address__hint { color: var(--rose-soft); }
.footer__messengers { display: flex; gap: 8px; flex-wrap: wrap; }
.footer__bottom { display: flex; flex-wrap: wrap; gap: 6px 24px; padding-top: 18px; padding-bottom: 26px; border-top: 1px solid rgba(255, 255, 255, .08); font-size: 12.5px; color: #8a929b; }

.mbar { display: none; }

/* Сообщение «добавлено в корзину». Скрыто совсем, а не только сдвинуто: на телефоне
   оно стоит над нижней панелью, и сдвиг вниз оставлял его на виду */
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 80; display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--dark); color: #fff; box-shadow: var(--shadow-up); transform: translate(-50%, 20px); opacity: 0; visibility: hidden; transition: transform .25s, opacity .25s, visibility .25s; max-width: calc(100vw - 32px); }
.toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; }
.toast a { color: var(--rose-soft); font-weight: 600; white-space: nowrap; }
.toast--error { background: var(--red); }
.toast--plain a { display: none; }

/* ── Узкие экраны ───────────────────────────────────────────────────────── */

@media (max-width: 1180px) {
  .hdr__contact { display: none; }
  .topline__msg { display: inline-flex; }
  .hero__row { grid-template-columns: minmax(0, 1fr) 360px; }
  .why__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .hide-md { display: none; }
  .wgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Значки и «Найти» без подписей: на планшете с подписями строке поиска
     оставалось меньше 100 px */
  .hdr__btn-text { display: none; }
  .hdr__btn { padding: 8px; }
  /* Карточка VIN уходит под текст, и середина первого экрана — за ней:
     машину поднимаем за заголовок */
  .hero__ghost { top: 240px; }
  .hero__row { grid-template-columns: 1fr; padding-top: 36px; padding-bottom: 40px; }
  .hero h1 { font-size: 36px; }
  /* minmax(0, 1fr), а не 1fr: иначе ряд миниатюр или длинное название раздвигает
     колонку шире экрана телефона */
  .listing, .product, .cart, .checkout, .contacts-page, .page-layout, .vin-page, .reviews__row, .help__row { grid-template-columns: minmax(0, 1fr); }
  .filters, .product__media, .summary, .page-aside { position: static; }
  /* На узком экране фильтр свёрнут (retail.js), а подсказка про VIN есть внизу страницы */
  .filters .side-help { display: none; }
  .filters__box summary { margin-bottom: 0; display: flex; justify-content: space-between; align-items: center; }
  .filters__box summary::after { content: '▾'; color: var(--muted); }
  .filters__box[open] summary { margin-bottom: 12px; }
  .filters__box[open] summary::after { content: '▴'; }
  .footer__row { grid-template-columns: 1fr 1fr; }
  .acc { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .hide-sm { display: none; }
  h1 { font-size: 25px; }
  .wgrid { gap: 12px; }
  .work { padding: 14px; }
  .work__photos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .wrap { padding: 0 14px; }
  .topline__row { gap: 14px; min-height: 30px; font-size: 12.5px; }
  .hdr__row { flex-wrap: wrap; gap: 10px 12px; min-height: 0; padding-top: 10px; padding-bottom: 10px; }
  /* Знак и два значка в одну строку и на самом узком телефоне (320 px): иначе
     значки уезжали бы на строку ниже. Ширина знака — 6,6 высоты, 130 px — поля,
     промежуток и значки */
  .logo__gg, .logo__word { height: min(32px, calc((100vw - 130px) / 6.6)); }
  .logo__word { margin-left: 3px; }
  .search { order: 3; flex-basis: 100%; }
  .search input, .search button { height: 44px; }
  /* Шапка с поиском и меню — четверть экрана телефона. Листают вниз — она
     уезжает, потянули вверх — возвращается (retail.js, класс hdr--away) */
  .hdr { transition: transform .25s ease, box-shadow .25s; }
  .hdr--away { transform: translateY(-100%); box-shadow: none; }
  /* Поиск на главной уже есть в шапке — второй такой же строкой ниже не нужен */
  .hero__search { display: none; }
  /* Марки и разделы — по две в ряд: столбиком это два с половиной экрана */
  .brands, .sections { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .brand { padding: 12px; }
  .brand__name { font-size: 15.5px; }
  /* две строки моделей целиком, третья не выглядывает */
  .brand__models { gap: 2px 8px; margin-top: 6px; font-size: 12.5px; line-height: 1.3; max-height: calc(2.6em + 2px); overflow: hidden; }
  .section-tile { padding: 12px; border-left-width: 3px; }
  .section-tile b { font-size: 14.5px; line-height: 1.25; }
  .section-tile span { font-size: 12.5px; }
  .hdr__actions { margin-left: auto; }
  .hero h1 { font-size: 30px; }
  .hero__lead { font-size: 15.5px; }
  .hero__car .car-pick { min-width: 0; flex-basis: 100%; }
  .hero__car .btn { width: 100%; }
  /* на телефоне цвет — до кнопки: марка, модель, цвет, «Показать детали» */
  .hero__paints { order: 0; margin: 2px 0 4px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  /* «С этим покупают» — лента вбок: десять карточек столбиком заняли бы пять экранов */
  .grid--row { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 44%;
    overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -14px; padding: 0 14px 6px;
    scroll-padding: 0 14px; }
  .grid--row > * { scroll-snap-align: start; }
  /* зоны машины — одной строкой вбок: в две-три строки они съедали первый экран */
  .zones { flex-wrap: nowrap; overflow-x: auto; margin: 0 -14px 14px; padding: 0 14px 4px; scrollbar-width: none; }
  .zones::-webkit-scrollbar { display: none; }
  .zone__head h2 { font-size: 18px; }
  .kit__row { grid-template-columns: auto 52px minmax(0, 1fr); gap: 10px; padding: 10px 12px; }
  .kit__photo { width: 52px; height: 40px; }
  .kit__price { grid-column: 3; justify-self: start; margin-top: -4px; }
  .kit__total .btn { width: 100%; justify-content: center; }
  /* над нижней панелью телефона: «Каталог · Поиск · Позвонить · Корзина» */
  .kit__total { bottom: calc(62px + env(safe-area-inset-bottom)); }
  .pcard__body { padding: 10px; }
  .pcard__name { font-size: 13.5px; -webkit-line-clamp: 3; }
  .pcard__bottom { flex-direction: column; align-items: stretch; }
  .pcard__bottom .btn, .pcard__buy .btn { width: 100%; }
  .price b { font-size: 17px; }
  .filters__box:not([open]) summary { margin-bottom: 0; }
  .lead--compact .lead__fields { grid-template-columns: 1fr; }
  .lead--compact .lead__submit { width: 100%; }
  .cline { grid-template-columns: 72px minmax(0, 1fr) 36px; }
  .cline__photo { width: 72px; height: 56px; }
  .cline__qty, .cline__sum { grid-column: 2; }
  .cline__sum { text-align: left; }
  .remove { grid-column: 3; grid-row: 1; }
  .form-row { grid-template-columns: 1fr; }
  .order-row { grid-template-columns: 1fr 1fr; }
  .why { padding: 22px; }
  .why__grid { grid-template-columns: 1fr; }
  .footer__row { grid-template-columns: 1fr; gap: 22px; }
  .buybox__price b { font-size: 30px; }

  /* Нижняя панель: звонок и корзина всегда под пальцем */
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
  .mbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
    padding-bottom: env(safe-area-inset-bottom, 0px); background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(16, 24, 40, .08); }
  .mbar__item { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 62px; border: 0; background: none; font-size: 11.5px; font-weight: 600; color: var(--muted); cursor: pointer; }
  .mbar__item .icon { width: 23px; height: 23px; }
  .mbar__call { color: #fff; background: var(--green); }
  /* «Написать»: раскрывается без скрипта (details), меню — над панелью во всю ширину */
  .mbar__write { display: block; position: static; }
  .mbar__write > summary { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 100%; list-style: none; cursor: pointer; }
  .mbar__write > summary::-webkit-details-marker { display: none; }
  .mbar__write[open] > summary { color: var(--accent); }
  .mbar__menu { position: absolute; left: 8px; right: 8px; bottom: calc(100% + 8px); display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px;
    padding: 10px; border-radius: 14px; background: #fff; box-shadow: 0 8px 28px rgba(16, 24, 40, .22); }
  .mbar__menu .msg { justify-content: center; min-height: 48px; }
  .mbar__badge { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
  /* Сообщение «в корзине» — во всю ширину над нижней панелью, а не узким столбиком */
  .toast { left: 12px; right: 12px; max-width: none; justify-content: space-between;
    bottom: calc(76px + env(safe-area-inset-bottom, 0px)); transform: translateY(20px); }
  .toast.show { transform: none; }
}

@media (max-width: 760px) and (prefers-reduced-motion: reduce) { .hdr { transition: none; } }
