/* ==========================================================================
   УКРАВТО НА БОРЩАГІВЦІ — дизайн-система
   1. Токени  2. База  3. Типографіка  4. Сітка  5. Кнопки/форми
   6. Шапка   7. Футер 8. Утиліти
   ========================================================================== */

/* 1. ТОКЕНИ ------------------------------------------------------------- */
:root {
  /* Кольори — взяті з фасаду дилерського центру */
  --ink:        #0B1826;   /* основний текст, темні блоки */
  --ink-2:      #56657A;   /* другорядний текст */
  --ink-3:      #8792A3;   /* підписи, службове */
  --line:       #E1E6EC;   /* рамки, розділювачі */
  --bg:         #FFFFFF;
  --bg-soft:    #F3F6F9;   /* фон секцій */
  --bg-dark:    #0B1826;   /* темні смуги, як панелі над входом */

  /* Акцент — перемикається брендом (див. [data-brand]) */
  --brand:      #1B3F73;   /* синій вивіски, за замовчуванням */
  --brand-ink:  #122C52;   /* ховер/натиснуто */

  /* Бренди — панелі на фасаді */
  --kia:        #0B1826;   /* майже чорна синь */
  --kgm:        #1B3F73;   /* найсвітліша синя панель */
  --jetour:     #16304F;   /* глибока синь */

  /* Фірмовий сірий логотипа УкрАвто */
  --logo: #505256;

  /* Ціна зі знижкою, стрічка акції */
  --sale:       #A8232E;   /* приглушений червоний для акцій */

  /* Типографіка */
  --font-display: "Unbounded", system-ui, sans-serif;
  --font-body:    "Manrope", system-ui, sans-serif;
  --font-data:    "IBM Plex Mono", ui-monospace, monospace;

  --fs-hero:  clamp(2.25rem, 1.2rem + 4vw, 4.25rem);
  --fs-h1:    clamp(1.9rem, 1.2rem + 2.6vw, 3rem);
  --fs-h2:    clamp(1.5rem, 1.1rem + 1.6vw, 2.125rem);
  --fs-h3:    1.25rem;
  --fs-body:  1rem;
  --fs-sm:    0.875rem;
  --fs-xs:    0.75rem;

  /* Ритм */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px;

  /* Форма */
  --maxw: 1280px;
  --r-sm: 4px;
  --r-md: 10px;
  --shadow-1: 0 1px 2px rgba(15,20,24,.06), 0 4px 16px rgba(15,20,24,.06);
  --shadow-2: 0 8px 32px rgba(15,20,24,.12);
  --header-h: 72px;
  /* Повна висота шапки: верхня смуга (.topbar, 36px) + рядок меню (--header-h).
     Використовується, щоб вікно чату не заходило на шапку. */
  --header-total: calc(36px + var(--header-h));
  --ease: cubic-bezier(.2,.6,.2,1);
}

