/* База для веб-витрины «Навсегда» (варианты A и C). */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('./img/fonts/manrope-700-cyr.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('./img/fonts/manrope-700-lat.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('./img/fonts/manrope-800-cyr.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('./img/fonts/manrope-800-lat.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #0D171A;
  --muted: #576467;
  --line: #DFE6E4;
  --accent: #007A6A;
  --accent-soft: #E6FFFA;
  --mint: #00FFE0;
  --cta: #FF6B00;
  --cta-hover: #E85F00;
  --danger: #B42318;
  --font-manrope: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

img { max-width: 100%; }

a { color: inherit; }

h1, h2, h3, p { margin: 0; }

.sr-only {
  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: 16px;
  top: -60px;
  z-index: 500;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip:focus { top: 16px; }

:where(a, button, input):focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

.btn {
  background: var(--mint);
  color: var(--ink);
  border: none;
  border-radius: 10px;
  padding: 13px 24px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
}
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: #4EF2CE; }
}

/* ---------- Модальная форма заявки ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(13, 23, 26, 0.55); }
.modal-panel {
  position: relative;
  z-index: 1;
  background: #FFFFFF;
  border-radius: 18px;
  padding: 28px 30px 26px;
  width: 420px;
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  box-shadow: 0 30px 80px rgba(13, 23, 26, 0.35);
}
.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  border-radius: 10px;
  font-size: 24px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}
@media (hover: hover) and (pointer: fine) {
  .modal-close:hover { background: var(--accent-soft); }
}
.modal-title {
  font-family: var(--font-manrope);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  padding-right: 28px;
}
.field { margin-bottom: 12px; }
.field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 5px;
}
.field input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  background: #FFFFFF;
}
.field input:focus,
.field input:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(11, 122, 103, 0.18);
}
.field-error {
  display: block;
  color: var(--danger);
  font-size: 12px;
  margin-top: 4px;
  min-height: 15px;
}
.btn-primary { width: 100%; padding: 13px; font-size: 15px; margin-top: 2px; }
.form-success { text-align: center; padding: 20px 0 6px; }
.success-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 26px;
  font-weight: 800;
}
.form-success p { font-size: 15px; line-height: 1.45; color: var(--ink); margin-top: 14px; }
.form-error { margin-top: 16px; padding: 12px 14px; border-radius: 10px; background: #FDECEC; }
.form-error p { font-size: 14px; line-height: 1.45; color: var(--danger); }
.form-error a { color: var(--danger); text-decoration: underline; text-underline-offset: 2px; }
/* Ловушка для спам-ботов: поле есть в DOM, но человек его не видит */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

@media print {
  .skip, .modal { display: none !important; }
}

/* =====================================================================
   Карточка авто «витрина» (референс: панель спеков слева, крупное фото
   справа). Используется: C — вся сетка парка, A — hero-акцент над
   таблицей. Степпер количества переиспользует разметку app.js
   (input.qty[data-model] → .qty-step с кнопками «− / +»).
   ===================================================================== */
.refcard {
  display: grid;
  grid-template-columns: minmax(0, 42%) minmax(0, 58%);
  align-items: stretch;
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  min-width: 0;
  min-height: 302px;
}
.ref-panel {
  display: flex;
  flex-direction: column;
  padding: 20px 20px 18px 24px;
  min-width: 0;
}
.ref-brand {
  font-family: var(--font-manrope);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.2;
}
.ref-name {
  margin: 7px 0 0;
  font-family: var(--font-manrope);
  font-size: clamp(21px, 1.6vw, 25px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.ref-meta {
  margin: 5px 0 0;
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--muted);
}
.ref-pay {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ref-pay-val {
  font-family: var(--font-manrope);
  font-size: clamp(26px, 2vw, 30px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ref-pay-lbl { font-size: 11.5px; line-height: 1.2; color: var(--muted); }
.ref-specs {
  margin-top: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
}
.ref-spec { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ref-spec-val {
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ref-spec-lbl { font-size: 11px; line-height: 1.2; color: var(--muted); }
.ref-foot {
  margin-top: auto;
  padding-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.ref-qty {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.ref-qty-lbl { font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.ref-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
}
.ref-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
@media (hover: hover) and (pointer: fine) {
  .ref-link:hover { color: var(--ink); }
}
.ref-photo {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 250px;
  padding: 12px 16px 0;
  background: radial-gradient(120% 92% at 50% 100%, #E4F1ED 0%, #F7FBFA 72%);
  overflow: hidden;
}
/* «Студийная» тень под колёсами: фото на прозрачном фоне не висит в воздухе */
.ref-photo::after {
  content: '';
  position: absolute;
  left: 14%;
  right: 14%;
  bottom: 6px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(13, 23, 26, 0.18), rgba(13, 23, 26, 0) 72%);
  pointer-events: none;
}
.ref-photo img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 10px 16px rgba(13, 23, 26, 0.16));
}

/* Степпер внутри карточки: тёмная обводка группы, кнопки всегда видны */
.refcard .qty-step {
  display: inline-flex;
  align-items: center;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
  background: #FFFFFF;
}
.refcard .qty-step-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}
@media (hover: hover) and (pointer: fine) {
  .refcard .qty-step-btn:hover:not(:disabled) { background: var(--accent-soft); color: var(--accent); }
}
.refcard .qty-step-btn:active:not(:disabled) { background: var(--accent-soft); }
.refcard .qty-step-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.refcard .qty-step-btn:disabled { opacity: 0.32; cursor: default; }
.refcard .qty-step:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(11, 122, 103, 0.18);
}
.refcard .qty {
  width: 44px;
  height: 36px;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  text-align: center;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.refcard .qty:focus,
.refcard .qty:focus-visible { outline: none; box-shadow: none; }

/* Телефон: фото сверху, панель снизу, та же иерархия */
@media screen and (max-width: 720px) {
  .refcard { grid-template-columns: minmax(0, 1fr); border-radius: 14px; }
  .ref-photo {
    order: -1;
    min-height: 0;
    height: 195px;
    padding: 14px 18px 0;
  }
  .ref-panel { padding: 16px 16px 16px; }
  .ref-name { font-size: 21px; }
  .ref-brand { font-size: 11.5px; }
  .ref-pay { margin-top: 12px; }
  .ref-pay-val { font-size: 26px; }
  .ref-pay-lbl { font-size: 12px; }
  .ref-specs { margin-top: 12px; gap: 9px; }
  .ref-spec-lbl { font-size: 12px; }
  .ref-status { margin-top: 10px; }
  .ref-foot { padding-top: 14px; }
}
@media screen and (max-width: 360px) {
  .ref-photo { height: 168px; padding: 12px 14px 0; }
  .ref-name { font-size: 19px; }
  .ref-pay-val { font-size: 24px; }
  .ref-spec-val { font-size: 13.5px; }
}
