/* ============================================================
   CORSA MOTORS — общие компоненты всех страниц:
   карточки машин, чипы, вывод расчёта, таймлайн-дорога, факты.
   Подключается и на главной, и на внутренних страницах.
   ============================================================ */

/* ===== карточки машин ===== */
.car-grid {
  display: grid; gap: 26px; margin-top: 36px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px)  { .car-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .car-grid { grid-template-columns: repeat(3, 1fr); } }

.car-card {
  display: flex; flex-direction: column;
  color: var(--ink);
  background: var(--card); border-radius: var(--r-card);
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(20, 23, 27, .07);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.car-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); color: var(--ink); }
.car-card::after {
  content: ""; display: block; height: 3px; margin-top: auto;
  background: var(--red);
  transform: scaleX(0); transform-origin: left center;
  transition: transform .3s var(--ease);
}
.car-card:hover::after { transform: scaleX(1); }
.car-card .cc-photo { display: block; overflow: hidden; aspect-ratio: 4 / 3; background: var(--paper-tint); }
.car-card img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s var(--ease);
}
.car-card:hover img { transform: scale(1.045); }
.car-card .cc-body { padding: 26px 20px 20px; display: flex; flex-direction: column; flex: 1; position: relative; }
/* ценник-таб: свисает с фото, как ценник на зеркале */
.cc-tag {
  position: absolute; top: -26px; right: 16px;
  display: grid; justify-items: end; gap: 0;
  background: var(--red); color: #fff;
  border-radius: 7px; padding: 8px 15px 9px;
  box-shadow: 0 8px 18px rgba(200, 16, 46, .32);
  font-family: var(--display); font-stretch: 112%;
  text-decoration: none; line-height: 1.15;
  transition: transform .25s var(--ease);
}
.car-card:hover .cc-tag { transform: translateY(-2px); }
.cc-tag .was { font-size: 13px; font-weight: 600; opacity: .78; }
.cc-tag .now { font-size: 21px; font-weight: 820; }
.cc-savings {
  margin-top: 8px;
  font-size: 15px; font-weight: 700; color: var(--red);
}
.car-card .cc-badge {
  display: inline-block; margin-bottom: 8px;
  font-family: var(--display); font-stretch: 112%; font-weight: 750;
  font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--red);
}
.car-card h3 { font-size: 19.5px; margin: 0 0 6px; }
.car-card .cc-link { color: var(--ink); text-decoration: none; }
.car-card .cc-link:hover { color: var(--red); }
/* второй ракурс при наведении */
.car-card .cc-photo { position: relative; }
.cc-alt {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0;
  transition: opacity .35s var(--ease);
}
.car-card:hover .cc-alt { opacity: 1; }
.car-card .cc-meta { font-size: 16px; color: var(--ink-soft); }
.car-card .cc-mo { font-size: 15px; color: var(--ink-soft); margin-top: 10px; }
.cc-actions { border-top: 1px solid var(--line); }
.cc-actions { display: flex; gap: 10px; margin-top: auto; padding-top: 14px; }
.btn-sm { min-height: 46px; padding: 9px 20px; font-size: 15.5px; }
.cc-actions .btn-ink { flex: 1; }
.cc-call { flex: none; width: 46px; padding: 9px 0; }
.cc-call .ic { width: 19px; height: 19px; }
.car-card .cc-mo b { color: var(--ink); font-weight: 700; }



