/* ==========================================================================
   TOKENS
   HONGQI / ДАКАР Санкт-Петербург. Тёмная палитра + золото.
   В правилах используем var(--…), а не хардкод.
   ========================================================================== */
:root {
  --c-dark: #101115;
  --c-panel: #1a1b1f;
  --c-accent: #cca166;
  --c-accent-brd: #806845;
  --c-line: #5b5657;
  --c-white: #fff;
  --c-soft: #ddd;
  --c-muted: #626265;
  --font-base: "Roboto", sans-serif;
  --container-w: 1420px;
  --control-h: 60px;
  --radius: 14px;
  --radius-lg: 30px;
  --transition: 0.5s ease-in-out;
  --head-h: 145px;
  --gap-section: 120px;
  --panel-bg: linear-gradient(180deg, var(--c-panel) 0%, rgba(26, 27, 31, 0) 100%);
  --hairline: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.4) 100%
  );
  --hairline-rev: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.4) 0%,
    rgba(255, 255, 255, 0) 100%
  );
  /* Обводки в макете — градиентные штрихи. border-image игнорирует
     border-radius, поэтому рамку кладём вторым слоем фона в border-box. */
  --brd-ico: linear-gradient(180deg, var(--c-accent-brd) 0%, transparent 100%);
  --brd-ico-accent: linear-gradient(180deg, var(--c-accent) 0%, transparent 100%);
  --brd-panel: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.4) 0%,
    rgba(255, 255, 255, 0) 100%
  );
  --brd-panel-edges: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.4) 0%,
    rgba(255, 255, 255, 0) 50%,
    rgba(255, 255, 255, 0.4) 100%
  );
  --brd-card: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.3) 0%,
    rgba(255, 255, 255, 0) 20%,
    rgba(255, 255, 255, 0) 80%,
    rgba(255, 255, 255, 0.3) 100%
  );
}

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

html {
  overflow-x: hidden;
}

body {
  max-width: 1920px;
  margin: 0 auto;
  font: 300 16px/1.4 var(--font-base);
  color: var(--c-white);
  background: var(--c-dark);
  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;
}

/* Требование заказчика: смена цвета везде одной длительностью. */
a,
button,
input,
select,
.btn,
.ico::before,
.ico::after {
  transition:
    color var(--transition),
    background-color var(--transition),
    border-color var(--transition),
    opacity var(--transition),
    transform var(--transition);
}

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

main {
  padding-top: var(--head-h);
}

main > section,
main > .section-wrap {
  margin-top: var(--gap-section);
}

main > .banner {
  margin-top: 0;
}

/* Панель со затухающей подложкой — кредит, обмен/тест-драйв, контакты. */
.panel {
  position: relative;
  background: var(--panel-bg);
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
}

/* Рамка-градиент отдельным слоем с вырезанной серединой: фоновым слоем нельзя —
   заливка панели полупрозрачная, и градиент просвечивал бы на всю её площадь. */
.panel::after {
  content: "";
  position: absolute;
  inset: -1px;
  border: 1px solid transparent;
  border-radius: inherit;
  background: var(--brd-panel) border-box;
  -webkit-mask:
    linear-gradient(#000 0 0) padding-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* Заголовок секции с расходящимися линиями. */
.section-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  font-size: 48px;
  font-weight: 300;
  line-height: normal;
  letter-spacing: 0.96px;
  text-transform: uppercase;
  white-space: nowrap;
}

.section-title::before,
.section-title::after {
  content: "";
  width: 235px;
  height: 1px;
  background: var(--hairline);
}

.section-title::after {
  background: var(--hairline-rev);
}

/* Появление блоков при скролле (класс .animated вешает JS, только десктоп). */
@media (min-width: 992px) {
  .anim {
    opacity: 0;
    transform: translateY(40px);
    transition:
      opacity 0.8s ease,
      transform 0.8s ease;
  }

  .anim.animated {
    opacity: 1;
    transform: none;
  }
}

/* ==========================================================================
   ICO — иконка с «прокруткой» по ховеру родителя (как на hongqi.ru)
   ========================================================================== */
.ico {
  position: relative;
  flex: none;
  display: block;
  overflow: hidden;
}

.ico::before,
.ico::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ico) 50% / contain no-repeat;
}

.ico::after {
  transform: translateY(100%);
}

/* url() внутри кастомного свойства резолвится от css-файла, а не от
   документа, — поэтому набор иконок объявляем здесь, а не в разметке. */
.ico--badge {
  --ico: url(../img/ico/badge.svg);
}

.ico--gift {
  --ico: url(../img/ico/gift.svg);
}

.ico--exchange {
  --ico: url(../img/ico/exchange.svg);
}

