:root {
  --paper: #eef0ef;
  --surface: #ffffff;
  --ink: #1c2629;
  --muted: #5a676c;
  --line: #d3d9da;
  --line-strong: #b9c2c4;
  --teal: #0f4c4a;
  --teal-hover: #0b3a39;
  --teal-soft: #dbe8e6;
  --cherry: #8c1c2c;
  --cherry-soft: #f5e4e6;
  --tg: #2481cc;
  --tg-hover: #1b6aa8;

  --display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --text: "Golos Text", system-ui, -apple-system, "Segoe UI", sans-serif;

  --r-sm: 6px;
  --r-md: 10px;
  --gutter: 16px;
  --max: 1280px;
  --shadow: 0 1px 2px rgba(28, 38, 41, .06), 0 4px 14px rgba(28, 38, 41, .06);
}
@media (min-width: 640px) { :root { --gutter: 24px; } }
@media (min-width: 1024px) { :root { --gutter: 32px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--paper); color: var(--ink);
  font: 400 16px/1.5 var(--text);
}
main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: var(--teal); text-underline-offset: 3px; }
a:hover { color: var(--teal-hover); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--teal) 55%, transparent); outline-offset: 2px; }
[hidden] { display: none !important; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: #fff; padding: 8px 12px; }
.skip:focus { left: 8px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--muted); }
.loading { color: var(--muted); padding: 32px 0; }

