/* ==========================================================================
   TOKENS
   Плейсхолдеры проекта — цвет/шрифт/размеры подменяются под конкретный макет.
   В правилах используем var(--…), а не хардкод.
   ========================================================================== */
:root {
  --c-dark: #121314;
  --c-accent: #00cabf;
  --c-white: #fff;
  --c-muted: #626970;
  --c-grey: #f2f3f4;
  --c-footer: #0b0d0c;
  --c-accent-hover: #44e5dd;
  --font-base: "Haval", sans-serif;
  --font-text: "TT Wellingtons", "Haval", sans-serif;
  --container-w: 1380px;
  --control-h: 47px;
  --radius: 0;
  --transition: 0.3s ease;
}

/* ==========================================================================
   RESET / BASE
   ========================================================================== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
}

body {
  max-width: 1920px;
  margin: 0 auto;
  font: 500 16px/1.4 var(--font-base);
  color: var(--c-dark);
  background: var(--c-grey);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

sup {
  font-size: 0.7em;
  vertical-align: super;
}

/* Клавиатурный фокус (мышь/тач не трогаем). */
:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
}

/* ==========================================================================
   LAYOUT
   ========================================================================== */
.container {
  position: relative;
  width: 100%;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 30px;
}

/* ==========================================================================
   BUTTONS — .btn + модификаторы .btn--accent / .btn--white / .btn--glass
   ========================================================================== */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--control-h);
  padding: 0 28px;
  font: 500 16px/1 var(--font-base);
  color: var(--c-white);
  text-align: center;
  white-space: nowrap;
  background: var(--c-dark);
  border: 2px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition:
    background var(--transition),
    color var(--transition),
    border-color var(--transition);
}

.btn:hover {
  background: var(--c-accent);
  border-color: var(--c-accent);
  color: var(--c-white);
}

.btn--accent {
  background: var(--c-accent);
}

.btn--accent:hover {
  color: var(--c-footer);
  background: var(--c-white);
  border-color: var(--c-accent);
}

.btn--white {
  background: var(--c-white);
  color: var(--c-dark);
}

.btn--glass {
  color: var(--c-dark);
  background: var(--c-white);
  border-color: var(--c-dark);
}

.btn--glass:hover {
  color: var(--c-white);
  background: var(--c-accent);
  border-color: var(--c-accent);
}

/* ==========================================================================
   FORMS — поле / селект / согласие ПД (сноска) / состояния
   ========================================================================== */
.form-group {
  position: relative;
  margin-bottom: 12px;
}

.form-group button {
  width: 100%;
}

.form-group input,
.form-group select {
  width: 100%;
  height: var(--control-h);
  padding: 0 20px;
  font: 500 16px/1 var(--font-base);
  color: var(--c-dark);
  background: var(--c-white);
  border: 2px solid var(--c-dark);
  border-radius: var(--radius);
  outline: none;
}

.form-group input::placeholder {
  color: var(--c-muted);
}

.form-group select {
  appearance: none;
  padding-right: 50px;
  color: var(--c-muted);
  background-color: var(--c-white);
  background-image: url(../img/ico/chevron.svg);
  background-position: right 20px center;
  background-repeat: no-repeat;
  background-size: 24px 24px;
}

.form-group select:valid {
  color: var(--c-dark);
}

input[type="file"] {
  display: none;
}

/* Согласие на обработку ПД — мелкая сноска под формой. */
.agree-field {
  position: relative;
  display: block;
  padding-left: 24px;
  font-size: 12px;
  line-height: 1.2;
}

.agree-field input {
  position: absolute;
  top: 0;
  left: 0;
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--c-accent);
}

.agree-field a {
  text-decoration: underline;
}

/* Подсветка невалидного поля + блок кнопки без согласия (классы вешает JS). */
.has-danger input,
.has-danger select {
  border-color: #eba5a3;
  box-shadow: 0 0 6px #eba5a3;
}

.not_agree button {
  background: #ccc !important;
  color: var(--c-white) !important;
  cursor: default;
  pointer-events: none;
}