[data-brand="kia"]    { --brand: var(--kia);    --brand-ink: #050D15; }
[data-brand="kgm"]    { --brand: var(--kgm);    --brand-ink: #122C52; }
[data-brand="jetour"] { --brand: var(--jetour); --brand-ink: #0D2138; }

/* 2. БАЗА --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* 3. ТИПОГРАФІКА -------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 var(--s-4);
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); letter-spacing: -0.01em; }
p  { margin: 0 0 var(--s-4); }

.eyebrow {
  font-family: var(--font-data);
  font-size: var(--fs-xs);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: var(--s-3);
  display: block;
}
.lead { font-size: 1.125rem; color: var(--ink-2); }
.muted { color: var(--ink-2); }
.price {
  font-family: var(--font-data);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

/* 4. СІТКА -------------------------------------------------------------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--s-5); }
.section { padding: var(--s-9) 0; }
.section--soft { background: var(--bg-soft); }
.section--dark { background: var(--bg-dark); color: #fff; }
.section__head { display: flex; align-items: end; justify-content: space-between; gap: var(--s-5); margin-bottom: var(--s-7); flex-wrap: wrap; }
.section__head h2 { margin: 0; }

.grid { display: grid; gap: var(--s-5); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }

.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: var(--s-5);
  transition: box-shadow .25s var(--ease), transform .25s var(--ease);
}
.card:hover { box-shadow: var(--shadow-1); transform: translateY(-2px); }
/* Якір на картку відділу не ховається під липкою шапкою. */
.dept-card, #banks { scroll-margin-top: calc(var(--s-9) + var(--s-5)); }

/* 5. КНОПКИ ТА ФОРМИ ---------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 48px; padding: 0 var(--s-5);
  border: 1px solid transparent; border-radius: var(--r-sm);
  font-family: var(--font-body); font-size: var(--fs-sm); font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
  cursor: pointer; transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-ink); }
.btn--outline { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--outline:hover { border-color: var(--ink); }
.btn--ghost { background: transparent; color: var(--brand); padding: 0; min-height: auto; }
.btn--ghost:hover { color: var(--brand-ink); }
.btn--sm { min-height: 38px; padding: 0 var(--s-4); font-size: var(--fs-xs); }
.btn--block { width: 100%; }

.field { display: block; margin-bottom: var(--s-4); }
.field > span { display: block; font-size: var(--fs-sm); color: var(--ink-2); margin-bottom: var(--s-2); }
.input {
  width: 100%; min-height: 48px; padding: 0 var(--s-4);
  border: 1px solid var(--line); border-radius: var(--r-sm);
  font-family: inherit; font-size: var(--fs-body); background: #fff; color: var(--ink);
}
.input:focus { border-color: var(--brand); outline: none; }

/* 6. ШАПКА -------------------------------------------------------------- */
.topbar {
  background: var(--bg-dark); color: rgba(255,255,255,.72);
  font-size: var(--fs-xs); letter-spacing: .02em;
}
.topbar__inner {
  width: 100%; max-width: none;
  padding-left: 24px; padding-right: 24px;
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-5);
  min-height: 36px;
}
.topbar a:hover { color: #fff; }

.topbar__contacts { display: flex; gap: var(--s-5); align-items: center; }
.topbar__phone { white-space: nowrap; }
.topbar__label { color: rgba(255,255,255,.55); }
.topbar__inner > span:first-child { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__contacts { flex: 0 0 auto; }
/* Роздільник між графіком автосалону і номерами; ховається разом із графіком. */
.topbar__sep { align-self: stretch; width: 1px; margin: var(--s-2) 0; background: rgba(255,255,255,.25); }
/* Нестача місця: спершу ховаємо графік автосалону (з роздільником), потім другий номер продажу. */
@media (max-width: 1399px) { .topbar__hours, .topbar__sep { display: none; } }
@media (max-width: 1084px) { .topbar__num2 { display: none; } }
@media (max-width: 1024px) { .topbar__inner { padding-left: 16px; padding-right: 16px; } }
@media (max-width: 860px) { .topbar { display: none; } }

.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.96);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header__inner {
  width: 100%; max-width: none;
  padding-left: 24px; padding-right: 24px;
  /* justify-content тут навмисно не задаємо: у рядка 4 прямих дітей
     (logo, brands, nav, burger — burger видимий лише ≤1100px). .brands має
     flex:1 1 auto з max-width, .nav — теж flex:1 1 auto: обидва самі
     заповнюють вільний простір, а gap нижче — саме ті 32px між блоком
     брендів і першим пунктом меню, які просили в ТЗ. */
  display: flex; align-items: center; gap: var(--s-6); min-height: var(--header-h);
}
@media (max-width: 1280px) { .header__inner { gap: var(--s-5); } }
@media (max-width: 1024px) { .header__inner { padding-left: 16px; padding-right: 16px; } }

.logo { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; color: var(--logo); }
.logo__emblem { width: auto; height: 36px; flex-shrink: 0; }
.logo__word {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 13px;
  line-height: 1.08;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  white-space: nowrap;
}
.logo--light, .logo--light .logo__word { color: #fff; }
/* Назва салону в шапці: +2px до базових 13px, вага лишається 800 (найважча з
   підключених Manrope; 700 було б легше за поточне). Інтервал 1.08 тримає два
   рядки разом. У футері розмір окремий (.footer .logo__word), на мобільному
   розмір лишається 13px. */
.header .logo__word { font-size: 15px; }
@media (max-width: 767px) { .header .logo__word { font-size: 13px; } }
.footer .logo__emblem { height: 42px; }
.footer .logo__word { font-size: 14px; }


/* Логотипи брендів — заливаються поточним кольором тексту */
.brand-logo {
  display: block;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center;  mask-position: center;
  -webkit-mask-size: contain;     mask-size: contain;
  transition: background-color .2s var(--ease);
}
.brand-logo--kia    { width: 51px; height: 12px; -webkit-mask-image: url(../img/brand-kia.svg);    mask-image: url(../img/brand-kia.svg); }
.brand-logo--kgm    { width: 61px; height: 10px; -webkit-mask-image: url(../img/brand-kgm.svg);    mask-image: url(../img/brand-kgm.svg); }
.brand-logo--jetour { width: 84px; height:  8px; -webkit-mask-image: url(../img/brand-jetour.svg); mask-image: url(../img/brand-jetour.svg); }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* Перемикач брендів — фірмовий елемент дилера трьох марок.
   flex:1 1 auto + max-width: заповнює простір між лого й меню, а не
   лишається притиснутим до лого; space-evenly замість фіксованого gap
   розподіляє три логотипи рівномірно по всій доступній ширині. */
.brands {
  flex: 1 1 auto;
  max-width: 520px;
  min-width: 0;
  display: flex; align-items: center; justify-content: space-evenly;
  padding: 3px;
  background: var(--bg-soft);
  border-radius: var(--r-sm);
}
.brands__btn {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  display: grid; place-items: center;
  color: var(--ink-3); padding: 9px 12px; border-radius: 3px;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.brands__btn:hover { color: var(--ink); }
.brands__btn.is-active { background: #fff; color: var(--brand); box-shadow: var(--shadow-1); }
.brands__btn { text-decoration: none; }
@media (max-width: 1200px) { .brands { max-width: 400px; } }
@media (max-width: 1100px) { .brands { display: none; } }

/* flex:1 1 auto — меню саме заповнює простір між брендами й правим краєм
   шапки; justify-content:space-between розподіляє пункти рівномірно, тому
   фіксований gap тут не потрібен (і конфліктував би з розподілом). */
.nav { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); flex: 1 1 auto; }
.nav__link {
  position: relative; font-size: 1rem; font-weight: 700; color: var(--ink); padding: 6px 0;
  white-space: nowrap;
}
.nav__link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--brand); transform: scaleX(0); transform-origin: left;
  transition: transform .25s var(--ease);
}
.nav__link:hover::after, .nav__link[aria-current="page"]::after { transform: scaleX(1); }
@media (max-width: 1100px) { .nav { display: none; } }

.burger {
  display: none; margin-left: auto; width: 44px; height: 44px;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; cursor: pointer;
  align-items: center; justify-content: center; flex-direction: column; gap: 5px;
}
.burger span { display: block; width: 18px; height: 2px; background: var(--ink); transition: transform .25s var(--ease), opacity .2s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 1100px) { .burger { display: flex; } }

.mobile-nav {
  display: none; border-top: 1px solid var(--line); background: #fff;
  max-height: calc(100dvh - var(--header-h)); overflow-y: auto;
}
.mobile-nav.is-open { display: block; }
.mobile-nav a { display: block; padding: var(--s-4) 0; border-bottom: 1px solid var(--line); font-weight: 600; }
.mobile-nav .btn { margin: var(--s-5) 0; }
.mobile-nav__brands { display: flex; gap: var(--s-2); padding: var(--s-4) 0; }

/* 7. ФУТЕР -------------------------------------------------------------- */
.footer { background: var(--bg-dark); color: rgba(255,255,255,.66); padding: var(--s-8) 0 var(--s-5); font-size: var(--fs-sm); }
.footer a:hover { color: #fff; }
.footer__grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: var(--s-6); }
@media (max-width: 1000px) { .footer__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .footer__grid { grid-template-columns: 1fr; } }
.footer h4 {
  font-family: var(--font-data); font-size: var(--fs-xs); font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.4);
  margin: 0 0 var(--s-4);
}
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
.footer__brandline {
  display: flex; align-items: center; gap: var(--s-5);
  margin: var(--s-5) 0; color: rgba(255,255,255,.9);
}
.footer__bottom {
  display: flex; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap;
  margin-top: var(--s-8); padding-top: var(--s-5);
  border-top: 1px solid rgba(255,255,255,.12);
  font-size: var(--fs-xs); color: rgba(255,255,255,.4);
}
.footer__hours-title {
  margin: 0 0 var(--s-2); font-size: var(--fs-sm); font-weight: 600; color: rgba(255,255,255,.9);
}
.footer__hours {
  list-style: none; margin: 0 0 var(--s-4); padding: 0;
  display: grid; gap: 4px;
  font-family: var(--font-data); font-size: var(--fs-xs); font-variant-numeric: tabular-nums;
}
.footer__grid { grid-template-columns: 1.3fr repeat(5, 1fr); }
@media (max-width: 1200px) { .footer__grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 1000px) { .footer__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .footer__grid { grid-template-columns: 1fr; } }

/* Телефони по відділах */
.footer__main-phone {
  display: block; font-family: var(--font-data); font-size: 1.375rem; font-weight: 600;
  color: #fff; letter-spacing: -0.01em; margin-bottom: var(--s-4);
}
.phones { display: grid; gap: var(--s-3); }
.phones__row { display: flex; gap: var(--s-3); align-items: baseline; }
.phones__label {
  min-width: 68px; font-size: var(--fs-xs); letter-spacing: .06em;
  text-transform: uppercase; color: rgba(255,255,255,.45);
}
.phones__nums { display: grid; gap: 2px; font-family: var(--font-data); font-size: var(--fs-sm); color: #fff; }
.footer__email { display: inline-block; margin-top: var(--s-4); font-family: var(--font-data); font-size: var(--fs-sm); }

.phones--dark { padding: var(--s-4) 0 var(--s-6); }
.phones--dark .phones__label { color: var(--ink-3); }
.phones--dark .phones__nums { color: var(--ink); }

/* 8. УТИЛІТИ ------------------------------------------------------------ */
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: var(--s-4); top: var(--s-4); z-index: 100; background: #fff; padding: var(--s-3) var(--s-4); }
.stack > * + * { margin-top: var(--s-4); }
.divider { height: 1px; background: var(--line); border: 0; margin: var(--s-7) 0; }
.tag {
  display: inline-block; font-family: var(--font-data); font-size: var(--fs-xs);
  letter-spacing: .08em; text-transform: uppercase;
  padding: 4px 8px; border: 1px solid var(--line); border-radius: 3px; color: var(--ink-2);
}

/* Стрічка знижки / акційна ціна — єдиний теплий акцент на сайті */
.ribbon {
  display: inline-block; background: var(--sale); color: #fff;
  font-family: var(--font-data); font-size: var(--fs-xs); font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 3px;
}
.price--sale { color: var(--sale); }
.price--old { color: var(--ink-3); text-decoration: line-through; font-size: .85em; font-weight: 400; }

/* 9. ГЕРОЙ-СЛАЙДЕР ------------------------------------------------------ */
.hero {
  position: relative;
  height: min(88vh, 760px);
  min-height: 520px;
  overflow: hidden;
  background: var(--bg-dark);
}
.hero__track { position: absolute; inset: 0; }

.hero__slide {
  position: absolute; inset: 0;
  opacity: 0; visibility: hidden;
  transition: opacity .7s var(--ease), visibility .7s;
}
.hero__slide.is-active { opacity: 1; visibility: visible; }

.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* Затемнення зліва, щоб текст читався на будь-якому фото */
.hero__shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(100deg, rgba(11,24,38,.92) 0%, rgba(11,24,38,.72) 38%, rgba(11,24,38,.15) 68%, rgba(11,24,38,0) 100%),
    linear-gradient(to top, rgba(11,24,38,.55) 0%, rgba(11,24,38,0) 45%);
}

.hero__body {
  position: relative; z-index: 2;
  height: 100%;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  color: #fff;
  padding-bottom: var(--s-8);
}
.hero__slide.is-active .hero__body > * { animation: heroIn .6s var(--ease) both; }
.hero__slide.is-active .hero__body > *:nth-child(2) { animation-delay: .05s; }
.hero__slide.is-active .hero__body > *:nth-child(3) { animation-delay: .1s; }
.hero__slide.is-active .hero__body > *:nth-child(4) { animation-delay: .15s; }
.hero__slide.is-active .hero__body > *:nth-child(5) { animation-delay: .2s; }
@keyframes heroIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Смуга акції внизу слайда */
.hero__promo {
  display: inline-flex; align-items: baseline; gap: var(--s-3); flex-wrap: wrap;
  margin: 0 0 var(--s-5); padding: 9px var(--s-5);
  background: var(--sale); border-radius: var(--r-sm);
  box-shadow: 0 4px 18px rgba(11,24,38,.35);
}
.hero__promo-main {
  font-family: var(--font-display); font-weight: 600; font-size: 1rem;
  letter-spacing: -0.01em; color: #fff;
}
.hero__promo-note { font-size: var(--fs-sm); color: rgba(255,255,255,.82); }
@media (max-width: 600px) {
  .hero__promo { padding: 8px var(--s-4); }
  .hero__promo-main { font-size: .9375rem; }
  .hero__promo-note { width: 100%; }
}


.hero__kicker {
  font-family: var(--font-data); font-size: var(--fs-xs);
  letter-spacing: .18em; text-transform: uppercase;
  color: rgba(255,255,255,.7); margin-bottom: var(--s-3);
}
.hero__name {
  font-size: var(--fs-hero); line-height: .95; letter-spacing: -0.03em;
  margin: 0 0 var(--s-4); text-wrap: balance;
}
.hero__text { max-width: 42ch; color: rgba(255,255,255,.8); margin-bottom: var(--s-6); }

.hero__specs { display: flex; gap: var(--s-7); margin-bottom: var(--s-6); }
.spec__label {
  display: block; font-family: var(--font-data); font-size: 10px;
  letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.55);
  margin-bottom: var(--s-1);
}
.spec__value {
  font-family: var(--font-data); font-size: 2rem; font-weight: 600;
  font-variant-numeric: tabular-nums; line-height: 1;
}
.spec__value i {
  font-style: normal; font-size: .75rem; font-weight: 400;
  color: rgba(255,255,255,.6); margin-left: 6px;
}

.hero__buy { display: flex; align-items: center; gap: var(--s-5); flex-wrap: wrap; }
.hero__price { display: flex; align-items: baseline; gap: var(--s-2); flex-wrap: wrap; }
.hero__old {
  width: 100%; font-family: var(--font-data); font-size: var(--fs-sm);
  color: rgba(255,255,255,.5); text-decoration: line-through;
}
.hero__from { font-size: var(--fs-sm); color: rgba(255,255,255,.7); }
.hero__sum {
  font-family: var(--font-data); font-size: clamp(1.75rem, 1rem + 2vw, 2.75rem);
  font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.02em;
}
.hero__cur { font-family: var(--font-data); font-size: 1rem; color: rgba(255,255,255,.7); }

.hero__btn { background: var(--slide, var(--brand)); color: #fff; }
.hero__btn:hover { background: #fff; color: var(--ink); }

/* Керування */
.hero__arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 52px; height: 52px; display: grid; place-items: center;
  font-size: 28px; line-height: 1; color: #fff;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.25);
  border-radius: 50%; cursor: pointer; backdrop-filter: blur(4px);
  transition: background .2s var(--ease), border-color .2s var(--ease);
}
.hero__arrow:hover { background: rgba(255,255,255,.22); border-color: #fff; }
.hero__arrow--prev { left: var(--s-5); }
.hero__arrow--next { right: var(--s-5); }
@media (max-width: 760px) { .hero__arrow { display: none; } }

.hero__dots {
  position: absolute; left: 50%; bottom: var(--s-6); transform: translateX(-50%);
  z-index: 3; display: flex; gap: var(--s-3);
}
.hero__dot {
  width: 40px; height: 3px; padding: 0; border: 0; cursor: pointer;
  background: rgba(255,255,255,.3); transition: background .25s var(--ease);
}
.hero__dot.is-active { background: #fff; }
.hero__dot:hover { background: rgba(255,255,255,.7); }

@media (max-width: 760px) {
  .hero { height: auto; min-height: 0; }
  .hero__track { position: relative; height: 78vh; min-height: 520px; }
  .hero__shade {
    background: linear-gradient(to top, rgba(11,24,38,.94) 22%, rgba(11,24,38,.55) 58%, rgba(11,24,38,.2) 100%);
  }
  .hero__body { justify-content: flex-end; padding-bottom: var(--s-9); }
  .hero__specs { gap: var(--s-6); }
  .spec__value { font-size: 1.5rem; }
  .hero__buy { gap: var(--s-4); }
  .hero__btn { width: 100%; }
}

/* 10. КАТАЛОГ МОДЕЛЕЙ ---------------------------------------------------- */
.mcard {
  display: flex; flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: box-shadow .25s var(--ease), transform .25s var(--ease), border-color .25s var(--ease);
}
.mcard:hover { box-shadow: var(--shadow-1); transform: translateY(-3px); border-color: #D3D9E0; }

.mcard__media {
  display: block; background: var(--bg-soft);
  aspect-ratio: 16 / 10; padding: var(--s-4);
}
/* object-fit:cover, не contain: картки KIA (card.webp, завжди рівно
   1200×750=16:10) від цього візуально не міняються — рамка й фото вже
   збігаються один-в-один, кропу нема. У KGM вихідні card.webp — той самий
   кадр, що й hero (не 16:10 — 1.33-1.78:1 залежно від моделі), тому досі
   різнилися візуальною висотою під contain; aspect-ratio+cover тепер
   приводить усі картки до однієї пропорції. width:100%;height:auto — сам
   img рахує висоту зі свого aspect-ratio (а не з .mcard__media, як
   раніше); той самий 16/10 на обох — не конфлікт, а дублювання для
   надійності (якщо картинка не завантажилась, контейнер однаково
   зарезервує правильну висоту). */
.mcard__media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center;
}
/* Точковий виняток тільки для KGM Rexton: вихідне фото (1600×900=1.78:1,
   ширше за 16:10) само по собі впритул обрізане по кормі праворуч — ще
   на етапі фотографа, не нашого кропу. Дефолтний center у 16:10-рамці
   зрізав би праву частину корми/колеса ще на ~5% додатково. object-position
   100% — прибиває кроп до правого краю фото (як у джерелі), весь запас
   забирається зліва, де в кадрі лише ліс і дорога.
   У KGM Torres New теж 1600×900=1.78:1 (так само ширше за 16:10), але там
   авто в кадрі — з запасом по обидва боки (~32-87% ширини, а не впритул
   до країв, як у Rexton), тому дефолтні 5% кропу з кожного боку в рамку
   не заходять — окреме правило не потрібне. У решти 3 моделей KGM (Musso
   Grand, Musso Grand New, Torres) вихідні фото взагалі вужчі за 16:10
   (1.33-1.41:1) — кроп там завжди тільки згори/знизу, боків не торкається
   структурно, на будь-якій композиції. */
.mcard__media[href$="kgm-rexton.html"] img {
  object-position: 100% center;
}

.mcard__body { padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-3); flex: 1; }

.mcard__body-type {
  font-family: var(--font-data); font-size: 10px;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3);
}
.mcard__name { font-size: 1.125rem; margin: 0; }
.mcard__name a::after { content: ""; position: absolute; inset: 0; }
.mcard { position: relative; }

/* Стрічка знижки — на відміну від .model-card__badge це саме акція,
   тому саме --sale (єдиний токен проєкту під знижки/акційні ціни). */
.mcard__ribbon {
  position: absolute; top: var(--s-3); left: var(--s-3); z-index: 2;
  background: var(--sale); color: #fff;
  font-family: var(--font-data); font-size: var(--fs-xs); font-weight: 600;
  letter-spacing: .02em;
  padding: 4px 10px; border-radius: var(--r-sm);
}

/* Стриманий бейдж-уточнення в картці моделі — НЕ акційна стрічка,
   тому без --sale/--brand: нейтральна рамка й другорядний колір тексту. */
.model-card__badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid var(--line);
  color: var(--ink-2);
  background: transparent;
  margin-bottom: 8px;
}

.mcard__specs {
  display: flex; gap: var(--s-4); flex-wrap: wrap;
  font-size: var(--fs-sm); color: var(--ink-2);
}
.mcard__specs span + span { padding-left: var(--s-4); border-left: 1px solid var(--line); }

.mcard__foot {
  margin-top: auto; padding-top: var(--s-4); border-top: 1px solid var(--line);
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3);
}
.mcard__price { font-family: var(--font-data); font-weight: 600; font-size: 1.0625rem; font-variant-numeric: tabular-nums; }
.mcard__price i { font-style: normal; font-weight: 400; font-size: var(--fs-sm); color: var(--ink-2); }
.mcard__more { font-size: var(--fs-sm); font-weight: 600; color: var(--brand); white-space: nowrap; }

