/* ==========================================================================
   TOKENS
   Плейсхолдеры проекта — цвет/шрифт/размеры подменяются под конкретный макет.
   В правилах используем var(--…), а не хардкод.
   ========================================================================== */
:root {
  --c-dark: #282830;
  --c-accent: #ff0022;
  --c-white: #fff;
  --c-muted: #414141;
  --font-base: "ToyotaType", sans-serif;
  --container-w: 1200px;
  --control-h: 48px;
  --radius: 8px;
  --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: 400 16px/1.4 var(--font-base);
  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: calc(
    var(--container-w) + 60px
  );
  margin: 0 auto;
  padding: 0 30px;
}

.section-title {
  margin-bottom: 40px;
  font-size: 48px;
  font-weight: 600;
  line-height: 1.1;
  text-align: center;
  text-transform: uppercase;
  color: var(--c-dark);
}

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

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

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

.btn--glass {
  background: transparent;
  border-color: currentColor;
}

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

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

.form-group select {
  appearance: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 20 20'%3E%3Cpath d='M5 8l5 5 5-5' fill='none' stroke='%23282830' stroke-width='2'/%3E%3C/svg%3E")
    right 15px center no-repeat var(--c-white);
}

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

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

.agree-field input {
  position: absolute;
  top: 0;
  left: 0;
}

/* Подсветка невалидного поля + блок кнопки без согласия (классы вешает 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: 30px;
  background: var(--c-white);
}

.form_title {
  margin-bottom: 20px;
  font-size: clamp(24px, 5vw, 30px);
  font-weight: 600;
  text-align: center;
}

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

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

.fancybox-close {
  width: 22px !important;
  height: 22px !important;
  top: -25px !important;
  right: -25px !important;
  background: url(../img/bg_close.png) 50% / contain no-repeat !important;
}

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

/* ==========================================================================
   HEADER — фикс-шапка (активная разметка)
   ========================================================================== */
header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 15;
  color: var(--c-white);
  background: var(--c-dark);
}

header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}

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

.logo-group img {
  height: 34px;
}

.header__addr,
.header__phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  color: var(--c-white);
}

.header__addr img,
.header__phone img {
  width: auto;
  height: 20px;
}

header .btn {
  width: 261px;
  font-weight: 600;
}

.m_btn {
  display: none;
}

/* ==========================================================================
   NAV — навигация (полупрозрачная строка под шапкой, поверх баннера)
   ========================================================================== */
.menu {
  position: fixed;
  top: 76px;
  left: 0;
  z-index: 14;
  width: 100%;
  height: 53px;
  color: var(--c-white);
  background: rgba(40, 40, 48, 0.48);
  backdrop-filter: blur(2px);
}

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

.menu__group {
  display: flex;
  align-items: center;
  gap: 40px;
  font-size: 16px;
}

.menu__group--model {
  font-weight: 600;
}

.menu__group a {
  position: relative;
}

.menu__group a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 100%;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

.menu__group a:hover::after {
  transform: scaleX(1);
}

/* ==========================================================================
   BANNER — hero-баннер (фото + заголовки + таймер-акции внизу)
   ========================================================================== */
.banner {
  position: relative;
  margin-top: 76px;
}

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

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

.banner__head {
  position: absolute;
  top: 9%;
  left: 50%;
  width: 100%;
  text-align: center;
  transform: translateX(-50%);
}

.banner__title {
  font-size: 48px;
  font-weight: 700;
  line-height: 1.19;
  text-transform: uppercase;
  color: #15151b;
}

.banner__title span {
  font-weight: 600;
}

.banner__subtitle {
  margin-top: 18px;
  font-size: 28px;
  color: #15151b;
}

.banner__cta {
  width: 260px;
  height: 50px;
  margin: 20px auto 0;
  border-radius: 5px;
}

.banner__timer {
  position: absolute;
  bottom: 5%;
  left: 50%;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  transform: translateX(-50%);
}

.banner__timer-clock {
  width: 63%;
  max-width: 755px;
}

