/* ==========================================================================
   TOKENS
   Палитра и типографика макета HAVAL КМ/Ч.
   В правилах используем var(--…), а не хардкод.
   ========================================================================== */
:root {
  --c-dark: #202020;
  --c-dark-72: rgba(32, 32, 32, 0.72);
  --c-accent: #00cabf;
  --c-accent-dark: #006f69;
  --c-white: #fefefe;
  --c-muted: #292929;
  --c-grey: #f5f5f5;
  --c-grey-2: #f2f3f4;
  --c-light: #fafafa;
  --c-border: rgba(204, 204, 204, 0.8);
  --font-base: "Haval", sans-serif;
  --font-text: "TT Wellingtons", sans-serif;
  --container-w: 1260px;
  --control-h: 42px;
  --radius: 0;
  --transition: 0.3s ease;
}

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

html {
  overflow-x: hidden;
}

/* Базовый текст — TT Wellingtons Medium; заголовки и кнопки ниже
   переключаются на Haval поимённо (как в макете). */
body {
  max-width: 1920px;
  margin: 0 auto;
  font: 500 16px/1.3 var(--font-text);
  color: var(--c-dark);
  background: var(--c-white);
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: 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--muted / .btn--white / .btn--glass /
   .btn--glass-light
   ========================================================================== */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  height: var(--control-h);
  padding: 0 16px;
  font: 500 11px/1 var(--font-base);
  letter-spacing: 0.2px;
  color: var(--c-white);
  text-align: center;
  text-transform: uppercase;
  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::after {
  content: "";
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  background: url(../img/btn_arrow_white.svg) 50% / contain no-repeat;
}

/* Ховер одинаковый у всех модификаторов: заливка светло-серым + тёмный текст. */
.btn:hover {
  color: var(--c-dark);
  background: var(--c-border);
  border-color: var(--c-border);
}

.btn:hover::after {
  background-image: url(../img/btn_arrow_black.svg);
}

.btn--muted {
  background: var(--c-dark-72);
}

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

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

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

.btn--white::after,
.btn--glass::after {
  background-image: url(../img/btn_arrow_black.svg);
}

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

.form-group+.form-group {
  margin-bottom: 8px;
}

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

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

.form-group select {
  padding-right: 40px;
  appearance: none;
  background: url(../img/ico_select.svg) right 12px center no-repeat var(--c-white);
}

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

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

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

.agree-field input {
  position: absolute;
  top: 1px;
  left: 0;
  width: 16px;
  height: 16px;
  appearance: none;
  background: transparent;
  border: 1px solid currentColor;
  cursor: pointer;
}

.agree-field input:checked::before {
  content: "";
  position: absolute;
  top: 1px;
  left: 4px;
  width: 5px;
  height: 9px;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Подсветка невалидного поля + блок кнопки без согласия (классы вешает 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: 440px;
  max-width: 100%;
  padding: 50px 40px 40px;
  background: var(--c-grey);
}

.form_title {
  margin-bottom: 20px;
  font: 500 26px/1.2 var(--font-base);
  line-height: 1.2;
  letter-spacing: -0.4px;
  text-align: center;
  text-transform: uppercase;
}

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

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

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

/* ==========================================================================
   SWIPER — скроллбар слайдеров (виден только на мобиле)
   ========================================================================== */
.swiper-scrollbar {
  background: var(--c-border);
}

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

/* ==========================================================================
   HEADER — фикс-шапка
   ========================================================================== */
header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 15;
  height: 80px;
  background: var(--c-light);
}

header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-group img {
  display: block;
}

.header__addr,
.header__phone {
  font-size: 18px;
  line-height: 1.3;
}

header .btn {
  width: 239px;
}

.m_btn,
.header__call {
  display: none;
}

/* ==========================================================================
   NAV — навигация
   ========================================================================== */
.menu {
  position: fixed;
  top: 80px;
  right: 0;
  left: 0;
  z-index: 14;
  height: 52px;
  background: var(--c-grey);
}

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

.menu a {
  font-size: 18px;
  line-height: 1.3;
}

.menu a:hover {
  text-decoration: underline;
}

main {
  padding-top: 132px;
}

/* ==========================================================================
   BANNER — hero-баннер
   ========================================================================== */
.banner {
  position: relative;
  height: 680px;
}

.banner__slider {
  height: 100%;
  --swiper-pagination-color: var(--c-accent);
  --swiper-pagination-bullet-inactive-color: #fff;
  --swiper-pagination-bullet-inactive-opacity: 0.5;
  --swiper-pagination-bullet-width: 50px;
  --swiper-pagination-bullet-height: 4px;
  --swiper-pagination-bullet-border-radius: 0;
  --swiper-pagination-bullet-horizontal-gap: 5px;
  --swiper-pagination-bottom: 40px;
}

.banner__pagination .swiper-pagination-bullet {
  transition: background 0.2s linear, opacity 0.2s linear;
}

.banner__media {
  position: absolute;
  inset: 0;
}

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

.banner__overlay {
  position: absolute;
  top: 59px;
  left: 50%;
  width: 1433px;
  max-width: 100%;
  transform: translateX(-50%);
}

.banner__titles {
  padding: 30px 0 37px;
  text-align: center;
  background: linear-gradient(90deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.828) 29.528%,
      rgba(255, 255, 255, 0.828) 66.801%,
      rgba(255, 255, 255, 0) 100%);
}

