/* ==========================================================================
   TOKENS
   Плейсхолдеры проекта — цвет/шрифт/размеры подменяются под конкретный макет.
   В правилах используем var(--…), а не хардкод.
   ========================================================================== */
:root {
  --c-dark: #343434;
  --c-dark-2: #3e3e3e;
  --c-dark-hover: #1c1c1c;
  --c-ink: #0d171a;
  --c-accent: #c3002f;
  --c-white: #fff;
  --c-muted: #b9b9b9;
  --c-bg: #f2f2f2;
  --font-base: "Roboto", sans-serif;
  --container-w: 1460px;
  --control-h: 58px;
  --radius: 50px;
  --radius-card: 20px;
  --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-bg);
  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--white / .btn--glass
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: var(--control-h);
  padding: 0 30px;
  font: 400 18px/1 var(--font-base);
  white-space: nowrap;
  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: var(--c-dark-hover);
  border-color: var(--c-dark-hover);
  color: var(--c-white);
}

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

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

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

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

.btn--arrow::after {
  content: "";
  flex: none;
  width: 30px;
  height: 21px;
  background: currentColor;
  -webkit-mask: url(../img/btn_arrow_bl.svg) center / contain no-repeat;
  mask: url(../img/btn_arrow_bl.svg) center / contain no-repeat;
}

.popup_container .btn,
.credit__form-wrap .btn,
.timer__form .btn {
  width: 100%;
}

/* ==========================================================================
   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(../img/ico_select.png) right 15px center no-repeat
    var(--c-white);
}

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

/* Согласие на обработку ПД — мелкая сноска под формой. */
.agree-field {
  position: relative;
  display: inline-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, 36px);
  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;
  top: 0;
  left: 0;
  right: 0;
  z-index: 15;
  width: 1920px;
  max-width: 100%;
  margin: 0 auto;
  backdrop-filter: blur(2px);
}

.header__top {
  background: var(--c-dark);
}

.header__top .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  height: 91px;
}

.header__logo img {
  width: 198px;
  height: 54px;
}

.header__addr {
  color: var(--c-white);
  font-size: 18px;
}

.header__phone {
  color: var(--c-white);
  font-size: 18px;
  font-weight: 700;
  white-space: nowrap;
}

.header__top .btn {
  width: 302px;
}

.m_btn {
  display: none;
}

/* ==========================================================================
   NAV — меню (десктоп: горизонтальная полупрозрачная полоса над баннером)
   ========================================================================== */
.menu {
  background: rgba(52, 52, 52, 0.3);
}

.menu__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 53px;
}

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

.menu a {
  position: relative;
  color: var(--c-white);
  font-size: 18px;
}

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

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

/* ==========================================================================
   BANNER — hero-баннер (картинка на всю ширину + оверлей контента)
   ========================================================================== */
.banner {
  position: relative;
  margin-top: 91px;
}

.banner__media {
  display: block;
  position: relative;
  border-radius: 0 0 var(--radius-card) var(--radius-card);
  overflow: hidden;
}

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

.banner .container {
  position: absolute;
  inset: 0;
}

.banner__titles {
  position: absolute;
  top: 12%;
  left: 30px;
  right: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: var(--c-white);
}

.banner__title--1 {
  max-width: 1110px;
  font-size: 48px;
  font-weight: 700;
  line-height: 1.05;
}

.banner__title--2 {
  margin-top: 6px;
  font-size: 32px;
  font-weight: 700;
}

.banner__titles .btn {
  width: 354px;
  margin-top: 26px;
}

/* ======================================================================
   Banner badge
====================================================================== */

.banner__badge {
    position: absolute;
    left: 30px;
    bottom: 180px;
    display: flex;
    align-items: center;
    z-index: 5;
    background: linear-gradient(
        90deg,
        #fff 66.72%,
        rgba(255,255,255,0) 92.75%
    );
    border-radius: 18px;
    overflow: hidden;
}

.banner__badge-icon {
    /* width: 58px; */
    /* height: 58px; */
    flex: 0 0 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* background: #d70f2f; */
}