/* Панель фільтрів */
.catalog__bar {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-5);
  flex-wrap: wrap; margin-bottom: var(--s-6);
}
.catalog__filter { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.chip {
  appearance: none; cursor: pointer;
  padding: 10px 18px; border: 1px solid var(--line); border-radius: 999px;
  background: #fff; color: var(--ink-2);
  font-family: inherit; font-size: var(--fs-sm); font-weight: 600;
  transition: color .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease);
}
.chip:hover { color: var(--ink); border-color: var(--ink-3); }
.chip.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
/* Ряди фільтрів: чіп (у т.ч. посилання) не нижче 44px, видимий фокус
   береться з глобального :focus-visible */
.catalog__filter .chip { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.catalog__filter[hidden] { display: none; }

.catalog__sort { display: flex; align-items: center; gap: var(--s-3); }
.catalog__sort span { font-size: var(--fs-sm); color: var(--ink-2); white-space: nowrap; }
.catalog__sort .input { min-height: 42px; width: auto; padding-right: var(--s-5); }

.catalog__count { margin: var(--s-6) 0 0; font-size: var(--fs-sm); }

/* Підзаголовки брендів у режимі "Усі моделі" — той самий стиль h2,
   що й секційні заголовки на сайті, просто великими літерами. */
.catalog__brand-title { text-transform: uppercase; margin: 0 0 var(--s-5); }
.catalog__brand-group + .catalog__brand-group { margin-top: var(--s-9); }

@media (max-width: 600px) {
  .catalog__bar { align-items: stretch; }
  .catalog__sort { justify-content: space-between; }
  .catalog__filter { overflow-x: auto; flex-wrap: nowrap; padding-bottom: var(--s-2); }
  .chip { white-space: nowrap; }
}

/* 11. ШАПКА СТОРІНКИ З ФОТО ----------------------------------------------- */
.page-hero {
  position: relative;
  background: var(--bg-dark);
  background-image: url(../img/dealer-facade.jpg);
  background-size: 118%;
  background-position: center 40%;
  background-repeat: no-repeat;
  color: #fff;
  min-height: 520px;
  display: flex;
  align-items: center;
  padding-block: var(--s-8);
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(100deg,
    rgba(11,24,38,.92) 0%,
    rgba(11,24,38,.78) 42%,
    rgba(11,24,38,.35) 75%,
    rgba(11,24,38,.15) 100%);
}
.page-hero > .container { position: relative; z-index: 1; }
.page-hero h1 { color: #fff;  overflow-wrap: anywhere; hyphens: auto; }
@media (max-width: 420px) {
  /* довгі слова («конфіденційності») не виходять за екран 360px */
  .page-hero h1 { font-size: clamp(1.6rem, 7.6vw, 1.9rem); }
}
.page-hero .lead { color: rgba(255,255,255,.82); }
.page-hero .eyebrow { color: #fff; }
@media (max-width: 700px) {
  .page-hero {
    background-size: cover;
    background-position: 62% center;
    min-height: 380px;
  }
  .page-hero::before {
    background: linear-gradient(to top,
      rgba(11,24,38,.94) 30%, rgba(11,24,38,.6) 100%);
  }
}

/* 12. СТОРІНКА КОНТАКТІВ -------------------------------------------------
   Список телефонів по відділах на світлому фоні картки (.phones/.phones__*
   з футера розраховані на темний фон і тут не підходять). */
.dept-list { display: grid; gap: var(--s-4); }
.dept-list__label {
  font-size: var(--fs-xs); letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 2px;
}
.dept-list__nums { display: grid; gap: 2px; font-family: var(--font-data); font-size: var(--fs-sm); }
.dept-list__nums a { color: var(--ink); }
.dept-list__nums a:hover { color: var(--brand); }

/* 13. ФОТО В КАРТЦІ ------------------------------------------------------ */
.section--gap { padding-block: var(--s-9); }

.cards-stack { display: grid; gap: 0; }

.card--photo {
  position: relative;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  color: #fff;
  min-height: 420px;
  display: flex;
  align-items: center;
  padding: var(--s-7);
  background: var(--bg-dark);
}
.card--photo:hover { transform: none; box-shadow: var(--shadow-2); }
.card--photo + .card--photo { border-top: 1px solid rgba(255,255,255,.12); }
.card--photo > .container { position: relative; z-index: 2; width: 100%; }

.card__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
}
.card--photo::after {
  content: "";
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg,
    rgba(11,24,38,.94) 0%,
    rgba(11,24,38,.86) 38%,
    rgba(11,24,38,.45) 72%,
    rgba(11,24,38,.15) 100%);
}
.card__inner { position: relative; z-index: 2; width: 100%; }

.card--photo h3 { color: #fff; margin-bottom: var(--s-5); }
.card--photo .phones__label,
.card--photo .footer__hours-title,
.card--photo .dept-list__label,
.card--photo .muted { color: rgba(255,255,255,.65); }
.card--photo .phones__nums,
.card--photo .footer__hours,
.card--photo a:not(.btn) { color: #fff; }
.card--photo a:not(.btn):hover { color: rgba(255,255,255,.75); }
.card--photo .btn--primary { background: #fff; color: var(--ink); }
.card--photo .btn--primary:hover { background: rgba(255,255,255,.85); }

@media (max-width: 700px) {
  .card--photo { padding: var(--s-5); min-height: 300px; }
  .card--photo::after {
    background: linear-gradient(to top,
      rgba(11,24,38,.94) 45%, rgba(11,24,38,.6) 100%);
  }
}

.card--photo .card__inner > h3 {
  font-size: var(--fs-h2);
  margin-bottom: var(--s-7);
}

.card--photo .phones__label,
.card--photo .footer__hours-title {
  font-size: var(--fs-sm);
  letter-spacing: .1em;
  margin-bottom: var(--s-3);
}

.card--photo .phones__nums,
.card--photo .footer__hours {
  font-size: 1.25rem;
  gap: var(--s-2);
}

.card--photo a:not(.btn) { font-size: 1.25rem; }

.contact-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--s-7);
  align-items: start;
}
.contact-cols > * { break-inside: avoid; }

@media (max-width: 700px) {
  .contact-cols { grid-template-columns: 1fr; gap: var(--s-5); }
  .card--photo .card__inner > h3 { font-size: var(--fs-h3); }
  .card--photo .phones__nums,
  .card--photo .footer__hours,
  .card--photo a:not(.btn) { font-size: 1.0625rem; }
}

/* 14. БІЧНА ПАНЕЛЬ ДІЙ ----------------------------------------------------
   Окремі плитки 56×56 із зазором 8px, прижаті до правого краю й центровані
   по вертикалі. Кругла кнопка зв'язку сюди НЕ входить — це окремий віджет
   у правому нижньому куті (розділ 15), щоб не перетинатися зі
   стрілками/індикаторами герой-слайдера.

   Кожна плитка лежить у власній обгортці 56×56 (.side-actions__item), а сама
   кнопка абсолютно позиціонована від right:0 усередині неї. Тому на
   hover/focus кнопка росте лише лівим краєм, поверх контенту, не зсуває
   сусідні плитки, сторінку й не дає горизонтального скролу. Ширина по
   тексту береться з анімації grid-template-columns 0fr → 1fr у підписі
   (без жорстких px). Іконка стоїть справа (row-reverse) і не рухається. */
.side-actions {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 900;
  width: 56px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--s-2);
}
/* На головній піднімаємо панель, щоб вона не перекривала стрілку
   герой-слайдера («перегорнути далі»); на решті сторінок — центр. */
html[data-page="index.html"] .side-actions {
  top: 32%;
}

.side-actions__item { position: relative; width: 56px; height: 56px; }

.side-actions__btn {
  position: absolute; top: 0; right: 0;
  height: 56px; min-width: 56px; width: max-content; /* не стискається до 56px обгортки */
  display: flex; flex-direction: row-reverse; align-items: center;
  padding: 0;
  background: var(--ink);
  color: #fff;
  border-radius: var(--s-2);
  box-shadow: var(--shadow-1);
  overflow: hidden;
  white-space: nowrap;
  text-decoration: none;
  /* Пункт "Запис на сервіс" — <button data-lead>, не <a>: скидаємо
     UA-стилі кнопки (рамку/шрифт/курсор), щоб виглядала так само,
     як сусідні посилання. */
  border: 0; font: inherit; cursor: pointer;
  transition: padding-left .2s var(--ease), background .2s var(--ease);
}
.side-actions__btn:focus-visible { outline: 2px solid var(--bg); outline-offset: -4px; }

.side-actions__icon { flex: 0 0 56px; height: 56px; display: flex; align-items: center; justify-content: center; }
.side-actions__icon svg { display: block; width: 26px; height: 26px; }

/* Підпис: обгортка анімує ширину 0 → по тексту, внутрішній span її обрізає. */
.side-actions__label {
  display: grid;
  grid-template-columns: 0fr;
  transition: grid-template-columns .2s var(--ease);
}
.side-actions__label > span {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-transform: uppercase;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
}

/* Розкриття: фокус клавіатурою діє як hover; hover лише там, де він є
   (на touch-планшетах підпис не показуємо). */
@media (min-width: 1025px) {
  .side-actions__btn:focus-visible { padding-left: var(--s-5); background: var(--brand); }
  .side-actions__btn:focus-visible .side-actions__label { grid-template-columns: 1fr; }
}
@media (min-width: 1025px) and (hover: hover) {
  .side-actions__btn:hover { padding-left: var(--s-5); background: var(--brand); }
  .side-actions__btn:hover .side-actions__label { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .side-actions__btn, .side-actions__label { transition: none; }
}

@media (max-width: 1024px) {
  .side-actions { width: 54px; }
  .side-actions__item { width: 54px; height: 54px; }
  .side-actions__btn { height: 54px; min-width: 54px; }
  .side-actions__icon { flex-basis: 54px; height: 54px; }
  .side-actions__label { display: none; }
}

@media (max-width: 600px) {
  .side-actions { display: none; }
}

/* Кнопка AI-чату (#ukr-chat-fab, assets/js/chat-loader.js) стоїть над круглою кнопкою
   зв'язку, а не поверх неї. Інлайн-позиція лоадера перекривається !important. */
:root { --chat-fab-right: 28px; --chat-fab-bottom: 100px; }
#ukr-chat-fab { right: var(--chat-fab-right) !important; bottom: var(--chat-fab-bottom) !important; }

/* 15. КНОПКА ЗВ'ЯЗКУ ------------------------------------------------------
   Окремий віджет у правому нижньому куті — навмисно поза .side-actions,
   тому не залежить від її вертикального центрування й не може «наїхати»
   на стрілки/крапки слайдера. Та сама механіка виїзду, що й у
   .side-actions: кнопка абсолютно позиціонована від right:0 всередині
   .call-widget (яка сама прибита до right:24px), тож ріст ширини на
   hover тягне лише лівий край, а права межа лишається на місці.
   У проєкту немає токена --accent — роль акценту виконує --brand. */
.call-widget {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 900;
}
.call-widget__btn {
  position: absolute; right: 0; bottom: 0;
  width: 64px; height: 64px;
  border-radius: 32px;
  border: none; cursor: pointer;
  background: var(--brand);
  color: #fff;
  display: flex; align-items: center; justify-content: flex-start;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0,0,0,.28);
  transition: width .35s cubic-bezier(.22,.61,.36,1);
}
.call-widget__btn:hover,
.call-widget__btn:focus-visible {
  width: 280px;
}

.call-widget__icon { flex: 0 0 64px; height: 64px; display: flex; align-items: center; justify-content: center; }
.call-widget__icon svg { display: block; width: 26px; height: 26px; }

.call-widget__label {
  white-space: nowrap;
  padding-right: 24px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  opacity: 0;
  transition: opacity .2s var(--ease);
}
.call-widget__btn:hover .call-widget__label,
.call-widget__btn:focus-visible .call-widget__label {
  opacity: 1;
  transition-delay: .08s;
}

.call-widget__menu {
  position: absolute;
  /* Над кнопкою зв'язку (76px) і, якщо на сторінці є кнопка чату, над нею теж:
     --chat-launcher-h (висота кнопки «Чат» + відступ 12px) виставляє chat-loader.js.
     Без кнопки чату змінної немає → 0. */
  right: 0; bottom: calc(76px + var(--chat-launcher-h, 0px));
  /* Не вище за екран: на низьких вікнах меню скролиться всередині */
  max-height: calc(100dvh - 24px - 76px - var(--chat-launcher-h, 0px) - 16px);
  overflow-y: auto;
  min-width: 280px;
  background: #fff;
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 12px 32px rgba(0,0,0,.18);
  opacity: 0; visibility: hidden;
  transform: translateY(8px);
  transition: opacity .25s, transform .25s, visibility .25s;
}
.call-widget__menu.is-open {
  opacity: 1; visibility: visible; transform: translateY(0);
}

/* Пункти меню контактів — як були раніше, лише в новій обгортці. */
.side-panel__menu-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-4);
  padding: var(--s-2) var(--s-3);
  white-space: nowrap;
}
.side-panel__menu-label {
  font-size: var(--fs-xs); letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-3); white-space: nowrap;
}
.side-panel__menu-nums {
  display: grid; justify-items: end; gap: 2px;
  font-family: var(--font-data); font-size: var(--fs-sm);
  white-space: nowrap;
}
.side-panel__menu-nums a { color: var(--ink); white-space: nowrap; }
.side-panel__menu-nums a:hover { color: var(--brand); }

