:root {
  --bg: #f5f5f2;
  --surface: #ffffff;
  --ink: #15171b;
  --ink-2: #3a3e46;
  --muted: #62676f; /* 4.5:1+ на светлом фоне */
  --line: #e3e3de;
  --dark: #071730;
  --dark-2: #10264a;
  --accent: #e0283a;
  --accent-hover: #c01d2e;
  --accent-soft: #fdebed;
  --wa: #13843f; /* темнее фирменного — белый текст читается (4.5:1+) */
  --tg: #2a8bd6;
  --danger: #c62828;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(20, 22, 26, .06), 0 8px 24px rgba(20, 22, 26, .06);
  --shadow-lg: 0 20px 60px rgba(10, 12, 16, .25);
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0; letter-spacing: -.02em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 2px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
a, button, input, select, label, summary { touch-action: manipulation; } /* без задержки нажатия на телефоне */
/* Для клавиатуры: первая клавиша Tab — «Перейти к содержимому» */
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 1000; background: var(--surface); color: var(--ink); padding: 10px 16px; border-radius: var(--radius-sm); font-weight: 700; box-shadow: var(--shadow-lg); }
.skip-link:focus { top: 12px; }
main:focus { outline: none; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .container { padding: 0 32px; } }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; /* 44 px — удобно попасть пальцем */
  border: 0; border-radius: 999px;
  font-weight: 700; font-size: 15px; text-decoration: none; white-space: nowrap;
  transition: background .15s, transform .1s, box-shadow .15s;
}
.btn:active { transform: translateY(1px); }
.btn-lg { min-height: 50px; padding: 0 24px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-hover); }
.btn-dark { background: var(--dark); color: #fff; }
.btn-dark:hover { background: var(--dark-2); }
.btn-ghost-light { background: rgba(255, 255, 255, .08); color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .25); }
.btn-ghost-light:hover { background: rgba(255, 255, 255, .16); }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { filter: brightness(.94); }
.btn-tg { background: var(--tg); color: #fff; }
.btn-tg:hover { filter: brightness(.94); }
.icon-btn {
  width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: transparent; font-size: 26px; line-height: 1; color: var(--muted);
  display: grid; place-items: center;
}
.icon-btn:hover { background: var(--bg); color: var(--ink); }
.icon-btn-sm { width: 30px; height: 30px; font-size: 20px; }

/* ---------- Шапка ---------- */
.header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(7, 23, 48, .95);
  backdrop-filter: saturate(1.4) blur(10px);
  color: #fff;
}
.header-row { display: flex; align-items: center; gap: 24px; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; text-decoration: none; letter-spacing: -.02em; }
.logo-mark {
  width: 26px; height: 30px; border-radius: 7px 7px 9px 9px;
  background:
    repeating-linear-gradient(45deg, transparent 0 4px, rgba(0,0,0,.35) 4px 5px),
    repeating-linear-gradient(-45deg, transparent 0 4px, rgba(0,0,0,.35) 4px 5px),
    var(--accent);
  box-shadow: inset 0 0 0 2.5px #fff;
}
.nav { display: none; gap: 24px; margin-left: 12px; }
.nav a { text-decoration: none; color: rgba(255, 255, 255, .75); font-weight: 600; font-size: 15px; }
.nav a:hover { color: #fff; }
.header-phone { display: none; margin-left: auto; text-decoration: none; font-weight: 700; }
.cart-btn {
  position: relative; margin-left: auto;
  width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .1); color: #fff;
  display: grid; place-items: center;
}
.cart-btn:hover { background: rgba(255, 255, 255, .18); }
.cart-btn.bump { animation: bump .4s ease; }
@keyframes bump { 40% { transform: scale(1.18); } }
.cart-count {
  position: absolute; top: -2px; right: -2px;
  min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  background: var(--accent); color: #fff; font-size: 12px; font-weight: 800;
  display: grid; place-items: center;
}
@media (min-width: 900px) {
  .nav { display: flex; }
  .header-phone { display: block; }
  .cart-btn { margin-left: 0; }
}