/* ==========================================================================
   POPUP — fancybox копирует innerHTML источника, поэтому стили вешаем
   на .popup_container, а не на #form_popup.
   ========================================================================== */
#form_popup {
  display: none;
}

.popup_container {
  width: 500px;
  max-width: 100%;
  padding: 46px;
  background: var(--c-white);
}

.form_title {
  margin-bottom: 24px;
  font: 500 30px/1.1 var(--font-base);
  text-align: center;
}

/* ==========================================================================
   FANCYBOX v3 — интеграция плагина (попапы форм + галереи)
   ========================================================================== */
.fancybox-content {
  overflow: hidden;
}

.fancybox-button svg {
  transform: scale(2);
}

.compensate-for-scrollbar {
  margin-right: auto !important;
  overflow: auto !important;
}

/* ==========================================================================
   HEADER — фикс-шапка + навигация
   ========================================================================== */
header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 15;
  padding: 14px 0 0;
  background: var(--c-white);
}

.header__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 59px;
}

.logo-group {
  display: flex;
  flex: none;
  align-items: center;
}

.header__addr,
.header__phone {
  position: relative;
  padding-left: 32px;
  font-size: 16px;
}

.header__addr::before,
.header__phone::before {
  position: absolute;
  top: 50%;
  left: 0;
  width: 24px;
  height: 24px;
  content: "";
  background: 50% / contain no-repeat;
  transform: translateY(-50%);
}

.header__addr::before {
  background-image: url(../img/ico/location.svg);
}

.header__phone::before {
  background-image: url(../img/ico/phone.svg);
}

.header__top .btn {
  height: 53px;
}

.header__call,
.m_btn {
  display: none;
}

/* ==========================================================================
   NAV — навигация
   ========================================================================== */
.menu {
  margin-top: 10px;
  padding: 8px 0;
  border-top: 2px solid var(--c-grey);
}

.menu .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.menu a {
  position: relative;
  display: inline-block;
  padding-bottom: 2px;
  overflow: hidden;
  font: 500 18px/1.2 var(--font-text);
  color: #000;
}

.menu a::after,
.complects__more::after {
  position: absolute;
  bottom: 0;
  left: -100%;
  width: 100%;
  height: 2px;
  content: "";
  background: var(--c-accent);
  transition: left var(--transition);
}

.menu a:hover::after,
.complects__more:hover::after {
  left: 0;
}

/* ==========================================================================
   BANNER — hero-баннер
   ========================================================================== */
.banner {
  position: relative;
  height: 700px;
  margin-top: 125px;
  overflow: hidden;
}

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

/* Белая подложка под заголовком. В макете наклонная фигура обрезана
   Mask Group до 1920x182, поэтому по факту плашка прямая и кнопка выходит
   за её нижнюю кромку. */
.banner__band {
  position: absolute;
  top: 34px;
  right: 0;
  left: 0;
  height: 182px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 15.6%,
    #fff 27.7%,
    #fff 72.9%,
    rgba(255, 255, 255, 0) 84.4%
  );
  mask-image: linear-gradient(
    90deg,
    transparent 15.6%,
    #000 27.7%,
    #000 72.9%,
    transparent 84.4%
  );
  backdrop-filter: blur(5px);
}

.banner .container {
  position: relative;
  z-index: 1;
}

.banner__titles {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 78px;
  text-align: center;
}

.banner__title--1 {
  font-size: 40px;
  line-height: 1;
}

.banner__title--1 span {
  color: var(--c-accent);
}

.banner__title--2 {
  margin-top: 16px;
  font-size: 30px;
  line-height: 1;
}

.banner__btn {
  width: 300px;
  margin-top: 29px;
}

/* ==========================================================================
   TIMER — блок таймера акции
   ========================================================================== */
.timer {
  position: relative;
  z-index: 2;
  margin-top: -77px;
}

.timer__card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 46px;
  background: var(--c-white);
  border-radius: 4px;
}

.timer__clock {
  flex: none;
  width: 500px;
}

.timer__form {
  flex: none;
  width: 680px;
}

.timer__title {
  margin-bottom: 12px;
  font-size: 22px;
  line-height: 1.2;
}