.banner__timer-side {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.banner__timer-text {
  font-size: 28px;
  line-height: 32px;
  color: var(--c-white);
}

.banner__timer-btn {
  width: 349px;
  margin-top: 25px;
}

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

/* ==========================================================================
   TIMER — блок таймера акции
   ========================================================================== */

.offer {
  margin-top: 75px;
}

.offer__card {
  position: relative;
  overflow: hidden;
  min-height: 309px;
  padding: 30px;
  border-radius: 12px;
  background: var(--c-dark) url(../img/timer_block_bg.svg) center / cover
    no-repeat;
}

.offer__content {
  position: relative;
  z-index: 1;
  max-width: 545px;
}

.offer__title {
  font-size: 40px;
  font-weight: 400;
  line-height: 1.25;
  text-transform: uppercase;
  color: var(--c-white);
}

.offer__text {
  margin-top: 16px;
  font-size: 24px;
  font-weight: 350;
  line-height: 1.25;
  color: var(--c-white);
}

.offer__btn {
  width: 351px;
  height: 50px;
  margin-top: 24px;
}

.offer__car {
  position: absolute;
  top: 50%;
  right: 16px;
  z-index: 0;
  width: auto;
  height: 294px;
  transform: translateY(-50%);
}

/* ==========================================================================
   CARS — «Модельный ряд»: меню-плитки моделей + карточки авто с галереей
   ========================================================================== */
.cars {
  margin-top: 120px;
}

.cars__menu {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-bottom: 30px;
  list-style: none;
}

.cars__menu-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 240px;
  height: 140px;
  padding-top: 16px;
  overflow: hidden;
  border-radius: 10px;
  background: url(../img/menu/menu_item_bg.jpg) center / cover no-repeat;
  transition: background-image var(--transition);
}

.cars__menu-item:hover {
  background-image: url(../img/menu/menu_item_bg_hov.jpg);
}

.cars__menu-label {
  font-size: 24px;
  text-transform: uppercase;
  color: var(--c-dark);
}

.cars__menu-item img {
  width: auto;
  max-width: 187px;
  max-height: 96px;
  margin-top: auto;
}

.car-card {
  position: relative;
  margin-top: 70px;
  border-radius: 12px;
  background: #eaeaea url(../img/car_item_bg.svg) center / cover no-repeat;
}

.car-card + .car-card {
  margin-top: 70px;
}

.car-card__badge {
  position: absolute;
  top: -40px;
  right: 40px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  height: 56px;
  padding: 0 20px 0 7px;
  font-size: 18px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--c-white);
  background: rgba(40, 40, 48, 0.55);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  transition: background var(--transition);
}

.car-card__badge:hover {
  background: rgba(255, 0, 34, 0.2);
}

.car-card__badge-ico {
  width: 42px;
  height: 42px;
  border-radius: 5px;
}

.car-card__body {
  display: flex;
  gap: 55px;
  padding: 40px;
}

.car-card__info {
  flex: 0 0 349px;
  display: flex;
  flex-direction: column;
  margin-top: auto;
}

.car-card__title {
  font-size: 31px;
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
  color: var(--c-dark);
}

.car-card__title span {
  color: rgba(40, 40, 48, 0.4);
}

.car-card__sub {
  margin-top: 10px;
  font-size: 16px;
  color: var(--c-dark);
}

.car-card__divider {
  height: 1px;
  margin-top: 5px;
  background: linear-gradient(to right, #292931, rgba(41, 41, 49, 0));
}

.car-card__benefits {
  margin-top: 30px;
  list-style: none;
}

.car-card__benefits li + li {
  margin-top: 12px;
}

.car-card__benefit {
  display: flex;
  align-items: center;
  gap: 15px;
  cursor: pointer;
}

.car-card__bico {
  position: relative;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: center / contain no-repeat;
}

.car-card__bico::after {
  content: "";
  position: absolute;
  inset: 0;
  background: center / contain no-repeat;
  opacity: 0;
  transition: opacity var(--transition);
}

.car-card__benefit:hover .car-card__bico::after {
  opacity: 1;
}

.car-card__bico--trade {
  background-image: url(../img/ico_trade.svg);
}

.car-card__bico--trade::after {
  background-image: url(../img/ico_trade_hov.svg);
}

.car-card__bico--coins {
  background-image: url(../img/ico_coins.svg);
}

.car-card__bico--coins::after {
  background-image: url(../img/ico_coins_hov.svg);
}

.car-card__bico--shield {
  background-image: url(../img/ico_shield.svg);
}

.car-card__bico--shield::after {
  background-image: url(../img/ico_shield_hov.svg);
}

.car-card__btext {
  font-size: 18px;
  color: var(--c-dark);
}

.car-card__bval {
  font-size: 20px;
  font-weight: 900;
  white-space: nowrap;
  color: var(--c-dark);
}
.car-card__bval--wrap {
  white-space: normal;
  font-weight: 900;
  color: var(--c-dark);
  font-size: 20px;
}

.car-card__btns {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 30px;
}

.car-card__btns .btn {
  width: 100%;
}

.car-card__media {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  margin-top: -40px;
}

.car-card__photo {
  align-self: center;
  width: 100%;
  max-width: 560px;
  height: auto;
}

.car-card__gallery {
  width: 100%;
  margin-top: auto;
  padding-bottom: 18px;
}

.car-card__gallery .swiper-slide img {
  display: block;
  width: 100%;
  height: 108px;
  object-fit: cover;
  border-radius: 8px;
}

.car-card__gallery .swiper-scrollbar {
  height: 4px;
  background: rgba(40, 40, 48, 0.12);
}

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

/* ==========================================================================
   COMPLECTS — комплектации (include.table.php): фильтр + горизонтальные карточки
   ========================================================================== */
.instock {
  margin-top: 120px;
}

.complects__menu {
  display: none;
}

.complects__filter {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
}

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

.complects__list {
  display: flex;
  flex-direction: column;
  margin-top: 70px;
  gap: 60px;
}

.complects__panel {
  position: relative;
  overflow: visible;
  min-height: 180px;
  padding: 18px 40px;
  border-radius: 12px;
  background:
    linear-gradient(-1deg, rgba(40, 40, 48, 0.07) 5%, rgba(40, 40, 48, 0) 72%),
    #eaeaea;
}

.complects__heading {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 15px;
  width: fit-content;
  height: 60px;
  margin-left: -40px;
  padding: 0 10px 0 40px;
  background: linear-gradient(
    to right,
    rgba(40, 40, 48, 0),
    rgba(40, 40, 48, 0.43)
  );
  border-radius: 0 12px 12px 0;
}

.complects__model {
  font-size: 28px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--c-dark);
}