.banner__badge-icon img {
    width: 58px;
    height: 58px;
    display: block;
}

.banner__badge-text {
    padding: 4px 48px 6px 20px;
    display: flex;
    flex-direction: column;
    font-size: 22px;
    font-weight: 400;
    line-height: 1;
    color: #3a3a3a;
}

.banner__badge-text span + span {
    margin-top: 4px;
}

.banner__badge-text strong {
    font-weight: 700;
}

.banner__badge-mobile {
    display: none;
}

/* ==========================================================================
   TIMER — оверлей внизу баннера: часы Sinoby слева + заголовок и форма справа
   ========================================================================== */
.banner__timer {
  position: absolute;
  left: 30px;
  right: 30px;
  bottom: 35px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 65px;
}

.timer__clock {
  flex: none;
  width: 600px;
  margin-left: -40px;
}

.timer__wrap {
  flex: 1;
  max-width: 718px;
}

.timer__title {
  margin-bottom: 14px;
  font-size: 28px;
  line-height: 32px;
  color: var(--c-white);
}

.timer__form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.timer__cta {
  display: none;
}

.br-mob {
  display: none;
}

.timer__form .form-group {
  margin-bottom: 0;
}

.banner__timer input.form-control {
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(255, 255, 255, 0.32);
  color: var(--c-white);
}

.banner__timer input.form-control::placeholder {
  color: var(--c-white);
}

.banner__timer .agree-field {
  grid-column: 1 / -1;
  color: var(--c-white);
}

/* ==========================================================================
   OFFER — «улучшим предложение конкурентов» (белая карточка + картинка)
   ========================================================================== */
.offer {
  background: var(--c-bg);
  padding: 60px 0;
}

.offer .container {
  display: flex;
  align-items: stretch;
  gap: 32px;
}

.offer__card {
  flex: 1 1 827px;
  padding: 24px;
  background: var(--c-white);
  border-radius: var(--radius-card);
}

.offer__title {
  font-size: 40px;
  font-weight: 700;
  color: var(--c-dark);
}

.offer__comment {
  margin-top: 12px;
  font-size: 24px;
  color: var(--c-dark);
}

.offer__form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
}

.offer__form .form-group {
  margin-bottom: 0;
}

.offer__form .form-group--phone {
  flex: 1;
  min-width: 240px;
}

.offer__form .form-control[type="tel"] {
  border-color: #757575;
  color: var(--c-dark);
}

.offer__form .btn {
  width: 342px;
}

.offer__form .agree-field {
  flex-basis: 100%;
  color: #9aa7aa;
}

.offer__img {
  flex: 0 0 542px;
  border-radius: var(--radius-card);
  overflow: hidden;
}

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

/* ==========================================================================
   CARS — модельный ряд: табы + карточки моделей + вертикальные галереи
   ========================================================================== */
.cars {
  /* margin-top: 30px; */
  padding: 60px 0 70px;
  background: var(--c-dark);
  border-radius: var(--radius-card);
}

.section-title {
  font-size: 48px;
  font-weight: 700;
  text-transform: uppercase;
  text-align: center;
  color: var(--c-white);
}

.cars__tabs {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 60px;
}

.cars__tab {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 330px;
  height: 84px;
  padding-left: 16px;
  background: linear-gradient(to top, #3e3e3e 41%, #343434);
  border: 1px solid #4b4b4b;
  border-radius: var(--radius-card);
  transition: border-color var(--transition);
}

.cars__tab::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background: linear-gradient(0deg, #a3a3a3 41.3%, #929292 100%);
  opacity: 0;
  transition: opacity var(--transition);
}

.cars__tab:hover::before,
.cars__tab.current::before {
  opacity: 1;
}

.cars__tab:hover,
.cars__tab.current {
  border-color: #e1e1e1;
}

.cars__tab-logo {
  position: relative;
  z-index: 1;
  width: 110px;
  transition: filter var(--transition);
}

.cars__tab:hover .cars__tab-logo,
.cars__tab.current .cars__tab-logo {
  filter: brightness(0.35);
}

.cars__tab-name {
  position: relative;
  z-index: 1;
  margin-top: 4px;
  font-size: 20px;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--c-white);
}