/* ================= кнопки и поля ================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; min-height: 44px; border-radius: var(--r-sm); border: 1px solid transparent;
  background: var(--teal); color: #fff; font-weight: 600; cursor: pointer; text-decoration: none;
  white-space: nowrap; line-height: 1.2;
}
.btn:hover { background: var(--teal-hover); color: #fff; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn svg { width: 20px; height: 20px; }
.btn.ghost { background: var(--surface); color: var(--teal); border-color: var(--line-strong); }
.btn.ghost:hover { background: var(--teal-soft); }
.btn.in-cart { background: var(--teal-soft); color: var(--teal); }
.btn.danger { background: transparent; color: var(--cherry); border-color: #dcbcc1; }
.btn.danger:hover { background: var(--cherry-soft); }
.btn.tg { background: var(--tg); }
.btn.tg:hover { background: var(--tg-hover); }
.btn.tg svg { fill: currentColor; stroke: none; }
.btn.big { min-height: 52px; padding: 14px 22px; font-size: 17px; }
.btn.sm { min-height: 38px; padding: 7px 12px; font-size: 14px; }
.btn.block { width: 100%; }
.btn.icon-only { padding: 0; width: 48px; min-height: 48px; }
.link-btn { border: 0; background: none; color: var(--muted); text-decoration: underline; cursor: pointer; padding: 0; font-size: 14px; }
.link-btn:hover { color: var(--cherry); }

input[type="text"], input[type="search"], input[type="tel"], input[type="email"], input[type="number"],
input[type="password"], select, textarea {
  width: 100%; padding: 10px 12px; min-height: 44px; border: 1px solid var(--line-strong);
  border-radius: var(--r-sm); background: #fff; font-size: 16px;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--teal); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 22%, transparent); }
select { width: auto; padding-right: 32px; }

.search { display: flex; gap: 8px; width: 100%; }
.search input { flex: 1; min-width: 0; }

.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field > span { font-weight: 500; font-size: 15px; }
.field .hint { font-size: 13px; color: var(--muted); }
.field .err { font-size: 13px; color: var(--cherry); }
.field.invalid input, .field.invalid textarea { border-color: var(--cherry); }
.consent-row { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.consent-row input { width: 18px; height: 18px; margin-top: 2px; flex: none; accent-color: var(--teal); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-error { color: var(--cherry); font-weight: 500; margin: 0 0 12px; }

/* ================= шапка ================= */
.site-header { position: sticky; top: 0; z-index: 30; }
.topbar { background: var(--ink); color: #fff; }
.topbar-in { display: flex; align-items: center; gap: 12px; min-height: 56px; }
.logo { display: flex; flex-direction: column; color: inherit; text-decoration: none; line-height: 1.1; margin-right: auto; }
.logo b { font: 700 19px/1.1 var(--display); letter-spacing: -.01em; }
.logo span { font-size: 12px; color: #aebbbd; margin-top: 3px; }
.topbar .logo:hover { color: #fff; }
.icon-btn {
  display: inline-grid; place-items: center; position: relative; width: 44px; height: 44px; flex: none;
  border: 0; border-radius: var(--r-sm); background: transparent; color: inherit; cursor: pointer; text-decoration: none;
}
.topbar .icon-btn:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.badge {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 10px; background: var(--cherry); color: #fff; font: 600 12px/1 var(--text);
}
.icon-btn .badge { position: absolute; top: 2px; right: 0; }
.topnav { display: none; gap: 4px; }
.topnav a { color: #dfe6e7; text-decoration: none; padding: 8px 12px; border-radius: var(--r-sm); font-weight: 500; font-size: 15px; white-space: nowrap; }
.topnav a:hover { background: rgba(255,255,255,.1); color: #fff; }
.topnav a[aria-current="page"] { color: #fff; box-shadow: inset 0 -2px 0 #fff; border-radius: 0; }
.cart-btn { position: relative; display: inline-flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-weight: 600; padding: 8px 10px; border-radius: var(--r-sm); white-space: nowrap; }
.cart-btn:hover { background: rgba(255,255,255,.1); color: #fff; }
.cart-btn .badge { margin-left: 2px; }
@media (max-width: 639px) {
  .cart-label { display: none; }
  .cart-btn { padding: 10px; }
  .cart-btn .badge { position: absolute; top: 2px; right: -2px; margin: 0; }
}
@media (min-width: 640px) { .logo b { font-size: 21px; } }
@media (min-width: 1024px) {
  .burger { display: none; }
  .topnav { display: flex; margin-right: auto; }
  .logo { margin-right: 24px; }
  .topbar-in { min-height: 60px; }
}

/* ================= боковое меню (телефон и планшет) ================= */
.drawer-backdrop, .sheet-backdrop {
  position: fixed; inset: 0; background: rgba(28, 38, 41, .5); z-index: 40;
  opacity: 0; transition: opacity .2s;
}
body.drawer-open .drawer-backdrop { opacity: 1; }
.drawer {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 41; width: min(320px, 86vw);
  background: var(--surface); overflow-y: auto; transform: translateX(-100%); transition: transform .2s ease-out;
  padding-bottom: env(safe-area-inset-bottom);
}
body.drawer-open .drawer { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 8px 16px; background: var(--ink); color: #fff; }
.drawer-nav { display: flex; flex-direction: column; padding: 8px 0 24px; }
.drawer-nav > a:not(.btn) { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; color: var(--ink); text-decoration: none; font-weight: 500; }
.drawer-nav > a:not(.btn):hover { background: var(--teal-soft); }
.drawer-car { flex-direction: column; align-items: flex-start !important; gap: 2px !important; }
.drawer-car small { color: var(--muted); font-weight: 400; }
.drawer-label { margin: 16px 16px 4px; font-size: 13px; color: var(--muted); font-weight: 600; }
.drawer-tg { margin: 20px 16px 0; }

/* ================= общие блоки ================= */
.page { padding-bottom: 56px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 16px 0 8px; font-size: 14px; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-right: 4px; color: var(--line-strong); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--teal); }
.page-title { font: 600 clamp(22px, 3vw, 32px)/1.2 var(--display); letter-spacing: -.01em; margin: 8px 0 12px; }
.section { padding-top: 28px; padding-bottom: 8px; }
.section-title { font: 600 clamp(19px, 2.2vw, 24px)/1.25 var(--display); margin: 0 0 16px; letter-spacing: -.01em; }
.empty { padding: 40px 16px; text-align: center; color: var(--muted); background: var(--surface); border-radius: var(--r-md); border: 1px dashed var(--line-strong); }
.empty strong { display: block; color: var(--ink); font-size: 18px; margin-bottom: 6px; }
.empty p { margin: 0 auto 16px; max-width: 46ch; }
.price { font: 600 18px/1.15 var(--display); color: var(--cherry); white-space: nowrap; }
.price.big { font-size: clamp(26px, 3vw, 32px); margin: 4px 0 16px; }
.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: 16px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 40px 1fr; gap: 4px 14px; }
.steps li::before {
  content: counter(s); grid-row: span 2; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  border: 2px solid var(--teal); color: var(--teal); font: 600 16px/1 var(--display);
}
.steps strong { display: block; }
.steps span { color: var(--muted); }
@media (min-width: 1024px) { .how .steps { grid-template-columns: repeat(3, 1fr); gap: 24px; } }

/* ================= главная ================= */
.hero { background: var(--ink); color: #fff; padding: 28px 0 32px; }
.hero h1 { font: 700 clamp(26px, 5vw, 46px)/1.1 var(--display); letter-spacing: -.02em; margin: 0 0 12px; max-width: 18ch; }
.hero .lead { color: #c3cdcf; margin: 0 0 20px; max-width: 60ch; font-size: 17px; }
.hero-search { max-width: 640px; }
.hero-search input { min-height: 52px; border-color: transparent; }
.hero-search .btn { min-height: 52px; padding: 0 24px; }

.cars { display: grid; gap: 16px; }
@media (min-width: 900px) { .cars { grid-template-columns: 1fr 1fr; gap: 24px; } }
.car-card { background: var(--surface); border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.car-photo { position: relative; aspect-ratio: 16 / 9; background: #dfe4e3; display: grid; place-items: center; color: var(--muted); text-decoration: none; overflow: hidden; }
.car-photo img, .card-img img, .line-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.car-body { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.car-body h3 { margin: 0; font: 600 19px/1.25 var(--display); }
.car-body h3 a { color: var(--ink); text-decoration: none; }
.car-body h3 a:hover { color: var(--teal); }
.specs-inline { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0; font-size: 15px; }
.specs-inline > div { display: contents; }
.specs-inline dt { color: var(--muted); }
.specs-inline dd { margin: 0; }
.car-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: auto; }
.car-count { font-weight: 600; }

/* ================= слайдер фото ================= */
.slider { position: relative; overflow: hidden; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.slider > span { position: absolute; inset: 0; display: grid; place-items: center; }
.sl-link { position: absolute; inset: 0; display: block; }
.sl-link img { width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; }
.sl-btn {
  position: absolute; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border: 0; border-radius: 50%;
  background: rgba(255,255,255,.9); color: var(--ink); font-size: 22px; line-height: 1; cursor: pointer;
  display: grid; place-items: center; box-shadow: 0 1px 4px rgba(0,0,0,.25); opacity: 0; transition: opacity .15s;
}
.sl-btn.prev { left: 8px; }
.sl-btn.next { right: 8px; }
.slider:hover .sl-btn, .sl-btn:focus-visible { opacity: 1; }
.sl-dots { position: absolute; left: 0; right: 0; bottom: 8px; display: flex; justify-content: center; gap: 5px; pointer-events: none; }
.sl-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.6); box-shadow: 0 0 2px rgba(0,0,0,.4); }
.sl-dots i.on { background: #fff; width: 16px; border-radius: 3px; }
@media (hover: none) { .sl-btn { display: none; } }

/* ================= сетка запчастей ================= */
.grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; } }
.card { background: var(--surface); border-radius: var(--r-md); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.card-img { position: relative; overflow: hidden; aspect-ratio: 4 / 3; background: #dfe4e3; display: grid; place-items: center; color: var(--muted); font-size: 13px; text-decoration: none; }
.card-body { padding: 10px 12px 6px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-title { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-title:hover { color: var(--teal); text-decoration: underline; }
.card-from { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.35; }
.card-meta { margin: 2px 0 0; font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 10px; }
.cond { color: var(--ink); font-weight: 500; }
.card-foot { padding: 6px 12px 12px; }
@media (max-width: 639px) {
  .card-body { padding: 8px 10px 4px; }
  .card-foot { padding: 4px 10px 10px; }
  .card .price { font-size: 16px; }
  .card-title { font-size: 14px; }
  .card-foot .btn svg { display: none; }
}

.pager { display: flex; gap: 6px; justify-content: center; margin-top: 24px; flex-wrap: wrap; align-items: center; }
.pager button { min-width: 40px; }

/* ================= разбор машины ================= */
.car-head { display: grid; grid-template-columns: 1fr; gap: 12px 20px; align-items: start; background: var(--surface); border-radius: var(--r-md); padding: 14px; box-shadow: var(--shadow); margin-bottom: 16px; }
.car-head .page-title { margin-top: 0; }
.car-head-photo { aspect-ratio: 16 / 9; border-radius: var(--r-sm); background: #dfe4e3; color: var(--muted); font-size: 14px; }
.car-head-photo .sl-link { cursor: zoom-in; }
.car-switch { display: flex; flex-wrap: wrap; gap: 8px; }
.car-switch .btn { white-space: normal; text-align: left; }
@media (min-width: 640px) {
  .car-head { grid-template-columns: 220px 1fr; padding: 18px; }
  .car-head-photo { aspect-ratio: 4 / 3; }
  .car-switch { grid-column: 1 / -1; }
}
@media (min-width: 1024px) {
  .car-head { grid-template-columns: 260px 1fr auto; }
  .car-switch { grid-column: auto; }
}

.listing { display: grid; gap: 20px; }
@media (min-width: 1024px) { .listing { grid-template-columns: 260px minmax(0, 1fr); align-items: start; } }
.side { background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow); padding: 8px 0; }
.side-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 6px 16px; }
.side-head h2 { font: 600 15px/1.3 var(--display); margin: 0; }
.cat-list { list-style: none; margin: 0; padding: 0 0 8px; }
.cat-list a { display: flex; justify-content: space-between; gap: 8px; padding: 9px 16px; color: var(--ink); text-decoration: none; }
.cat-list a:hover { background: var(--teal-soft); }
.cat-list a[aria-current="true"] { background: var(--teal); color: #fff; font-weight: 600; }
.cat-list a[aria-current="true"] .n { color: #cfe0de; }
.cat-list .n { color: var(--muted); font-variant-numeric: tabular-nums; }
.side-close { display: none; }
.sheet-backdrop { display: none; }
.car-search { margin-bottom: 12px; }
.toolbar { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar p { margin: 0; margin-right: auto; }
.cats-btn { display: none; }

@media (min-width: 1024px) { .side { position: sticky; top: 76px; max-height: calc(100vh - 92px); overflow-y: auto; } }
/* телефон и планшет: категории — выезжающая снизу панель */
@media (max-width: 1023px) {
  .cats-btn { display: inline-flex; max-width: 60vw; overflow: hidden; text-overflow: ellipsis; }
  .side {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-height: 78vh; overflow-y: auto;
    border-radius: 16px 16px 0 0; transform: translateY(105%); transition: transform .22s ease-out;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
  }
  .side-close { display: inline-grid; }
  body.sheet-open .side { transform: none; }
  body.sheet-open .sheet-backdrop { display: block; opacity: 1; }
  .toolbar p { order: 3; width: 100%; }
}

.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-right: auto; }
.chip { padding: 7px 12px; border-radius: 18px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); text-decoration: none; font-size: 14px; white-space: nowrap; }
.chip:hover { background: var(--teal-soft); color: var(--ink); }
.chip.on { background: var(--teal); border-color: var(--teal); color: #fff; }
.page-search { max-width: 640px; margin-bottom: 14px; }

/* ================= карточка товара ================= */
.product { display: grid; gap: 20px; align-items: start; }
@media (min-width: 768px) { .product { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 28px; } }
@media (min-width: 1024px) { .product { gap: 40px; } }
.viewer { position: relative; background: var(--surface); border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow); }
.stage { aspect-ratio: 4 / 3; position: relative; overflow: hidden; background: #fff; display: grid; place-items: center; }
.stage img, .lb-stage img { width: 100%; height: 100%; object-fit: contain; transform-origin: 0 0; user-select: none; -webkit-user-drag: none; will-change: transform; }
.zoombox { cursor: zoom-in; }
.zoombox.is-zoomed { cursor: grab; }
.zoombox.is-zoomed:active { cursor: grabbing; }
.nophoto { color: var(--muted); }
.zoom-ctrl { position: absolute; right: 10px; bottom: 10px; display: flex; align-items: center; gap: 2px; background: rgba(28, 38, 41, .78); border-radius: 22px; padding: 3px; color: #fff; }
.zbtn { width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: #fff; font-size: 22px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.zbtn:hover:not(:disabled) { background: rgba(255,255,255,.16); }
.zbtn:disabled { opacity: .4; cursor: default; }
.zreset { width: auto; padding: 0 12px; border-radius: 20px; font-size: 14px; font-weight: 600; }
.zlevel { min-width: 48px; text-align: center; font-size: 13px; font-variant-numeric: tabular-nums; }
.zfull { position: absolute; top: 10px; right: 10px; background: rgba(28, 38, 41, .78); font-size: 20px; }
.gnav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 56px; border: 0; background: rgba(28, 38, 41, .55); color: #fff; font-size: 30px; cursor: pointer; }
.gnav.prev { left: 0; border-radius: 0 8px 8px 0; }
.gnav.next { right: 0; border-radius: 8px 0 0 8px; }
.gnav:hover { background: rgba(28, 38, 41, .8); }
.viewer:has(.is-zoomed) .gnav { display: none; }
.zoom-hint { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
@media (hover: none) { .zoom-hint { display: none; } }
.thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; }
.thumbs button { flex: none; padding: 0; border: 2px solid transparent; border-radius: var(--r-sm); overflow: hidden; width: 76px; aspect-ratio: 4/3; cursor: pointer; background: #dfe4e3; }
.thumbs button[aria-current="true"] { border-color: var(--teal); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }

.product-title { font: 600 clamp(21px, 2.6vw, 28px)/1.25 var(--display); letter-spacing: -.01em; margin: 0 0 6px; }
.from { margin: 0 0 4px; color: var(--muted); }
.props { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0 0 20px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.props dt { color: var(--muted); }
.props dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.code { font-variant-numeric: tabular-nums; letter-spacing: .03em; }
.info .actions { display: flex; flex-wrap: wrap; gap: 10px; }
.info .actions .btn { flex: 1 1 200px; }
.note { font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.desc { margin-top: 24px; }
.desc h2 { font: 600 16px/1.3 var(--display); margin: 0 0 8px; }
.desc p { margin: 0; white-space: pre-line; max-width: 65ch; }

/* телефон: закреплённая панель покупки внизу */
.buybar { display: none; }
@media (max-width: 639px) {
  .buybar {
    display: flex; align-items: center; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
    background: var(--surface); border-top: 1px solid var(--line); padding: 8px var(--gutter) calc(8px + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 16px rgba(28, 38, 41, .08);
  }
  .buybar .price { margin-right: auto; font-size: 19px; }
  .buybar .btn { min-height: 48px; }
  body:has(.buybar) .site-footer { padding-bottom: 88px; }
  .info .actions { display: none; }
  .stage { aspect-ratio: 1 / 1; }
  .gnav { display: none; }
}

/* ================= полноэкранный просмотр ================= */
body.lightbox-open { overflow: hidden; }
.lightbox { position: fixed; inset: 0; z-index: 60; background: #0d1416; color: #fff; display: grid; grid-template-rows: auto 1fr auto; }
.lb-top { display: flex; align-items: center; gap: 12px; padding: 8px 12px; }
.lb-top .zoom-ctrl { position: static; margin-left: auto; }
.lb-count { font-size: 14px; color: #c3cdcf; }
.lb-close { width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; font-size: 20px; cursor: pointer; }
.lb-close:hover { background: rgba(255,255,255,.22); }
.lb-stage { position: relative; overflow: hidden; display: grid; place-items: center; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 72px; border: 0; background: rgba(255,255,255,.1); color: #fff; font-size: 36px; cursor: pointer; }
.lb-nav.prev { left: 0; border-radius: 0 10px 10px 0; }
.lb-nav.next { right: 0; border-radius: 10px 0 0 10px; }
.lb-nav:hover { background: rgba(255,255,255,.22); }
.lightbox:has(.is-zoomed) .lb-nav { display: none; }
.lb-hint { text-align: center; font-size: 13px; color: #9fb0b3; margin: 0; padding: 8px 12px calc(10px + env(safe-area-inset-bottom)); }
@media (hover: none) { .lb-hint { display: none; } .lb-nav { display: none; } }

/* ================= наличие, самовывоз, характеристики ================= */
.ico { width: 20px; height: 20px; flex: none; stroke: var(--muted); }
.stock-line { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin: -6px 0 16px; }
.stock-line > span:first-of-type { margin-right: 2px; }
.cond-badge { font-size: 12px; font-weight: 700; letter-spacing: .02em; padding: 2px 8px; border-radius: 4px; background: #f6e7b4; color: #6b5200; }
.pickup { margin: 18px 0 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); display: grid; gap: 8px; }
.pickup h2 { font: 600 15px/1.3 var(--display); margin: 0 0 2px; }
.pickup p { display: flex; align-items: flex-start; gap: 10px; margin: 0; }
.pickup .ico { margin-top: 1px; }
.map-link { color: var(--muted); text-decoration: underline dashed; text-underline-offset: 4px; margin-left: 4px; white-space: nowrap; }
.map-link:hover { color: var(--teal); }
.phone { font-weight: 700; color: var(--ink); text-decoration: none; }
.phone:hover { color: var(--teal); text-decoration: underline; }
.prose .pickup { margin: 8px 0 12px; }
.pickup-tag { color: var(--teal); font-weight: 500; }
.specs-block { margin-top: 24px; }
.specs-block h2 { font: 600 16px/1.3 var(--display); margin: 0 0 8px; }
.specs-block .props { margin: 0; padding: 0; border: 0; gap: 0; }
.specs-block .props dt, .specs-block .props dd { padding: 9px 0; border-bottom: 1px solid var(--line); }
.specs-block .props dd { padding-left: 16px; }

/* ================= плашка «снята с автомобиля» ================= */
.donor {
  display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 4px 14px; align-items: center;
  background: var(--teal-soft); border-radius: var(--r-md); padding: 12px 14px; margin: 12px 0 0;
}
.donor-img { grid-row: span 2; width: 72px; aspect-ratio: 4 / 3; border-radius: var(--r-sm); overflow: hidden; background: #c9d8d5; }
.donor-img img { width: 100%; height: 100%; object-fit: cover; }
.donor-text { display: flex; flex-direction: column; min-width: 0; }
.donor-label { font-size: 13px; color: var(--muted); }
.donor-title { font-weight: 600; color: var(--ink); text-decoration: none; line-height: 1.3; }
.donor-title:hover { color: var(--teal); text-decoration: underline; }
.donor-specs { font-size: 13px; color: var(--muted); line-height: 1.35; }
.donor-btn { justify-self: start; }
@media (min-width: 480px) {
  .donor { grid-template-columns: 72px minmax(0, 1fr) auto; }
  .donor-img { grid-row: auto; }
}

/* ================= главная: о разборе ================= */
.about-box { display: grid; gap: 20px; background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow); padding: clamp(16px, 3vw, 28px); }
.about-text p { margin: 0 0 16px; max-width: 62ch; }
.about-text .section-title { margin-bottom: 10px; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; }
.facts > div { background: var(--paper); border-radius: var(--r-sm); padding: 12px 14px; }
.facts dt { font: 700 18px/1.2 var(--display); color: var(--teal); }
.facts dd { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
@media (min-width: 900px) { .about-box { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: center; gap: 32px; } }
.prose ul { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 6px; }

/* ================= модальное окно ================= */
body.modal-open { overflow: hidden; }
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(28, 38, 41, .55); opacity: 0; transition: opacity .25s ease; }
.modal-box {
  position: relative; width: min(640px, 100%); max-height: min(80vh, 720px); display: flex; flex-direction: column;
  background: var(--surface); border-radius: 14px; box-shadow: 0 24px 64px rgba(28, 38, 41, .35);
  opacity: 0; transform: translateY(24px) scale(.97);
  transition: opacity .25s ease, transform .3s cubic-bezier(.2, .8, .2, 1);
}
.modal.is-open .modal-backdrop { opacity: 1; }
.modal.is-open .modal-box { opacity: 1; transform: none; }
.modal-box:focus { outline: none; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 12px 10px 22px; border-bottom: 1px solid var(--line); }
.modal-head h2 { font: 600 18px/1.3 var(--display); margin: 0; }
.modal-head .icon-btn:hover { background: var(--paper); }
.modal-body { padding: 4px 22px 16px; overflow-y: auto; }
.modal-body h2 { font: 600 16px/1.3 var(--display); margin: 18px 0 6px; }
.modal-body p { margin: 0 0 10px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 22px 16px; border-top: 1px solid var(--line); }
/* телефон: окно выезжает снизу */
@media (max-width: 639px) {
  .modal { place-items: end stretch; padding: 0; }
  .modal-box { width: 100%; max-height: 88vh; border-radius: 16px 16px 0 0; transform: translateY(100%); padding-bottom: env(safe-area-inset-bottom); }
  .modal-foot .btn { flex: 1; }
}
.inline-link { border: 0; background: none; padding: 0; font: inherit; color: var(--teal); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.inline-link:hover { color: var(--teal-hover); }

/* ================= корзина ================= */
.cart-grid { display: grid; gap: 24px; align-items: start; }
@media (min-width: 1024px) { .cart-grid { grid-template-columns: minmax(0, 1.4fr) minmax(340px, 1fr); gap: 40px; } }
.cart-lines { list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow); }
.cart-line { display: grid; grid-template-columns: 88px minmax(0, 1fr) auto; gap: 14px; padding: 14px; border-bottom: 1px solid var(--line); align-items: center; }
.cart-line:last-child { border-bottom: 0; }
.line-img { position: relative; width: 88px; aspect-ratio: 4/3; border-radius: var(--r-sm); overflow: hidden; background: #dfe4e3; display: grid; place-items: center; font-size: 12px; color: var(--muted); text-decoration: none; }
.line-side { display: grid; justify-items: end; gap: 8px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: #fff; }
.qty button { width: 36px; height: 36px; border: 0; background: none; cursor: pointer; font-size: 18px; }
.qty button:disabled { opacity: .35; cursor: default; }
.qty output { min-width: 28px; text-align: center; font-variant-numeric: tabular-nums; }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 4px; font-weight: 600; }
.cart-total .price { font-size: 24px; }
.checkout { background: var(--surface); padding: clamp(16px, 3vw, 28px); border-radius: var(--r-md); box-shadow: var(--shadow); }
@media (min-width: 1024px) { .checkout { position: sticky; top: 76px; } }
.checkout h2 { font: 600 18px/1.3 var(--display); margin: 0 0 6px; }
.checkout > p { margin: 0 0 18px; color: var(--muted); font-size: 15px; }
@media (max-width: 639px) {
  .cart-line { grid-template-columns: 64px minmax(0, 1fr); }
  .line-img { width: 64px; }
  .line-side { grid-column: 1 / -1; grid-template-columns: auto 1fr auto; align-items: center; justify-items: start; }
  .line-side .price { justify-self: end; }
}

/* ================= оформлено, тексты ================= */
.done { max-width: 680px; padding-top: 24px; }
.done .lead { font-size: 18px; color: var(--muted); margin: 0 0 24px; }
.done .steps { margin: 32px 0; }
.prose { max-width: 720px; background: var(--surface); border-radius: var(--r-md); padding: clamp(16px, 3vw, 32px); box-shadow: var(--shadow); }
.prose h2 { font: 600 17px/1.3 var(--display); margin: 24px 0 8px; }
.prose p { margin: 0 0 12px; }

/* ================= подвал ================= */
.site-footer { background: var(--ink); color: #c3cdcf; padding: 28px 0 32px; font-size: 14px; }
.footer-in { display: grid; gap: 20px; }
.site-footer .logo { color: #fff; }
.site-footer p { margin: 8px 0 0; max-width: 46ch; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; align-content: start; }
.site-footer nav a { color: #dfe6e7; text-decoration: none; }
.site-footer nav a:hover { color: #fff; text-decoration: underline; }
@media (min-width: 1024px) { .footer-in { grid-template-columns: 1fr 1fr; } }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 70;
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: var(--r-md);
  box-shadow: 0 8px 24px rgba(28, 38, 41, .25); max-width: calc(100vw - 32px);
}
@media (max-width: 639px) { body:has(.buybar) .toast { bottom: 92px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
