/* «Подбор по авто»: шаги марка → модель → кузов, поиск по коду кузова. Общие токены и карточка кузова — в storefront.css. */

.carpick-page main { padding-top: 28px; }
.carpick-page main h1 { margin: 0; }
.carpick-page main .cp-title, .carpick-page main .cp-results-head h2, .carpick-page main .cp-help h2 {
  font-family: var(--font-accent); font-style: italic; font-weight: 800; letter-spacing: -.005em; }

/* ---------- шапка страницы ---------- */
.cp-head__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 520px); gap: 24px 48px; align-items: end; }
.cp-head__lead { margin: 14px 0 0 calc(.95em + 14px); max-width: 46ch; font-size: 18px; line-height: 1.45; color: var(--ink-2); }
.cp-search { position: relative; display: flex; align-items: center; height: 60px; padding: 6px 6px 6px 52px; border-radius: 18px; background: #fff;
  box-shadow: 0 0 0 1px var(--line-soft), 0 18px 40px -26px rgba(17, 24, 39, .35); transition: box-shadow .25s; }
.cp-search:focus-within { box-shadow: 0 0 0 2px var(--lime-2), 0 0 0 6px rgba(108, 196, 23, .16), 0 18px 40px -26px rgba(17, 24, 39, .35); }
.cp-search > svg { position: absolute; left: 18px; width: 22px; height: 22px; color: var(--ink-3); }
.cp-search input { flex: 1; min-width: 0; height: 100%; padding: 0 12px 0 0; border: 0; background: none; box-shadow: none; font-size: 16px; color: var(--ink); }
.cp-search input:focus { outline: none; box-shadow: none; }
.cp-search input::-webkit-search-cancel-button { cursor: pointer; }
.cp-search .btn { height: 48px; padding: 0 22px; border-radius: 13px; }

.cp-mine { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 28px; }
.cp-current { display: flex; align-items: center; gap: 14px; padding: 8px 10px 8px 8px; border-radius: 18px; background: #fff; box-shadow: var(--shadow); }
.cp-current__pic { display: grid; place-items: center; width: 92px; height: 56px; overflow: hidden; border-radius: 12px; background: var(--surface-2); color: var(--ink-4); }
.cp-current__pic img { width: 100%; height: 100%; object-fit: cover; }
.cp-current__pic .car-ghost { width: 70%; }
.cp-current__text { display: grid; gap: 2px; margin-right: 6px; }
.cp-current__text small { font-size: 12px; font-weight: 600; color: var(--accent); }
.cp-current__text b { font-size: 15px; font-weight: 600; line-height: 1.3; }
.cp-current .btn { height: 42px; padding: 0 18px; font-size: 14px; }
.cp-current__reset { padding: 0 10px; font-size: 14px; color: var(--ink-3); }
.cp-garage { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-3); }
.cp-garage a { padding: 7px 13px; border-radius: 999px; background: var(--accent-soft); color: var(--ink); font-weight: 500; }
.cp-garage a:hover { text-decoration: none; background: #e0f3cc; }
.cp-garage small { color: var(--ink-3); }

/* ---------- шаги ---------- */
.cp { margin-top: 40px; scroll-margin-top: 110px; }
.cp[aria-busy="true"] { opacity: .55; transition: opacity .2s .1s; }
.cp-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 0 0 36px; padding: 6px; list-style: none;
  border-radius: 22px; background: #fff; box-shadow: var(--shadow); counter-reset: none; }
.cp-steps li { min-width: 0; }
.cp-steps li > a, .cp-steps li > span { display: flex; align-items: center; gap: 14px; height: 100%; padding: 12px 16px; border-radius: 16px; color: var(--ink); }
.cp-steps li > a { transition: background .2s; }
.cp-steps li > a:hover { text-decoration: none; background: var(--surface-2); }
.cp-steps b { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--surface-2); color: var(--ink-3);
  font: italic 800 17px/1 var(--font-accent); transition: background .25s, color .25s; }
