/* ---------- основа ---------- */
:root {
  --ink: #0f1b2d;
  --ink-2: #3b4658;
  --muted: #6b7486;
  --line: #e3e6ec;
  --bg: #f5f6f8;
  --card: #ffffff;
  --navy: #13233f;
  --accent: #e8541c;
  --accent-dark: #c9440f;
  --good: #15803d;
  --good-bg: #e8f6ed;
  --warn: #a15c07;
  --warn-bg: #fdf3e2;
  --bad: #b91c1c;
  --bad-bg: #fdecec;
  --wa: #1fa855;
  --tg: #2a9ed8;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 27, 45, .06), 0 4px 16px rgba(15, 27, 45, .06);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(28px, 4.5vw, 44px); font-weight: 800; }
h2 { font-size: clamp(22px, 3vw, 30px); font-weight: 800; }
h3 { font-size: 18px; font-weight: 700; }
p { margin: 0 0 1em; }
small { font-size: 13px; }
.muted { color: var(--muted); font-weight: 500; }
.mono { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 14px; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 10px; border: 1.5px solid transparent;
  font: inherit; font-weight: 700; font-size: 15px; text-decoration: none;
  cursor: pointer; transition: background .15s, border-color .15s, transform .05s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-dark); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink-2); }
.btn--wa { background: var(--wa); color: #fff; }
.btn--tg { background: var(--tg); color: #fff; }
.btn--sm { padding: 8px 14px; font-size: 14px; }
.btn--lg { padding: 15px 24px; font-size: 16px; }
.btn--block { display: flex; width: 100%; }

.icon-btn {
  width: 38px; height: 38px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; color: #fff;
}
.icon-btn--tg { background: var(--tg); }
.icon-btn--wa { background: var(--wa); }

/* ---------- шапка ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .94); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header__inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; text-decoration: none; }
.logo__mark {
  width: 32px; height: 32px; border-radius: 9px; background: var(--navy); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 17px;
}
.logo--light { color: #fff; }
.logo--light .logo__mark { background: var(--accent); }
.nav { display: flex; gap: 4px; }
.nav__link { padding: 8px 12px; border-radius: 8px; text-decoration: none; font-weight: 600; color: var(--ink-2); }
.nav__link:hover { background: var(--bg); color: var(--ink); }
.nav__link--hot { color: var(--accent); font-weight: 700; }
.header__contacts { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* ---------- первый экран ---------- */
.hero { background: linear-gradient(160deg, #13233f 0%, #1c3561 100%); color: #fff; padding: 56px 0 64px; }
.hero__inner { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: center; }
.hero h1 { color: #fff; }
.eyebrow { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin-bottom: 12px; }
.hero__lead { font-size: 18px; color: #c9d3e6; max-width: 560px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0; }
.hero .btn--ghost { color: #fff; border-color: rgba(255, 255, 255, .3); }
.hero .btn--ghost:hover { border-color: #fff; }
.hero__facts { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; color: #c9d3e6; font-size: 15px; }
.hero__facts b { color: #fff; }
.hero__card { background: #fff; color: var(--ink); border-radius: var(--radius); padding: 24px; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.hero__card-title { font-weight: 800; font-size: 18px; margin-bottom: 12px; }
.hero__card-note { font-size: 14px; color: var(--muted); margin-top: 12px; }
.price-steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.price-steps li {
  counter-increment: s; display: flex; justify-content: space-between; gap: 12px;
  padding: 11px 0; border-bottom: 1px dashed var(--line); font-weight: 600;
}
.price-steps li::before { content: counter(s); width: 22px; height: 22px; border-radius: 50%; background: var(--bg); font-size: 12px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.price-steps li span:first-of-type { flex: 1; }
.price-steps li span:last-child { color: var(--muted); font-weight: 500; font-size: 14px; }

/* ---------- секции ---------- */
.section { padding: 56px 0; }
.section--accent { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section--muted { background: #eceff4; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.link-more { color: var(--accent); font-weight: 700; text-decoration: none; }
.link-more:hover { text-decoration: underline; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split--top { align-items: start; padding-bottom: 56px; }
.split--center { align-items: center; }
.empty { background: #fff; border: 1px dashed var(--line); border-radius: var(--radius); padding: 40px; text-align: center; color: var(--ink-2); }

.page-head { padding: 28px 0 20px; }
.page-head--tight { padding: 16px 0 8px; }
.page-head__lead { font-size: 18px; color: var(--ink-2); max-width: 720px; }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }

/* ---------- карточки машин ---------- */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--card); border-radius: var(--radius); overflow: hidden; text-decoration: none;
  box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(15, 27, 45, .12); }
.card__photo { position: relative; aspect-ratio: 4 / 3; background: #dde2ea; }
.card__photo img { width: 100%; height: 100%; object-fit: cover; }
.card__nophoto { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--muted); }
.card__badge { position: absolute; top: 10px; left: 10px; }
.card__count { position: absolute; bottom: 10px; right: 10px; background: rgba(15, 27, 45, .7); color: #fff; font-size: 12px; padding: 3px 8px; border-radius: 6px; }
.card__body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card__title { font-weight: 800; font-size: 17px; }
.card__sub { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 1.4em; }
.card__specs { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 14px; color: var(--ink-2); }
.card__accident { font-size: 13px; font-weight: 600; }
.card__prices { display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }
.card__label { font-size: 12px; color: var(--muted); }
.card__price { font-size: 20px; font-weight: 800; }
.card__bishkek { text-align: right; font-weight: 700; color: var(--ink-2); font-size: 14px; }

.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 6px; }
.badge--green { background: var(--good); color: #fff; }

/* ---------- сравнение утильсбора ---------- */
.compare { background: var(--bg); border-radius: var(--radius); padding: 8px 20px; }
.compare__row { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.compare__row b { display: block; }
.compare__row span { font-size: 14px; color: var(--muted); }
.compare__sum { font-weight: 800; font-size: 20px; color: var(--bad); }
.compare__row--good .compare__sum { color: var(--good); }
.compare__note { font-size: 13px; color: var(--muted); padding: 12px 0 8px; }

/* ---------- шаги ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 24px; }
.step { background: #fff; border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.step__num { width: 36px; height: 36px; border-radius: 10px; background: var(--navy); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.step p { color: var(--ink-2); margin: 0; font-size: 15px; }

.directions { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.direction { background: #fff; border-radius: var(--radius); padding: 28px; text-decoration: none; box-shadow: var(--shadow); border: 2px solid transparent; transition: border-color .15s; }
.direction:hover { border-color: var(--accent); }
.direction__flag {
  width: 52px; height: 52px; border-radius: 12px; margin-bottom: 14px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 17px; color: #fff; background: var(--navy);
}
.direction--china .direction__flag { background: var(--accent); }
.direction p { color: var(--ink-2); }

/* ---------- форма заявки ---------- */
.leadform { background: #fff; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 14px; }
.leadform__title { font-size: 20px; font-weight: 800; }
.leadform__sub { color: var(--muted); font-size: 14px; margin-top: -10px; }
.leadform__note { font-size: 12px; color: var(--muted); }
.leadform__trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.field input, .field select, .field textarea {
  font: inherit; font-weight: 500; font-size: 16px; color: var(--ink);
  padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--navy); }
.field textarea { resize: vertical; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.chip span { display: inline-block; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line); cursor: pointer; font-weight: 600; color: var(--ink); }
.chip input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; font-size: 15px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--navy); }
.check small { display: block; color: var(--muted); font-weight: 500; }

/* ---------- каталог ---------- */
.catalog { display: grid; grid-template-columns: 270px 1fr; gap: 24px; align-items: start; padding-bottom: 56px; }
.filters { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); position: sticky; top: 80px; }
.filters__toggle { padding: 16px 20px; font-weight: 800; cursor: pointer; list-style: none; }
.filters__toggle::-webkit-details-marker { display: none; }
.filters__form { display: flex; flex-direction: column; gap: 14px; padding: 0 20px 20px; }
.pager { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 28px; }
.pager__link { padding: 10px 18px; background: #fff; border-radius: 10px; text-decoration: none; font-weight: 700; box-shadow: var(--shadow); }
.pager__info { color: var(--muted); }

/* ---------- карточка машины ---------- */
.car { display: grid; grid-template-columns: 1fr 380px; gap: 24px; align-items: start; padding-bottom: 32px; }
.car__main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.car__side { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 80px; }

.gallery { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.gallery__main { position: relative; aspect-ratio: 16 / 10; background: #0f1b2d; }
.gallery__main img { width: 100%; height: 100%; object-fit: contain; }
.gallery__nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%;
  border: none; background: rgba(255, 255, 255, .9); font-size: 28px; line-height: 1; cursor: pointer; color: var(--ink);
}
.gallery__nav--prev { left: 12px; }
.gallery__nav--next { right: 12px; }
.gallery__counter { position: absolute; bottom: 12px; right: 12px; background: rgba(0, 0, 0, .6); color: #fff; padding: 4px 10px; border-radius: 6px; font-size: 13px; }
.gallery__thumbs { display: flex; gap: 6px; padding: 8px; overflow-x: auto; scrollbar-width: thin; }
.gallery__thumb { flex: none; width: 84px; aspect-ratio: 4 / 3; padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden; cursor: pointer; background: none; opacity: .65; }
.gallery__thumb.is-active { border-color: var(--accent); opacity: 1; }
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery__empty { padding: 80px; text-align: center; color: var(--muted); }

.panel { background: #fff; border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); }
.panel__title { font-size: 20px; margin-bottom: 14px; }
.panel__sub { font-size: 16px; margin: 18px 0 10px; }

.specs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 32px; margin: 0; }
.specs div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; font-weight: 700; text-align: right; }
.specs__wide { grid-column: 1 / -1; }

.verdict { padding: 12px 16px; border-radius: 10px; font-weight: 700; background: var(--bg); margin-bottom: 14px; }
.verdict--good { background: var(--good-bg); color: var(--good); }
.verdict--warn { background: var(--warn-bg); color: var(--warn); }
.verdict--bad { background: var(--bad-bg); color: var(--bad); }

.checks { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 6px; }
.checks li { padding-left: 28px; position: relative; }
.checks li::before { position: absolute; left: 0; top: 0; }
.checks .ok::before { content: "✓"; color: var(--good); font-weight: 800; }
.checks .bad::before { content: "✕"; color: var(--bad); font-weight: 800; }
.checks .warn::before { content: "!"; color: var(--warn); font-weight: 800; left: 5px; }
.checks .neutral::before { content: "•"; color: var(--muted); left: 5px; }

.table { width: 100%; border-collapse: collapse; font-size: 15px; margin-top: 8px; }
.table th { text-align: left; font-size: 13px; color: var(--muted); font-weight: 600; padding: 8px 0; border-bottom: 1px solid var(--line); }
.table td { padding: 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.table .num { text-align: right; }

.parts { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.parts li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 12px; background: var(--bg); border-radius: 8px; }
.parts b { color: var(--warn); }
.parts--warn li { background: var(--warn-bg); color: var(--warn); font-weight: 600; }
.scans { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.scans img { border-radius: 8px; border: 1px solid var(--line); width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: top; }

.options { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.options li { padding: 6px 12px; background: var(--bg); border-radius: 999px; font-size: 14px; font-weight: 600; }

.price-box { background: #fff; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; }
.price-box__title { font-size: 26px; margin: 0; }
.price-box__sub { color: var(--muted); font-size: 14px; margin-top: -6px; }
.price-box__label { font-size: 13px; color: var(--muted); font-weight: 600; margin-top: 6px; }
.price-box__price { font-size: 34px; font-weight: 800; line-height: 1; margin-top: -6px; }
.price-box__alt { color: var(--ink-2); font-weight: 600; font-size: 15px; }
.price-box__id { font-size: 13px; color: var(--muted); }
.notice { padding: 12px 14px; border-radius: 10px; font-size: 14px; font-weight: 600; background: var(--bg); }
.notice--good { background: var(--good-bg); color: var(--good); }
.notice--warn { background: var(--warn-bg); color: var(--warn); }
.breakdown { border: 1px solid var(--line); border-radius: 10px; }
.breakdown summary { padding: 12px 14px; cursor: pointer; font-weight: 700; }
.breakdown ul { list-style: none; margin: 0; padding: 0 14px; }
.breakdown li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.breakdown__note { font-size: 12px; color: var(--muted); padding: 10px 14px 14px; }
.messengers { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.messengers--center { display: flex; justify-content: center; margin: 12px 0 28px; }

.sticky-cta { display: none; }

/* ---------- Китай и подбор ---------- */
.brands { display: flex; flex-wrap: wrap; gap: 8px; }
.brand-chip { padding: 8px 14px; background: var(--bg); border-radius: 999px; font-weight: 700; }
.steps-list { margin: 0; padding-left: 20px; display: grid; gap: 10px; }
.split--top > div { display: flex; flex-direction: column; gap: 20px; }

.thanks { text-align: center; padding: 80px 16px; max-width: 560px; }
.thanks__icon { font-size: 56px; }

/* ---------- подвал ---------- */
.footer { background: var(--navy); color: #c9d3e6; padding: 48px 0 24px; margin-top: 0; }
.footer__inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.footer__text { margin-top: 12px; max-width: 380px; font-size: 15px; }
.footer__col { display: flex; flex-direction: column; gap: 8px; }
.footer__col a { text-decoration: none; }
.footer__col a:hover { color: #fff; }
.footer__title { color: #fff; font-weight: 800; margin-bottom: 4px; }
.footer__note { margin-top: 32px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: 13px; color: #8d99b0; }

/* ---------- адаптив ---------- */
@media (max-width: 1080px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .car { grid-template-columns: 1fr 340px; }
}

@media (max-width: 900px) {
  .hero__inner, .split, .directions { grid-template-columns: 1fr; gap: 28px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .catalog { grid-template-columns: 1fr; }
  .filters { position: static; }
  /* на узком экране: фото → цена → история → форма заявки */
  .car { grid-template-columns: 1fr; gap: 20px; }
  .car__main, .car__side { display: contents; }
  .gallery { order: 1; }
  .price-box { order: 2; }
  .car__main > .panel { order: 3; }
  #car-lead { order: 4; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .footer__inner > div:first-child { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  body { font-size: 15px; }
  /* разделы переезжают второй строкой под логотип */
  .header__inner { flex-wrap: wrap; gap: 0 12px; height: auto; padding-top: 10px; }
  .nav { order: 3; width: 100%; overflow-x: auto; padding: 6px 0 8px; margin: 0 -4px; }
  .nav__link { padding: 6px 10px; font-size: 14px; background: var(--bg); white-space: nowrap; }
  .header__cta { display: none; }
  .hero { padding: 36px 0 44px; }
  .hero__lead { font-size: 16px; }
  .hero__actions .btn { flex: 1; }
  .section { padding: 40px 0; }
  .grid, .grid--3 { grid-template-columns: 1fr; gap: 16px; }
  .steps { grid-template-columns: 1fr; }
  .specs { grid-template-columns: 1fr; }
  .panel, .price-box, .leadform { padding: 18px; }
  .price-box__price { font-size: 30px; }
  .gallery__nav { width: 38px; height: 38px; font-size: 24px; }
  .footer__inner { grid-template-columns: 1fr; }

  /* цена и кнопка всегда под рукой на телефоне */
  .sticky-cta {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: #fff; border-top: 1px solid var(--line); padding: 10px 16px;
    box-shadow: 0 -4px 20px rgba(15, 27, 45, .08);
  }
  .sticky-cta__price { font-weight: 800; font-size: 18px; }
  .sticky-cta__label { font-size: 12px; color: var(--muted); }
  body:has(.sticky-cta) .footer { padding-bottom: 88px; }
}

/* Comfortable touch targets for navigation and messenger selection. */
.nav__link, .chip span { min-height: 44px; display: inline-flex; align-items: center; box-sizing: border-box; }