.timer__row {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.timer__row .form-group {
  flex: 1 0 0;
  min-width: 0;
  margin-bottom: 0;
}

.timer__row .form-group:last-child {
  flex: none;
}

.timer__row .btn {
  width: 100%;
}
/* ==========================================================================
   Бег. Строка
   ========================================================================== */

/*=== Бегущая строка ===*/
.run_now {
  display: flex;
  align-items: center;
  background: #00cabf;
  overflow: hidden;
  position: relative;
  height: 53px;
  margin-bottom: 20px;
  position: relative;
  z-index: 2;
  color: white;
}

.run_now_cont {
  white-space: nowrap;
  animation: runstring 20s infinite linear;
  font-size: 18px;
  font-weight: bold;
  text-transform: uppercase;
  display: flex;
  align-items: center;
}

.run_now_cont span b {
  text-transform: uppercase;
}

.run_now_cont div {
  position: relative;
  display: flex;
  align-items: center;
  padding-right: 24px;
  padding-top: 3px;
}

.run_now_cont span {
  content: "";
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50px;
  margin-right: 24px;
  box-shadow: 0px 2px 34px 0px #3d3d3d26;
  /*background: #FFFFFF;*/
}

@keyframes runstring {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* ==========================================================================
   CARS — модельный ряд
   ========================================================================== */
.cars {
  padding: 100px 0 0;
}

.cars__title,
.instock__title {
  font: 500 40px/1.2 var(--font-base);
  text-align: center;
}

.cars__menu {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 53px;
}

.cars__tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 168px;
  padding: 16px;
  overflow: hidden;
  background: var(--c-white);
}

/* Ховер-фон плитки. menu_item_bg.svg напрямую не годится: внутри него полосы
   идут через mix-blend-mode:screen, и в экспортированном файле им не с чем
   смешиваться — вместо еле заметной текстуры выходят чёрные полосы. Цвета и
   шаг сняты с макета (основа #F9F9FA, полосы #FCFCFC, шаг 14px по горизонтали). */
.cars__tile::before {
  position: absolute;
  inset: 0;
  content: "";
  background: repeating-linear-gradient(
    118deg,
    #fcfcfc 0,
    #fcfcfc 5.3px,
    #f9f9fa 5.3px,
    #f9f9fa 12.4px
  );
  opacity: 0;
  transition: opacity var(--transition);
}

.cars__tile > * {
  position: relative;
}

.cars__tile:hover::before {
  opacity: 1;
}

.cars__tile img {
  width: 136px;
  height: 68px;
  object-fit: contain;
  opacity: 0.8;
  transition: opacity var(--transition);
}

.cars__tile:hover img {
  opacity: 1;
}

.cars__tile span {
  font-size: 16px;
  line-height: 19px;
  color: var(--c-muted);
  transition: color var(--transition);
}

.cars__tile:hover span {
  color: var(--c-dark);
}

.cars__list {
  margin-top: 75px;
}

.car {
  margin-bottom: 72px;
}

.car__wrap {
  position: relative;
  min-height: 499px;
  padding: 46px 46px 63px;
  overflow: hidden;
  background: var(--c-white);
}

.car__name {
  font: 500 40px/1.08 var(--font-base);
}

.car__name span {
  color: var(--c-accent);
}

.car__benefits {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 414px;
  margin-top: 43px;
}

.car__benefit {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 40px;
  padding-left: 52px;
  font: 500 18px/1.2 var(--font-text);
  transition: color var(--transition);
}

.car__benefit::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 40px;
  height: 40px;
  content: "";
  background-color: var(--c-accent);
  background-position: 50%;
  background-repeat: no-repeat;
  background-size: 24px 24px;
  transition:
    width var(--transition),
    height var(--transition),
    top var(--transition),
    background-color var(--transition);
}

/* Ховер: иконка 40 → 44 и растёт от центра, текст уходит в серый. */
.car__benefit:hover {
  color: var(--c-muted);
}

.car__benefit:hover::before {
  top: -2px;
  width: 44px;
  height: 44px;
  background-color: var(--c-accent-hover);
}