.ico--percent {
  --ico: url(../img/ico/percent.svg);
}

.ico--shield {
  --ico: url(../img/ico/shield.svg);
}

.ico--coins {
  --ico: url(../img/ico/coins.svg);
}

a:hover > .ico::before,
a:hover .ico::before,
button:hover .ico::before,
.credit__card:hover .ico::before {
  transform: translateY(-100%);
}

a:hover > .ico::after,
a:hover .ico::after,
button:hover .ico::after,
.credit__card:hover .ico::after {
  transform: translateY(0);
}

/* Круглая оправа иконки. */
.ico-round {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 40px;
  height: 40px;
  background:
    linear-gradient(var(--c-panel) 0 100%) padding-box,
    var(--brd-ico) border-box;
  border: 1px solid transparent;
  border-radius: 100px;
}

.ico-round--accent {
  background:
    linear-gradient(var(--c-accent) 0 100%) padding-box,
    var(--brd-ico) border-box;
}

/* ==========================================================================
   BUTTONS — .btn (обводка) + .btn--accent (золотая) + .btn--soft
   Текст в кнопке прокручивается по ховеру: копия лежит строкой ниже.
   ========================================================================== */
.btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 260px;
  height: var(--control-h);
  padding: 0 25px;
  overflow: hidden;
  font: 400 16px/1.2 var(--font-base);
  color: var(--c-white);
  letter-spacing: 0.32px;
  text-align: center;
  text-transform: uppercase;
  background: transparent;
  border: 1px solid var(--c-accent-brd);
  border-radius: var(--radius);
  cursor: pointer;
}

.btn span,
.menu a span {
  position: relative;
  display: block;
  height: 1.2em;
  overflow: hidden;
  visibility: hidden;
}

.btn span::before,
.btn span::after,
.menu a span::before,
.menu a span::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  width: 100%;
  visibility: visible;
  transition: transform var(--transition);
}

.btn span::before,
.menu a span::before {
  top: 0;
}

.btn span::after,
.menu a span::after {
  top: 100%;
}

.btn:hover span::before,
.btn:hover span::after,
.menu a:hover span::before,
.menu a:hover span::after {
  transform: translateY(-100%);
}

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

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

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

.btn--soft {
  border-color: var(--c-line);
}

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

.form-group input,
.form-group select {
  width: 100%;
  height: var(--control-h);
  padding: 0 20px;
  font: 300 16px/1.2 var(--font-base);
  color: var(--c-white);
  letter-spacing: 0.32px;
  background: var(--c-panel);
  border: 1px solid transparent;
  border-bottom-color: var(--c-line);
  border-radius: var(--radius);
  outline: none;
}

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

.form-group input:focus,
.form-group select:focus {
  border-bottom-color: var(--c-accent);
}

.form-group select {
  appearance: none;
  padding: 0 50px 0 30px;
  text-transform: uppercase;
  color: var(--c-soft);
  background:
    url(../img/ico/sel_arrow.svg) right 20px center / 20px 20px no-repeat,
    var(--c-panel);
  cursor: pointer;
}

.form-group select option {
  color: var(--c-white);
  background: var(--c-panel);
  text-transform: none;
}

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

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

.agree-field input {
  flex: none;
  width: 12px;
  height: 12px;
  appearance: none;
  background: transparent;
  border: 1px solid var(--c-accent);
  border-radius: 100px;
  cursor: pointer;
}

.agree-field input:checked {
  background: var(--c-accent);
}

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

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

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

.not_agree button {
  background: var(--c-muted) !important;
  border-color: var(--c-muted) !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: 40px;
  overflow: visible;
  background: var(--c-panel);
  border: 1px solid var(--c-accent-brd);
  border-radius: var(--radius-lg);
}

.popup_container .btn {
  width: 100%;
}

.popup_container .agree-field {
  margin-top: 15px;
}

.form_title {
  margin-bottom: 25px;
  font-size: 28px;
  font-weight: 300;
  letter-spacing: 0.56px;
  text-align: center;
  text-transform: uppercase;
}

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

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

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

/* ==========================================================================
   HEADER — фикс-шапка + строка меню под ней
   ========================================================================== */
header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 15;
  height: 96px;
  background: var(--c-dark);
}

header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(128, 104, 69, 0) 0%,
    var(--c-accent) 50%,
    rgba(128, 104, 69, 0) 100%
  );
}

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

.logo img {
  display: block;
  width: 236px;
  height: 66px;
  object-fit: contain;
}

.info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.info img {
  flex: none;
  width: 35px;
  height: 35px;
}

.info__label {
  font-weight: 400;
  font-size: 18px;
  line-height: normal;
  letter-spacing: 0.36px;
  color: var(--c-muted);
}