.complects__trim {
  padding: 6px 12px;
  font-size: 28px;
  line-height: 1;
  text-transform: uppercase;
  color: var(--c-white);
  background: var(--c-dark);
  border-radius: 5px;
}

.complects__specs {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 30px;
  margin-top: 24px;
  list-style: none;
}

.complects__specs li {
  padding-left: 13px;
  border-left: 1px solid var(--c-dark);
}

.complects__spec-label {
  display: block;
  font-size: 16px;
  color: var(--c-dark);
}

.complects__spec-val {
  display: block;
  margin-top: 4px;
  font-size: 24px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--c-dark);
}

.complects__image {
  position: absolute;
  right: 20px;
  bottom: 0;
  z-index: 0;
  width: auto;
  height: calc(100% + 45px);
  max-width: 52%;
  object-fit: contain;
  object-position: bottom right;
}

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

.complects__btns .btn {
  flex: 1;
}

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

.complects__more {
  width: auto;
  height: auto;
  margin: 30px auto 0;
  padding: 8px 16px;
  gap: 8px;
  color: var(--c-dark);
  background: transparent;
  border: none;
}

.complects__more:hover {
  color: var(--c-accent);
  background: transparent;
  border: none;
}

.complects__more[hidden] {
  display: none;
}

.complects__more::after {
  content: "";
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-1px) rotate(45deg);
}

/* ==========================================================================
   TRADEIN — «Обмен с доплатой»: фото-коллаж + форма
   ========================================================================== */
.tradein {
  margin-top: 120px;
}

.tradein__grid {
  display: grid;
  grid-template-columns: 258fr 390fr 492fr;
  grid-template-rows: 382px 201px;
  gap: 30px;
  grid-template-areas:
    "photo1 form   photo3"
    "photo2 photo2 photo3";
}

.tradein__photo--1 {
  grid-area: photo1;
}
.tradein__photo--2 {
  grid-area: photo2;
}
.tradein__photo--3 {
  grid-area: photo3;
}
.tradein__form-wrap {
  grid-area: form;
}

.tradein__photo {
  overflow: hidden;
  border-radius: 10px;
}

.tradein__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tradein__comment {
  margin-bottom: 20px;
  font-size: 20px;
  line-height: 1.25;
  color: var(--c-dark);
}

.tradein__form-wrap .form-control {
  border-color: #d0d0d0;
}

.tradein__form-wrap .btn {
  width: 100%;
}

/* ==========================================================================
   CREDIT — «Кредит» + «Тестовая поездка» (две колонки + центральное фото)
   ========================================================================== */
.cred-test {
  margin-top: 120px;
}

.cred-test__grid {
  display: grid;
  grid-template-columns: 390fr 318fr 432fr;
  gap: 30px;
  align-items: stretch;
}

.cred-test__col {
  display: flex;
  flex-direction: column;
}