@media (max-width: 600px) {
  /* .side-actions ховається на мобільному, .call-widget лишається —
     кнопка зв'язку там потрібна найбільше. */
  .call-widget { right: 16px; bottom: 16px; }
  /* Кнопка зв'язку тут на 8px нижче, ніж на десктопі (16 проти 24), а кнопка
     «Чат» стоїть там само, тому панель піднімаємо ще на 8px: відступ над «Чат» лишається 12px */
  .has-chat-launcher .call-widget__menu {
    bottom: calc(76px + var(--chat-launcher-h, 0px) + 8px);
    max-height: calc(100dvh - 16px - 76px - var(--chat-launcher-h, 0px) - 8px - 16px);
  }
}

/* 16. СТОРІНКА МОДЕЛІ ------------------------------------------------------
   Герой — повноекранне фото, та сама механіка, що й у герой-слайдері
   головної: .hero__img{object-fit:cover} + .hero__shade-градієнт (значення
   взяті звідти буквально, нових не вигадував), .hero__body{flex,
   justify-content:center} для тексту зліва. Текстові поля (specs/price)
   так само перевикористовують .hero__specs/.spec__label/.spec__value/
   .hero__buy/.hero__price/.hero__from/.hero__sum/.hero__cur. */
.model-hero {
  position: relative;
  height: min(88vh, 760px);
  min-height: 520px;
  overflow: hidden;
  color: #fff;
}
.model-hero__bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 65% center;
  /* Діє лише коли model-page.js ставить inline object-position:var(--hero-pos-active)
     (модель задала heroPosition/heroPositionDesktop). Без цих полів — як раніше. */
  --hero-pos-active: var(--hero-pos, 65% center);
}
@media (min-width: 1024px) {
  .model-hero__bg { --hero-pos-active: var(--hero-pos-desktop, var(--hero-pos, 65% center)); }
}
.model-hero__shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(100deg, rgba(11,24,38,.92) 0%, rgba(11,24,38,.72) 38%, rgba(11,24,38,.15) 68%, rgba(11,24,38,0) 100%),
    linear-gradient(to top, rgba(11,24,38,.55) 0%, rgba(11,24,38,0) 45%);
}
.model-hero__body {
  position: relative; z-index: 2; height: 100%;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
}
.model-hero__text { max-width: 42ch; }
.model-hero .eyebrow { color: #fff; }
.model-hero h1 { color: #fff; }
.model-hero .lead { color: rgba(255,255,255,.82); margin-bottom: var(--s-6); }
.model-hero__cta { display: flex; gap: var(--s-4); flex-wrap: wrap; margin-top: var(--s-6); }
.model-hero .btn--outline { border-color: rgba(255,255,255,.35); color: #fff; }
.model-hero .btn--outline:hover { border-color: #fff; }

@media (max-width: 700px) {
  .model-hero__bg { object-position: 70% center; --hero-pos-active: var(--hero-pos, 70% center); }
  .model-hero__shade {
    background: linear-gradient(to top, rgba(11,24,38,.94) 30%, rgba(11,24,38,.72) 100%);
  }
}

/* Герой KIA Picanto — точкове правило тільки для цієї сторінки, а не для
   спільного .model-hero__bg: фото 1920×900 (2.13:1) ширше за типове для
   цього блоку, авто на ньому зсунуте лівіше центру (28-71% ширини кадру).
   На XCeed і майбутніх моделях це ніяк не позначається.

   object-position:0% — показує ЛІВУ частину фото (авто зсувається праворуч
   у кадрі, подалі з-під тексту зліва); scale — додатковий зум, який дає
   резерв кропу там, де object-fit:cover сам його не лишає (на широких
   екранах фото впритул влазить по ширині). 1.15 — стеля зуму, задана
   явно: сильніше почне мʼякшати фото на великих екранах.
   На ≤1350px повний зум 1.15 підводить корму під бічну панель кнопок
   (68px впритул до правого краю) — там знижено до 1.03.
   На ≤700px машина (43% ширини фото) ширша за видиме вікно кадру (37%)
   у принципі — вмістити ніс і корму одночасно неможливо; пріоритет
   свідомо віддано носу (саме він ішов під текст у вихідній скарзі). */
html[data-page="kia-picanto.html"] .model-hero__bg {
  object-position: 0% center;
  transform: scale(1.15);
  transform-origin: 0% 50%;
}
@media (max-width: 1350px) {
  html[data-page="kia-picanto.html"] .model-hero__bg {
    /* На 1.08 корма впритул під бічну панель (68px справа) — знижено. */
    transform: scale(1.03);
  }
}
@media (max-width: 700px) {
  html[data-page="kia-picanto.html"] .model-hero__bg {
    object-position: 22% center;
    transform: scale(1);
    transform-origin: center center;
  }
}

/* Герой KIA XCeed — так само точкове правило, лише для цієї сторінки.
   Фото 1920×1200 (1.6:1) — при W>1216px (тобто на 1920/1440/1280)
   object-fit:cover не лишає природного кропу по горизонталі, машина
   стоїть на нативному місці кадру (хвіст ~30%, ніс/бампер ~64% ширини
   фото) незалежно від object-position. Тут проблемна частина — ХВІST
   (лівий край силуету), не ніс: він і заходить під текст зліва.

   transform-origin по X = 0% (ліво) зсуває хвіст праворуч при зумі —
   той самий принцип, що й у Picanto, дзеркально до потрібного напрямку.
   transform-origin по Y = 68% (не 50%/центр) навмисно зміщений ближче
   до коліс: на 1920px вертикального запасу найменше з трьох ширин,
   і симетричний зум навколо центру там обрізав би колеса раніше, ніж
   хвіст встигав дійти до 40%. Зміщений якір ріже більше неба зверху
   (це не шкодить композиції) і майже не чіпає низ.
   1.333 — саме те значення, при якому хвіст на 1920/1440/1280 рівно
   впирається у 40%; дах і колеса лишаються в кадрі з запасом, до
   бічної панелі теж є відстань на всіх трьох ширинах (не знадобився
   окремий проміжний брейкпоінт, як для Picanto на 1280px). */
html[data-page="kia-xceed.html"] .model-hero__bg {
  object-position: 0% center;
  transform: scale(1.333);
  transform-origin: 0% 68%;
}
@media (max-width: 700px) {
  html[data-page="kia-xceed.html"] .model-hero__bg {
    /* На 600px природного кропу (49.3% ширини фото) достатньо для
       всього авто (34pp) без додаткового зуму — центруємо з відступом. */
    object-position: 40% center;
    transform: scale(1);
    transform-origin: center center;
  }
}

/* Герой KIA Sportage — точкове правило лише для цієї сторінки.
   Фото 1920×1200 (1.6:1), та сама механіка, що й у XCeed: при W>1216px
   (1920/1440/1280) object-fit:cover не лишає природного кропу по
   горизонталі, і transform-origin:0% + scale(S) масштабує ніс і корму
   ЛІНІЙНО від однієї й тієї самої точки (0%): vp = image% × S.

   Машина в кадрі ширша, ніж у XCeed (тут ~25–70% ширини фото = 45 в.п.,
   у XCeed було 34 в.п.), тому мета "ніс за 42%" математично недосяжна
   в межах безпечного зуму: 25×S=42 → S=1.68, а вже при такому S корма
   (70×1.68=117.6%) вилітає далеко за кадр. Гранична межа, де корма
   рівно на краю кадру (70×S=100) — S≈1.43, і навіть там ніс лише 35.7%.
   Це вище допустимого ліміту зуму (до 1.35 — далі фото помітно м'якшає).

   Тому це компромісне значення, не повне рішення: scale(1.3) дає
   ніс≈32.5%, корму≈91% (запас до бічної панелі є на всіх трьох ширинах),
   дах/колеса в кадрі з запасом. Це найкраще практичне наближення без
   перекадрованого фото — власник вирішить, чи перекроплювати фото
   заново для точного влучення в 42%. */
html[data-page="kia-sportage.html"] .model-hero__bg {
  object-position: 0% center;
  transform: scale(1.3);
  transform-origin: 0% 50%;
}
@media (max-width: 700px) {
  html[data-page="kia-sportage.html"] .model-hero__bg {
    /* На 600px природного кропу (49.3% ширини фото) заледве вистачає на
       машину (45pp) — слеку лише ~4pp. Додатковий zoom тут тільки
       погіршить ситуацію, тому scale(1), просто центруємо якомога точніше. */
    object-position: 45% center;
    transform: scale(1);
    transform-origin: center center;
  }
}

/* .model-hero--plain — клас-модифікатор для героя БЕЗ фото (рівний темний
   фон замість <img>). З 2026-09-18 не використовується жодною сторінкою —
   kia-tasman отримав нове фото (assets/img/models/kia-tasman/hero.webp,
   heroImg у model-details.js) і рендериться як усі інші. Лишаємо клас
   визначеним про запас: та сама заглушка знадобиться для першої-ліпшої
   майбутньої моделі, для якої ще нема відповідного фото. */
.model-hero--plain {
  background:
    radial-gradient(120% 140% at 20% 20%, rgba(255,255,255,.06) 0%, rgba(255,255,255,0) 60%),
    var(--bg-dark);
}

/* Герой KIA Sorento — точкове правило лише для цієї сторінки.
   Фото 1920×1200, та сама механіка (object-fit:cover без природного
   горизонтального кропу при W≥1217px, тому саме лише transform:scale +
   origin:0% зсуває кадр). Авто в кадрі займає вужчу частку ширини
   (~30–64%, 34 в.п.), ніж на XCeed/Sportage/Tasman, тому мета "ніс за
   42%" тут ДОСЯЖНА без компромісів: scale(1.4) дає ніс≈42%, корму≈89.6% —
   запас до бічної панелі є на всіх трьох ширинах, дах/колеса в кадрі
   з великим запасом. */
/* Перераховано під нове hero.webp (main-pc, 1920×1080 — інший аспект,
   ніж старе фото 1920×1200, під яке був підібраний попередній scale(1.40)).
   Машина в кадрі тепер займає 32.8-77.6% (44.8 в.п.), тому старий scale 1.40
   зрізав корму (108.7% — за межею кадру). scale(1.22) дає ніс≈40-42%,
   корму≈95-100% на всіх трьох ширинах — на межі, але в кадрі. */
html[data-page="kia-sorento.html"] .model-hero__bg {
  object-position: 0% center;
  transform: scale(1.22);
  transform-origin: 0% 50%;
}
@media (max-width: 700px) {
  html[data-page="kia-sorento.html"] .model-hero__bg {
    /* На 600px природне вікно кропу (~44.4%) вужче за саму машину
       (44.8pp) — на відміну від старого фото тут вона вже НЕ вміщується
       без втрат (різниця мінімальна). Пріоритет — ніс, як і в
       Tasman/Torres. */
    object-position: 45% center;
    transform: scale(1);
    transform-origin: center center;
  }
}

/* Герой KGM Torres — точкове правило лише для цієї сторінки.
   Фото 2600×1948 (аспект 1.335, майже 4:3) — точка переходу в
   width-constrained режим лежить дуже низько (~1015px), тому на
   1920/1440/1280 це фото завжди заповнює контейнер по ширині без
   природного горизонтального кропу — той самий принцип, що й у
   Sportage/Tasman: працює лише transform:scale + origin:0%.

   Машина в кадрі займає ~21-79.5% ширини фото (58.5 в.п., ширше навіть
   за Tasman) — "ніс за 42%" тут так само недосяжний: гранична межа, де
   корма рівно на краю кадру, — S≈1.26, і навіть там ніс лише ~26%.

   ВАЖЛИВО, і це не наслідок зуму: через низьку пропорцію фото (1.335)
   при W=1920 контейнер (760px) вимагає такого сильного стиснення по
   висоті, що низ коліс зрізає НАВІТЬ БЕЗ жодного зуму (scale:1) —
   порахував: ~104% замість ≤100%. Зум це трохи посилює (до ~111% на
   scale 1.12), але корінь проблеми не в ньому. На 1440/1280 запас з
   висоти є, там усе в кадрі. scale(1.12) — компроміс: ніс≈23.5-24%,
   корма з запасом на всіх трьох ширинах, дах усюди в кадрі. Якщо потрібне
   точне влучення в 42% без огріхів по колесах — тут це вирішить лише
   перекадроване фото, підбором тут не обійтись. */
html[data-page="kgm-torres.html"] .model-hero__bg {
  object-position: 0% center;
  transform: scale(1.12);
  transform-origin: 0% 50%;
}
@media (max-width: 700px) {
  html[data-page="kgm-torres.html"] .model-hero__bg {
    /* На 600px природне вікно кропу (~59.2%) ледь вміщує машину
       (58.5pp) — запасу в 1пп замало для зсуву, тому центруємо
       симетрично й без зуму (він тільки погіршить і без того
       мінімальний запас). */
    object-position: 50% center;
    transform: scale(1);
    transform-origin: center center;
  }
}

/* Таблиця комплектацій і цін — те саме .price/.price--sale/.price--old,
   що й у картках каталогу. */
.table-wrap { overflow-x: auto; }
.price-table, .spec-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.price-table th, .price-table td,
.spec-table th, .spec-table td { padding: var(--s-4); border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.price-table th {
  font-family: var(--font-data); font-size: var(--fs-xs); font-weight: 500;
  letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3);
}
.price-table td:first-child { color: var(--ink-2); white-space: nowrap; }
/* Одна комплектація — без другого стовпця таблиця не має розтягуватись
   на всю ширину контейнера. */
.price-table--narrow { width: auto; min-width: 320px; max-width: 480px; }
.spec-table th { width: 34%; font-weight: 600; color: var(--ink-2); }
/* Багатоколонкова версія (кілька силових агрегатів поруч, напр. Sportage) —
   вужча підписна колонка, щоб лишити місце під 3 колонки значень. */
.spec-table--multi th:first-child { width: 22%; }
.spec-table--multi thead th {
  font-family: var(--font-data); font-size: var(--fs-xs); font-weight: 500;
  letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3);
}

/* Комплектації картками, згруповані за роком випуску (5+ версій —
   табличний .price-table на таку кількість колонок нечитабельний). */
.trims-year { margin-bottom: var(--s-7); }
.trims-year:last-of-type { margin-bottom: 0; }
.trims-year__title { margin-bottom: var(--s-5); }
.trim-card__name { margin-bottom: var(--s-2); }
.trim-card__spec { font-size: var(--fs-sm); color: var(--ink-2); margin-bottom: var(--s-4); }
.trim-card__price { display: flex; align-items: baseline; gap: var(--s-3); flex-wrap: wrap; }
.trim-card__price .price { font-size: 1.125rem; }
.trim-card__save { font-size: var(--fs-sm); color: var(--sale); margin: var(--s-2) 0 0; }

/* Сервісна акція (pages/promo.html, data/promos.json): та сама .trim-card,
   лише зі списком, приміткою й таблицею оливи. */
.trim-card--service { display: flex; flex-direction: column; gap: var(--s-3); min-width: 0; }
.trim-card--service > * { margin-top: 0; margin-bottom: 0; }
.trim-card--service .btn { align-self: flex-start; }
.trim-card__list { margin: 0; padding-left: var(--s-5); color: var(--ink-2); }
.trim-card__note { font-size: var(--fs-sm); color: var(--ink-2); }
.trim-card__caption { font-weight: 600; }
.trim-card__fine { font-size: var(--fs-xs); color: var(--ink-3); }
.trim-card--service .price-table th,
.trim-card--service .price-table td { padding: var(--s-3) var(--s-2); }
.trim-card--service .price-table td:first-child { white-space: normal; }
.trim-card__art { font-family: var(--font-data); font-size: .625rem; overflow-wrap: anywhere; }
.trim-card--service .price-table td + td, .trim-card--service .price-table th + th { white-space: nowrap; width: 1%; }
.promo-service { margin-top: var(--s-6); }
.promo-service:first-child { margin-top: 0; }

/* Оснащення — акордеон на нативних <details>/<summary>, без JS. */
.equip-group { border-bottom: 1px solid var(--line); }
.equip-group summary {
  cursor: pointer; padding: var(--s-4) 0; font-weight: 600; list-style: none;
  display: flex; align-items: center; justify-content: space-between;
}
.equip-group summary::-webkit-details-marker { display: none; }
.equip-group summary::after { content: "+"; font-size: 1.25rem; color: var(--ink-3); line-height: 1; }
.equip-group[open] summary::after { content: "–"; }
.equip-list {
  display: grid; gap: var(--s-2); margin: 0; padding: 0 0 var(--s-5);
  list-style: none; color: var(--ink-2); font-size: var(--fs-sm);
}
.equip-list li { padding-left: var(--s-4); position: relative; }
.equip-list li::before { content: "•"; position: absolute; left: 0; color: var(--ink-3); }
.model-spec__tag {
  display: inline-block; margin-left: var(--s-2);
  font-family: var(--font-data); font-size: 10px; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase;
  padding: 1px 6px; border-radius: 3px; border: 1px solid var(--line); color: var(--ink-3);
}

/* Декоративна фото-смуга між блоками — суцільне фото на всю ширину вікна,
   без тексту й оверлею. Перевикористовна на інших сторінках моделей:
   клас .model-strip + інший url() у style="background-image:...".

   Свідомо НЕ через CSS custom property (--photo): у секції цін ми щойно
   з'ясували, що відносний url() всередині custom property резолвиться
   відносно stylesheet, де стоїть var() (assets/css/main.css), а не
   відносно HTML-сторінки — шлях ламався. Пряме background-image в
   style="" на самому елементі резолвиться нормально, відносно HTML-
   документа, як і мало б бути. */
.model-strip {
  height: 420px;
  background-size: cover;
  background-position: center 65%;
  background-repeat: no-repeat;
  background-color: var(--bg-dark);
}
@media (max-width: 700px) {
  .model-strip { height: 260px; }
}

/* Модифікатор для смуг з невеликим вихідним фото (тут — 850×450): на
   420px картинка розтягується більш ніж удвічі й помітно м'якшає.
   Точковий клас, а не правка .model-strip — впливає лише на елементи
   з обома класами. На ≤700px фото вже масштабується ВНИЗ від 850px,
   різкість не страждає — тому мобільна висота лишається як у базового
   класу (260px), тут просто дублюється явно. */
.model-strip--sm { height: 280px; }
@media (max-width: 700px) {
  .model-strip--sm { height: 260px; }
}

/* Модифікатор для смуг, де 420px замало кадру (напр. салон, де важливі
   і кермо, і панель, і верх сидінь одночасно). Раніше XCeed навмисно
   лишався на базових 420px .model-strip (без --tall) — але для уніфікації
   нижче важливо, щоб усі 5 моделей KIA мали ОДНАКОВУ розмітку, тому XCeed
   теж переведено на --tall (cars/kia-xceed.html) разом з рештою. */
.model-strip--tall { height: 600px; }
@media (max-width: 600px) {
  .model-strip--tall { height: 320px; }
}

/* .media-bleed — спільний клас для full-bleed фото-блоків: showcase
   (над "Технічні характеристики") і interior-смуга (перед "Оснащення")
   на 5 сторінках моделей KIA + KGM Torres. Раніше showcase і interior-
   смуга мали ОКРЕМІ правила (interior — контейнерна, max-width:var(--maxw)
   з білими полями; showcase — full-bleed) — тепер один спільний клас на
   обидва блоки, замість дублювання тих самих 4 властивостей у двох місцях.

   Ширина: width:100% (не vw). Перша версія showcase пробувала класичний
   "break out of container"-прийом (margin-inline:calc(50% - 50vw) при
   width:auto) — рятує від розбіжності vw/scrollbar, але тільки коли
   елемент вкладений у ВУЖЧОГО за viewport батька. Тут .media-bleed завжди
   вішається на прямих нащадків <main>, а <main>/<body> без власного
   padding (перевірено — немає жодного правила main{}/#main{} з padding),
   тобто батько й так уже на всю БЕЗПЕЧНУ (без scrollbar) ширину — і
   calc(50% - 50vw) тут алгебраїчно збігається зі звичайним width:100vw
   (перевірено окремо QA), тобто не рятує від scrollbar-розбіжності.
   width:100% — явний, а НЕ мовчазний "auto" від блокової моделі: без
   нього лишалась вузька біла смуга (aspect-ratio + max-height разом —
   один із найменш однозначно специфікованих кутків CSS, перенесення
   розміру між осями при обмеженій висоті) — той самий принцип, що й у
   .model-gallery нижче (теж явний width:100%, а не дефолтна поведінка).

   Висота: aspect-ratio 2/1 (≈ те, що раніше давали фіксовані 600px на
   контейнері 1232px = 1232/600 ≈ 2.05, округлено до рівного числа) +
   max-height:calc(var(--maxw)/2)=640px, щоб на широких екранах висота НЕ
   росла разом із шириною — фото стає ширшим, не вищим. Джерельні фото
   showcase/interior на всіх 5 моделях KIA — 1920×1200=1.6, вужчі за 2:1,
   тому object-fit:cover (showcase, <img>) і background-size:cover
   (interior, ще на background-image) завжди кропають ТІЛЬКИ згори/знизу,
   ніколи по боках.

   KGM Torres (як і 4 інші KGM-сторінки, додані пізніше — Musso Grand,
   Musso Grand New, Torres New, Rexton) на тому самому класі, тих самих
   правилах, без винятків: assets/img/models/kgm-torres/strip.webp —
   1280×836 ≈ 1.53:1, теж вужче за еталонні 2:1, той самий безпечний
   кроп тільки згори/знизу, що й у KIA. (Це заміна попередньої версії
   коментаря — той описував старий, тепер вилучений strip-kgm-torres-2.jpg
   2.7:1, який справді був ширшим за 2:1 і різав боки; нове фото такої
   проблеми не має.)

   Компаунд-селектор .model-strip.media-bleed (дві класи, а не просто
   .media-bleed) навмисно — щоб гарантовано перебити .model-strip/
   .model-strip--tall (та сама специфічність класу — 0,1,0) незалежно від
   порядку правил у файлі; на .media-bleed завжди є й .model-strip поряд
   (усі елементи цього типу — .model-strip за задумом). */
.model-strip.media-bleed {
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 1;
  max-height: calc(var(--maxw) / 2);
}

.model-strip__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Gallery (3 плитки після "Оснащення") у цю уніфікацію НЕ включена: це
   мозаїка з трьох різних фото по 4:3, інший патерн, ніж "одне велике
   фото" showcase/interior-смуги — підганяти її під aspect-ratio 2/1
   зламало б задум сітки. .model-gallery лишається full-bleed, як і
   раніше (див. коментар нижче), за свідомим рішенням. */

/* Контейнерне фото — альтернатива .model-strip для невеликих вихідних
   зображень, які не варто розтягувати на всю ширину вікна (спотворює
   різкість). Обмежене max-width, показується у власних пропорціях без
   crop: <img> з aspect-ratio НЕ задається навмисно. */
.model-photo { max-width: 1100px; margin: 0 auto; }
.model-photo img { display: block; width: 100%; height: auto; border-radius: 16px; }

/* Ряд із кількох фото впритул — на відміну від .model-strip (одне фото
   на всю ширину), тут кілька .model-gallery__item з фоном через inline
   style="background-image:...", кількість задає розмітка. Той самий
   принцип "без бічних полів": .model-gallery — прямий нащадок <main>,
   не обгорнутий у .container. */
.model-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  width: 100%;
}
.model-gallery__item {
  aspect-ratio: 4 / 3;
  background-size: cover;
  background-position: center;
}
@media (max-width: 900px) {
  .model-gallery { grid-template-columns: repeat(2, 1fr); }
  .model-gallery__item:nth-child(3) { grid-column: span 2; }
}
@media (max-width: 600px) {
  .model-gallery { grid-template-columns: 1fr; }
  .model-gallery__item:nth-child(3) { grid-column: auto; }
}

/* Три групи телефонів у фінальному CTA — в ряд, по центру. */
.cta-phones {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}
.cta-phones__label {
  display: block;
  text-transform: uppercase;
  font-size: var(--fs-xs);
  letter-spacing: .06em;
  color: var(--ink-3);
  margin-bottom: 8px;
}
.cta-phones__nums { display: block; font-family: var(--font-data); }
.cta-phones__nums a { display: block; color: var(--ink); line-height: 1.6; }
.cta-phones__nums a:hover { color: var(--brand); }

@media (max-width: 700px) {
  .cta-phones { grid-template-columns: 1fr; gap: 24px; }
}

/* 17. ФОРМА ЗАЯВКИ ТА МОДАЛЬНЕ ВІКНО --------------------------------------
   Один шаблон форми (assets/js/lead-form.js) для двох контекстів показу:
   спливаюче вікно (.lead-modal, відкривається кнопками data-lead) і
   вбудований блок прямо в розмітку сторінки (pages/test-drive.html та
   інші сторінки-заявки, .lead-form рендериться в контейнер без модалки). */
.lead-form { max-width: 480px; }
.lead-form__hint { color: var(--ink-2); margin-bottom: var(--s-5); }

/* Окрема форма заявки по центру сторінки (клас form-page на контейнері #lead-form-embed):
   ширша й крупніша за форму в модальному вікні. Для сторінок, де вона єдиний блок секції. */
.form-page { max-width: 720px; margin-inline: auto; }
.form-page .lead-form { max-width: none; }
.form-page .lead-form__hint { max-width: 52ch; margin: 0 auto var(--s-6); text-align: center; font-size: 1.125rem; }
.form-page .field { margin-bottom: var(--s-5); }
.form-page .field > span { font-size: 1.0625rem; margin-bottom: var(--s-2); }
.form-page .input { min-height: 56px; font-size: 1.125rem; }
.form-page .input--area { min-height: 128px; padding: var(--s-3) var(--s-4); }
.form-page .field--checkbox span { font-size: 1rem; }
.form-page .field--checkbox input { width: 22px; height: 22px; }
.form-page .lead-form__submit { min-height: 56px; font-size: 1.0625rem; }

.field--checkbox { display: flex; align-items: flex-start; gap: var(--s-3); }
.field--checkbox input { margin-top: 3px; width: 18px; height: 18px; flex: 0 0 auto; }
.field--checkbox span { font-size: var(--fs-sm); color: var(--ink-2); }

/* Honeypot: приховане від людей, але доступне ботам, які заповнюють усі
   поля форми підряд — якщо значення непорожнє, заявку тихо відкидаємо
   (lead-form.js), без повідомлення про помилку. */
.lead-form__hp {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.input--area { min-height: 88px; padding: var(--s-3) var(--s-4); resize: vertical; line-height: 1.4; }
/* Помилка валідації під полем (lead-form.js): текст + підсвічене поле. */
.field__error { display: block; margin-top: var(--s-2); font-size: var(--fs-sm); color: var(--sale); }
.field__error--consent { margin: calc(-1 * var(--s-2)) 0 var(--s-4); }
.input[aria-invalid="true"] { border-color: var(--sale); }
.field--checkbox input[aria-invalid="true"] { outline: 2px solid var(--sale); outline-offset: 1px; }
.lead-form__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.lead-form__actions .btn { flex: 1 1 200px; }
.lead-form__result-title { font-weight: 600; margin-bottom: var(--s-4); }
.lead-form__result-title--error { color: var(--sale); }
/* Екран успіху: текст і кнопка з номером по центру, крупніше за звичайний текст форми. */
.lead-form__thanks { display: flex; flex-direction: column; align-items: center; text-align: center; padding: var(--s-5) 0; }
.lead-form__result-title--ok { font-size: clamp(1.25rem, 2.2vw, 1.75rem); line-height: 1.3; margin-bottom: var(--s-6); }
.lead-form__call { min-height: 56px; padding: var(--s-2) var(--s-6); font-size: var(--fs-body); text-align: center; flex-wrap: wrap; column-gap: var(--s-2); }
.lead-form__call-num { white-space: nowrap; }

/* Мобільний варіант — шторка знизу (найзручніша зона дотику на телефоні);
   від 640px — по центру екрана, як звичайне модальне вікно. */
.lead-modal {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: flex-end; justify-content: center;
}
.lead-modal[hidden] { display: none; }
.lead-modal__overlay { position: absolute; inset: 0; background: color-mix(in srgb, var(--ink) 60%, transparent); }
.lead-modal__dialog {
  position: relative; width: 100%; max-width: 480px;
  max-height: 92vh; overflow-y: auto;
  background: var(--bg); border-radius: var(--r-md) var(--r-md) 0 0;
  padding: var(--s-6) var(--s-5);
  box-shadow: var(--shadow-2);
}
.lead-modal__close {
  position: absolute; top: var(--s-4); right: var(--s-4);
  width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: var(--bg-soft); color: var(--ink); font-size: 1.25rem;
  line-height: 1; cursor: pointer;
}
.lead-modal__title { padding-right: var(--s-7); margin-bottom: var(--s-2); }
/* Екран результату (успіх, помилка): заголовок по центру; хрестик лишається в куті. */
.lead-modal__dialog.is-result .lead-modal__title { padding-left: var(--s-7); text-align: center; }
body.lead-modal-open { overflow: hidden; }

@media (min-width: 640px) {
  .lead-modal { align-items: center; }
  .lead-modal__dialog { border-radius: var(--r-md); }
}

/* Новини: картка у списку й хлібні крихти на сторінці статті. */
.news-card { display: flex; flex-direction: column; gap: var(--s-3); }
.news-card h3 { margin: 0; }
.news-card__img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--r-sm); }
.breadcrumbs { font-size: var(--fs-sm); color: rgba(255,255,255,.82); margin-bottom: var(--s-4); }
.breadcrumbs a { color: inherit; text-decoration: underline; }
.news-article__meta { color: rgba(255,255,255,.82); font-size: var(--fs-sm); }
.news-article__body { max-width: 68ch; }
.news-article__body > * + * { margin-top: var(--s-4); }
/* Фото в статті: атрибути width/height лише резервують місце, висоту задає aspect-ratio. */
.news-article__body .news-card__img { height: auto; }

/* Сторінка сервісу: якорна навігація й блок фото розділу (показується лише
   коли в SITE.servicePhotos задано шлях). */
.anchor-nav { display: flex; gap: var(--s-2); flex-wrap: wrap; margin-top: var(--s-5); }
.anchor-nav .chip { text-decoration: none; display: inline-block; }
.page-hero .anchor-nav .chip { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.35); color: #fff; }
.page-hero .anchor-nav .chip:hover { border-color: #fff; }
.service-photo img { display: block; width: 100%; height: auto; border-radius: var(--r-md); }
[id="service"], [id="parts"], [id="warranty"], [id="accessories"] { scroll-margin-top: calc(var(--header-h) + var(--s-4)); }
@media (max-width: 767px) {
  .anchor-nav { flex-wrap: nowrap; overflow-x: auto; padding-bottom: var(--s-2); }
  .anchor-nav .chip { white-space: nowrap; }
}

/* Сторінка кредиту: факти, картки програм, калькулятор, FAQ. */
.credit-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--s-4); }
.credit-fact { padding: var(--s-4) var(--s-5); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg); }
.credit-fact__label { display: block; font-size: var(--fs-sm); color: var(--ink-2); margin-bottom: var(--s-2); }
.credit-fact__value { font-family: var(--font-data); font-size: 1.125rem; font-weight: 600; line-height: 1.3; }