.info__value {
  display: block;
  margin-top: 2px;
  font-weight: 400;
  font-size: 18px;
  line-height: normal;
  letter-spacing: 0.36px;
  white-space: nowrap;
}

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

.m_btn {
  display: none;
}

/* ==========================================================================
   NAV — строка навигации под шапкой
   ========================================================================== */
.menu {
  position: fixed;
  top: 96px;
  left: 0;
  z-index: 14;
  width: 100%;
  height: 49px;
  background: var(--c-panel);
}

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

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

.menu a {
  position: relative;
  display: block;
  overflow: hidden;
  font-size: 16px;
  letter-spacing: 0.32px;
  text-transform: uppercase;
  white-space: nowrap;
}

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

/* ==========================================================================
   BANNER — hero-баннер со стеклянной плашкой
   ========================================================================== */
.banner {
  position: relative;
  height: 730px;
  overflow: hidden;
}

.banner__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

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

.banner .container {
  z-index: 1;
  height: 100%;
}

.banner__panel {
  position: absolute;
  top: 35px;
  left: 50%;
  transform: translateX(-50%);
  width: 1102px;
  max-width: calc(100% - 60px);
  padding: 35px 40px;
  text-align: center;
  background: rgba(16, 17, 21, 0.75);
  border: 1px solid var(--c-accent);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
}

.banner__date {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 12px;
  font-size: 36px;
  line-height: normal;
  letter-spacing: 0.72px;
}

.banner__date b {
  font-weight: 500;
}

.banner__date i {
  font-style: normal;
  font-weight: 400;
  text-transform: uppercase;
}

.banner__date-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 50px;
  height: 50px;
  background:
    linear-gradient(var(--c-dark) 0 100%) padding-box,
    var(--brd-ico-accent) border-box;
  border: 1px solid transparent;
  border-radius: 100px;
}

.banner__date-ico img {
  width: 24px;
  height: 24px;
}

.banner__title {
  margin-bottom: 21px;
  font-size: 44px;
  line-height: normal;
  letter-spacing: 0.88px;
  text-transform: uppercase;
}

.banner__title b {
  font-weight: 400;
}

.banner__subtitle {
  font-size: 36px;
  line-height: normal;
  letter-spacing: 0.72px;
  text-transform: uppercase;
}

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

.timer__card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 40px;
  background: var(--c-panel);
  border-radius: 20px;
}

.timer__form {
  flex: 0 1 647px;
}

.timer__title {
  margin-bottom: 20px;
  font-size: 28px;
  line-height: normal;
  letter-spacing: 0.56px;
}

.timer__row {
  display: flex;
  align-items: center;
  gap: 25px;
  margin-bottom: 15px;
}

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

.timer__row .btn {
  flex: none;
}

/* Виджет Sinoby рисуется в shadow DOM и своей ширины не заявляет —
   контейнеру нужен явный размер, иначе схлопывается в 0. */
.timer__clock {
  flex: 0 0 591px;
  min-width: 0;
}

/* ==========================================================================
   CARS — модельный ряд: карточка модели + вертикальная галерея
   ========================================================================== */
.cars__list {
  display: flex;
  flex-direction: column;
  gap: 120px;
  margin-top: 120px;
}

.cars__card {
  position: relative;
  padding: 30px 0 0;
}

.cars__inner {
  position: relative;
  height: 497px;
  padding: 40px;
  background:
    linear-gradient(90deg, var(--c-panel) 0%, var(--c-dark) 100%) padding-box,
    var(--brd-card) border-box;
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
}

.cars__badge {
  position: absolute;
  line-height: normal;
  top: -30px;
  left: 160px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 20px;
  height: var(--control-h);
  padding: 0 25px 0 10px;
  font-weight: 400;
  font-size: 18px;
  letter-spacing: 0.36px;
  text-transform: uppercase;
  background: var(--c-panel);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 100px;
}

.cars__badge b {
  font-weight: 500;
}

.cars__badge .ico {
  width: 22px;
  height: 22px;
}

.cars__name {
  position: relative;
  z-index: 2;
  margin-bottom: 5px;
  font-weight: 400;
  font-size: 18px;
  line-height: normal;
  letter-spacing: 0.36px;
  color: var(--c-muted);
}

.cars__model {
  position: relative;
  z-index: 2;
  font-size: 48px;
  line-height: 1.17;
}

.cars__benefits {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 320px;
  margin-top: 34px;
}

.cars__link {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 18px;
  line-height: normal;
  letter-spacing: 0.36px;
}

.cars__link .ico {
  width: 22px;
  height: 22px;
}

.cars__link > span:last-child {
  flex: 1 1 auto;
}

