:root {
  --bg: #0b0d10;
  --bg2: #12151a;
  --card: #171b21;
  --line: #262c35;
  --text: #eef1f5;
  --muted: #9aa3ae;
  --blue: #2f7df6;
  --blue-d: #1c4f9c;
  --red: #e2333b;
  --sky: #59b4ef;
  --wa: #25d366;
  --wa-d: #1aa851;
  --ok: #3ccf7a;
  --radius: 14px;
  --head: 'Unbounded', system-ui, sans-serif;
  --body: 'Manrope', system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--body); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: var(--sky); }
h1, h2, h3 { font-family: var(--head); line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.01em; }
h2 { font-size: clamp(24px, 3.4vw, 36px); }
h3 { font-size: 17px; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 12px; border: 0; font: 700 15px/1 var(--body); text-decoration: none; cursor: pointer; transition: transform .12s, background .15s; color: #fff; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--blue); }
.btn-primary:hover { background: #4a8ff8; }
.btn-wa { background: var(--wa); color: #06260f; }
.btn-wa:hover { background: #3ae07a; }
.btn-ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--muted); }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 14px; }
.btn-block { width: 100%; }

/* header */
.top { position: sticky; top: 0; z-index: 20; background: rgba(11,13,16,.86); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 24px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.logo-mark { display: flex; gap: 3px; transform: skewX(-18deg); }
.logo-mark i { width: 5px; height: 22px; border-radius: 1px; }
.logo-mark i:nth-child(1) { background: var(--sky); }
.logo-mark i:nth-child(2) { background: var(--blue-d); }
.logo-mark i:nth-child(3) { background: var(--red); }
.logo-text { font: 800 17px/1 var(--head); letter-spacing: -.02em; }
.logo-text b { font-weight: 500; color: var(--muted); margin-left: 6px; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15px; }
.nav a:hover { color: var(--text); }

/* hero */
.hero { position: relative; overflow: hidden; min-height: min(86vh, 760px); display: flex; align-items: flex-end; }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center 60%; }
.hero-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,13,16,.35) 0%, rgba(11,13,16,.55) 45%, var(--bg) 100%), linear-gradient(90deg, rgba(11,13,16,.85) 0%, rgba(11,13,16,0) 70%); }
.hero-in { position: relative; padding: 120px 0 56px; }
.eyebrow { display: inline-block; margin: 0 0 18px; padding: 6px 12px; border-radius: 99px; background: rgba(255,255,255,.08); font-weight: 700; font-size: 13px; letter-spacing: .02em; }
.hero h1 { font-size: clamp(34px, 6.4vw, 72px); font-weight: 800; max-width: 14ch; }
.lead { font-size: clamp(16px, 1.8vw, 19px); max-width: 600px; color: #d6dbe2; margin: 0 0 28px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.trust { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border-radius: var(--radius); overflow: hidden; max-width: 860px; }
.trust li { background: rgba(18,21,26,.92); padding: 16px 18px; }
.trust b { display: block; font: 800 24px/1.1 var(--head); }
.trust span { color: var(--muted); font-size: 13px; font-weight: 600; }
.trust .star { color: #ffc531; }

/* ask */
.ask { padding: 64px 0; }
.ask-in { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; background: linear-gradient(135deg, #14233d 0%, var(--bg2) 60%); border: 1px solid var(--line); border-radius: 22px; padding: 40px; }
.ask-text p { color: #c8cfd8; }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.steps li { counter-increment: s; display: flex; gap: 14px; align-items: center; color: var(--muted); }
.steps li::before { content: counter(s); flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--blue); color: #fff; font: 700 14px/32px var(--head); text-align: center; }
.steps b { color: var(--text); }
.ask-form { display: grid; gap: 14px; }
.ask-form label { display: grid; gap: 6px; font-weight: 700; font-size: 14px; }
.opt { color: var(--muted); font-weight: 500; margin-left: 6px; }
.lbl { display: block; }
input, select, textarea { width: 100%; font: 500 16px/1.4 var(--body); color: var(--text); background: var(--bg); border: 1.5px solid var(--line); border-radius: 10px; padding: 12px 14px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); }
textarea { resize: vertical; }

/* sections */
.sec { padding: 72px 0; }
.sec-alt { background: var(--bg2); }
.sec-head { max-width: 720px; margin-bottom: 28px; }
.sec-head p { color: var(--muted); margin: 0; }

/* donors */
.donors { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.donor { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.donor-img { aspect-ratio: 4/3; background: #000 center/cover; position: relative; }
.donor-img .tag { position: absolute; left: 12px; top: 12px; background: var(--red); color: #fff; font: 700 12px/1 var(--body); padding: 6px 10px; border-radius: 6px; }
.donor-b { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.donor-b .meta { color: var(--sky); font-weight: 700; font-size: 13px; }
.donor-b p { margin: 0; color: var(--muted); font-size: 14px; flex: 1; }
.donor-b .btn { margin-top: 10px; }

/* models */
.models { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.model-group h3 { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; font-family: var(--body); font-weight: 800; }
.model-group div { display: flex; flex-wrap: wrap; gap: 8px; }
.model-chip { background: var(--card); border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 10px 14px; font: 700 14px/1 var(--body); cursor: pointer; }
.model-chip:hover { border-color: var(--blue); }
.model-chip small { color: var(--muted); font-weight: 600; margin-left: 6px; }

/* filters */
.filters { display: grid; gap: 12px; margin-bottom: 22px; }
.filters input[type=search] { max-width: 460px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: transparent; color: var(--muted); border-radius: 99px; padding: 8px 14px; font: 700 14px/1 var(--body); cursor: pointer; }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.chips-small .chip { padding: 6px 12px; font-size: 13px; }
.toggle { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 600; cursor: pointer; width: fit-content; }
.toggle input { width: 18px; height: 18px; accent-color: var(--blue); }

/* grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; cursor: pointer; display: flex; flex-direction: column; text-align: left; color: inherit; padding: 0; font: inherit; transition: border-color .15s, transform .15s; }
.card:hover { border-color: #3a4350; transform: translateY(-2px); }
.card-img { aspect-ratio: 1; background: #000 center/cover; position: relative; }
.badge { position: absolute; left: 10px; top: 10px; font: 800 11px/1 var(--body); text-transform: uppercase; letter-spacing: .04em; padding: 6px 8px; border-radius: 6px; }
.badge.ok { background: var(--ok); color: #05210f; }
.badge.sold { background: rgba(0,0,0,.72); color: #fff; }
.card-b { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-b h3 { font: 700 15px/1.3 var(--body); margin: 0; }
.card-b .bodies { color: var(--muted); font-size: 13px; font-weight: 600; }
.price { font: 800 19px/1.1 var(--head); margin-top: auto; padding-top: 8px; }
.card .price { font-size: 18px; }
.card.is-sold .price { font: 700 15px/1.2 var(--body); }
.price small { font: 600 12px var(--body); color: var(--muted); margin-left: 4px; }
.card.is-sold .card-img { filter: grayscale(.5) brightness(.75); }
.card.is-sold .price { color: var(--muted); }
.empty { color: var(--muted); padding: 32px 0; }

/* info cards */
.cards4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.info { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.info p { color: var(--muted); margin: 0; font-size: 15px; }

/* contacts */
.contacts { display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap; }
.rating-big { color: #ffc531; font-size: 20px; margin: 18px 0 0; }
.rating-big span { font: 800 40px/1 var(--head); color: var(--text); margin-right: 8px; }
.rating-big a { font-size: 15px; font-weight: 700; }
.contact-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.foot { padding: 28px 0 100px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); }

/* mobile bar */
.bar-mobile.no-call { grid-template-columns: 1fr !important; }
.bar-mobile { display: none; }

/* modal */
.modal { width: min(980px, 100% - 24px); max-height: calc(100vh - 24px); padding: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--bg2); color: var(--text); }
.modal::backdrop { background: rgba(0,0,0,.75); backdrop-filter: blur(4px); }
.modal-x { position: absolute; right: 12px; top: 12px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 24px; cursor: pointer; }
.modal-body { display: grid; grid-template-columns: 1.15fr 1fr; }
.modal-body > * { min-width: 0; }
.gal-main { aspect-ratio: 1; background: #000; display: flex; align-items: center; justify-content: center; }
.gal-main img { max-height: 100%; width: 100%; height: 100%; object-fit: contain; }
.gal-thumbs { display: flex; gap: 6px; padding: 8px; overflow-x: auto; background: #000; }
.gal-thumbs button { flex: none; width: 64px; height: 64px; padding: 0; border: 2px solid transparent; border-radius: 8px; background: #000 center/cover; cursor: pointer; }
.gal-thumbs button.on { border-color: var(--blue); }
.m-info { padding: 28px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; max-height: calc(100vh - 24px); }
.m-info h2 { font-size: 22px; margin: 0; padding-right: 40px; }
.m-info .price { font-size: 26px; padding: 0; }
.m-info .desc { white-space: pre-line; color: #c8cfd8; font-size: 15px; }
.m-info .params { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; font-size: 14px; color: var(--muted); }
.m-info .status { font-weight: 700; }
.m-info .status.ok { color: var(--ok); }
.m-info .status.sold { color: var(--muted); }
.m-info .src { font-size: 13px; color: var(--muted); }

@media (max-width: 900px) {
  .nav { display: none; }
  .top .btn-sm { margin-left: auto; }
  .trust { grid-template-columns: repeat(2, 1fr); }
  .ask-in { grid-template-columns: 1fr; padding: 24px 20px; gap: 28px; }
  .models { grid-template-columns: 1fr; }
  .cards4 { grid-template-columns: 1fr 1fr; }
  .modal-body { grid-template-columns: 1fr; }
  .m-info { max-height: none; padding: 20px; }
  .modal { overflow-y: auto; overflow-x: hidden; }
  .gal-main { aspect-ratio: 4/3; }
  .bar-mobile { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(11,13,16,.94); backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .hero-in { padding: 96px 0 36px; }
  .hero-cta .btn { flex: 1 1 100%; }
  .cards4 { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .card-b { padding: 10px 12px 12px; }
  .card-b h3 { font-size: 14px; }
  .price { font-size: 16px; }
  .sec { padding: 52px 0; }
  .ask { padding: 40px 0; }
}

/* v2 */
.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.filter-row select { width: auto; min-width: 220px; }
.count { color: var(--muted); font-size: 14px; font-weight: 600; margin-left: auto; }
.more-wrap { display: flex; justify-content: center; margin-top: 28px; }
.card-img { overflow: hidden; }
.card-img img, .donor-img img { width: 100%; height: 100%; object-fit: cover; }
.card-img .noimg { width: 100%; height: 100%; display: grid; place-items: center; color: var(--muted); font-size: 13px; }
.badge.stock { background: #2f7df6; color: #fff; }
.m-info .status.stock { color: var(--sky); }
.price.ask { font: 700 15px/1.2 var(--body); color: var(--sky); }
.donor-img { cursor: pointer; overflow: hidden; }
.donor-img .tag.stock { background: var(--blue); }
.donors { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
@media (max-width: 560px) { .filter-row select { flex: 1 1 100%; } .count { margin-left: 0; } }

/* ===================== v3: подбор, запрос, галерея, анимации (mobile-first) ===================== */
:root { --ease: cubic-bezier(.2,.8,.2,1); --fab-bottom: 20px; }
html { -webkit-tap-highlight-color: transparent; }
button { -webkit-tap-highlight-color: transparent; }

/* появление */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* фото: плавное проявление на цветной заглушке */
img.fade { opacity: 0; transition: opacity .45s ease; }
img.fade.ok { opacity: 1; }
.card-img img, .donor-img img, .pbody-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* логотип: полосы въезжают */
.logo-mark i { animation: stripeIn .7s var(--ease) both; }
.logo-mark i:nth-child(2) { animation-delay: .08s; }
.logo-mark i:nth-child(3) { animation-delay: .16s; }
@keyframes stripeIn { from { transform: translateY(-120%); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .logo-mark i { animation: none; } }

/* первый экран: смена кадров с медленным наездом */
.hero-bg.kb { opacity: 0; transition: opacity 1.4s ease; will-change: opacity, transform; }
.hero-bg.kb.on { opacity: 1; }
.hero-bg.kb-run { animation: kenburns 7.5s linear both; }
@keyframes kenburns { from { transform: scale(1.02); } to { transform: scale(1.1); } }
.hero-bg.kb::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,13,16,.35) 0%, rgba(11,13,16,.55) 45%, var(--bg) 100%), linear-gradient(90deg, rgba(11,13,16,.85) 0%, rgba(11,13,16,0) 70%); }
.live-chip { display: inline-flex; align-items: center; gap: 10px; margin-top: 18px; padding: 9px 14px; border-radius: 99px; background: rgba(226,51,59,.14); border: 1px solid rgba(226,51,59,.4); color: #ffd9db; font-weight: 700; font-size: 14px; text-decoration: none; max-width: 100%; }
.live-chip .dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 rgba(226,51,59,.7); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(226,51,59,0); } 100% { box-shadow: 0 0 0 0 rgba(226,51,59,0); } }
.trust b .num { font: inherit; color: inherit; font-variant-numeric: tabular-nums; }
.trust b small { font: 700 .62em/1 var(--head); letter-spacing: 0; }

/* ---------- подбор в два касания ---------- */
.pick { padding-bottom: 24px; }
.pick-tabs { display: flex; gap: 8px; margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.pick-tabs::-webkit-scrollbar { display: none; }
.pick-tab { flex: none; border: 1px solid var(--line); background: transparent; color: var(--muted); border-radius: 99px; padding: 10px 16px; font: 700 14px/1 var(--body); cursor: pointer; }
.pick-tab.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.pick-bodies { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.pbody { position: relative; display: block; aspect-ratio: 4/3; border: 0; padding: 0; border-radius: 14px; overflow: hidden; background: var(--card); cursor: pointer; text-align: left; color: #fff; isolation: isolate; }
.pbody-img { position: absolute; inset: 0; z-index: -1; }
.pbody-img img { transition: transform .5s var(--ease), opacity .45s ease; }
.pbody::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,.85) 100%); }
.pbody:hover .pbody-img img { transform: scale(1.06); }
.pbody:active { transform: scale(.98); }
.pbody-t { position: absolute; left: 12px; right: 12px; bottom: 10px; display: grid; gap: 2px; }
.pbody-t b { font: 800 16px/1.15 var(--head); }
.pbody-t small { font-weight: 700; font-size: 12px; color: #c9d4e2; }
.pick-sel { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 16px; }
.pick-sel b { font: 800 20px/1.2 var(--head); }
.pick-sel span { color: var(--muted); font-weight: 600; }
.pick-back { border: 1px solid var(--line); background: transparent; color: var(--text); border-radius: 99px; padding: 9px 14px; font: 700 14px/1 var(--body); cursor: pointer; }
.pcats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.pcat { display: grid; grid-template-columns: 40px 1fr; grid-template-rows: auto auto; align-items: center; column-gap: 12px; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; color: var(--text); cursor: pointer; animation: popIn .45s var(--ease) both; }
.pcat svg { grid-row: 1 / 3; width: 40px; height: 40px; padding: 8px; border-radius: 10px; background: rgba(47,125,246,.14); color: var(--sky); }
.pcat b { font: 700 15px/1.2 var(--body); }
.pcat small { color: var(--muted); font-weight: 700; font-size: 13px; }
.pcat:hover { border-color: var(--blue); }
.pcat:active { transform: scale(.98); }
.pcat-ask svg { background: rgba(37,211,102,.14); color: var(--wa); }
@keyframes popIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---------- машины в разборе: лента ---------- */
.sec-head.with-nav { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; max-width: none; }
.sec-head.with-nav > :not(.rail-nav) { max-width: 720px; }
.rail-nav { display: flex; gap: 8px; flex: none; }
.rail-nav button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--text); font-size: 24px; line-height: 1; cursor: pointer; }
.rail-nav button:hover { border-color: var(--muted); }
.donors.rail { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 16px; padding-bottom: 8px; scrollbar-width: none; }
.donors.rail::-webkit-scrollbar { display: none; }
.donors.rail .donor { flex: 0 0 min(300px, 78vw); scroll-snap-align: start; }
.donor-img { position: relative; aspect-ratio: 4/3; }
.pc { position: absolute; right: 10px; bottom: 10px; background: rgba(0,0,0,.65); color: #fff; font: 700 11px/1 var(--body); padding: 5px 7px; border-radius: 6px; }

/* ---------- каталог ---------- */
.filters.sticky { position: sticky; top: 64px; z-index: 15; background: rgba(11,13,16,.94); backdrop-filter: blur(10px); margin: 0 -16px 22px; padding: 12px 16px; border-bottom: 1px solid transparent; }
.card { position: relative; user-select: none; }
.card:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.add { position: absolute; right: 8px; top: 8px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(11,13,16,.75); backdrop-filter: blur(6px); cursor: pointer; display: grid; place-items: center; transition: background .2s, transform .15s; }
.add svg { position: absolute; width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--ease), opacity .2s; }
.add .i-check { opacity: 0; transform: scale(.4) rotate(-20deg); stroke: #06260f; }
.add:active { transform: scale(.9); }
.add.on { background: var(--wa); }
.add.on .i-plus { opacity: 0; transform: rotate(90deg) scale(.4); }
.add.on .i-check { opacity: 1; transform: none; }
.card .pc { right: 8px; bottom: 8px; left: auto; }

/* ---------- запрос ---------- */
.req-fab { position: fixed; right: 16px; bottom: var(--fab-bottom); z-index: 40; display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 18px 0 14px; border-radius: 99px; border: 0; background: var(--text); color: var(--bg); font: 800 15px/1 var(--body); box-shadow: 0 10px 30px rgba(0,0,0,.45); cursor: pointer; }
.req-fab svg { width: 22px; height: 22px; }
.req-fab b { min-width: 24px; height: 24px; border-radius: 12px; background: var(--red); color: #fff; display: grid; place-items: center; font-size: 13px; padding: 0 6px; }
.req-fab.bump { animation: bump .45s var(--ease); }
@keyframes bump { 30% { transform: scale(1.12); } }
.fly { position: fixed; z-index: 60; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: var(--wa); pointer-events: none; transition: transform .6s cubic-bezier(.5,-.3,.6,1), opacity .6s ease; }
.toast { position: fixed; left: 50%; top: 78px; z-index: 70; transform: translate(-50%, -20px); opacity: 0; pointer-events: none; background: var(--text); color: var(--bg); font-weight: 800; font-size: 14px; padding: 10px 16px; border-radius: 99px; transition: .3s var(--ease); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.drawer { width: min(520px, 100%); max-height: min(86vh, 860px); margin: auto 0 auto auto; height: 100%; max-height: 100vh; padding: 0; border: 0; border-left: 1px solid var(--line); background: var(--bg2); color: var(--text); overflow-y: auto; }
.drawer[open] { animation: slideL .35s var(--ease); }
@keyframes slideL { from { transform: translateX(40px); opacity: 0; } }
.drawer::backdrop { background: rgba(0,0,0,.6); backdrop-filter: blur(3px); }
.drawer-h { display: flex; align-items: center; justify-content: space-between; padding: 20px 20px 8px; position: sticky; top: 0; background: var(--bg2); z-index: 2; }
.drawer-h h2 { margin: 0; font-size: 22px; }
.drawer-h .modal-x { position: static; }
.drawer > p, .req-list, .req-sum, .req-list { list-style: none; padding: 0; margin-top: 8px; display: grid; gap: 10px; }
.req-list li { display: grid; grid-template-columns: 64px 1fr 40px; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
.req-img { width: 64px; height: 64px; border-radius: 8px; overflow: hidden; display: block; }
.req-img img { width: 100%; height: 100%; object-fit: cover; }
.req-t { display: grid; gap: 4px; min-width: 0; }
.req-t b { font-size: 14px; line-height: 1.25; }
.req-t small { color: var(--muted); font-weight: 600; }
.req-x { width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); font-size: 24px; cursor: pointer; }
.req-sum { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 16px; color: var(--muted); font-weight: 600; }
.req-sum b { font: 800 22px/1 var(--head); color: var(--text); }
.req-form { display: grid; gap: 10px; margin-top: 16px; margin-bottom: 24px; }

/* ---------- карточка детали ---------- */
.gal { position: relative; background: #000; }
.gal-strip { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; aspect-ratio: 1; }
.gal-strip::-webkit-scrollbar { display: none; }
.gal-strip figure { flex: 0 0 100%; margin: 0; scroll-snap-align: center; display: grid; place-items: center; cursor: zoom-in; }
.gal-strip img { width: 100%; height: 100%; object-fit: contain; }
.gal-empty { aspect-ratio: 4/3; display: grid; place-items: center; }
.gal-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; z-index: 2; }
.gal-arrow.l { left: 10px; } .gal-arrow.r { right: 10px; }
.gal > .gal-arrow { top: calc(50% - 40px); }
.gal-count, .lb-count { position: absolute; left: 12px; top: 12px; background: rgba(0,0,0,.6); color: #fff; font: 700 12px/1 var(--body); padding: 6px 9px; border-radius: 99px; z-index: 2; }
.fits { display: flex; flex-wrap: wrap; gap: 6px; }
.fits span { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 5px 9px; font-size: 13px; font-weight: 700; color: var(--sky); }
.m-actions { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.m-add.on { box-shadow: inset 0 0 0 1.5px var(--wa); color: var(--wa); }
.avito-link { font-weight: 700; font-size: 14px; }
.m-info .desc { margin-top: 4px; }

/* полноэкранный просмотр */
.lb { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #000; color: #fff; }
.lb::backdrop { background: #000; }
.lb-strip { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.lb-strip::-webkit-scrollbar { display: none; }
.lb-strip figure { flex: 0 0 100%; margin: 0; scroll-snap-align: center; display: grid; place-items: center; }
.lb-strip img { max-width: 100%; max-height: 100%; object-fit: contain; touch-action: pan-x pinch-zoom; }
.lb-x { position: absolute; right: 14px; top: 14px; z-index: 3; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 28px; cursor: pointer; }
.lb .gal-arrow { top: 50%; }

/* ---------- десктоп: модалка и запрос ---------- */
@media (min-width: 901px) {
  .modal-body { grid-template-columns: 1.15fr 1fr; }
  .modal .gal { max-height: calc(100vh - 24px); }
  .modal .gal-thumbs { background: #000; }
}

/* ---------- телефон ---------- */
@media (max-width: 900px) {
  :root { --fab-bottom: calc(84px + env(safe-area-inset-bottom)); }
  .rail-nav { display: none; }
  .gal-arrow { display: none; }
  .modal { width: 100%; max-width: 100%; height: 100%; max-height: 100%; margin: 0; border-radius: 0; border: 0; }
  .modal[open] { animation: slideUp .35s var(--ease); }
  .modal .gal-thumbs { display: none; }
  .modal-x { position: fixed; top: calc(10px + env(safe-area-inset-top)); right: 10px; width: 44px; height: 44px; z-index: 5; }
  .m-info { padding: 18px 16px calc(24px + env(safe-area-inset-bottom)); }
  .m-info .price { font-size: 26px; }
  .m-actions { position: sticky; bottom: 0; z-index: 3; background: var(--bg2); padding: 10px 0; margin: 0 0 -10px; grid-template-columns: 1fr auto; }
  .drawer { margin: auto 0 0; width: 100%; max-width: 100%; height: auto; max-height: 88vh; border-left: 0; border-top: 1px solid var(--line); border-radius: 20px 20px 0 0; }
  .drawer[open] { animation: slideUp .35s var(--ease); }
  .drawer-h::before { content: ''; position: absolute; left: 50%; top: 8px; width: 40px; height: 4px; border-radius: 2px; background: var(--line); transform: translateX(-50%); }
  .req-form { margin-bottom: calc(24px + env(safe-area-inset-bottom)); }
  .filters.sticky { top: 64px; padding: 10px 16px; gap: 10px; }
  .filters.sticky .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
  .filters.sticky .chips::-webkit-scrollbar { display: none; }
  .filters.sticky .chip { flex: none; }
  .filters.sticky input[type=search] { max-width: none; }
  .toast { top: 72px; }
}
@keyframes slideUp { from { transform: translateY(40px); opacity: 0; } }
@media (max-width: 560px) {
  .pick-bodies { grid-template-columns: 1fr 1fr; gap: 10px; }
  .pbody-t b { font-size: 14px; }
  .pcats { grid-template-columns: 1fr 1fr; }
  .pcat { grid-template-columns: 1fr; grid-template-rows: auto auto auto; row-gap: 8px; padding: 12px; }
  .pcat svg { grid-row: auto; }
  .add { width: 36px; height: 36px; right: 6px; top: 6px; }
  .card .badge { font-size: 10px; padding: 5px 6px; }
  .live-chip { font-size: 13px; }
  .req-fab { height: 48px; padding: 0 14px 0 12px; right: 12px; }
}

/* v3.1: без перегруза на телефоне */
@media (max-width: 900px) {
  .top .btn-wa { display: none; }
  .hero-cta .btn-wa { display: none; }
  .filters.sticky { position: static; background: none; backdrop-filter: none; margin: 0 0 18px; padding: 0; }
  .sec-head.with-nav { display: block; }
}