.cars__tab-img {
  position: absolute;
  z-index: 1;
  right: -2px;
  bottom: 0;
  width: 228px;
  max-width: none;
}

.car {
  display: flex;
  gap: 32px;
  margin-top: 60px;
}

.car__card {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 439px;
  padding: 32px 32px 90px;
  background:
    url(../img/car_item_bg.svg) center / cover no-repeat,
    var(--c-dark-2);
  border-radius: var(--radius-card);
  overflow: visible;
}

.car__brand {
  width: 136px;
}

.car__name {
  margin-top: 6px;
  font-size: 52px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  color: var(--c-white);
}

.car__benefit {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  height: 90px;
  margin-top: 30px;
  padding-right: 40px;
  background: linear-gradient(to right, #1e1e1e 0%, rgba(30, 30, 30, 0) 95%);
  border-radius: 100px;
}

.car__benefit::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background: linear-gradient(to right, #ffffff 0%, rgba(255, 255, 255, 0) 95%);
  opacity: 0;
  transition: opacity var(--transition);
}

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

.car__benefit:hover .car__benefit-text {
  color: var(--c-dark);
}

.car__benefit-ico {
  position: relative;
  z-index: 1;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 90px;
  height: 90px;
  background: var(--c-accent);
  border-radius: var(--radius-card);
}

.car__benefit-ico img {
  width: 64px;
  height: 64px;
}

.car__benefit-text {
  position: relative;
  z-index: 1;
  padding-left: 15px;
  font-size: 24px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--c-white);
  transition: color var(--transition);
}

.car__benefit-text b {
  font-size: 34px;
  font-weight: 700;
}

.car__features {
  position: relative;
  z-index: 1;
  margin-top: 30px;
  list-style: none;
}

.car__features li {
  margin-bottom: 8px;
}

.car__features li a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  color: var(--c-white);
}

.car__features img {
  width: 18px;
  transition: width var(--transition);
}

.car__features li a:hover img {
  width: 26px;
}

.car__btns {
  position: absolute;
  left: 32px;
  right: 32px;
  bottom: 32px;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.car__photo {
  position: absolute;
  top: -10px;
  right: 0;
  width: 62%;
  max-width: 700px;
  height: auto;
  pointer-events: none;
}

.car__gallery {
  position: relative;
  flex: 0 0 260px;
  height: 439px;
  padding: 32px 0;
  background:
    url(../img/car_gallery_bg.svg) center / cover no-repeat,
    #3e3e3e;
  border-radius: var(--radius-card);
  overflow: hidden;
}

.car_gallery_slider {
  height: 100%;
}

.car__gallery .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
}

.car__gallery .swiper-slide img {
  width: 196px;
  height: 114px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
}

.car__gallery-nav {
  position: absolute;
  left: 50%;
  z-index: 3;
  width: 30px;
  height: 30px;
  padding: 0;
  background: url(../img/car_gallery_arrow.svg) center / contain no-repeat;
  border: 0;
  cursor: pointer;
  transform: translateX(-50%);
}

.car__gallery-nav--prev {
  top: 6px;
  transform: translateX(-50%) rotate(180deg);
}

.car__gallery-nav--next {
  bottom: 6px;
}

/* ==========================================================================
   COMPLECTS — комплектации (include.table.php): светлая секция, тёмные карточки
   ========================================================================== */
.instock {
  background: var(--c-bg);
  padding: 120px 0;
}

.section-title--dark {
  color: var(--c-dark);
}

.instock .section-title {
  margin-bottom: 36px;
}

.complects {
  display: flex;
  flex-direction: column;
}

.complects__filter,
.complects__menu {
  display: none;
}

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

.complects__card {
  display: flex;
  flex-direction: column;
}

.complects__image {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 175px;
}