/* ---------- Первый экран ---------- */
.hero {
  background:
    radial-gradient(900px 400px at 85% 20%, rgba(224, 40, 58, .25), transparent 60%),
    linear-gradient(180deg, #071730, #0c2142);
  color: #fff;
  overflow: hidden;
}
.hero-grid { display: grid; gap: 32px; padding-top: 48px; padding-bottom: 56px; align-items: center; }
.eyebrow { margin: 0 0 12px; color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: 13px; }
.hero h1 { font-size: clamp(32px, 6vw, 56px); font-weight: 800; max-width: 12em; }
.hero-text { color: rgba(255, 255, 255, .72); font-size: 18px; max-width: 34em; margin: 18px 0 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-stats { list-style: none; padding: 0; margin: 36px 0 0; display: flex; gap: 28px; flex-wrap: wrap; }
.hero-stats b { display: block; font-size: 24px; font-weight: 800; }
.hero-stats span { color: rgba(255, 255, 255, .6); font-size: 14px; }
.hero-art { position: relative; height: 300px; }
.hero-mat { position: absolute; width: 200px; filter: drop-shadow(0 24px 30px rgba(0, 0, 0, .45)); }
.hero-mat-a { left: 50%; top: 10px; transform: translateX(-80%) rotate(-10deg); }
.hero-mat-b { left: 50%; top: 40px; transform: translateX(-5%) rotate(8deg); }
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.15fr .85fr; padding-top: 72px; padding-bottom: 88px; }
  .hero-art { height: 420px; }
  .hero-mat { width: 260px; }
}

/* ---------- Преимущества ---------- */
.benefits { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: -28px; position: relative; }
.benefit { background: var(--surface); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.benefit-ic { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-hover); display: grid; place-items: center; }
.benefit-ic svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.benefit h3 { font-size: 16px; margin: 8px 0 4px; }
.benefit p { margin: 0; color: var(--muted); font-size: 14px; }
@media (min-width: 900px) { .benefits { grid-template-columns: repeat(4, 1fr); gap: 16px; } .benefit { padding: 22px; } }

/* ---------- Секции ---------- */
.section { padding-top: 64px; padding-bottom: 64px; }
.section h2 { font-size: clamp(26px, 4vw, 36px); font-weight: 800; margin-bottom: 24px; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.section-head h2 { margin: 0; }
.catalog-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1.5px solid var(--line); background: var(--surface);
  min-height: 44px; padding: 7px 16px; border-radius: 999px; font-weight: 600; font-size: 14px;
}
.chip:hover { border-color: var(--ink-2); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.sort select {
  min-height: 44px; border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px;
  padding: 7px 14px; font-weight: 600; font-size: 14px;
}

/* ---------- Карточки ---------- */
.grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 600px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
.card {
  background: var(--surface); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); display: flex; flex-direction: column;
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(20,22,26,.06), 0 16px 40px rgba(20,22,26,.1); }
.card-media {
  position: relative; border: 0; padding: 24px; margin: 0;
  background: linear-gradient(180deg, #eceae4, #e2e0d9);
  aspect-ratio: 4 / 3; display: grid; place-items: center;
}
.card-media .mat-svg { height: 100%; width: auto; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .25)); transition: transform .3s; }
.card:hover .card-media .mat-svg { transform: rotate(-3deg) scale(1.03); }
.card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.badge {
  position: absolute; top: 14px; left: 14px;
  background: var(--accent); color: #fff; font-size: 12px; font-weight: 800;
  padding: 4px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em;
}
.badge-inline { position: static; display: inline-block; margin-bottom: 10px; }
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.card-cat { margin: 0 0 4px; color: var(--muted); font-size: 13px; font-weight: 600; }
.card-title { font-size: 20px; font-weight: 800; }
.card-desc { color: var(--muted); font-size: 14px; margin: 8px 0 16px; }
.card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-price { font-size: 20px; font-weight: 800; }
.card-price small { font-size: 13px; color: var(--muted); font-weight: 600; }
.card-price .card-price-type { display: block; font-size: 12px; line-height: 1.2; }
.card-price .card-price-type::before { content: 'за '; }
.empty { color: var(--muted); }
.card-skeleton { pointer-events: none; }
.card-skeleton .card-body span { display: block; height: 14px; border-radius: 7px; background: var(--line); margin-bottom: 10px; }
.card-skeleton .card-body span:nth-child(2) { width: 70%; height: 20px; }
.card-skeleton .card-body span:nth-child(3) { width: 90%; }
.card-skeleton .card-media, .card-skeleton .card-body span { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }

/* ---------- Как заказать / FAQ ---------- */
.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; gap: 16px; }
@media (min-width: 700px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.steps li { counter-increment: s; background: var(--bg); border-radius: var(--radius); padding: 22px; }
.steps li::before {
  content: counter(s); display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 50%; margin-bottom: 14px;
  background: var(--accent); color: #fff; font-weight: 800;
}
.steps b { font-size: 17px; }
.steps p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.faq { display: grid; gap: 10px; max-width: 820px; }
.faq details { background: var(--surface); border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.faq summary {
  padding: 18px 20px; font-weight: 700; cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 22px; line-height: 1; color: var(--accent); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { margin: 0; padding: 0 20px 18px; color: var(--ink-2); }

/* ---------- Подвал ---------- */
.footer { background: var(--dark); color: rgba(255, 255, 255, .85); padding-top: 48px; }
.footer-grid { display: grid; gap: 28px; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer h3, .footer h4 { color: #fff; font-size: 15px; margin-bottom: 12px; }
.footer p { margin: 0 0 6px; }
.footer a { text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; }
.logo-light { color: #fff; }
.muted-light { color: rgba(255, 255, 255, .55); margin-top: 10px !important; }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 16px;
  margin-top: 36px; padding-top: 20px; padding-bottom: 28px;
  border-top: 1px solid rgba(255, 255, 255, .1); font-size: 14px; color: rgba(255, 255, 255, .5);
}

.wa-float {
  position: fixed; right: 16px; bottom: 16px; z-index: 20;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--wa); color: #fff; display: grid; place-items: center;
  box-shadow: 0 8px 24px rgba(31, 168, 85, .4);
}
.wa-float:hover { transform: scale(1.06); }

/* ---------- Модальное окно товара ---------- */
.modal {
  width: min(1000px, calc(100% - 24px)); max-height: calc(100% - 24px);
  padding: 0; border: 0; border-radius: 18px;
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg);
}
.modal::backdrop { background: rgba(10, 12, 16, .6); backdrop-filter: blur(2px); }
.modal[open] { animation: pop .22s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.modal-close {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .9); font-size: 26px; line-height: 1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}
.pm { display: grid; }
.pm > * { min-width: 0; } /* иначе ряд миниатюр растягивает окно шире экрана */
@media (min-width: 820px) { .pm { grid-template-columns: 1fr 1.1fr; } }
.pm-media {
  background: linear-gradient(180deg, #eceae4, #dfddd5);
  padding: 28px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
}
.pm-preview { width: min(260px, 70%); }
.pm-preview .mat-svg { width: 100%; height: auto; filter: drop-shadow(0 16px 22px rgba(0, 0, 0, .3)); }
.pm-hint { margin: 0; font-size: 13px; color: var(--muted); text-align: center; }
.pm-photo { width: 100%; max-width: 360px; border-radius: var(--radius-sm); margin-top: 8px; }
@media (min-width: 820px) {
  .pm-media { position: sticky; top: 0; align-self: start; min-height: 100%; }
}
.pm-body { padding: 28px 20px 24px; }
@media (min-width: 820px) { .pm-body { padding: 36px 36px 28px; } }
.pm-body h2 { font-size: 28px; font-weight: 800; padding-right: 36px; }
.pm-desc { color: var(--ink-2); margin: 10px 0 12px; }
.pm-features { margin: 0 0 8px; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.pm-features li { background: var(--bg); border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 600; color: var(--ink-2); }

.field-group { border: 0; padding: 0; margin: 22px 0 0; min-width: 0; }
.field-group legend { font-weight: 800; font-size: 15px; margin-bottom: 10px; padding: 0; }
.legend-val { color: var(--muted); font-weight: 600; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > span { font-size: 13px; font-weight: 600; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); padding: 10px 12px; font-size: 15px;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field textarea { resize: vertical; }
.car-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.car-row .field-year { grid-column: span 2; }
@media (min-width: 500px) { .car-row { grid-template-columns: 1.2fr 1.2fr .7fr; } .car-row .field-year { grid-column: auto; } }

.sets { display: grid; gap: 8px; }
.set-opt {
  display: flex; align-items: center; gap: 12px; cursor: pointer;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px;
  transition: border-color .15s, background .15s;
}
.set-opt:hover { border-color: var(--ink-2); }
.set-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.set-opt input { accent-color: var(--accent); width: 18px; height: 18px; margin: 0; }
.set-name { flex: 1; font-weight: 600; }
.set-price { font-weight: 800; }

.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { position: relative; cursor: pointer; }
.swatch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.swatch > span:first-of-type {
  display: block; width: 38px; height: 38px; border-radius: 50%;
  background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15);
  transition: transform .12s;
}
.swatch:hover > span:first-of-type { transform: scale(1.08); }
.swatch input:checked + span { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--accent); }
.swatch input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 4px; }

/* Цена сверху, под ней две кнопки одинаковой ширины в один ряд (на узком экране — друг под другом). */
.pm-buy {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px 12px;
  margin-top: 22px;
}
.pm-buy .pm-total { grid-column: 1 / -1; }
.buy-opt { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pm-buy .btn { width: 100%; height: 46px; min-height: 46px; padding: 0 14px; font-size: 15px; overflow: hidden; text-overflow: ellipsis; }
.buy-note { margin: 0; font-size: 12.5px; line-height: 1.35; color: var(--muted); text-align: center; }
.pm-buy .pm-total + .buy-opt:last-child { grid-column: 1 / -1; } /* нет Kaspi — одна кнопка на всю ширину */
@media (max-width: 520px) { .pm-buy { grid-template-columns: 1fr; row-gap: 12px; } }
.pm-total { display: flex; flex-direction: column; line-height: 1.2; margin-right: auto; }
.pm-total small { color: var(--muted); font-weight: 600; }
.pm-total b { font-size: 24px; font-weight: 800; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; }
.qty button { width: 38px; height: 38px; border: 0; background: none; font-size: 20px; border-radius: 50%; }
.qty button:hover { background: var(--bg); }
.qty output { min-width: 26px; text-align: center; font-weight: 700; }
.qty-sm button { width: 30px; height: 30px; font-size: 17px; }
.form-error { color: var(--danger); font-weight: 600; font-size: 14px; margin: 12px 0 0; }

/* ---------- Корзина ---------- */
.drawer-overlay { position: fixed; inset: 0; z-index: 40; background: rgba(10, 12, 16, .5); }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 41;
  width: min(440px, 100%); background: var(--surface);
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .28s ease;
  box-shadow: var(--shadow-lg); visibility: hidden;
}
.drawer.is-open { transform: none; visibility: visible; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 12px 20px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-size: 22px; font-weight: 800; }
.drawer-body { overflow-y: auto; padding: 16px 20px 28px; flex: 1; }
.cart-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.cart-item { display: flex; gap: 12px; align-items: flex-start; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.cart-thumb { width: 64px; flex: none; background: var(--bg); border-radius: var(--radius-sm); padding: 8px; }
.cart-info { flex: 1; display: flex; flex-direction: column; font-size: 13px; color: var(--muted); min-width: 0; }
.cart-info > b { color: var(--ink); font-size: 15px; }
.cart-line { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; color: var(--ink); }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 0; font-weight: 700; }
.cart-total b { font-size: 24px; font-weight: 800; }
.order-form { display: grid; gap: 12px; background: var(--bg); border-radius: var(--radius); padding: 18px; }
.order-form h3 { font-size: 17px; }
.order-form .field input, .order-form .field select, .order-form .field textarea { background: var(--surface); }
.fine { margin: 0; font-size: 13px; color: var(--muted); text-align: center; }
.done { text-align: center; padding: 48px 8px; }
.done h3 { font-size: 22px; margin-bottom: 8px; }
.done p { color: var(--muted); margin: 0 0 20px; }
.done-ic {
  width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 16px;
  background: var(--wa); color: #fff; font-size: 32px; display: grid; place-items: center;
}

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 60;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--dark); color: #fff; font-weight: 600;
  padding: 12px 20px; border-radius: 999px; box-shadow: var(--shadow-lg);
  transition: opacity .2s, transform .2s; max-width: calc(100% - 32px); text-align: center;
}
.toast.is-shown { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Каталог из Kaspi ---------- */
.muted { color: var(--muted); }
.small { font-size: 13px; }
.btn-kaspi { background: #d9302a; color: #fff; }
.btn-kaspi:hover { background: #bf2720; }
.btn-light-dark { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-light-dark:hover { box-shadow: inset 0 0 0 1.5px var(--ink-2); }
.link-btn { border: 0; background: none; padding: 12px 0; margin: -12px 0; color: var(--accent-hover); font-weight: 700; font-size: 14px; } /* зона нажатия 44 px без сдвига вёрстки */
.section-dark .link-btn { color: #ff8a94; }
.link-btn:hover { text-decoration: underline; }

.quick-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 16px; max-width: 560px; }
.quick-pick select { min-width: 0; height: 50px; border: 0; border-radius: 12px; padding: 0 14px; background: #fff; color: var(--ink); font-weight: 600; }
.quick-pick select:disabled { opacity: .6; }
.quick-pick .btn { grid-column: 1 / -1; min-height: 50px; }
@media (min-width: 560px) { .quick-pick { grid-template-columns: 1fr 1fr auto; } .quick-pick .btn { grid-column: auto; } }

.hero-shot { position: absolute; inset: 0; border-radius: 20px; overflow: hidden; box-shadow: 0 24px 50px rgba(0, 0, 0, .45); background: #fff; }
.hero-shot img { width: 100%; height: 100%; object-fit: cover; object-position: var(--hero-focus, 50% 50%); }
/* На телефоне — точка фокуса мобильного кадра (если он задан), иначе та же, что и на широком экране */
@media (max-width: 700px) { .hero-shot img { object-position: var(--hero-focus-mobile, var(--hero-focus, 50% 50%)); } }
#featured .section-head { align-items: baseline; }
#featured .section-head p { margin: 0; }
.hero-photo { position: absolute; width: 58%; aspect-ratio: 1; border-radius: 20px; overflow: hidden; background: #fff; box-shadow: 0 24px 50px rgba(0, 0, 0, .45); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo-a { left: 4%; top: 6%; transform: rotate(-5deg); }
.hero-photo-b { right: 4%; top: 22%; transform: rotate(5deg); }

.search input { width: min(280px, 100%); border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px; min-height: 44px; padding: 7px 16px; font-size: 14px; }
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.catalog-tools .search { flex: 1 1 200px; }
.catalog-tools .search input { width: 100%; }
.type-chips { margin-bottom: 8px; }
.catalog-count { margin: 0 0 14px; font-size: 14px; }
.catalog-more { display: flex; justify-content: center; margin-top: 24px; }

.card-media-photo { padding: 0; background: #fff; }
.card-media-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transition: transform .3s; }
.card:hover .card-media-photo img { transform: scale(1.03); }
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 14px; }
.card-tags span { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--bg); color: var(--ink-2); }
.empty-box { grid-column: 1 / -1; background: var(--surface); border-radius: var(--radius); padding: 28px; text-align: center; box-shadow: var(--shadow); }
.empty-box p { margin: 0 0 8px; color: var(--ink-2); }
.empty-box .btn { margin-top: 10px; }

/* Окно подбора */
.pm-media { justify-content: flex-start; background: #fff; border-right: 1px solid var(--line); }
.pm-photo-main { position: relative; width: 100%; aspect-ratio: 1; display: grid; place-items: center; border-radius: var(--radius-sm); overflow: hidden; }
/* Фото привязано к рамке и вписано целиком: height: 100% в рамке с aspect-ratio браузеры считают по-разному — картинка вылезала и обрезалась снизу */
.pm-photo-main img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.pm-photo-main .mat-svg { width: 60%; height: auto; }
.pm-thumbs { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.pm-thumb { width: 56px; height: 56px; padding: 0; border: 2px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.pm-thumb img { width: 100%; height: 100%; object-fit: contain; }
.pm-thumb.is-active { border-color: var(--accent); }
.pm-rating { margin: 6px 0 0; color: #f5a623; letter-spacing: 1px; }
.pm-rating span { color: var(--muted); letter-spacing: 0; font-size: 14px; margin-left: 6px; }
.pm-note { margin: 18px 0 0; padding: 14px 16px; background: var(--accent-soft); border-radius: var(--radius-sm); font-weight: 600; }
.year-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.year-row select { border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 16px; font-weight: 700; min-width: 170px; background: var(--surface); }
.type-pick { display: grid; gap: 8px; }
.type-opt { display: flex; align-items: center; gap: 12px; cursor: pointer; border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; }
.type-opt:hover { border-color: var(--ink-2); }
.type-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.type-opt input { accent-color: var(--accent); width: 18px; height: 18px; margin: 0; }
/* Название и метки («Новинка», «Под заказ») — одна строка, при нехватке места метка переносится целиком */
.type-name { flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-weight: 600; }
.type-name em { font-style: normal; font-size: 11px; font-weight: 800; text-transform: uppercase; white-space: nowrap; background: var(--ink); color: #fff; padding: 2px 7px; border-radius: 999px; }
.type-price { flex: none; white-space: nowrap; font-weight: 700; color: var(--ink-2); font-size: 14px; }
.set-help { justify-content: center; color: var(--wa); font-weight: 700; text-decoration: none; border-style: dashed; }
.pm-result { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.pm-variant { margin: 0 0 8px; font-weight: 800; font-size: 17px; }
.pm-specs { list-style: none; padding: 0; margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 14px; color: var(--muted); }
.pm-specs b { color: var(--ink); }
.pm-long p { margin: 0; color: var(--ink-2); font-size: 14px; max-height: 4.6em; overflow: hidden; }
.pm-long.is-open p { max-height: none; }
.pm-result .pm-buy { margin-top: 16px; }
.pm-result .fine { text-align: left; margin-top: 10px; }
.pm-help { margin: 18px 0 0; font-size: 14px; }
.pm-help a { color: var(--wa); font-weight: 700; display: inline-block; padding: 12px 0; margin: -12px 0; }
.check-line { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.check-line input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--accent); flex: none; }
.cart-thumb img { width: 100%; height: 48px; object-fit: contain; }
.pm-photo-main { max-width: 420px; margin: 0 auto; }
@media (max-width: 819px) {
  .pm-media { padding: 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .pm-photo-main { aspect-ratio: 4 / 3; max-width: 320px; }
  .pm-thumb { width: 44px; height: 44px; }
}

/* ---------- Обзоры из Instagram ---------- */
.section-dark { background: var(--dark); color: #fff; }
.section-dark h2 { color: #fff; }
.reviews-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 760px) { .reviews-grid { grid-template-columns: repeat(4, 1fr); gap: 18px; } }
.reel-card { background: var(--dark-2); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.reel-cover { position: relative; border: 0; padding: 0; aspect-ratio: 4 / 5; background: #fff; display: block; width: 100%; }
.reel-cover img { width: 100%; height: 100%; object-fit: cover; }
.reel-cover-fallback { position: absolute; inset: 0; background: radial-gradient(circle at 30% 20%, #f58529, #dd2a7b 45%, #8134af 75%, #515bd4); }
.reel-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 56px; height: 56px; border-radius: 50%; background: rgba(0, 0, 0, .6); color: #fff; display: grid; place-items: center; font-size: 20px; padding-left: 4px; transition: transform .15s, background .15s; }
.reel-cover:hover .reel-play { transform: translate(-50%, -50%) scale(1.1); background: var(--accent); }
.reel-info { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.reel-info b { font-size: 14px; line-height: 1.35; }
.reel-info span { font-size: 12px; color: rgba(255, 255, 255, .55); }
.reel-info .link-btn { margin: auto 0 -12px; padding: 12px 0; color: #ff8a94; text-align: left; text-decoration: none; font-size: 13px; }
.reel-modal { width: min(420px, calc(100% - 24px)); padding: 16px; }
.reel-title { font-size: 17px; font-weight: 800; padding-right: 40px; margin-bottom: 12px; }
.reel-frame { width: 100%; height: min(72vh, 680px); border: 0; border-radius: var(--radius-sm); background: var(--bg); display: block; }
.reel-link { margin: 10px 0 0; font-size: 14px; }
.reel-link a { color: var(--accent-hover); font-weight: 700; }
.has-reel { color: #c81d6b; font-weight: 700; }
.pm-reels { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.pm-reels-title { margin: 0; font-weight: 800; }
.pm-reel-btn { display: flex; align-items: center; gap: 10px; border: 1.5px solid var(--line); background: var(--surface); border-radius: var(--radius-sm); padding: 10px 14px; font-weight: 600; text-align: left; }
.pm-reel-btn:hover { border-color: #dd2a7b; }
.pm-reel-btn > span:first-child { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af); color: #fff; display: grid; place-items: center; font-size: 11px; flex: none; padding-left: 2px; }
.pm-reels .reel-frame { height: 560px; }

/* ---------- Места и характеристики ---------- */
.seat-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.seat-opt { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; cursor: pointer; border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 12px 10px; font-size: 13px; font-weight: 600; line-height: 1.3; }
.seat-opt:hover { border-color: var(--ink-2); }
.seat-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.seat-opt input { position: absolute; opacity: 0; pointer-events: none; }
.seat-opt:focus-within { outline: 3px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 2px; }
.seat-unknown { justify-content: center; color: var(--muted); }
.seat-svg { width: 44px; height: auto; }
.seat-svg .seat-car { fill: none; stroke: var(--line); stroke-width: 2; }
.seat-svg rect:not(.seat-car) { fill: var(--ink-2); }
.seat-opt:has(input:checked) .seat-svg rect:not(.seat-car) { fill: var(--accent); }
/* Нет в наличии: кнопка Kaspi остаётся на месте, но потухшая и неактивная */
.pm-buy .btn[disabled] { background: #e8e6e0; color: #6b6f77; cursor: default; }
.pm-buy .btn[disabled]:active { transform: none; }
.badge-stock { top: 14px; left: auto; right: 14px; background: var(--ink); color: #fff; }
.type-stock { font-style: normal; font-size: 11px; font-weight: 800; text-transform: uppercase; white-space: nowrap; background: #f0efea; color: var(--ink-2); padding: 2px 7px; border-radius: 999px; }
.cart-stock { color: #8c1420; font-weight: 600; }
.pm-warn { margin: 0 0 12px; padding: 10px 14px; border-radius: var(--radius-sm); background: #fff4d6; color: #6b4c00; font-size: 14px; font-weight: 600; }
.spec-box { margin: 6px 0 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.spec-box summary { padding: 10px 14px; font-weight: 800; cursor: pointer; }
.spec-table { margin: 0; padding: 0 14px 10px; }
.spec-table div { display: grid; grid-template-columns: minmax(110px, 40%) 1fr; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 14px; }
.spec-table dt { color: var(--muted); }
.spec-table dd { margin: 0; font-weight: 600; }

/* ---------- Логотип PARADOX (из Instagram @paradox.mats) ---------- */
.logo-img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; box-shadow: 0 0 0 2px rgba(255, 255, 255, .15); }
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-text b { font-weight: 800; font-size: 19px; letter-spacing: .08em; }
.logo-text small { font-size: 11px; font-weight: 700; letter-spacing: .32em; text-transform: uppercase; color: #ff6b77; margin-top: 4px; }
.footer .logo-text small { color: #ff5a6a; }
.eyebrow { color: #ff5a6a; }

/* ---------- Отзывы покупателей из Kaspi ---------- */
.kr-summary { margin: 6px 0 0; color: var(--ink-2); }
.kr-stars { color: #d97706; letter-spacing: 1px; }
.kr-grid { display: grid; gap: 14px; }
@media (min-width: 700px) { .kr-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1050px) { .kr-grid { grid-template-columns: repeat(3, 1fr); } }
.kr-card { background: var(--surface); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px; }
.kr-card header { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.kr-card header b { font-size: 15px; }
.kr-text { margin: 0; white-space: pre-line; color: var(--ink-2); font-size: 14px; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
.kr-text.is-open { display: block; -webkit-line-clamp: unset; }
.kr-photos { display: flex; gap: 6px; }
.kr-photos img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; }
/* Ответ магазина под отзывом (2ГИС) */
.kr-answer { margin: 0; padding: 10px 12px; background: var(--bg); border-radius: var(--radius-sm); font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.kr-answer b { font-weight: 700; }
.kr-sources { margin-bottom: 16px; }
.gis-line a { font-weight: 600; }
.ext { font-size: 12px; opacity: .7; }
.kr-card footer { margin-top: auto; display: flex; justify-content: space-between; gap: 10px; align-items: center; font-size: 13px; color: var(--muted); }
.kr-card footer .link-btn { font-size: 13px; text-align: right; }
.pm-kr { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.pm-kr-title { margin: 0; font-weight: 800; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; }
.pm-kr-title > span { font-weight: 600; color: var(--muted); font-size: 14px; }
.pm-kr .kr-card { box-shadow: none; border: 1px solid var(--line); padding: 12px 14px; }
.pm-kr-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.btn-sm { min-height: 44px; padding: 0 14px; font-size: 14px; }
.pm-reels-title span { font-weight: 700; font-size: 13px; color: var(--muted); margin-left: 4px; }
.pm-reels .btn-sm { justify-self: start; }
.card-aka { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.pm-reel-text { display: flex; flex-direction: column; }
.pm-reel-text small { font-size: 12px; font-weight: 600; color: var(--muted); }
.set-name small { display: block; font-weight: 600; margin-top: 2px; }
.body-photo { font-size: 13px; white-space: nowrap; }
.body-wa { margin-top: 10px; display: inline-flex; }