.banner__title {
  font: 400 48px/1.2 var(--font-base);
  letter-spacing: -0.4px;
  text-transform: uppercase;
}

.banner__title--2 {
  margin-top: 4px;
  font-weight: 500;
}

.banner__cta {
  width: 357px;
  margin: -20px auto 0;
  padding: 0 47px;
}

/* Слайд «Модель недели» — своя типографика и подложка по макету. */
.banner__slide--offer .banner__overlay {
  top: 30px;
}

.banner__slide--offer .banner__titles {
  padding: 25px 0 38px;
}

.banner__slide--offer .banner__title {
  font-size: 32px;
}

.banner__slide--offer .banner__title--2 {
  margin-top: 15px;
  line-height: 48px;
}

.banner__slide--offer .banner__title--3 {
  font-weight: 500;
  font-size: 46px;
  line-height: 62px;
}

.banner__slide--offer .banner__cta {
  width: max-content;
}

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

.timer__wrap {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 64px;
  background: var(--c-grey);
}

.timer__clock {
  width: 400px;
}

.zi-root.preset-text-classic .zi-inner {
  width: auto !important;
}

.timer__offer {
  width: 616px;
}

.timer__subtitle {
  margin-bottom: 12px;
  font: 500 18px/1.2 var(--font-base);
  text-transform: uppercase;
}

.timer__offer form {
  display: flex;
  flex-wrap: wrap;
  column-gap: 10px;
  row-gap: 12px;
}

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

.timer__offer .agree-field {
  width: 100%;
}

/* ==========================================================================
   MODEL — модельный ряд
   ========================================================================== */
.model {
  padding-top: 92px;
}

.model__title,
.instock__title,
.tradein__title,
.credit__title,
.test-drive__title,
.contacts__title {
  font: 500 36px/1.2 var(--font-base);
  letter-spacing: -0.4px;
  text-transform: uppercase;
}

.model__title,
.instock__title,
.tradein__title,
.test-drive__title,
.contacts__title {
  text-align: center;
}

.model__title {
  margin-bottom: 40px;
}

/* Ряд плиток; на мобиле Swiper делает из него слайдер (см. MEDIA). */
.model__row .swiper-wrapper {
  justify-content: center;
  gap: 15px;
}

.model__row .swiper-scrollbar {
  display: none;
}

.model__card {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding-bottom: 11px;
  transition: background var(--transition);
}

/* Специфичность выше .swiper-slide: его width:100% подключается позже. */
.model__row .model__card {
  width: 160px;
}

.model__card:hover {
  background: var(--c-grey);
}

.model__card img {
  display: block;
}

.model__card span {
  font: 500 12px/1.1 var(--font-base);
  text-transform: uppercase;
}

/* ==========================================================================
   CARS — карточка модели: выгоды, кнопки, выбор цвета, галерея
   ========================================================================== */
.car {
  padding-top: 40px;
}

.car__wrap {
  position: relative;
  min-height: 400px;
  padding: 40px;
  background: var(--c-grey-2) url(../img/car_item_bg.svg) 0 0 / cover no-repeat;
}

.car__title {
  margin-bottom: 16px;
  font: 500 32px/1.2 var(--font-base);
  text-transform: uppercase;
}