.cars__media {
  position: absolute;
  bottom: 80px;
  left: 336px;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 669px;
  height: 389px;
}

.cars__media img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 100%;
}

.cars__gallery {
  position: absolute;
  top: 40px;
  right: 40px;
  z-index: 2;
  width: 275px;
  height: 317px;
}

.cars__gallery .swiper {
  height: 100%;
}

.cars__gallery .swiper-wrapper {
  align-items: center;
}

.cars__gallery .swiper-slide {
  display: block;
  width: 235px;
  height: 134px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 10px;
  opacity: 0.5;
  transition:
    transform var(--transition),
    opacity var(--transition);
}

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

.cars__gallery .swiper-slide-active {
  z-index: 3;
  opacity: 1;
  transform: scale(1.17);
}

.cars__arrow {
  position: absolute;
  left: 50%;
  z-index: 4;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: var(--c-panel);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
}

.cars__arrow img {
  width: 3px;
  height: 35px;
}

.cars__arrow--prev {
  top: -25px;
}

.cars__arrow--prev img {
  transform: rotate(180deg);
}

.cars__arrow--next {
  top: 292px;
}

.cars__arrow:hover {
  background: var(--c-accent-brd);
}

.cars__btns {
  position: absolute;
  right: 40px;
  bottom: 40px;
  left: 40px;
  z-index: 3;
  display: flex;
  gap: 25px;
}

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

/* ==========================================================================
   COMPLECTS — комплектации (include.table.php)
   ========================================================================== */
.complects {
  margin-top: 60px;
}

.complects__menu {
  display: none;
}

.complects__filter {
  display: flex;
  gap: 25px;
  padding: 40px;
  background: linear-gradient(180deg, rgba(26, 27, 31, 0) 0%, var(--c-panel) 100%);
  border-radius: var(--radius-lg);
}

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

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

.complects__card {
  position: relative;
  min-height: 380px;
  padding-top: 80px;
}

.complects__badge {
  position: absolute;
  top: 0;
  left: 0;
  line-height: normal;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 20px;
  height: var(--control-h);
  padding: 0 25px 0 10px;
  font-weight: 400;
  font-size: 18px;
  letter-spacing: 0.36px;
  text-transform: uppercase;
  background: var(--c-panel);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 100px;
}

.complects__badge b {
  font-weight: 500;
}

.complects__badge .ico {
  width: 22px;
  height: 22px;
}

.complects__image {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  width: 577px;
  pointer-events: none;
}

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

.complects__body {
  position: relative;
  z-index: 1;
  width: 933px;
  height: 270px;
  margin-left: auto;
  padding: 40px 141px 0;
  background: var(--c-panel);
  border-radius: var(--radius-lg);
}

.complects__name {
  display: flex;
  align-items: center;
  gap: 35px;
  font-size: 40px;
  font-weight: 300;
  line-height: normal;
  white-space: nowrap;
}

.complects__chip {
  display: flex;
  align-items: center;
  flex: none;
  height: var(--control-h);
  padding: 0 30px;
  font-weight: 400;
  font-size: 24px;
  line-height: normal;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 100px;
}

.complects__name {
  margin-left: 36px;
}

.complects__specs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 38px;
  list-style: none;
}

.complects__specs li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  line-height: normal;
  letter-spacing: 0.32px;
}

/* Разделитель — отдельный флекс-элемент: при space-between он получает
   одинаковые зазоры слева и справа, как в макете. */
.complects__specs .complects__sep {
  flex: none;
  width: 1px;
  height: 50px;
  padding: 0;
  background: rgba(255, 255, 255, 0.4);
}

.complects__specs b {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 300;
  font-size: 30px;
  line-height: normal;
  white-space: nowrap;
}

.complects__specs img {
  flex: none;
  width: 24px;
  height: 24px;
}

.complects__btns {
  position: absolute;
  right: 141px;
  bottom: -30px;
  left: 141px;
  display: flex;
  gap: 25px;
}

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

/* Кнопки свисают из панели на 30px — фон нужен и в покое, и по ховеру,
   иначе сквозь них видно фон страницы. */
.complects__btns .btn:not(.btn--accent) {
  background: var(--c-panel);
}

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

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

.complects__more {
  display: flex;
  align-items: center;
  gap: 20px;
  width: auto;
  height: 50px;
  margin: 60px auto 0;
  padding: 0;
  font-weight: 300;
  border: none;
  background: transparent;
}

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

.complects__more img {
  width: 3px;
  height: 35px;
}

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

/* ==========================================================================
   CREDIT — автокредит: карточки с раскрытием по ховеру
   ========================================================================== */
.credit {
  position: relative;
}