.program-card { display: flex; flex-direction: column; gap: var(--s-3); }
.program-card h3 { margin: 0; }
.program-card__rows { margin: 0; display: grid; gap: var(--s-2); }
.program-card__rows > div { display: flex; justify-content: space-between; gap: var(--s-4); border-bottom: 1px solid var(--line); padding-bottom: var(--s-2); }
.program-card__rows dt { color: var(--ink-2); font-size: var(--fs-sm); }
.program-card__rows dd { margin: 0; font-weight: 600; text-align: right; }
.program-card__more summary { cursor: pointer; font-weight: 600; color: var(--brand); }
.program-card__more dt { font-size: var(--fs-sm); color: var(--ink-2); margin-top: var(--s-3); }
.program-card__more dd { margin: 0; font-size: var(--fs-sm); line-height: 1.45; }
.program-card__note, .program-card__until { margin: 0; font-size: var(--fs-sm); }
.supersila-card { margin-top: var(--s-6); }
.supersila-card h3 { margin: 0 0 var(--s-2); }
.bank-card h3 { margin: 0 0 var(--s-2); }
.bank-card p { margin: 0; }

.calc { display: grid; gap: var(--s-6); align-items: start; margin-top: var(--s-5); }
@media (min-width: 900px) { .calc { grid-template-columns: 1.1fr 1fr; } }
.calc__pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
.field--readonly .input { background: var(--bg-soft); }
.calc__out { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s-5); }
.calc__msg { margin: 0 0 var(--s-3); color: var(--sale); }
.calc__msg:empty { display: none; }
.calc__main { display: flex; flex-direction: column; gap: var(--s-1); margin-bottom: var(--s-3); }
.calc__main span { font-size: var(--fs-sm); color: var(--ink-2); }
.calc__main strong { font-family: var(--font-data); font-size: 1.75rem; line-height: 1.1; }
.calc__rows { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); margin: 0 0 var(--s-4); }
.calc__rows dt { font-size: var(--fs-xs); color: var(--ink-2); }
.calc__rows dd { margin: 0; font-family: var(--font-data); font-weight: 600; font-size: var(--fs-sm); }
.calc__notes { margin-top: var(--s-4); font-size: var(--fs-sm); }
.calc__notes-title { font-weight: 600; margin: 0 0 var(--s-2); }
.calc__notes dt { color: var(--ink-2); margin-top: var(--s-2); }
.calc__notes dd { margin: 0; line-height: 1.45; }
@media (max-width: 899px) {
  /* Результат лишається видимим при зміні полів: прилипає до низу екрана. */
  .calc__out { position: sticky; bottom: 0; z-index: 5; box-shadow: var(--shadow-2); }
  .calc__main strong { font-size: 1.5rem; }
  .calc__out [data-calc-cta] { width: calc(100% - 72px); } /* не під круглою кнопкою зв'язку */
  .calc__notes { max-height: 0; overflow: hidden; margin: 0; }
  .calc__out:focus-within .calc__notes, .calc__out:hover .calc__notes { max-height: none; margin-top: var(--s-4); }
}
.faq-item { border-bottom: 1px solid var(--line); padding: var(--s-4) 0; }
.faq-item summary { cursor: pointer; font-weight: 600; }
.faq-item p { margin: var(--s-3) 0 0; color: var(--ink-2); }