.car__benefit--like::before {
  background-image: url(../img/ico/like.svg);
}

.car__benefit--gift::before {
  background-image: url(../img/ico/gift.svg);
}

.car__benefit--shield::before {
  background-image: url(../img/ico/shield.svg);
}

.car__benefit--wallet::before {
  background-image: url(../img/ico/wallet.svg);
}

.car__media {
  position: absolute;
  top: 45px;
  left: 483px;
  width: 789px;
}

.car__photo {
  position: relative;
  height: 290px;
}

.car__photo::before {
  position: absolute;
  top: 50%;
  left: 0;
  width: 786px;
  height: 118px;
  content: "";
  background: url(../img/car_stripes.svg) 0 0 / 786px 118px no-repeat;
  transform: translateY(-50%);
}

/* Машина едет вправо на 21px (Default → Variant2 в макете) по прогрессу
   скролла блока, --progress ставит initScrollProgress. */
.car__img {
  position: absolute;
  top: 0;
  left: calc(50% - 21px);
  width: 584px;
  height: 290px;
  object-fit: contain;
  opacity: 0;
  transform: translateX(-50%);
  transition: opacity var(--transition);
}

.car__img.current {
  opacity: 1;
}

.car__colors {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: -6px;
  padding-left: 19px;
}

/* Свотчи — параллелограммы из макета: наклон 30deg, шаг 40px. Белые кузова
   на белом фоне без рамки не читаются, поэтому рамка есть у всех. */
.car__color {
  width: 30px;
  height: 32px;
  padding: 0;
  border: 1px solid rgba(18, 19, 20, 0.25);
  cursor: pointer;
  transform: skewX(-30.2deg);
  transition: transform var(--transition);
}

.car__color.current {
  border-color: var(--c-dark);
  transform: skewX(-30.2deg) scale(1.2);
}

.car__btns {
  display: flex;
  gap: 24px;
  margin-top: 38px;
}

.car__btns .btn {
  flex: 1 0 0;
  min-width: 0;
  height: 53px;
}

/* Бегущая строка внизу карточки (Skroll 2 в макете). Едет не сама по себе,
   а по прогрессу скролла: --progress ставит initScrollProgress. */
.car__marquee {
  --fade: 90px;
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 43px;
  overflow: hidden;
  pointer-events: none;
  mask-image: linear-gradient(
    90deg,
    transparent 0,
    #000 var(--fade),
    #000 calc(100% - var(--fade)),
    transparent 100%
  );
}

.car__marquee-line {
  display: flex;
  gap: 20px;
  align-items: center;
  width: max-content;
  height: 100%;
  font-size: 16px;
  color: rgba(98, 105, 112, 0.5);
  white-space: nowrap;
  transform: translateX(calc(var(--progress, 0) * -500px));
}

.car__gallery {
  margin-top: 24px;
  padding-bottom: 20px;
}

.car__gallery .swiper-slide {
  height: auto;
}