.credit__panel {
  position: relative;
  z-index: 1;
  padding: 60px 40px 60px;
}

.credit__panel::after {
  background: var(--brd-panel-edges) border-box;
}

/* Засветки по кромкам панели: в макете это размытые эллипсы, обрезанные
   краем панели, поэтому радиальный градиент от самой кромки. Обе лежат на
   одном псевдоэлементе — второй занят рамкой. */
.credit__panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
        50% 100% at 50% 0%,
        rgba(255, 255, 255, 0.16) 0%,
        rgba(255, 255, 255, 0) 100%
      )
      50% 0 / 1063px 180px no-repeat,
    radial-gradient(
        50% 100% at 50% 100%,
        rgba(255, 255, 255, 0.16) 0%,
        rgba(255, 255, 255, 0) 100%
      )
      50% 100% / 1063px 180px no-repeat;
  pointer-events: none;
}

/* Надпись HONGQI: лежит за панелью и выходит за её края. */
.credit__bg {
  position: absolute;
  top: 411px;
  left: 50%;
  z-index: 0;
  width: 2090px;
  max-width: none;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.credit__comment {
  max-width: 615px;
  margin: 0 auto;
  padding-top: 60px;
  font-size: 20px;
  text-align: center;
}

.credit__cards {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 25px;
  height: 240px;
  margin-top: 60px;
}

.credit__card {
  position: relative;
  flex: 0 1 410px;
  height: 240px;
  overflow: hidden;
  background: var(--c-dark);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-lg);
  transition:
    height var(--transition),
    background-color var(--transition);
}

.credit__card-title {
  position: relative;
  z-index: 2;
  padding: 29px 29px 0;
  font-size: 30px;
  line-height: normal;
}

.credit__card .ico-round {
  position: absolute;
  right: 31px;
  bottom: 29px;
  z-index: 2;
  width: 70px;
  height: 70px;
}

.credit__card .ico {
  width: 30px;
  height: 30px;
}

.credit__card-img {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  transition: opacity var(--transition);
}

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

.credit__card-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(16, 17, 21, 0.71) 0%,
    rgba(16, 17, 21, 0) 57%
  );
}

.credit__card:hover {
  height: 280px;
  background: rgba(255, 255, 255, 0.05);
}

.credit__card:hover .credit__card-img {
  opacity: 1;
}

.credit__card:hover .ico-round {
  opacity: 0;
}

.credit__form {
  display: flex;
  flex-wrap: wrap;
  gap: 15px 25px;
  width: 647px;
  margin: 60px auto 0;
}

.credit__form .form-group {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}

.credit__form .btn {
  flex: none;
}

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

/* ==========================================================================
   OFFERS — обмен авто и тест-драйв
   ========================================================================== */
.offers .container {
  display: flex;
  gap: 24px;
}

.offer {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
}

.offer__title {
  justify-content: flex-start;
  margin-bottom: 40px;
}

.offer__title::before {
  display: none;
}

.offer--right .offer__title {
  justify-content: flex-end;
}

.offer--right .offer__title::before {
  display: block;
}

.offer--right .offer__title::after {
  display: none;
}

.offer__card {
  position: relative;
  border-radius: var(--radius-lg);
}

.offer__media {
  display: block;
  width: 100%;
  height: 475px;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

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

.offer__panel {
  position: relative;
  z-index: 2;
  margin-top: -40px;
  padding: 40px;
}

.offer__comment {
  min-height: 56px;
  margin-bottom: 40px;
  font-size: 24px;
  line-height: 1.17;
}

.offer__panel .form-group {
  margin-bottom: 10px;
}

.offer__panel .btn {
  width: 100%;
  margin-bottom: 15px;
}

/* ==========================================================================
   SLIDER — бесконечная лента фотографий
   ========================================================================== */
.slider {
  overflow: hidden;
}

.slider__track {
  display: flex;
  gap: 25px;
  width: max-content;
  animation: slider-run 70s linear infinite;
}

.slider__item {
  flex: none;
  width: 579px;
  height: 279px;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

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

@keyframes slider-run {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(calc(-50% - 12.5px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .slider__track {
    animation: none;
  }
}

/* ==========================================================================
   CONTACTS — контакты + карта
   ========================================================================== */
.contacts__wrap {
  display: flex;
  gap: 25px;
  margin-top: 60px;
}

.contacts__card {
  position: relative;
  flex: 0 0 497px;
}

.contacts__media {
  display: block;
  height: 336px;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

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

.contacts__panel {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  min-height: 457px;
  margin-top: -56px;
  padding: 39px;
}

.contacts__logo {
  width: 267px;
  margin-bottom: 34px;
}

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

.contacts__info {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 41px;
}

.contacts__panel .btn {
  width: 100%;
  margin-top: auto;
}

#map1 {
  flex: 1 1 auto;
  min-width: 0;
  height: 737px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--c-panel);
}

/* В макете карта обесцвечена: гасим только слой подложки, чтобы метка
   осталась цветной. */
#map1 ymaps[class$="ground-pane"] {
  filter: grayscale(1);
}

/* ==========================================================================
   FOOTER — подвал
   ========================================================================== */
footer {
  margin-top: var(--gap-section);
  padding: 40px 0;
  background: var(--c-panel);
}

.footer__wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  min-height: 110px;
}

.footer__legal {
  font-size: 16px;
  line-height: 1.4;
  letter-spacing: 0.32px;
}

.footer__links {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  font-size: 16px;
  letter-spacing: 0.32px;
  text-align: right;
}

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

.disclamer {
  display: none;
  padding-top: 30px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--c-soft);
}