/* Додаткове обладнання: фільтри й прайс (service.html #accessories). */
.acc { margin-top: var(--s-6); }
.acc__controls { display: grid; gap: var(--s-3); grid-template-columns: 1fr; margin-top: var(--s-4); }
@media (min-width: 768px) { .acc__controls { grid-template-columns: 1fr 1fr 1.2fr; } }
.acc-group { margin: var(--s-6) 0 var(--s-2); font-size: var(--fs-h3); }
.acc-list { list-style: none; margin: 0; padding: 0; }
.acc-item { display: grid; grid-template-columns: 1fr auto auto; gap: var(--s-4); align-items: center; padding: var(--s-3) 0; border-bottom: 1px solid var(--line); }
.acc-item__info { display: flex; flex-direction: column; gap: var(--s-1); min-width: 0; }
.acc-item__name { font-weight: 600; }
.acc-item__sub, .acc-item__art { font-size: var(--fs-xs); }
.acc-item__price { display: flex; flex-direction: column; align-items: flex-end; text-align: right; font-family: var(--font-data); }
.acc-item__price .muted { font-family: var(--font-body); font-size: var(--fs-xs); }
@media (max-width: 599px) {
  .acc-item { grid-template-columns: 1fr auto; }
  .acc-item .btn { grid-column: 1 / -1; justify-self: start; }
}