.complects__image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.complects__box {
  margin-top: -30px;
  padding: 40px 31px 24px;
  background: var(--c-dark);
  border-radius: var(--radius-card);
}

.complects__name {
  font-size: 32px;
  font-weight: 400;
  text-transform: uppercase;
  text-align: center;
  color: var(--c-white);
}

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

.complects__specs {
  margin-top: 18px;
  list-style: none;
}

.complects__specs li {
  display: flex;
  align-items: flex-end;
  margin-bottom: 6px;
  font-size: 18px;
  color: var(--c-white);
}

.complects__dots {
  flex: 1;
  margin: 0 6px 5px;
  border-bottom: 1px dotted rgba(255, 255, 255, 0.4);
}

.complects__specs b {
  font-weight: 400;
}

.complects__btns {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.complects__btns .btn {
  width: 100%;
}

.complects__btns .btn--glass {
  color: var(--c-ink);
  border-color: var(--c-ink);
}

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

.complects__more {
  align-self: center;
  height: auto;
  margin-top: 36px;
  padding: 0;
  font-size: 18px;
  color: var(--c-dark);
  background: transparent;
  border: 0;
}

.complects__more[hidden] {
  display: none;
}

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

/* ==========================================================================
   TRADEIN — обмен с доплатой: фото по краям + форма-карточка справа
   ========================================================================== */
.tradein {
  /* margin: 30px 0; */
}

.tradein__grid {
  display: grid;
  grid-template-columns: 985fr 467fr 404fr;
  gap: 32px;
  min-height: 389px;
}

.tradein__img {
  border-radius: var(--radius-card);
  overflow: hidden;
}

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

.tradein__card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px;
  background: var(--c-dark);
  border-radius: var(--radius-card);
}

.tradein__title {
  font-size: 40px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--c-white);
}

.tradein__comment {
  margin: 16px 0 24px;
  font-size: 28px;
  line-height: 32px;
  color: var(--c-white);
}

.tradein__comment b {
  font-weight: 700;
}

.tradein input.form-control {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.7);
  color: var(--c-white);
}

.tradein input.form-control::placeholder {
  color: #cfcfcf;
}

.tradein .btn {
  width: 100%;
}

.tradein .agree-field {
  color: #9aa7aa;
}

/* ==========================================================================
   CREDIT — тёмная панель: белая форма + фото + 3 преимущества
   ========================================================================== */
.credit {
  padding: 120px 0;
}

.credit__card {
  display: grid;
  grid-template-columns: 514px 1fr;
  gap: 32px;
  padding: 32px;
  background: var(--c-dark);
  border-radius: var(--radius-card);
}

.credit__form-wrap {
  padding: 32px;
  background: var(--c-white);
  border-radius: var(--radius-card);
}

.credit__title {
  font-size: 40px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--c-dark);
}

.credit__comment {
  margin-top: 16px;
  font-size: 27px;
  line-height: 32px;
  color: var(--c-dark);
}

.credit__comment b {
  font-weight: 700;
}

.credit__form-wrap form {
  margin-top: 24px;
}

.credit__form-wrap input.form-control {
  border-color: #757575;
}

.credit__form-wrap .agree-field {
  color: #9aa7aa;
}

.credit__img {
  border-radius: var(--radius-card);
  overflow: hidden;
}

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

.credit__benefits {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 19px;
}

.credit__benefit {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  font-size: 22px;
  color: var(--c-white);
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-card);
  transition:
    background var(--transition),
    color var(--transition);
}

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

.credit__benefit-ico {
  flex: none;
  width: 40px;
  height: 40px;
}

/* ==========================================================================
   CONTACTS — карта на всю ширину + матовая карточка контактов
   ========================================================================== */
.contacts {
  position: relative;
  min-height: 550px;
}

#map1 {
  position: absolute;
  inset: 0;
  background: #e9e9e9;
}

.contacts .container {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  min-height: 550px;
  pointer-events: none;
}