.disclamer p + p {
  margin-top: 10px;
}

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

/* Ниже ширины макета контейнер сжимается, а фиксированные блоки карточек
   переходят на проценты. */
@media (max-width: 1439px) {
  .cars__media {
    left: 24.7%;
    width: 49.2%;
  }

  .cars__gallery {
    width: 20.2%;
  }

  .cars__gallery .swiper-slide {
    width: 85.5%;
  }

  .cars__btns .btn {
    padding: 0 12px;
    font-size: 14px;
  }

  .complects__image {
    width: 42.4%;
  }

  .complects__body {
    width: 68.6%;
    padding: 40px 10.4%;
  }

  .complects__btns {
    right: 10.4%;
    left: 10.4%;
  }

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

  .section-title::before,
  .section-title::after {
    width: 160px;
  }

  .banner__title {
    font-size: 36px;
  }

  .banner__date,
  .banner__subtitle {
    font-size: 28px;
  }

  .timer__clock {
    flex: 1 1 auto;
  }
}

@media (max-width: 1199px) {
  :root {
    --gap-section: 80px;
  }

  .menu__group {
    gap: 25px;
  }

  .menu a {
    font-size: 14px;
  }

  .info__label,
  .info__value {
    font-size: 16px;
  }

  .header__addr {
    display: none;
  }

  /* Порядок блоков: спец.цена справа, название, авто, офферы, кнопки, галерея. */
  .cars__inner {
    display: flex;
    flex-direction: column;
    height: auto;
  }

  .cars__badge {
    right: 40px;
    left: auto;
  }

  .cars__name {
    order: 1;
  }

  .cars__model {
    order: 2;
  }

  .cars__media {
    order: 3;
    position: relative;
    bottom: 0;
    left: auto;
    width: 70%;
    height: auto;
    margin: -10px auto 10px;
  }

  .cars__benefits {
    order: 4;
    margin-top: -10%;
  }

  .cars__btns {
    order: 5;
  }

  .cars__gallery {
    order: 6;
    position: relative;
    top: 0;
    right: 0;
    left: 0;
    width: 100%;
    height: auto;
    margin-top: 30px;
    transform: none;
  }

  /* «Колода» как на десктопе, только горизонтальная. */
  .cars__gallery .swiper {
    padding: 14px 0;
  }

  .cars__gallery .swiper-slide {
    width: auto;
    height: auto;
    aspect-ratio: 235 / 134;
  }

  .cars__arrow {
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
  }

  .cars__arrow img {
    transform: rotate(90deg);
  }

  .cars__arrow--prev,
  .cars__arrow--next {
    top: 50%;
  }

  .cars__arrow--next {
    right: 15px;
    left: auto;
  }

  .cars__arrow--next img {
    transform: rotate(-90deg);
  }

  .cars__btns {
    position: static;
    margin-top: 30px;
  }

  .cars__model {
    font-size: 40px;
  }

  .complects__card {
    padding-top: 60px;
  }

  .complects__image {
    position: relative;
    width: 70%;
    margin: 0 auto;
  }

  .complects__body {
    width: 100%;
    height: auto;
    padding: 40px;
  }

  .complects__name {
    margin-left: 0;
  }

  .complects__btns {
    position: static;
    margin-top: 30px;
  }

  .complects__name {
    flex-wrap: wrap;
    gap: 20px;
    font-size: 32px;
    white-space: normal;
  }

  .complects__chip {
    font-size: 18px;
  }

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

  .credit__cards {
    height: auto;
    flex-wrap: wrap;
  }

  .credit__card {
    flex: 1 1 280px;
  }

  .credit__card-title {
    font-size: 24px;
  }

  .contacts__wrap {
    flex-direction: column;
  }

  .contacts__card {
    flex: none;
  }

  #map1 {
    height: 450px;
  }

  .offer__media {
    height: 320px;
  }

  .offer__comment {
    font-size: 20px;
  }
}