/* Сторінка CO2: вибір авто, картка показників, шкали, норми, плакати. */
.co2-layout { display: grid; gap: var(--s-6); align-items: start; }
@media (min-width: 960px) { .co2-layout { grid-template-columns: 1.7fr 1fr; } }
.co2-select { display: grid; gap: var(--s-3); grid-template-columns: 1fr; }
@media (min-width: 768px) { .co2-select { grid-template-columns: 1fr 1fr 1.6fr; } }
.co2-card { display: flex; flex-direction: column; gap: var(--s-3); margin-bottom: var(--s-4); }
.co2-card h3 { margin: 0; overflow-wrap: anywhere; }
.co2-card h4 { margin: var(--s-3) 0 0; }
.co2-card__rows { margin: 0; display: grid; gap: var(--s-2); }
.co2-card__rows > div { display: flex; justify-content: space-between; gap: var(--s-4); border-bottom: 1px solid var(--line); padding-bottom: var(--s-2); }
.co2-card__rows dt { color: var(--ink-2); font-size: var(--fs-sm); }
.co2-card__rows dd { margin: 0; font-weight: 600; text-align: right; }
.co2-card__big { font-family: var(--font-data); font-size: 2rem; font-weight: 600; margin: 0; }
.co2-card__big span { font-size: var(--fs-sm); color: var(--ink-2); }
.co2-scale { margin: var(--s-2) 0; }
.co2-scale__bar { position: relative; height: 10px; border-radius: 999px; background: linear-gradient(90deg, var(--bg-soft), var(--brand)); }
.co2-scale__mark { position: absolute; top: -4px; width: 4px; height: 18px; margin-left: -2px; border-radius: 2px; background: var(--ink); }
.co2-scale__ticks { display: flex; justify-content: space-between; font-family: var(--font-data); font-size: var(--fs-xs); color: var(--ink-3); margin-top: var(--s-1); }
.co2-norms h3 { margin: 0 0 var(--s-2); }
.poster-card h3 { margin: 0 0 var(--s-2); }
.poster-card p { margin: 0 0 var(--s-3); }

/* Trade-in: окрема секція з трьома кроками (класи лише для цієї сторінки). */
.trade-steps__list { list-style: none; margin: 0; padding: 0; }
.trade-steps__item { display: flex; flex-direction: column; align-items: center; gap: var(--s-3); text-align: center; padding: var(--s-6) var(--s-5); }
.trade-steps__label { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--brand); font-size: clamp(1.25rem, 1rem + 1.2vw, 1.75rem); }
.trade-steps__text { margin: 0; font-weight: 600; line-height: 1.3; font-size: clamp(1.125rem, 0.95rem + 0.9vw, 1.5rem); }

/* Форма заявки: атрибут hidden має діяти й на .field (інакше display:block його перекриває). */
.lead-form [hidden] { display: none; }

/* Trade-in: форма на всю ширину контейнера, поля з підкресленням. */
.lead-form--tradein { max-width: none; }
.trade-form__title, .trade-contact__title { text-align: center; }
.trade-form__title { margin-bottom: var(--s-6); }
.lead-form__sub { font-family: var(--font-body); font-size: var(--fs-h3); font-weight: 700; margin: 0 0 var(--s-4); text-align: center; }
.lead-form__pair { display: flex; flex-direction: column; gap: var(--s-2); }
.lead-form__grid { display: grid; grid-template-columns: 1fr; column-gap: var(--s-6); margin-bottom: var(--s-5); }
.lead-form--tradein .input { background: transparent; border: 0; border-bottom: 1px solid var(--ink-3); border-radius: 0; padding-left: 0; }
.lead-form--tradein select.input { margin-left: -4px; width: calc(100% + 4px); }
.lead-form--tradein .input:focus { border-bottom-color: var(--brand); box-shadow: 0 1px 0 var(--brand); }
.lead-form--tradein .input:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.lead-form--tradein .input[aria-invalid="true"] { border-bottom: 2px solid var(--ink); }
.lead-form--tradein .field__error { color: var(--ink); font-weight: 600; }
.lead-form__foot { display: flex; flex-direction: column; gap: var(--s-4); margin-top: var(--s-4); }
.lead-form__foot .field { margin-bottom: 0; }
.lead-form--tradein .field--checkbox input { margin-left: 0; }
.lead-form__foot .btn { width: 100%; }
.trade-contact__box { max-width: 480px; margin: 0 auto; text-align: center; }
.trade-contact__box .lead { margin: var(--s-2) 0 0; }
@media (min-width: 720px) {
  .lead-form__grid { grid-template-columns: repeat(3, 1fr); }
  .lead-form__foot { flex-direction: row; align-items: center; justify-content: space-between; }
  .lead-form__foot .btn { width: auto; min-width: 240px; }
}
@media (min-width: 720px) {
  /* Авто клієнта: ряд 1 — 4 поля, ряд 2 — 3 поля (без осиротілих). */
  .lead-form__grid[data-lead-car-fields] { grid-template-columns: repeat(12, 1fr); }
  .lead-form__grid[data-lead-car-fields] > .field { grid-column: span 3; }
  .lead-form__grid[data-lead-car-fields] > .field:nth-child(n+5) { grid-column: span 4; }
  .lead-form__grid--noengine[data-lead-car-fields] > .field:nth-child(n+5) { grid-column: span 6; }
}

/* Trade-in: переваги. */
.trade-benefits__heading, .trade-docs__heading { text-align: center; margin-bottom: var(--s-6); }
.trade-benefits__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: var(--s-5); }
.trade-benefits__item { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-3); padding: var(--s-6) var(--s-5); }
.trade-benefits__icon { flex: 0 0 auto; box-sizing: content-box; padding: var(--s-3); border-radius: var(--r-md); background: var(--bg-soft); color: var(--brand); }
.trade-benefits__title { margin: 0; font-size: var(--fs-h3); }
.trade-benefits__text { margin: 0; color: var(--ink-2); }
@media (min-width: 720px) { .trade-benefits__list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1200px) { .trade-benefits__list { grid-template-columns: repeat(4, 1fr); } }