.car__shot {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.car__shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.car__gallery .swiper-scrollbar {
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: rgba(98, 105, 112, 0.2);
}

.car__gallery .swiper-scrollbar-drag {
  background: var(--c-accent);
}

/* ==========================================================================
   COMPLECTS — таблица комплектаций (include.table.php)
   ========================================================================== */
.instock {
  padding: 88px 0 82px;
}

/* Меню моделей живёт в модельном ряду, в комплектациях остаются только
   селекты — костяк include.table.php при этом не меняется. */
.complects__menu {
  display: none;
}

.complects__filter {
  display: flex;
  gap: 24px;
  margin-top: 48px;
}

.complects__filter .form-group {
  flex: 1 0 0;
  min-width: 0;
  margin-bottom: 0;
}

.complects__list {
  margin-top: 48px;
}

.complects__card {
  position: relative;
  display: flex;
  background: var(--c-white);
  align-items: center;
  justify-content: space-between;
  padding: 26px 46px 26px 24px;
  margin-bottom: 32px;
  overflow: hidden;
  border: 2px solid var(--c-grey);
}

/* Диагональная штриховка из макета — гаснет к левому краю карточки. */
.complects__card::before {
  position: absolute;
  inset: 0;
  content: "";
  background: repeating-linear-gradient(
    118deg,
    var(--c-grey) 0,
    var(--c-grey) 9px,
    #fafbfb 9px,
    #fafbfb 26px
  );
  mask-image: linear-gradient(90deg, transparent 12%, #000 58%);
}

.complects__image,
.complects__body {
  position: relative;
}

.complects__image {
  flex: none;
  width: 400px;
}

.complects__image img {
  width: 400px;
  height: 200px;
  object-fit: contain;
  /* transform: scaleX(-1); */
}

.complects__body {
  display: flex;
  flex: none;
  flex-direction: column;
  gap: 24px;
  width: 812px;
}

.complects__name {
  padding-bottom: 5px;
  font: 500 30px/1.1 var(--font-base);
}

.complects__name span {
  color: var(--c-accent);
}

.complects__specs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  white-space: nowrap;
}

.complects__specs li {
  position: relative;
  padding-left: 52px;
}

.complects__specs li::before {
  position: absolute;
  top: 50%;
  left: 0;
  width: 40px;
  height: 40px;
  content: "";
  background: 50% / contain no-repeat;
  transform: translateY(-50%);
}

.complects__specs li[data-spec="dvigatel"]::before {
  background-image: url(../img/ico/engine.svg);
}

.complects__specs li[data-spec="korobka_peredach"]::before {
  background-image: url(../img/ico/transmission.svg);
}

.complects__specs li[data-spec="privod"]::before {
  background-image: url(../img/ico/drive.svg);
}

.complects__specs b {
  display: block;
  font-size: 20px;
  font-weight: 500;
  line-height: 1;
}

.complects__specs span {
  display: block;
  margin-top: 4px;
  font-size: 16px;
  line-height: 1;
}

.complects__btns {
  display: flex;
  gap: 24px;
}

.complects__btns .btn {
  flex: 1 0 0;
  min-width: 0;
}

.complects__more {
  position: relative;
  display: block;
  margin: 0 auto;
  padding: 2px 0;
  overflow: hidden;
  font: 500 18px/1.2 var(--font-text);
  color: #000;
  background: none;
  border: 0;
  cursor: pointer;
}

/* Авторский display у .complects__more перебивает display:none из UA-стилей
   для [hidden], поэтому кнопку «Показать ещё» прячем явно. */
.complects__more[hidden] {
  display: none;
}

/* ==========================================================================
   TRADEIN / CREDIT / TEST-DRIVE — блоки с фото и формой
   ========================================================================== */
.tradein,
.credit,
.test-drive {
  position: relative;
  overflow: hidden;
  background: var(--c-white);
}

.tradein {
  height: 650px;
}

.credit {
  height: 572px;
}

.test-drive {
  height: 546px;
}

.tradein__img,
.credit__img,
.test-drive__img {
  position: absolute;
  inset: 0;
}

.tradein__img img,
.credit__img img,
.test-drive__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.test-drive__img::after {
  position: absolute;
  inset: 0;
  content: "";
  background: rgba(0, 0, 0, 0.1);
}

.tradein .container,
.credit .container,
.test-drive .container {
  position: relative;
  z-index: 1;
  display: flex;
  height: 100%;
  align-items: center;
}

/* Белая подложка со скосом 25.6deg — Rectangle 1 из макета. */
.tradein__wrap,
.credit__wrap {
  position: relative;
  width: 448px;
}

.tradein__wrap::before,
.credit__wrap::before {
  position: absolute;
  top: 50%;
  width: 1475px;
  height: 687px;
  content: "";
  background: var(--c-white);
  transform: translateY(-50%);
}

.tradein__wrap::before {
  left: -634px;
  clip-path: polygon(22.27% 0, 100% 0, 77.73% 100%, 0 100%);
}

.credit__wrap::before {
  left: -377px;
  clip-path: polygon(0 0, 77.73% 0, 100% 100%, 22.27% 100%);
}

.credit__wrap {
  margin-left: auto;
}

.tradein__wrap > *,
.credit__wrap > * {
  position: relative;
}

.test-drive__wrap {
  width: 538px;
  padding: 46px;
  background: var(--c-white);
}

.tradein__title,
.credit__title,
.test-drive__title {
  font-size: 30px;
  line-height: 1.2;
}

.tradein__comment,
.credit__comment,
.test-drive__comment {
  margin: 24px 0;
  font: 500 18px/1.3 var(--font-text);
}

.tradein form .btn,
.credit form .btn,
.test-drive form .btn,
.contacts .btn {
  width: 100%;
}

/* ==========================================================================
   CONTACTS — контакты + карта
   ========================================================================== */
.contacts {
  position: relative;
  height: 557px;
  overflow: hidden;
}

#map1 {
  position: absolute;
  inset: 0;
  height: 585px;
}