@media (max-width: 991px) {
  :root {
    --head-h: 96px;
  }

  .menu {
    top: 96px;
    height: auto;
  }

  .menu .container {
    flex-direction: column;
    gap: 10px;
    padding: 20px 15px;
  }

  .menu__group {
    flex-direction: column;
    gap: 10px;
  }

  .offers .container {
    flex-direction: column;
    gap: 60px;
  }

  .offer__title {
    justify-content: center;
  }

  .offer__title::before,
  .offer--right .offer__title::after {
    display: block;
  }
}

@media (max-width: 767px) {
  :root {
    --gap-section: 50px;
    --control-h: 50px;
    --radius-lg: 20px;
  }

  .container {
    padding: 0 15px;
  }

  body {
    font-size: 14px;
  }

  header {
    height: 70px;
  }

  .logo img {
    width: 130px;
    height: 36px;
  }

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

  .header__phone {
    gap: 8px;
    margin-right: 45px;
  }

  .header__phone .info__value {
    font-size: 3.7vw;
    white-space: nowrap;
  }

  .header__phone img {
    width: 22px;
    height: 22px;
  }

  :root {
    --head-h: 70px;
  }

  /* Бургер. */
  .m_btn {
    position: absolute;
    top: 25px;
    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-accent);
    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 {
    top: 70px;
    right: -100%;
    left: auto;
    height: auto;
    transition: right var(--transition);
  }

  .menu.active {
    right: 0;
  }

  .menu a {
    font-size: 16px;
  }

  /* Баннер: картинка в потоке задаёт высоту, текст поверх и в vw. */
  .banner {
    height: auto;
    overflow: visible;
  }

  .banner__media {
    position: relative;
    inset: auto;
    display: block;
  }

  .banner__media img {
    height: auto;
  }

  .banner .container {
    position: absolute;
    inset: 0;
    padding-top: 4vw;
  }

  .banner__panel {
    position: static;
    width: 100%;
    max-width: none;
    padding: 4vw 3vw;
    transform: none;
    border-radius: var(--radius-lg);
  }

  .banner__date {
    gap: 2vw;
    margin-bottom: 2vw;
    font-size: 3.2vw;
  }

  .banner__date-ico {
    width: 8vw;
    height: 8vw;
  }

  .banner__date-ico img {
    width: 4vw;
    height: 4vw;
  }

  .banner__title {
    margin-bottom: 2vw;
    font-size: 4.6vw;
  }

  .banner__subtitle {
    font-size: 3.4vw;
  }

  .section-title {
    gap: 10px;
    font-size: 24px;
    letter-spacing: 0.48px;
  }

  .section-title::before,
  .section-title::after {
    width: 100%;
  }

  .timer {
    margin-top: var(--gap-section);
  }

  .timer__card {
    flex-direction: column;
    align-items: stretch;
    gap: 25px;
    padding: 20px;
  }

  /* В колонке flex-basis уехал бы в высоту. */
  .timer__form {
    flex: none;
    width: 100%;
  }

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

  .timer__title {
    margin-bottom: 15px;
    font-size: 20px;
    text-align: center;
  }

  .timer__row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .timer__row .btn {
    width: 100%;
  }

  .timer__clock {
    flex: none;
    width: 100%;
    order: -1;
  }

  /* Карточка модели: всё в колонку, галерея — горизонтальная. */
  .cars__list {
    gap: 50px;
    margin-top: 30px;
  }

  .cars__card {
    padding-top: 25px;
  }

  .cars__inner {
    height: auto;
    padding: 20px 15px;
  }

  .cars__badge {
    right: 15px;
    left: auto;
    gap: 10px;
    height: 44px;
    padding: 0 15px 0 8px;
    font-size: 12px;
  }

  .cars__badge .ico-round {
    width: 30px;
    height: 30px;
  }

  .cars__badge .ico {
    width: 16px;
    height: 16px;
  }

  .cars__name {
    font-size: 14px;
  }

  .cars__model {
    font-size: 30px;
  }

  .cars__media {
    position: relative;
    bottom: 0;
    left: auto;
    width: 100%;
    height: auto;
    margin: 10px 0;
  }

  .cars__benefits {
    width: 100%;
    margin-top: -14%;
  }

  .cars__link {
    font-size: 14px;
  }

  .cars__gallery {
    margin-top: 20px;
  }

  .cars__gallery .swiper {
    padding: 10px 0;
  }

  .cars__arrow {
    top: 50%;
    right: auto;
    bottom: auto;
    left: 5px;
    width: 34px;
    height: 34px;
    transform: translateY(-50%);
  }

  .cars__arrow img {
    width: 2px;
    height: 22px;
    transform: rotate(90deg);
  }

  .cars__arrow--prev {
    top: 50%;
    bottom: auto;
  }

  .cars__arrow--next {
    top: 50%;
    right: 5px;
    bottom: auto;
    left: auto;
  }

  .cars__arrow--next img {
    transform: rotate(-90deg);
  }

  .cars__btns {
    position: static;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
  }

  .cars__btns .btn,
  .complects__btns .btn {
    flex: none;
    width: 100%;
  }

  /* Комплектации. */
  .complects {
    margin-top: 25px;
  }

  .complects__filter {
    flex-direction: column;
    gap: 10px;
    padding: 20px 15px;
  }

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

  .complects__card {
    min-height: 0;
    padding-top: 44px;
  }

  .complects__badge {
    gap: 10px;
    height: 44px;
    padding: 0 15px 0 8px;
    font-size: 12px;
  }

  .complects__badge .ico-round {
    width: 30px;
    height: 30px;
  }

  .complects__badge .ico {
    width: 16px;
    height: 16px;
  }

  .complects__image {
    width: 100%;
  }

  .complects__body {
    padding: 20px 15px;
  }

  .complects__name {
    gap: 12px;
    font-size: 22px;
  }

  .complects__chip {
    height: 40px;
    padding: 0 18px;
    font-size: 14px;
  }

  .complects__specs {
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
  }

  .complects__specs li {
    flex: 1 1 40%;
    align-items: flex-start;
    gap: 5px;
    font-size: 12px;
  }

  .complects__specs .complects__sep {
    display: none;
  }

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

  .complects__specs img {
    width: 18px;
    height: 18px;
  }

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

  .form-group select {
    padding: 0 45px 0 18px;
    font-size: 14px;
    background-position: right 15px center;
  }

  .complects__more {
    gap: 10px;
    margin-top: 30px;
  }

  .complects__more img {
    height: 24px;
  }

  /* Кредит. */
  .credit__panel {
    padding: 25px 15px;
  }

  .credit__bg {
    display: none;
  }

  .credit__panel::before {
    background-size: 100% 90px;
  }

  .credit__comment {
    padding-top: 25px;
    font-size: 14px;
  }

  .credit__cards {
    flex-direction: column;
    gap: 10px;
    margin-top: 25px;
  }

  .credit__card,
  .credit__card:hover {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    flex: none;
    width: 100%;
    height: auto;
    padding: 12px 15px;
  }

  .credit__card-title {
    padding: 0;
    font-size: 18px;
  }

  .credit__card .ico-round {
    position: static;
    width: 46px;
    height: 46px;
  }

  .credit__card .ico {
    width: 20px;
    height: 20px;
  }

  .credit__card-img {
    display: none;
  }

  .credit__form {
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin-top: 25px;
  }

  .credit__form .btn {
    width: 100%;
  }

  /* Обмен / тест-драйв. */
  .offers .container {
    gap: 40px;
  }

  .offer__title {
    margin-bottom: 20px;
  }

  .offer__media {
    height: 55vw;
  }

  .offer__panel {
    margin-top: -20px;
    padding: 20px 15px;
  }

  .offer__comment {
    min-height: 0;
    margin-bottom: 20px;
    font-size: 16px;
  }

  /* Лента фотографий. */
  .slider__item {
    width: 70vw;
    height: 34vw;
  }

  .slider__track {
    gap: 10px;
    animation-duration: 45s;
  }

  @keyframes slider-run {
    from {
      transform: translateX(0);
    }
    to {
      transform: translateX(calc(-50% - 5px));
    }
  }

  /* Контакты. */
  .contacts__wrap {
    margin-top: 25px;
  }

  .contacts__media {
    height: 50vw;
  }

  .contacts__panel {
    min-height: 0;
    margin-top: -20px;
    padding: 20px 15px;
  }

  .contacts__logo {
    width: 200px;
    margin-bottom: 20px;
  }

  .contacts__info {
    gap: 12px;
    margin-bottom: 20px;
  }

  .info img {
    width: 28px;
    height: 28px;
  }

  .info__label,
  .info__value {
    font-size: 14px;
    white-space: normal;
  }

  #map1 {
    height: 320px;
  }

  /* Подвал. */
  footer {
    padding: 25px 0;
  }

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

  .footer__legal {
    font-size: 11px;
  }

  .footer__links {
    align-items: flex-start;
    font-size: 13px;
    text-align: left;
  }

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

  .form_title {
    margin-bottom: 20px;
    font-size: 20px;
  }
}