.contacts__card {
  pointer-events: auto;
  width: 410px;
  padding: 32px;
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border-radius: var(--radius-card);
}

.contacts__logo {
  width: 346px;
  max-width: 100%;
}

.contacts__list {
  margin-top: 24px;
  list-style: none;
}

.contacts__list li {
  position: relative;
  margin-bottom: 10px;
  padding-left: 22px;
  font-size: 18px;
  color: var(--c-dark);
}

.contacts__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 9px;
  height: 15px;
  background: url(../img/bullet_arrow.svg) center / contain no-repeat;
}

.contacts__phone {
  font-weight: 700;
}

.contacts__note {
  margin: 6px 0 20px;
  font-size: 18px;
  color: var(--c-dark);
}

.contacts__card .btn {
  width: 346px;
  max-width: 100%;
}

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

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

.footer__legal {
  max-width: 360px;
}

.footer__legal a {
  font-size: 14px;
  text-decoration: underline;
}

.footer__legal p {
  margin-top: 15px;
  font-size: 14px;
  line-height: 1.45;
}

.footer__terms {
  font-size: 18px;
}

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

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

.footer__sinoby img {
  width: 100px;
}

.disclamer {
  display: none;
  margin-top: 20px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--c-muted);
}

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

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

  .btn {
    padding: 0 20px;
    font-size: 15px;
  }

  .btn--arrow::after {
    width: 24px;
    height: 17px;
  }

  .header__top .container {
    height: 64px;
    justify-content: flex-start;
  }

  .header__logo img {
    width: 120px;
    height: auto;
  }

  .header__addr,
  .header__top .btn {
    display: none;
  }

  .header__phone {
    margin-left: auto;
    margin-right: 44px;
    font-size: 15px;
  }

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

  .menu.active {
    right: 0;
  }

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

  .menu__group {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }

  .banner {
    margin-top: 64px;
  }

  .banner__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
      linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 32%),
      linear-gradient(180deg, rgba(0, 0, 0, 0) 59%, #000 100%);
  }

  .banner .container {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 40px 15px 22px;
    background: none;
  }

  .banner__titles {
    position: static;
    left: auto;
    right: auto;
    align-items: stretch;
  }

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

  .banner__title--2 {
    margin-top: 8px;
    font-size: 20px;
    font-weight: 400;
    line-height: 20px;
  }

  .banner__titles .btn {
    display: none;
  }

  .banner__timer {
    position: static;
    left: auto;
    right: auto;
    bottom: auto;
    flex-direction: column;
    gap: 15px;
  }

  .banner__badge--desktop {
    display: none;
}