.car__ribbon {
  display: flex;
  align-items: center;
  width: 434px;
  height: 41px;
  margin-bottom: 25px;
  padding: 0 26px 0 60px;
  font: 400 20px/1.2 var(--font-base);
  color: #fff;
  white-space: nowrap;
  background: var(--c-accent) url(../img/car_profit_ico.svg) 15px 50% / 24px 24px no-repeat;
  clip-path: polygon(0 0, 100% 0, calc(100% - 20px) 100%, 0 100%);
  transition: background-color var(--transition);
}

.car__ribbon:hover {
  background-color: var(--c-accent-dark);
}

.car__benefits {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 424px;
  margin-bottom: 25px;
  list-style: none;
}

/* Иконку рисуем псевдоэлементом: на ховере она растёт до 32px и выходит за
   26px строки, а фон самого бокса её бы обрезал. */
.car__benefits li {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 26px;
  padding-left: 34px;
  font-size: 18px;
  line-height: 1.2;
  white-space: nowrap;
  transition: padding var(--transition);
}

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

.car__benefits li:nth-child(1)::before {
  background-image: url(../img/car_ico1.svg);
}

.car__benefits li:nth-child(2)::before {
  background-image: url(../img/car_ico2.svg);
}

.car__benefits li:nth-child(3)::before {
  background-image: url(../img/car_ico3.svg);
}

.car__benefits li:nth-child(4)::before {
  background-image: url(../img/car_ico4.svg);
}

.car__benefits li:hover {
  padding-left: 42px;
}

.car__benefits li:hover::before {
  width: 32px;
  height: 32px;
}

.car__btns {
  display: flex;
  gap: 25px;
}

.car__btns .btn {
  width: 357px;
  padding: 0 47px;
}

.car__pic {
  position: absolute;
  top: 1px;
  left: 455px;
  width: 650px;
  height: 286px;
}

.car__pic img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.car__colors {
  position: absolute;
  top: 144px;
  left: 1128px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transform: translateY(-50%);
}

.car__color {
  width: 32px;
  height: 32px;
  border: 1px solid transparent;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: border-color var(--transition);
}

.car__color:hover {
  border-color: var(--c-dark-72);
}

.car__color.current {
  border-color: var(--c-dark);
  box-shadow:
    inset 3px 3px 0 0 #fff,
    inset -3px -3px 0 0 #fff,
    0 4px 16px rgba(0, 0, 0, 0.08);
}

.car__gallery {
  position: relative;
  margin-top: 25px;
}

.car__gallery .swiper {
  overflow: hidden;
}

.car__gallery .swiper-scrollbar {
  display: none;
}

.car__gallery .swiper-slide a {
  display: block;
  cursor: pointer;
}

.car__gallery .swiper-slide img {
  display: block;
  width: 100%;
  height: auto;
}

.car__arrow {
  position: absolute;
  top: 50%;
  width: 24px;
  height: 24px;
  background: url(../img/car_gallery_arrow.svg) 50% / contain no-repeat;
  border: 0;
  cursor: pointer;
  transition: opacity var(--transition);
  transform: translateY(-50%);
}

.car__arrow:hover {
  opacity: 0.6;
}

.car__arrow--prev {
  left: -30px;
}

.car__arrow--next {
  right: -30px;
  transform: translateY(-50%) rotate(180deg);
}

/* Убираем замыливание 3D-слоев внутри Swiper */
.car_gallery_slider .swiper-slide {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
}

/* Принудительное качественное сглаживание для фото */
.car_gallery_slider .swiper-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: high-quality;
}

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

.instock__title {
  margin-bottom: 40px;
}

/* Меню моделей макетом не предусмотрено — работает только фильтр-селектами. */
.complects__menu {
  display: none;
}

.complects__filter {
  display: flex;
  gap: 16px;
  margin-bottom: 32px;
}

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

.complects__filter select {
  padding-left: 12px;
  border-color: var(--c-dark);
}

.complects__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.complects__card {
  background: var(--c-grey);
}

.complects__image {
  height: 168px;
  overflow: hidden;
}

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

.complects__body {
  padding: 20px;
}

.complects__name {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font: 500 12px/1.1 var(--font-base);
  color: var(--c-dark-72);
  text-transform: uppercase;
}

.complects__name span {
  font-size: 18px;
  line-height: 1.2;
  color: var(--c-dark);
}

.complects__specs {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-top: 20px;
  font-size: 16px;
  line-height: 1.3;
  color: var(--c-dark-72);
  white-space: nowrap;
  list-style: none;
}