.contacts .container {
  position: relative;
  z-index: 1;
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: flex-end;
  pointer-events: none;
}

.contacts__wrap {
  display: flex;
  flex-direction: column;
  gap: 32px;
  width: 528px;
  padding: 46px;
  background: var(--c-white);
  pointer-events: auto;
}

.contacts__info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contacts__addr,
.contacts__phone,
.contacts__worktime {
  position: relative;
  padding-left: 32px;
  font-size: 16px;
  line-height: 1.5;
  color: #000;
}

.contacts__addr::before,
.contacts__phone::before,
.contacts__worktime::before {
  position: absolute;
  top: 50%;
  left: 0;
  width: 24px;
  height: 24px;
  content: "";
  background: 50% / contain no-repeat;
  transform: translateY(-50%);
}

.contacts__addr::before {
  background-image: url(../img/ico/location.svg);
}

.contacts__phone::before {
  background-image: url(../img/ico/phone.svg);
}

.contacts__worktime::before {
  background-image: url(../img/ico/clock.svg);
}

.contacts__cta {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contacts__question {
  font-size: 22px;
  line-height: 1.2;
}

/* ==========================================================================
   FOOTER — подвал
   ========================================================================== */
footer {
  padding: 30px 0;
  color: var(--c-white);
  background: var(--c-footer);
}

.footer__wrap {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  font: 700 14px/1.4 var(--font-text);
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer__sinoby {
  display: flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
}

.disclamer {
  display: none;
  padding-top: 24px;
  font: 500 12px/1.4 var(--font-text);
  color: rgba(255, 255, 255, 0.6);
}

/* ==========================================================================
   MEDIA — медиазапросы
   ========================================================================== */

@media (max-width: 1379px) {
  .timer__card {
    flex-direction: column;
  }

  .timer__clock,
  .timer__form {
    width: 100%;
  }

  .car__media {
    left: 460px;
    width: auto;
    right: 46px;
  }

  .car__photo::before {
    right: 0;
    width: auto;
  }

  .complects__body {
    flex: 1 0 0;
    width: auto;
  }

  .complects__image {
    width: 340px;
  }

  .complects__image img {
    width: 340px;
    height: 170px;
  }
}

@media (max-width: 1200px) {
  .banner__title--1 {
    font-size: 32px;
  }
  .car__wrap {
    min-height: 0;
    padding: 30px 30px 63px;
  }

  .car__name {
    font-size: 32px;
  }

  .car__media {
    position: static;
    width: 100%;
    margin-top: 24px;
  }

  .car__photo {
    height: 0;
    padding-bottom: 36.8%;
  }

  .car__photo::before {
    left: 0;
    width: 100%;
    height: 40%;
    background-size: 100% 100%;
  }

  .car__img {
    width: 74%;
    height: 100%;
    left: 50%;
  }

  .car__benefits {
    width: 100%;
  }

  .complects__card {
    flex-direction: column;
    align-items: stretch;
    padding: 24px;
  }

  .complects__image,
  .complects__image img {
    width: 100%;
    height: auto;
  }

  .complects__body {
    width: 100%;
  }
}

@media (max-width: 991px) {
  header {
    padding: 0;
  }

  .header__addr,
  .header__phone {
    display: none;
  }

  .header__top .btn {
    margin-right: 50px;
  }

  .menu {
    margin-top: 0;
    border: 0;
  }

  /* Бургер. */
  /* Номер в строку не влезает — рядом с бургером иконка-звонок. */
  .header__call {
    position: absolute;
    top: 17px;
    right: 60px;
    z-index: 1;
    display: block;
    width: 26px;
    height: 26px;
    background: url(../img/ico/phone.svg) 50% / contain no-repeat;
  }

  .m_btn {
    position: absolute;
    top: 19px;
    right: 15px;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
  }

  .m_btn span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--c-dark);
    transition: var(--transition);
  }

  .m_btn.active span:nth-child(1) {
    transform: translateY(9px) rotate(-45deg);
  }

  .m_btn.active span:nth-child(2) {
    opacity: 0;
  }

  .m_btn.active span:nth-child(3) {
    transform: translateY(-9px) rotate(45deg);
  }

  /* Выезжающее меню (позицию сверху JS уточняет по высоте хедера). */
  .menu {
    position: fixed;
    top: 59px;
    right: -100%;
    z-index: 2;
    display: flex;
    flex-direction: column;
    row-gap: 10px;
    width: 100%;
    padding: 20px 0;
    background: var(--c-white);
    transition: right var(--transition);
  }

  .menu.active {
    right: 0;
  }

  .menu > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    row-gap: 10px;
  }

  .banner {
    margin-top: 59px;
  }

  .car__btns,
  .complects__btns,
  .complects__filter {
    flex-direction: column;
    gap: 12px;
  }

  /* В колонке flex: 1 0 0 из десктопа сжимает кнопки до content-высоты,
     а фиксированные 53px обрезали бы подпись, если она всё же перенесётся. */
  .car__btns .btn,
  .complects__btns .btn,
  .complects__filter .form-group {
    flex: none;
  }

  .car__btns .btn {
    height: auto;
    min-height: 47px;
  }

  .tradein,
  .credit,
  .test-drive,
  .contacts {
    height: auto;
  }

  /* Сначала блок с контактами, карта под ним. */
  .contacts {
    display: flex;
    flex-direction: column;
  }

  .contacts .container {
    order: 1;
  }

  #map1 {
    order: 2;
  }

  /* Моб-картинка блока встаёт в поток во всю ширину, форма — под ней. */
  .tradein__img,
  .credit__img,
  .test-drive__img {
    position: static;
  }

  .tradein__img img,
  .credit__img img,
  .test-drive__img img {
    height: auto;
  }

  .test-drive__img {
    position: relative;
  }

  .tradein .container,
  .credit .container,
  .test-drive .container,
  .contacts .container {
    display: block;
    padding: 20px 15px;
  }

  .tradein__wrap,
  .credit__wrap,
  .test-drive__wrap,
  .contacts__wrap {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    padding: 20px 15px;
    background: var(--c-white);
  }

  /* Фон блоков — общий серый страницы, иначе белая карточка с формой на
     белой секции не читается. */
  .tradein,
  .credit,
  .test-drive {
    background: var(--c-grey);
  }

  .tradein__wrap::before,
  .credit__wrap::before {
    display: none;
  }

  #map1 {
    position: static;
    height: 320px;
  }

  .contacts .container {
    pointer-events: auto;
  }

  .footer__wrap {
    flex-wrap: wrap;
    row-gap: 20px;
  }
}