.cp-steps li > * > span { display: grid; gap: 1px; min-width: 0; }
.cp-steps small { font-size: 12px; font-weight: 600; color: var(--ink-3); }
.cp-steps em { overflow: hidden; font-size: 15px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; color: var(--ink-4); }
.cp-steps .is-current > * { background: var(--accent-soft); }
.cp-steps .is-current b { background: var(--lime-grad); color: var(--lime-ink); box-shadow: var(--lime-glow); }
.cp-steps .is-current em { color: var(--ink); }
.cp-steps .is-done b { background: var(--ink); color: #fff; }
.cp-steps .is-done em { color: var(--ink); }
.cp-steps .is-done a:hover em { color: var(--link); }

.carpick-page main .cp-title { margin: 0 0 20px; font-size: clamp(24px, 2.2vw, 30px); line-height: 1.15; }

/* ---------- марки ---------- */
.cp-brands { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.cp-brand { position: relative; display: flex; flex-direction: column; padding: 10px 10px 16px; border-radius: 20px; background: #fff; color: var(--ink);
  box-shadow: var(--shadow); transition: transform .4s var(--ease-out), box-shadow .4s var(--ease-out); }
.cp-brand:hover { text-decoration: none; color: var(--ink); transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.cp-brand:hover .cp-pic img { transform: scale(1.05); }
.cp-brand .cp-pic { aspect-ratio: 16 / 9; border-radius: 12px; }
.cp-brand b { display: flex; align-items: center; gap: 8px; margin: 14px 8px 0; font: italic 800 clamp(19px, 1.6vw, 23px)/1.1 var(--font-accent); letter-spacing: -.005em; }
.cp-brand__logo { width: 26px; height: 26px; object-fit: contain; }
.cp-brand__meta { margin: 6px 48px 0 8px; font-size: 13px; color: var(--ink-3); }
.cp-brand small { margin: 2px 48px 0 8px; font-size: 13px; font-weight: 600; color: var(--accent); }

/* общая стрелка */
.cp-go { position: absolute; right: 16px; bottom: 16px; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: #fff; color: var(--lime-2);
  box-shadow: 0 0 0 1px var(--line-soft), 0 6px 14px -8px rgba(17, 24, 39, .35); transition: background .25s, color .25s, transform .35s var(--ease-out); }
.cp-go svg { width: 18px; height: 18px; }
a:hover > .cp-go { background: var(--lime-grad); color: var(--lime-ink); transform: translateX(2px); }

/* ---------- фото кузова ---------- */
.cp-pic { display: grid; place-items: center; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 14px; background: #fff; color: #c9ccd3; }
.cp-pic img { width: 100%; height: 100%; object-fit: contain; transition: transform .9s var(--ease-out); }
.is-scene .cp-pic img { object-fit: cover; }
.cp-pic .car-ghost { width: 58%; }
.cp-pic:has(.car-ghost) { background: linear-gradient(180deg, var(--surface-2), #fff); }

/* ---------- модели ---------- */
.cp-models { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.cp-model { position: relative; display: flex; flex-direction: column; padding: 12px 12px 18px; border-radius: 20px; background: #fff; color: var(--ink);
  box-shadow: var(--shadow); transition: transform .4s var(--ease-out), box-shadow .4s var(--ease-out); }
.cp-model:hover { text-decoration: none; color: var(--ink); transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.cp-model:hover .cp-pic img { transform: scale(1.05); }
.cp-model__text { display: grid; gap: 3px; padding: 14px 52px 0 8px; }
.cp-model__text b { font-size: 17px; font-weight: 700; line-height: 1.25; letter-spacing: -.015em; }
.cp-model__text span { font-size: 14px; color: var(--ink-3); }
.cp-model__text small { margin-top: 3px; font-size: 13px; font-weight: 600; color: var(--accent); }

/* ---------- кузова и рестайлинг ---------- */
.cp-bodies { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.cp-body { display: grid; grid-template-columns: minmax(0, 46%) minmax(0, 1fr); gap: 20px; align-items: center; padding: 12px 20px 12px 12px; border-radius: 22px;
  background: #fff; box-shadow: var(--shadow); }
.cp-body h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 0; font-size: 18px; line-height: 1.25; }
.cp-code { font: italic 800 26px/1 var(--font-accent); letter-spacing: -.005em; }
.cp-body__info > p { margin: 6px 0 14px; font-size: 14px; color: var(--ink-3); }
.cp-vers { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.cp-vers a { position: relative; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 56px 8px 14px; border-radius: 14px;
  background: var(--surface-2); color: var(--ink); transition: background .2s, box-shadow .2s; }
.cp-vers a:hover { text-decoration: none; background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--lime-2); }
.cp-vers a > span { display: grid; gap: 1px; flex: 1; min-width: 0; }
.cp-vers b { font-size: 15px; font-weight: 600; }
.cp-vers small { font-size: 13px; color: var(--ink-3); }
.cp-vers em { flex: none; font-size: 13px; font-weight: 600; color: var(--accent); }
.cp-vers .cp-go { right: 9px; top: 50%; bottom: auto; width: 36px; height: 36px; margin-top: -18px; box-shadow: none; }
.cp-hint { display: flex; align-items: flex-start; gap: 10px; margin: 22px 0 0; font-size: 14px; color: var(--ink-3); }
.cp-hint svg { flex: none; width: 20px; height: 20px; color: var(--lime-2); }

/* ---------- поиск ---------- */
.cp-results-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 20px; margin-bottom: 20px; }
.carpick-page main .cp-results-head h2 { margin: 0; font-size: clamp(22px, 2vw, 28px); }
.cp-results-head a { font-size: 15px; font-weight: 600; }
.cp-empty { max-width: 60ch; padding: 22px 24px; border-radius: 18px; background: #fff; box-shadow: var(--shadow); color: var(--ink-2); }

.cp-credits { margin: 14px 0 0; font-size: 11px; color: var(--ink-4); }
.cp-credits span + span::before { content: "; "; }

/* ---------- популярное и помощь ---------- */
.carpick-page .cp-popular .section-title { margin: 72px 0 22px; }
.carpick-page .cp-popular .section-title h2 { font-size: clamp(26px, 2.5vw, 34px); line-height: 1.1; }
.cp-help { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; margin-top: 72px; padding: 32px 36px; border-radius: 26px;
  background: radial-gradient(120% 160% at 100% 0, rgba(126, 211, 33, .2), transparent 55%), #fff; box-shadow: var(--shadow); }
.carpick-page main .cp-help h2 { margin: 0; font-size: clamp(22px, 2vw, 28px); }
.cp-help p { margin: 8px 0 0; color: var(--ink-2); }
.cp-help__actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- появление ---------- */
@media (prefers-reduced-motion: no-preference) {
  .cp.is-swapped .cp-brand, .cp.is-swapped .cp-model, .cp.is-swapped .cp-body { animation: cp-in .5s var(--ease-out) both; animation-delay: calc(min(var(--i, 0), 12) * 30ms); }
  .cp.is-swapped .cp-title, .cp.is-swapped .cp-results-head { animation: cp-in .4s var(--ease-out) both; }
}
@keyframes cp-in { from { opacity: 0; transform: translateY(12px); } }

/* ---------- адаптив ---------- */
@media (max-width: 1240px) {
  .cp-brands { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cp-models { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  .cp-head__row { grid-template-columns: minmax(0, 1fr); }
  .cp-bodies { grid-template-columns: minmax(0, 1fr); }
  .cp-brands { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .cp-models { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .cp-steps { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); }
  .cp-steps li > a, .cp-steps li > span { flex-direction: column; align-items: flex-start; gap: 8px; padding: 10px; }
  .cp-steps small { font-size: 12px; line-height: 1.25; }
  .cp-steps em { font-size: 13px; }
  .cp-steps em.is-empty { display: none; }
  .cp-steps b { width: 32px; height: 32px; font-size: 15px; border-radius: 10px; }
}
@media (max-width: 600px) {
  .carpick-page main { padding-top: 16px; }
  .cp-head__lead { margin-left: 0; font-size: 16px; }
  .cp-search { height: 54px; padding-left: 46px; border-radius: 16px; }
  .cp-search > svg { left: 15px; width: 20px; height: 20px; }
  .cp-search .btn { display: none; }
  .cp-current { flex-wrap: wrap; width: 100%; }
  .cp-current__text { flex: 1; }
  .cp-current .btn { flex: 1; }
  .cp { margin-top: 28px; }
  .cp-steps { margin-bottom: 26px; }
  .cp-brands { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .cp-brand { padding: 8px 8px 12px; border-radius: 18px; }
  .cp-brand b { margin: 10px 4px 0; font-size: 18px; }
  .cp-brand__meta { margin: 4px 4px 0; font-size: 12px; }
  .cp-brand small { margin: 2px 4px 0; font-size: 12px; }
  .cp-brand .cp-go { display: none; }
  .cp-go { right: 12px; bottom: 12px; width: 32px; height: 32px; }
  .cp-models { grid-template-columns: minmax(0, 1fr); }
  .cp-model { flex-direction: row; align-items: center; gap: 4px; padding: 10px; }
  .cp-model .cp-pic { flex: none; width: 42%; }
  .cp-model__text { padding: 0 44px 0 10px; }
  .cp-model__text b { font-size: 15px; }
  .cp-model .cp-go { top: 50%; bottom: auto; margin-top: -16px; }
  .cp-body { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 10px 10px 14px; }
  .cp-body__info { padding: 0 6px; }
  .cp-help { padding: 24px 22px; }
  .cp-help__actions, .cp-help__actions .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .cp-brand, .cp-model, .cp-pic img, .cp-go { transition: none; }
}