.complects__specs b {
  display: block;
  margin-top: 4px;
  font-weight: 400;
  font-size: 18px;
  line-height: 1.3;
  color: var(--c-dark);
}

.complects__btns {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 20px;
}

.complects__more {
  gap: 12px;
  width: auto;
  height: auto;
  margin: 16px auto 0;
  padding: 10px;
  font: 500 16px/1.3 var(--font-text);
  letter-spacing: 0;
  color: var(--c-dark);
  text-transform: none;
  background: transparent;
  border: 0;
}

.complects__more::after {
  background-image: url(../img/ico_select.svg);
}

/* display у .btn перебивает атрибут hidden, поэтому гасим явно. */
.complects__more[hidden] {
  display: none;
}

.complects__more:hover {
  background: var(--c-border);
}

/* ==========================================================================
   TRADEIN — обмен авто
   ========================================================================== */
.tradein {
  height: 360px;
  margin-top: 92px;
  background: url("../phpThumb/phpThumb.php?src=..%2Fimg%2Ftradein_bg.jpg&f=webp&q=90&hash=cb12ae47fa0cc925aa4bd247e65af9eccee55e76cea81f89bcc20dacaedf30af") 50% 0 / cover no-repeat;
}

.tradein__title {
  margin-bottom: 32px;
}

.tradein__comment,
.test-drive__comment {
  margin-bottom: 20px;
  font: 500 18px/1.2 var(--font-base);
  text-align: center;
  text-transform: uppercase;
}

.tradein form,
.test-drive form {
  width: 360px;
  margin: 0 auto;
}

/* ==========================================================================
   CREDIT — кредит
   ========================================================================== */
.credit {
  height: 481px;
  margin-top: 8px;
  background: url("../phpThumb/phpThumb.php?src=..%2Fimg%2Fcredit_bg.jpg&f=webp&q=90&hash=e08b0d6e5629c8b294f94d2157bcd81f51f71609b12584cbad088392a2fc8343") 50% 0 / cover no-repeat;
}

.credit .container {
  display: flex;
  height: 100%;
}

.credit__wrap {
  width: 440px;
  padding: 92px 40px 0;
  color: var(--c-white);
  background: rgba(32, 32, 32, 0.4);
  backdrop-filter: blur(26px);
}

.credit__title {
  margin-bottom: 32px;
}

.credit__comment {
  margin-bottom: 20px;
  font: 500 18px/1.2 var(--font-base);
  text-transform: uppercase;
}

.credit form {
  width: 360px;
}

.credit .form-group input {
  color: var(--c-white);
  background: transparent;
}

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

/* ==========================================================================
   TEST-DRIVE — тестовая поездка
   ========================================================================== */
.test-drive {
  height: 360px;
  margin-top: 8px;
  background: url("../phpThumb/phpThumb.php?src=..%2Fimg%2Ftest_drive_bg.jpg&f=webp&q=90&hash=db4182cb81af16f265bd902f2fcd148e30550b71e11bb25ffc44c0d6e64fef94") 50% 0 / cover no-repeat;
}

.test-drive .container {
  padding-top: 78px;
}

.test-drive__title {
  margin-bottom: 32px;
}

/* ==========================================================================
   CONTACTS — контакты + карта
   ========================================================================== */
.contacts {
  padding-top: 92px;
}

.contacts__title {
  margin-bottom: 32px;
}

.contacts__info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
}

.contacts .btn {
  width: 239px;
}

.contacts__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 6px;
  font-size: 18px;
  line-height: 1.3;
  color: var(--c-muted);
  border-top: 1px solid var(--c-border);
}

#map1 {
  height: 336px;
  margin-top: 6px;
}

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

.footer__wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 114px;
  padding: 25px 0;
}

.footer__legal,
.footer__addr {
  font-size: 16px;
  line-height: 1.3;
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 14px;
  line-height: 1.3;
  color: #f3f3f3;
  text-transform: uppercase;
}

.footer__links a:hover,
.header__phone:hover,
.contacts__phone:hover,
.agree-field a:hover {
  text-decoration: underline;
}

.footer__sinoby img {
  display: block;
}