/* ===== чипы и вывод расчёта ===== */
.qo-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.chips-label { font-size: 14.5px; color: var(--ink-soft); margin-right: 2px; }
.chip {
  font: inherit; font-size: 15px; color: var(--ink);
  background: var(--paper); border: 1px solid #D8D5CC; border-radius: 999px;
  padding: 7px 14px; cursor: pointer;
  transition: border-color .18s var(--ease), background .18s var(--ease), transform .15s var(--ease);
}
.chip b { color: var(--red); }
.chip:hover { border-color: var(--ink); background: #fff; transform: translateY(-1px); }

/* результат под баром: белым по тёмному */
.quote-out { margin-top: 20px; font-size: 17.5px; display: none; color: #C9CED4; }
.quote-out.show { display: block; animation: qo-in .4s var(--ease); }
@keyframes qo-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.quote-out .qo-price {
  font-family: var(--display); font-stretch: 114%; font-weight: 820;
  font-size: 40px; color: #fff; line-height: 1.15;
}
.quote-out .qo-price::after { content: ""; display: inline-block; width: 10px; height: 10px; margin-left: 10px; border-radius: 50%; background: var(--red); vertical-align: 6px; }
.quote-out b { color: #fff; }
.quote-out .qo-free { color: #fff; font-weight: 700; }
.quote-out .qo-note { color: #8B939C; font-size: 15.5px; margin-top: 6px; }
.quote-out .qo-err { color: #FF5A70; font-weight: 600; }
.quote-out .qo-err a { color: #fff; }
.qo-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.qo-actions .btn-ghost { color: #fff; border-color: #fff; }
.qo-actions .btn-ghost:hover { background: #fff; color: var(--ink); }
/* живёт только в тёмном блоке .delivery — цвет под тёмный фон */
.d-fine { font-size: 14.5px; color: #9AA1A9; margin: 14px 0 0; }



/* ===== таймлайн-дорога ===== */
.tl {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: clamp(30px, 3.6vw, 44px);
  counter-reset: step;
}
.tl { position: relative; }
/* дорога с осевой разметкой: от первой вехи до гаража */
.tl::before {
  content: ""; position: absolute; left: 22px; top: 27px; bottom: 27px;
  width: 10px; border-radius: 5px;
  background:
    repeating-linear-gradient(180deg, rgba(255,255,255,.85) 0 9px, transparent 9px 20px) center / 2px calc(100% - 20px) no-repeat,
    var(--deep);
}
.tl li { counter-increment: step; position: relative; padding-left: 78px; }
.tl li::before {
  content: counter(step);
  position: absolute; left: 0; top: -2px; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--ink); color: #fff;
  border: 4px solid var(--paper);
  font-family: var(--display); font-stretch: 116%; font-weight: 820; font-size: 23px;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s var(--ease);
}
.tl li.now::before {
  background: var(--red);
  transform: scale(1.12);
  box-shadow: 0 8px 22px rgba(200, 16, 46, .38);
}
.tl li.now h3 { color: var(--red); }
.tl h3 { transition: color .3s var(--ease); }
/* финал-развязка: графитовый круг с белой галочкой */
/* финал-награда: красный круг с галочкой, к нему ведёт дорога */
.tl .tl-done::before { content: ""; background: var(--red); }
.tl li.tl-done.now::before { box-shadow: 0 8px 22px rgba(200, 16, 46, .38); }
.tl .tl-done .tl-check {
  position: absolute; left: 0; top: -2px; z-index: 2;
  width: 54px; height: 54px;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.tl .tl-done .tl-check .ic { width: 24px; height: 24px; color: #fff; }
.tl h3 { font-size: 21px; margin-bottom: 6px; }
.tl p { font-size: 17px; color: var(--ink-soft); margin: 0; max-width: 36em; }



/* ===== крупные факты ===== */
.m-facts {
  display: flex; gap: clamp(20px, 2.6vw, 40px);
  margin: 10px 0 14px;
}
.m-fact { display: grid; gap: 3px; }
.m-fact b {
  font-family: var(--display); font-stretch: 120%; font-weight: 820;
  font-size: clamp(28px, 2.6vw, 38px); line-height: 1; color: #fff;
}
.m-fact span { font-size: 14.5px; color: rgba(255,255,255,.85); }

/* ===== полароиды (главная: визит; About: фотоколонка) ===== */
.v-photos { position: relative; min-height: clamp(340px, 40vw, 560px); }
.pol {
  position: absolute; margin: 0;
  background: #fff; padding: 10px 10px 30px;
  border-radius: 4px;
  box-shadow: 0 12px 34px rgba(20, 23, 27, .18);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), z-index 0s;
}
.pol img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; display: block; }
.pol.p1 { width: 56%; left: 0; top: 2%; transform: rotate(-2.4deg); z-index: 2; }
.pol.p2 { width: 46%; right: 0; top: 20%; transform: rotate(2deg); z-index: 1; }
.pol.p3 { width: 42%; left: 20%; bottom: 0; transform: rotate(-1.2deg); z-index: 3; }
.pol:hover { transform: rotate(0deg) translateY(-6px); z-index: 5; box-shadow: 0 20px 44px rgba(20, 23, 27, .26); }
@media (max-width: 939px) {
  .v-photos { min-height: 0; display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
  .pol { position: static; transform: none !important; }
  .pol.p1 { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  /* полароиды: плотнее */
  .v-photos { gap: 10px; }
  .pol { padding: 7px 7px 20px; }
}

/* ===== квитанция-калькулятор FROM->TO (главная, shipping, полоса инвентаря) ===== */
.quote-bar {
  background: #fff; color: var(--ink);
  border-radius: var(--r-card); box-shadow: var(--shadow);
  padding: clamp(16px, 2vw, 22px) clamp(18px, 2.4vw, 26px);
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; flex-wrap: wrap;
}
.quote-bar form { display: flex; align-items: stretch; gap: 12px; flex-wrap: wrap; }
.qc-from, .qc-to { display: grid; gap: 3px; align-content: center; }
.qc-from {
  background: var(--paper); border: 2px solid var(--line); border-radius: var(--r-btn);
  padding: 8px 14px; flex: none;
}
.qc-label {
  font-family: var(--display); font-stretch: 110%; font-weight: 750;
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-soft);
}
.qc-fixed { font-weight: 600; font-size: 16.5px; white-space: nowrap; }
.qc-arrow { align-self: center; flex: none; }
.qc-arrow .ic { width: 18px; height: 18px; color: var(--ink-soft); }
.qc-to { flex: none; width: 150px; position: relative; }
.qc-to input {
  font: inherit; font-size: 18px; letter-spacing: .05em; color: var(--ink);
  width: 100%; min-height: 58px; padding: 22px 14px 8px;
  border: 2px solid #C2C4C0; border-radius: var(--r-btn);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.qc-to .qc-label { position: absolute; top: 8px; left: 16px; z-index: 1; }
.qc-to input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(20,23,27,.14); }
.quote-bar .btn { flex: none; min-height: 58px; }
@media (max-width: 760px) {
  .quote-bar { padding: 14px 14px; gap: 12px; }
  .quote-bar form { width: 100%; }
  .qc-from { flex: 1; }
  .qc-arrow { display: none; }
  .qc-to { flex: 1; width: auto; }
  .quote-bar .btn { width: 100%; }
}

/* ===== тёмный блок доставки: карта зон + факты (главная, shipping) ===== */
.delivery { background: var(--deep); color: #C9CED4; overflow: hidden; }
.delivery .wrap {
  padding-top: clamp(60px, 8vw, 104px); padding-bottom: clamp(60px, 8vw, 104px);
}
.d-head {
  display: grid; gap: clamp(30px, 4vw, 60px);
  grid-template-columns: 1fr; align-items: center;
  margin-bottom: clamp(30px, 4vw, 46px);
}
@media (min-width: 940px) { .d-head { grid-template-columns: 5fr 7fr; } }

.delivery h2 { color: #fff; margin-bottom: 10px; }
.d-sub { font-size: 18px; color: #A7AEB6; margin: 0 0 34px; }

.d-facts { display: grid; gap: 22px; justify-content: start; }
.d-fact { display: grid; gap: 4px; }
.d-fact b {
  font-family: var(--display); font-stretch: 120%; font-weight: 820;
  font-size: clamp(30px, 3vw, 42px); line-height: 1; color: #fff;
}
.d-fact span { font-size: 15.5px; color: #A7AEB6; }

/* карта: точки наших ZIP-зон */
.d-map svg { width: 100%; height: auto; display: block; }
.map-dot { fill: rgba(255, 255, 255, .22); }
.map-home { fill: #fff; }
.map-home-ring {
  fill: none; stroke: #fff; stroke-width: 2;
  transform-box: fill-box; transform-origin: center;
}
@media (prefers-reduced-motion: no-preference) {
  .map-home-ring { animation: home-pulse 2.6s var(--ease) infinite; }
}
@keyframes home-pulse {
  0%   { transform: scale(1); opacity: .9; }
  70%  { transform: scale(2.4); opacity: 0; }
  100% { transform: scale(2.4); opacity: 0; }
}
.map-route {
  fill: none; stroke: var(--red); stroke-width: 2.5; stroke-linecap: round;
  filter: drop-shadow(0 2px 6px rgba(200, 16, 46, .5));
  transition: stroke-dashoffset 1.1s var(--ease);
}
.map-dest { fill: var(--red); stroke: #fff; stroke-width: 2; }
.d-map-cap {
  margin: 14px 0 0; text-align: center;
  font-size: 15px; color: #8B939C;
}
@media (max-width: 760px) {
  .d-facts { grid-template-columns: repeat(3, auto); gap: 12px 18px; }
  .d-fact b { font-size: 24px; }
  .d-fact span { font-size: 13px; }
  .d-map-cap { font-size: 13.5px; }
}

/* ---------- лид-форма «бланк дилера» ----------
   Общая для всех страниц (helper lead_form в build_pages.py). Жила в
   VDP-секции pages.css и однажды уехала вместе с вырезкой той секции —
   поэтому теперь здесь, в общем слое. */
.ask-card {
  background: #fff; border-radius: var(--r-card);
  box-shadow: 0 2px 10px rgba(20, 23, 27, .07);
  padding: clamp(22px, 3vw, 34px);
  max-width: 640px;
}
/* «бланк дилера»: форма + «корешок квитанции» с шагами и телефоном */
.ask-card.ac-wide { max-width: 920px; }
.ac-tag {
  font-family: var(--display); font-stretch: 110%; font-weight: 750;
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--red); margin: 0 0 8px;
}
.ask-card h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.ac-grid { display: grid; grid-template-columns: 1fr; gap: 22px; margin-top: 16px; }
/* корешок: тонированная плитка с линией отрыва, прижат к верху, не болтается */
.ac-side {
  background: var(--paper-tint); border-radius: 10px;
  padding: 20px 22px;
  display: flex; flex-direction: column;
}
.ac-side .ac-alt { margin-top: auto; }
.ac-cap {
  font-family: var(--display); font-stretch: 110%; font-weight: 750;
  font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-soft); margin: 0 0 10px;
}
.ac-side > div:first-child { flex: 1; display: flex; flex-direction: column; }
.ac-side .mini-steps { margin: 0; gap: 0; flex: 1; justify-content: space-evenly; }
.ac-side .mini-steps li { font-size: 15.5px; align-items: flex-start; }
.ac-side .mini-steps li::before { transform: translateY(1px); }
.ac-steps b { display: block; font-size: 16px; }
.ac-steps p { margin: 3px 0 0; font-size: 14px; line-height: 1.5; color: var(--ink-soft); }
.ac-alt { border-top: 2px dashed #CFC9BB; margin-top: 16px; padding-top: 16px; }
.ac-phone {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--display); font-stretch: 112%; font-weight: 800;
  font-size: 19px; color: var(--ink); text-decoration: none;
}
.ac-phone:hover { color: var(--red); }
.ac-phone .ic { width: 19px; height: 19px; color: var(--red); }
.ac-hours { font-size: 14.5px; color: var(--ink-soft); margin: 6px 0 0; }
.ask-card .btn .ic { width: 15px; height: 15px; }
.ac-alt-inline { margin: 14px 0 0; text-align: center; font-size: 15.5px; color: var(--ink-soft); }
.ac-alt-inline a { color: var(--ink); font-weight: 700; text-decoration-color: var(--red); text-underline-offset: 3px; }
.ac-alt-inline a:hover { color: var(--red); }
@media (min-width: 760px) {
  .ac-grid { grid-template-columns: 1fr 320px; gap: 30px; }
}
@media (max-width: 759px) {
  /* на телефоне шаги не повторяем (они есть на thank-you) — остаётся телефон */
  .ac-side > div:first-child { display: none; }
  .ac-side { padding: 16px 18px; }
  .ac-alt { border-top: 0; margin-top: 0; padding-top: 0; }
}
.ask-card h2 { font-size: clamp(1.4rem, 2.4vw, 1.8rem); margin-bottom: 6px; }
.ask-card .btn { width: 100%; }
.field-row { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .field-row { grid-template-columns: 1fr 1fr; } }
.form-note { font-size: 15px; color: var(--ink-soft); margin: 0 0 16px; }

/* липкая панель VDP на мобиле */