.cred-test__title {
  font-size: 42px;
  font-weight: 600;
  line-height: 1.1;
  text-transform: uppercase;
  color: var(--c-dark);
  margin-top: 10px;
}

.cred-test__text {
  margin-top: 30px;
  font-size: 20px;
  line-height: 1.3;
  color: var(--c-dark);
}

.cred-test__col form {
  margin-top: 24px;
}

.cred-test__col--test form {
  margin-top: auto;
}

.cred-test__col .form-control {
  border-color: #d0d0d0;
}

.cred-test__col .btn {
  width: 100%;
}

.cred-test__img {
  overflow: hidden;
  border-radius: 10px;
}

.cred-test__img img {
  display: block;
  width: 100%;
  height: auto;
}

.cred-test__img--credit {
  margin-top: auto;
}

.cred-test__img--test {
  margin-bottom: 35px;
}

.cred-test__center img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

/* ==========================================================================
   CONTACTS — контакты (инфо-карточка + Яндекс.Карта)
   ========================================================================== */
.contacts {
  margin-top: 120px;
}

.contacts__wrap {
  display: grid;
  grid-template-columns: 460fr 710fr;
  gap: 30px;
  align-items: stretch;
}

.contacts__card {
  padding: 40px;
  border-radius: 12px;
  background:
    linear-gradient(-6deg, rgba(40, 40, 48, 0.06), rgba(40, 40, 48, 0) 70%),
    #f2f2f2;
}

.contacts__logo {
  display: inline-block;
  margin-bottom: 24px;
}

.contacts__logo img {
  height: 46px;
}

.contacts__row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 16px;
  color: var(--c-dark);
}

.contacts__row img {
  width: 24px;
  height: 24px;
}

.contacts__phone {
  font-size: 20px;
  font-weight: 600;
}

.contacts__cta-text {
  margin-top: 24px;
  font-size: 22px;
  line-height: 1.25;
  color: var(--c-dark);
}

.contacts__cta-text b {
  display: block;
  font-weight: 600;
}

.contacts__cta-text span {
  display: block;
}

.contacts__btn {
  width: 380px;
  max-width: 100%;
  margin-top: 20px;
  font-weight: 600;
}

.contacts__map {
  overflow: hidden;
  min-height: 412px;
  border-radius: 12px;
  background: #eaeaea;
}

/* ==========================================================================
   FOOTER — подвал (реквизиты + ссылки + Синоби)
   ========================================================================== */
footer {
  margin-top: 120px;
  padding: 40px 0;
  color: var(--c-white);
  background: var(--c-dark);
}

.footer__wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.footer__legal {
  font-size: 16px;
  line-height: 1.45;
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 16px;
}

.footer__links a {
  transition: color var(--transition);
}

.footer__links a:hover {
  color: var(--c-accent);
}

.footer__sinoby {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  white-space: nowrap;
}

.footer__sinoby img {
  height: 22px;
}