.disclamer {
  display: none;
  padding: 0 0 25px;
  font-size: 12px;
  line-height: 1.4;
}

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

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

  /* Бургер. */
  .m_btn {
    position: absolute;
    top: 20px;
    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: 62px;
    height: auto;
    right: -100%;
    left: auto;
    z-index: 2;
    display: flex;
    flex-direction: column;
    row-gap: 10px;
    width: 100%;
    padding: 20px 0;
    background: var(--c-grey);
    transition: right var(--transition);
  }

  .menu.active {
    right: 0;
  }

  .menu .container {
    flex-direction: column;
    align-items: center;
    row-gap: 10px;
    padding-top: 0;
    padding-bottom: 0;
  }

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

  .form_title {
    font-size: 24px;
  }

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

  /* Шапка: логотип + бургер, остальное уходит в меню. */
  header {
    height: 62px;
  }

  .header__addr,
  .header__phone,
  header .btn {
    display: none;
  }

  /* Номер в шапку не влезает — рядом с бургером кнопка-звонок. */
  .header__call {
    position: absolute;
    top: 17px;
    right: 61px;
    z-index: 1;
    display: block;
  }

  .header__call img {
    display: block;
  }

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

  main {
    padding-top: 62px;
  }

  /* Баннер. */
  .banner {
    height: auto;
  }

  /* Выше кадра точки попадают на тёмные кузова — уводим к самому низу. */
  .banner__slider {
    --swiper-pagination-bottom: 12px;
  }

  .banner__media {
    position: relative;
  }

  .banner__media img {
    height: auto;
    aspect-ratio: 1 / 1;
  }

  /* Текст и кнопка — блоком в свободной части баннера, машины не перекрываем. */
  .banner__overlay {
    top: 15px;
    right: 15px;
    left: 15px;
    width: auto;
    transform: none;
  }

  /* На узком экране градиент по краям не читался — плоская подложка. */
  .banner__titles {
    padding: 15px 10px;
    background: rgba(255, 255, 255, 0.828);
  }

  .banner__title {
    font-size: 6vw;
  }

  .banner__cta {
    width: 100%;
    margin: 12px 0 0;
    padding: 0 16px;
  }

  .banner__slide--offer .banner__overlay {
    top: 15px;
  }

  .banner__slide--offer .banner__titles {
    padding: 15px 10px;
  }

  .banner__slide--offer .banner__title {
    font-size: 4.2vw;
    line-height: 1.2;
  }

  .banner__slide--offer .banner__title--2 {
    margin-top: 6px;
  }

  .banner__slide--offer .banner__title--3 {
    font-size: 6vw;
    line-height: 1.2;
  }

  /* Надпись длиннее, чем на первом слайде, — в одну строку не влезает. */
  .banner__slide--offer .banner__cta {
    width: 100%;
    height: auto;
    gap: 12px;
    padding: 11px 16px;
    line-height: 1.3;
    white-space: normal;
  }

  /* Таймер. */
  .timer {
    margin-top: 0;
  }

  .timer__wrap {
    flex-direction: column;
    padding: 20px 15px;
  }

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

  .timer__clock {
    margin-bottom: 20px;
  }

  .timer__offer .form-group {
    flex: 1 0 100%;
  }

  /* Модельный ряд. */
  .model {
    padding-top: 40px;
  }

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

  .model__title {
    margin-bottom: 20px;
  }

  /* Модельный ряд — слайдер по 2 плитки со скроллбаром (ширины ставит Swiper). */
  .model__row {
    padding-bottom: 20px;
  }

  .model__row .swiper-wrapper {
    justify-content: flex-start;
    gap: 0;
  }

  .model__row .swiper-scrollbar {
    display: block;
  }

  .model__row .model__card {
    width: auto;
  }

  /* Карточка модели. */
  .car {
    padding-top: 60px;
  }

  .car__wrap {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 0;
    padding: 20px 15px;
  }

  .car__title,
  .car__ribbon,
  .car__benefits,
  .car__btns,
  .car__pic,
  .car__colors {
    position: static;
    width: auto;
    margin-bottom: 0;
    transform: none;
  }

  .car__title {
    order: 1;
    font-size: 22px;
  }

  .car__pic {
    order: 2;
    height: auto;
  }

  .car__pic img {
    height: auto;
  }

  .car__colors {
    order: 3;
    flex-direction: row;
    justify-content: center;
  }

  .car__ribbon {
    order: 4;
    height: auto;
    min-height: 41px;
    max-width: 100%;
    padding: 8px 10px 8px 48px;
    font-size: 3.5vw;
    white-space: normal;
    background-position: 12px 50%;
  }

  .car__benefits {
    order: 5;
  }

  .car__benefits li {
    white-space: normal;
    font-size: 4vw;
  }

  .car__btns {
    order: 6;
    flex-direction: column;
    gap: 8px;
  }

  .car__btns .btn {
    width: 100%;
    padding: 0 16px;
  }

  /* Галерея: вместо стрелок — скроллбар. */
  .car__arrow {
    display: none;
  }

  .car__gallery .swiper {
    padding-bottom: 20px;
  }

  .car__gallery .swiper-scrollbar {
    display: block;
  }

  /* Комплектации. */
  .instock {
    padding-top: 40px;
  }

  .instock__title {
    margin-bottom: 20px;
  }

  .complects__filter {
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
  }

  .complects__list {
    grid-template-columns: minmax(0, 1fr);
  }

  .complects__btns .btn {
    gap: 12px;
    padding: 0 12px;
  }

  /* Обмен / кредит / тестовая поездка: мобильная картинка целиком во всю
     ширину вьюпорта, форма с текстом — под ней. */
  .tradein,
  .credit,
  .test-drive {
    height: auto;
    /* margin-top: 40px; */
    padding: 0 0 30px;
    background-image: none;
  }

  .credit {
    padding-bottom: 0;
  }

  .test-drive {
    margin-top: 0;
  }

  .tradein::before,
  .credit::before,
  .test-drive::before {
    content: "";
    display: block;
    width: 100%;
    margin-bottom: 25px;
    aspect-ratio: 800 / 362;
    background: 50% / cover no-repeat;
  }

  .tradein::before {
    background-image: url("../phpThumb/phpThumb.php?src=..%2Fimg%2Ftradein_bg_mob.jpg&f=webp&q=90&hash=18b37a76ae9d731bb059e11fb8c2ac1b4ed169844b5a67ab3146fca75db1f774");
  }

  .credit::before {
    background-image: url("../phpThumb/phpThumb.php?src=..%2Fimg%2Fcredit_bg_mob.jpg&f=webp&q=90&hash=1808da9087a68065829b406f6cc27bea492504c3aa92db4a8e6ee1b8e88b22fd");
    margin-bottom: 0;
  }

  .test-drive::before {
    background-image: url("../phpThumb/phpThumb.php?src=..%2Fimg%2Ftest_drive_bg_mob.jpg&f=webp&q=90&hash=01a83bfbd0b14386f9cee0c05b7ef9b25bc15132ef3e58fce3b1628f294b768c");
  }

  .test-drive .container {
    padding-top: 0;
  }

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

  .credit .container {
    display: block;
    padding: 0;
  }

  /* Под картинкой размывать нечего — карточка кредита становится плашкой. */
  .credit__wrap {
    width: 100%;
    padding: 30px 15px;
    background: var(--c-dark);
    backdrop-filter: none;
  }

  /* Контакты. */
  .contacts {
    padding-top: 40px;
  }

  .contacts__info,
  .contacts__row {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .contacts__info {
    margin-bottom: 16px;
  }

  .contacts .btn {
    width: 100%;
  }

  .contacts__row {
    gap: 10px;
    padding-top: 16px;
  }

  #map1 {
    height: 280px;
    margin-top: 20px;
  }

  /* Подвал. */
  .footer__wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 25px 0;
  }
}
/* Фиксирует высоту таймера до загрузки */.sinoby-timer[data-sinoby-reserve="sinoby-9r43yz"]{display:block;min-height:72px;}@media (max-width:767px){.sinoby-timer[data-sinoby-reserve="sinoby-9r43yz"]{min-height:76px;}}

.body-color-e1e1e1 { background: #E1E1E1; }

.body-color-9e9e9e { background: #9E9E9E; }

.body-color-33a9cb { background: #33A9CB; }

.body-color-fd0404 { background: #FD0404; }

.body-color-111111 { background: #111111; }

.body-color-000000 { background: #000000; }

.body-color-ffffff { background: #FFFFFF; }

.body-color-dedede { background: #DEDEDE; }

.body-color-1d1e20 { background: #1D1E20; }

.body-color-122c4e { background: #122C4E; }

.body-color-7e7e7e { background: #7E7E7E; }

.body-color-eae3e3 { background: #EAE3E3; }

.body-color-726c6c { background: #726C6C; }

.body-color-7e7e7e { background: #7e7e7e; }

.alert { font-size: 20px; }