@media (max-width: 767px) {
  .container {
    padding: 0 15px;
  }

  /* Длинные подписи в узкую кнопку не влезают на 16px («Подобрать
     комплектацию» = 292px при доступных 283), поэтому кегль 14px; nowrap
     с десктопа всё равно отменяем — как страховка. */
  .btn {
    height: auto;
    min-height: 47px;
    padding: 12px 16px;
    font-size: 14px;
    line-height: 1.2;
    white-space: normal;
  }

  .logo-group img {
    width: 170px;
    height: auto;
  }

  .header__top .btn {
    display: none;
  }

  .banner {
    height: auto;
  }

  .banner__media img {
    position: static;
    width: 100%;
    height: auto;
  }

  /* Текст лежит на картинке, как на десктопе. Мобильного фрейма в макете
     нет: подложку делаем плоской и без блюра — на фото машин градиент с
     backdrop-filter только мылит и тормозит. */
  .banner__band {
    top: 56px;
    height: 128px;
    background: rgba(255, 255, 255, 0.88);
    mask-image: none;
    backdrop-filter: none;
  }

  .banner .container {
    position: absolute;
    inset: 56px 0 auto;
  }

  .banner__titles {
    padding-top: 14px;
  }

  .banner__title--1 {
    font-size: 16px;
  }

  .banner__title--2 {
    margin-top: 8px;
    font-size: 16px;
  }

  .banner__btn {
    width: 100%;
    max-width: 260px;
    margin-top: 16px;
  }

  .timer {
    margin-top: 0;
  }

  .timer__card {
    padding: 20px 15px;
  }

  .timer__row {
    flex-direction: column;
  }

  .timer__title {
    font-size: 18px;
  }

  .sinoby-timer {
    min-height: auto !important;
  }

  .run_now_cont {
    font-size: 16px;
  }

  .cars {
    padding-top: 50px;
  }

  .cars__title,
  .instock__title {
    font-size: 26px;
  }

  .cars__menu {
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
  }

  .cars__tile {
    width: calc(50% - 6px);
    padding: 10px;
  }

  .cars__list {
    margin-top: 40px;
  }

  .car {
    margin-bottom: 40px;
  }

  /* Порядок: название → фото с цветами → выгоды → кнопки → строка.
     Бегущая строка абсолютная, поэтому из потока не участвует. */
  .car__wrap {
    display: flex;
    flex-direction: column;
    padding: 20px 15px 43px;
  }

  .car__name {
    order: 1;
    font-size: 24px;
  }

  .car__media {
    order: 2;
    margin-top: 16px;
  }

  .car__benefits {
    order: 3;
    gap: 12px;
    margin-top: 24px;
  }

  .car__btns {
    order: 4;
    margin-top: 20px;
  }

  /* Фото — во всю ширину блока, свотчи мельче. */
  .car__photo {
    padding-bottom: 49%;
  }

  /* Полосы 786x118 растянуты по ширине блока — высоту держим по пропорции. */
  .car__photo::before {
    height: 31%;
  }

  .car__img {
    width: 100%;
  }

  .car__colors {
    gap: 7px;
    margin-top: 10px;
    padding-left: 13px;
  }

  .car__color {
    width: 21px;
    height: 22px;
  }

  .car__benefit {
    min-height: 32px;
    padding-left: 44px;
    font-size: 15px;
  }

  .car__benefit::before {
    width: 32px;
    height: 32px;
    background-size: 20px 20px;
  }

  .car__marquee {
    --fade: 40px;
    height: 33px;
  }

  .car__marquee-line {
    font-size: 13px;
  }

  .instock {
    padding: 50px 0;
  }

  .complects__list {
    margin-top: 24px;
  }

  .complects__filter {
    margin-top: 24px;
  }

  .complects__card {
    padding: 15px;
    margin-bottom: 16px;
  }

  .complects__body {
    gap: 16px;
  }

  .complects__name {
    font-size: 22px;
  }

  .complects__specs {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .complects__specs b {
    font-size: 17px;
  }

  .complects__specs span {
    font-size: 14px;
  }

  .tradein__title,
  .credit__title,
  .test-drive__title {
    font-size: 24px;
  }

  .tradein__comment,
  .credit__comment,
  .test-drive__comment {
    margin: 16px 0;
    font-size: 16px;
  }

  .contacts__wrap {
    gap: 20px;
  }

  .contacts__question {
    font-size: 18px;
  }

  .footer__wrap {
    flex-direction: column;
    row-gap: 16px;
  }

  /* Попап на всю ширину. */
  .popup_container {
    width: 100%;
    padding: 30px 20px;
  }

  .form_title {
    font-size: 22px;
  }

  /* fancybox на мобиле — на весь экран. */
  .fancybox-wrap,
  .fancybox-inner,
  .fancybox-type-image {
    width: 100% !important;
    left: 0 !important;
    margin: 0 !important;
  }
}

.alert {
  font-size: 20px;
}