.banner__badge-mobile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 10px auto 10px;
    padding: 8px 14px;
    background: rgba(255,255,255,.9);
    border-radius: 18px;
    font-size: 18px;
    line-height: 1;
    color: #333;
    width: 100%;
}

  .banner__badge-mobile img {
      width: 34px;
      height: 34px;
      flex: none;
  }

  .banner__badge-mobile strong {
      font-weight: 700;
  }

  .offer {
    padding-top: 20px;
  }

  .timer__clock {
    display: flex;
    justify-content: center;
    width: 100%;
    overflow: hidden;
  }

  .timer__clock .sinoby-timer {
    flex: none;
    /* transform: scale(0.55); */
    transform-origin: center;
    min-height: auto !important;
  }

  .timer__wrap {
    width: 100%;
  }

  .timer__clock {
    margin-left: 0px;
  }

  .timer__title {
    margin-bottom: 14px;
    font-size: 20px;
    line-height: 20px;
    text-align: left;
  }

  .timer__form {
    display: none;
  }

  .br-mob {
    display: inline;
  }

  .timer__cta {
    display: flex;
    width: 100%;
    height: 48px;
  }

  .offer .container {
    flex-direction: column-reverse;
    gap: 15px;
  }

  .offer__card {
    padding: 20px 15px;
    flex: auto;
  }

  .offer__title {
    font-size: 22px;
  }

  .offer__comment {
    margin-top: 8px;
    font-size: 15px;
  }

  .offer__form {
    flex-direction: column;
    align-items: stretch;
  }

  .offer__form .form-group--phone {
    flex: none;
  }

  .offer__form .btn {
    width: 100%;
  }

  .offer__img {
    flex-basis: auto;
    height: 200px;
  }

  .cars {
    padding: 36px 0 40px;
  }

  .section-title {
    font-size: 26px;
  }

  .cars__tabs {
    flex-direction: column;
    gap: 40px;
    margin: 40px 0 20px;
  }

  .cars__tab {
    width: 100%;
    height: 70px;
  }

  .car {
    flex-direction: column;
    gap: 15px;
    margin-top: 50px;
  }

  .car__card {
    display: flex;
    flex-direction: column;
    min-height: auto;
    padding: 20px 15px;
  }

  .car__brand {
    order: 1;
  }

  .car__name {
    order: 2;
    font-size: 32px;
  }

  .car__photo {
    order: 3;
    position: static;
    width: 100%;
    margin: 10px 0;
    transform: none;
  }

  .car__benefit {
    order: 4;
    height: 72px;
    margin-top: 10px;
  }

  .car__benefit-ico {
    width: 72px;
    height: 72px;
  }

  .car__benefit-ico img {
    width: 48px;
    height: 48px;
  }

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

  .car__benefit-text b {
    font-size: 24px;
  }

  .car__features {
    order: 5;
  }

  .car__features li {
    font-size: 15px;
  }

  .car__btns {
    order: 6;
    position: static;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 18px;
  }

  /* Галерея салонных фото — отдельный блок под кнопками, 3 квадрата в ряд
     (отступ сверху 15px даёт gap у .car). */
  .car__gallery {
    display: block;
    flex: none;
    height: auto;
    padding: 12px;
    overflow: visible; /* чтобы стрелки могли вылезти за края */
  }

  .car_gallery_slider {
    height: auto;
  }

  .car__gallery .swiper-slide img {
    width: 100%;
    height: 90px;
  }

  /* Стрелки перелистывания по бокам — абсолютные, чуть за краями блока. */
  .car__gallery-nav {
    display: block;
    top: 50%;
    bottom: auto;
  }

  .car__gallery-nav--prev {
    left: -12px;
    transform: translateY(-50%) rotate(90deg);
  }

  .car__gallery-nav--next {
    left: auto;
    right: -12px;
    transform: translateY(-50%) rotate(-90deg);
  }

  .instock {
    padding: 36px 0 40px;
  }

  .complects__list {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .complects__name {
    font-size: 26px;
  }

  .complects__specs li {
    font-size: 15px;
  }

  .tradein__grid {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 0 15px;
    gap: 20px;
  }

  .tradein__img {
    height: 200px;
  }

  .tradein__card {
    padding: 20px 15px;
  }

  .tradein__title {
    font-size: 24px;
  }

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

  .credit {
    padding: 0;
    margin-top: 20px;
  }

  .credit__card {
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 15px;
  }

  .credit__form-wrap {
    padding: 20px 15px;
  }

  .credit__title {
    font-size: 24px;
  }

  .credit__comment {
    font-size: 16px;
    line-height: 1.3;
  }

  .credit__img {
    height: 200px;
  }

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

  .credit__benefit {
    padding: 14px;
    font-size: 16px;
  }

  .contacts {
    display: flex;
    flex-direction: column;
    min-height: 0;
    margin-top: 40px;
  }

  #map1 {
    position: relative;
    order: 2;
    height: 320px;
  }

  .contacts .container {
    position: static;
    order: 1;
    display: block;
    min-height: 0;
    padding: 0;
  }

  .contacts__card {
    width: 100%;
    padding: 20px 15px;
    background: var(--c-white);
    border-radius: 0;
    backdrop-filter: none;
  }

  .contacts__logo {
    width: 240px;
  }

  footer {
    padding: 24px 0;
  }

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

  .footer__legal {
    max-width: none;
  }

  /* Попап на всю ширину. */
  .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;
  }
}