/* Trade-in: документи, вкладки. */
.trade-docs__tabs { display: flex; gap: var(--s-2); max-width: 520px; margin: 0 auto var(--s-6); padding: var(--s-1); background: var(--bg-soft); border-radius: var(--r-md); }
.trade-docs__tab { flex: 1 1 0; min-height: 48px; padding: 0 var(--s-4); border: 0; border-radius: var(--r-sm); background: transparent; color: var(--ink-2); font: inherit; font-weight: 600; cursor: pointer; }
.trade-docs__tab[aria-selected="true"] { background: var(--brand); color: var(--bg); }
.trade-docs__tab:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.trade-docs__panel[hidden] { display: none; }
.trade-docs__hint { margin: 0 0 var(--s-6); padding: var(--s-4) var(--s-5); background: var(--bg-soft); border-left: 4px solid var(--brand); border-radius: var(--r-sm); }
.trade-docs__cols { display: grid; grid-template-columns: 1fr; gap: var(--s-6); }
.trade-docs__subtitle { margin: 0 0 var(--s-4); font-size: var(--fs-h3); }
.trade-docs__list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
.trade-docs__list li { position: relative; padding-left: var(--s-6); }
.trade-docs__list li::before { content: ""; position: absolute; left: 4px; top: .3em; width: 6px; height: 11px; border: solid var(--brand); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.trade-docs__note { margin: var(--s-5) 0 0; font-weight: 600; }
.trade-docs__foot { margin: var(--s-6) 0 0; text-align: center; color: var(--ink-2); }
@media (min-width: 720px) { .trade-docs__cols { grid-template-columns: 3fr 2fr; } }

/* Авто з пробігом. Один вертикальний ритм: відступ згори між секціями, знизу лише в останній. */
.used-section { --used-gap: calc(var(--s-5) + var(--s-4)); padding: var(--used-gap) 0 0; }
.used-section:last-of-type { padding-bottom: var(--used-gap); }
@media (min-width: 720px) { .used-section { --used-gap: var(--s-8); } }
.used-lead { max-width: 58ch; }
.used-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.used-card__img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; background: var(--bg-soft); }
.used-card__body { display: flex; flex-direction: column; flex: 1 1 auto; gap: var(--s-3); padding: var(--s-5); }
.used-card__source { margin: 0; font-size: var(--fs-xs); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.used-card__title { margin: 0; font-size: var(--fs-h3); }
.used-card__trim { margin: 0; color: var(--ink-2); }
.used-card__chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-2); }
.used-card__chip { padding: var(--s-1) var(--s-3); border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg-soft); font-family: var(--font-data); font-size: var(--fs-xs); color: var(--ink-2); }
.used-card__price { margin: auto 0 0; padding-top: var(--s-2); font-family: var(--font-data); font-size: var(--fs-h3); font-weight: 600; color: var(--ink); }
.used-card__actions { display: grid; gap: var(--s-3); }
.used-card__link { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); height: auto; padding-block: var(--s-3); text-align: center; line-height: 1.3; }
.used-card__actions .btn { width: 100%; }
.used-note { margin: var(--s-5) 0 0; }
.used-empty { grid-column: 1 / -1; margin: 0; }
.used-cta__box { display: flex; flex-direction: column; align-items: center; gap: var(--s-4); padding: var(--s-6) var(--s-5); background: var(--bg-soft); border-radius: var(--r-md); text-align: center; }
.used-cta__phone { margin: 0; }
@media (min-width: 720px) { .used-cta__box { flex-direction: row; justify-content: center; gap: var(--s-7); } }

/* Hero «З пробігом» з фото салону: окремі кадри для десктопа (1920) і мобільної (960). */
.page-hero--used { background-image: url(../images/salon/used-hero-1920.webp); background-size: cover; background-position: center 70%; }
@media (max-width: 700px) {
  .page-hero--used { background-image: url(../images/salon/used-hero-960.webp); background-position: 12% top; }
  /* Текст унизу, фото видно зверху. */
  .page-hero--used { min-height: 480px; align-items: flex-end; }
  .page-hero--used::before {
    background: linear-gradient(to top, rgba(11,24,38,.94) 0%, rgba(11,24,38,.88) 45%, rgba(11,24,38,.1) 80%, rgba(11,24,38,0) 100%);
  }
}

/* Контакти: блоки з контактами без фону-фото (фото перенесені в галерею). */
/* Блоки «Телефони / Час роботи / Пошта»: один спільний фон-фото з темним накладанням.
   Накладання не світліше за 80% (білий текст ≥9,5:1, підписи 65% ≥5,1:1 навіть на білих пікселях). */
.contacts-blocks { position: relative; padding: 0; background: var(--bg-dark) url(../images/contacts/contacts-bg-1920.webp) center / cover no-repeat; }
.contacts-blocks::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11,24,38,.9) 0%, rgba(11,24,38,.84) 60%, rgba(11,24,38,.8) 100%); }
.contacts-blocks > .cards-stack { position: relative; z-index: 1; }
.contacts-blocks .card--photo { background: transparent; min-height: 0; }
.contacts-blocks .card--photo::after { display: none; }
@media (max-width: 700px) { .contacts-blocks { background-image: url(../images/contacts/contacts-bg-960.webp); } }

/* Галерея (pages/contacts.html, assets/js/gallery.js). */
.gallery__title { text-align: center; margin-bottom: var(--s-6); }
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-3); }
.gallery-item { display: block; padding: 0; border: 0; border-radius: var(--r-sm); overflow: hidden; background: var(--bg-soft); aspect-ratio: 4 / 3; cursor: pointer; }
.gallery-item[hidden] { display: none; }
.gallery-item:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.gallery-item__img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .3s var(--ease); }
.gallery-item:hover .gallery-item__img { transform: scale(1.03); }
.gallery__more { margin: var(--s-6) 0 0; text-align: center; }
.gallery__more [hidden] { display: none; }
@media (min-width: 720px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: var(--s-4); } }
@media (min-width: 1100px) { .gallery-grid { grid-template-columns: repeat(4, 1fr); } }
@media (prefers-reduced-motion: reduce) { .gallery-item__img { transition: none; } .gallery-item:hover .gallery-item__img { transform: none; } }

body.gallery-lock { overflow: hidden; }
.gallery-lightbox { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; background: rgba(11,24,38,.96); color: #fff; }
.gallery-lightbox[hidden] { display: none; }
.gallery-lightbox__bar { display: flex; align-items: center; justify-content: space-between; padding: var(--s-3) var(--s-4); }
.gallery-lightbox__count { font-family: var(--font-data); font-size: var(--fs-sm); }
.gallery-lightbox__stage { flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; gap: var(--s-3); padding: 0 var(--s-3) var(--s-4); }
.gallery-lightbox__fig { flex: 1 1 auto; min-width: 0; max-height: 100%; margin: 0; display: flex; flex-direction: column; align-items: center; gap: var(--s-3); }
.gallery-lightbox__img { display: block; max-width: 100%; max-height: calc(100vh - 160px); width: auto; height: auto; object-fit: contain; }
.gallery-lightbox__cap { font-size: var(--fs-sm); color: rgba(255,255,255,.8); text-align: center; }
.gallery-lightbox__btn { min-width: 48px; min-height: 48px; border: 1px solid rgba(255,255,255,.3); border-radius: 50%; background: rgba(255,255,255,.08); color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer; }
.gallery-lightbox__btn[hidden] { display: none; }
.gallery-lightbox__btn:hover { background: rgba(255,255,255,.2); }
.gallery-lightbox__btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
@media (max-width: 719px) {
  .gallery-lightbox__stage { position: relative; padding: 0 var(--s-2) var(--s-3); }
  .gallery-lightbox__prev, .gallery-lightbox__next { position: absolute; bottom: var(--s-3); z-index: 1; }
  .gallery-lightbox__prev { left: var(--s-3); }
  .gallery-lightbox__next { right: var(--s-3); }
  .gallery-lightbox__img { max-height: calc(100vh - 220px); }
}

/* Логотипи банків на сторінці кредиту. Блок фіксованої висоти, лого вирівняне вліво й не розтягується. */
.credit-bank-logobox { display: flex; align-items: center; justify-content: flex-start; }
.credit-bank-logobox--md { height: 40px; max-width: 160px; margin-bottom: var(--s-3); }
.credit-bank-logobox--sm { height: 30px; max-width: 120px; flex: 0 0 auto; }
.credit-bank-logo { display: block; width: auto; height: 100%; max-width: 100%; object-fit: contain; object-position: left center; }
.credit-bank-head { display: flex; align-items: center; gap: var(--s-3); margin-bottom: var(--s-3); }
.credit-bank-head .eyebrow { margin: 0; }

/* Юридична інформація: перелік документів. */
.legal-lead { max-width: 58ch; }
.legal-brand { margin: var(--s-7) 0 var(--s-4); font-size: var(--fs-h2); }
.legal-intro + .legal-brand { margin-top: 0; }
.legal-intro { max-width: 68ch; margin: 0 0 var(--s-6); }
.legal-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-4); max-width: 820px; }
.legal-item { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: var(--s-3) var(--s-4); padding: var(--s-5); }
.legal-item__icon { grid-row: 1; color: var(--brand); }
.legal-item__text { grid-column: 2; min-width: 0; }
.legal-item__title { margin: 0; font-family: var(--font-body); font-size: var(--fs-h3); font-weight: 700; }
.legal-item__note { margin: var(--s-2) 0 0; font-size: var(--fs-sm); color: var(--ink-2); }
.legal-item__link { grid-column: 1 / -1; width: 100%; }
@media (min-width: 720px) {
  .legal-item { grid-template-columns: auto 1fr auto; }
  .legal-item__link { grid-column: 3; grid-row: 1; width: auto; min-width: 140px; }
}

/* Прайс-листи (pages/price.html, assets/js/price-files.js). */
.price-lead { max-width: 58ch; }
.price-herolink { margin: var(--s-4) 0 0; }
.price-herolink a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.price-filter { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-6); }
.price-filter[hidden] { display: none; }
.price-group[hidden] { display: none; }
.price-group + .price-group { margin-top: var(--s-7); }
.price-group__title { margin: 0 0 var(--s-5); }
.price-card { display: flex; flex-direction: column; gap: var(--s-2); }
.price-card__title { margin: 0; font-size: var(--fs-h3); }
.price-card__date, .price-card__size { margin: 0; }
.price-card__actions { display: grid; grid-template-columns: 1fr; gap: var(--s-3); margin-top: var(--s-4); }
@media (min-width: 420px) { .price-card__actions { grid-template-columns: 1fr 1fr; } }
.price-note { margin: var(--s-7) 0 0; max-width: 68ch; color: var(--ink-2); }
.price-empty { margin: 0; font-weight: 600; }

/* Сервіс: другий відділ (кузовний ремонт) під відділом гарантії в одній секції. */
.service-dept-extra { margin-top: var(--s-7); }
/* h3 за семантикою (одна секція = один h2), вигляд як у h2. */
.service-dept-extra h3 { font-size: var(--fs-h2); letter-spacing: -0.02em; }

/* Сервіс: прайс додаткового обладнання розгортається кнопкою в лівій колонці секції. */
.service-acc-actions .btn { width: 100%; max-width: 360px; }
.acc-toggle { justify-content: space-between; gap: var(--s-3); }
.acc-toggle__icon { font-size: 1.25rem; line-height: 1; }
.acc-toggle:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.acc-panel { margin-top: var(--s-6); scroll-margin-top: calc(var(--header-h) + var(--s-4)); }
.acc-panel[hidden] { display: none; }
.acc-panel > .acc { margin-top: 0; }