.disclamer {
  display: none;
  margin-top: 20px;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.6);
}

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

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

  .offer,
  .cars,
  .instock,
  .tradein,
  .cred-test,
  .contacts,
  footer {
    margin-top: 60px;
  }

  .complects__list {
    margin-top: 30px;
    gap: 40px;
  }

  .complects__heading {
    min-width: 0;
    height: auto;
    margin-left: -16px;
    padding: 8px 16px;
  }

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

  .logo-group img {
    height: 28px;
  }

  .banner {
    margin-top: 56px;
  }

  .banner__overlay::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
  }

  .banner__head {
    top: 24px;
  }

  .banner__title {
    font-size: 20px;
    line-height: 24px;
  }

  .banner__subtitle {
    margin-top: 10px;
    font-size: 18px;
    line-height: 20px;
  }

  .banner__cta {
    display: none;
  }

  .banner__timer {
    bottom: 4%;
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }

  .banner__timer-clock {
    width: 100%;
    max-width: 330px;
  }

  .banner__timer-side {
    align-items: stretch;
    width: 100%;
    max-width: 330px;
  }

  .banner__timer-text {
    font-size: 20px;
    line-height: 20px;
    text-align: left;
  }

  .banner__timer-btn {
    width: 100%;
    height: 40px;
    margin-top: 12px;
  }

  .offer__card {
    padding: 24px 20px;
    text-align: center;
  }

  .offer__content {
    max-width: none;
  }

  .offer__title {
    font-size: 22px;
  }

  .offer__text {
    margin-top: 10px;
    font-size: 15px;
  }

  .offer__btn {
    width: 100%;
    margin-top: 18px;
  }

  .offer__car {
    position: static;
    display: block;
    max-width: 100%;
    height: auto;
    margin: 16px auto 0;
    transform: none;
  }

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

  .section-title {
    margin-bottom: 24px;
    font-size: 28px;
  }

  .cars__menu {
    gap: 8px;
  }

  .cars__menu-item {
    width: auto;
    flex: 1 1 0;
    height: 96px;
  }

  .cars__menu-label {
    top: 12px;
    font-size: 15px;
  }

  .cars__menu-item img {
    width: 78%;
  }

  .car-card__body {
    flex-direction: column;
    gap: 0;
    padding: 24px 16px;
  }

  .car-card__info,
  .car-card__media {
    display: contents;
  }

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

  .car-card__sub {
    order: 2;
  }

  .car-card__divider {
    order: 3;
  }

  .car-card__photo {
    order: 4;
    align-self: center;
    max-width: 100%;
    margin-top: 10px;
  }

  .car-card__benefits {
    order: 5;
    margin-top: 10px;
  }

  .car-card__benefit {
    gap: 10px;
  }

  .car-card__btext {
    font-size: 4.5vw;
  }

  .car-card__bval {
    font-size: inherit;
  }

  .car-card__btns {
    order: 6;
    margin-top: 20px;
  }

  .car-card__gallery {
    order: 7;
    margin-top: 20px;
    padding-bottom: 20px !important;
  }

  .car-card__gallery .swiper-slide img {
    height: 80px;
  }

  .car-card__badge {
    top: -30px;
    right: 12px;
    height: 44px;
    padding: 0 14px 0 5px;
    font-size: 13px;
  }

  .car-card__badge-ico {
    width: 34px;
    height: 34px;
  }

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

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

  .complects__heading {
    order: 1;
  }

  .complects__image {
    order: 2;
    display: block;
    position: static;
    width: auto;
    height: auto;
    max-width: 78%;
    margin: 14px auto 0;
  }

  .complects__specs {
    order: 3;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 10px;
    margin-top: 16px;
  }

  .complects__model,
  .complects__trim {
    font-size: 18px;
  }

  .complects__spec-label {
    font-size: 13px;
  }

  .complects__spec-val {
    font-size: 15px;
  }

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

  .complects__btns .btn {
    flex: none;
  }

  .tradein .container {
    display: flex;
    flex-direction: column;
  }

  .tradein .section-title {
    order: 2;
    margin-bottom: 12px;
  }

  .tradein__grid {
    display: contents;
  }

  .tradein__photo--1 {
    order: 1;
    height: 200px;
    margin-bottom: 20px;
  }

  .tradein__photo--1 img {
    height: 100%;
    object-fit: cover;
    object-position: 50% 69%;
  }

  .tradein__photo--2,
  .tradein__photo--3 {
    display: none;
  }

  .tradein__form-wrap {
    order: 3;
  }

  .tradein__comment {
    text-align: center;
    font-size: 18px;
  }

  .cred-test__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .cred-test__center {
    display: none;
  }

  .cred-test__title {
    font-size: 28px;
    text-align: center;
  }

  .cred-test__text {
    margin-top: 12px;
    font-size: 18px;
    text-align: center;
  }

  .cred-test__col--credit form,
  .cred-test__col--test form {
    margin-top: 20px;
  }

  .cred-test__img--credit {
    order: -1;
    margin: 0 0 20px;
    padding-top: 0;
  }

  .cred-test__img--test {
    margin-bottom: 20px;
  }

  .contacts__wrap {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .contacts__card {
    padding: 24px 20px;
  }

  .contacts__logo {
    display: block;
    width: 100%;
  }

  .contacts__logo img {
    width: 100%;
    height: auto;
  }

  .contacts__cta-text {
    font-size: 18px;
  }

  .contacts__btn {
    width: 100%;
  }

  .contacts__map {
    min-height: 280px;
  }

  .footer__wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .footer__legal {
    font-size: 14px;
  }

  /* Бургер. */
  .m_btn {
    position: absolute;
    top: 15px;
    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-white);
    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: 107px;
    right: -100%;
    left: auto;
    z-index: 2;
    width: 100%;
    height: auto;
    padding: 20px 0;
    background: var(--c-dark);
    backdrop-filter: none;
    transition: right var(--transition);
  }

  .menu.active {
    right: 0;
  }

  .menu .container {
    flex-direction: column;
    row-gap: 16px;
    height: auto;
  }

  .menu__group {
    flex-direction: column;
    row-gap: 12px;
    text-align: center;
  }

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

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

  .fancybox-close {
    top: 9px !important;
    right: 9px !important;
  }
}
