/* ============================================================
   JUNYOU EXPORT — карточка авто
   Дизайн: Figma «Карточка» (1920)
   ============================================================ */

/* ---------- Переменные ---------- */
:root {
  --red: #fc3a3a;
  --red-hover: #c31717;
  --black: #1c1c1c;
  --dark: #363636;
  --gray-text: #4f4f4f;
  --muted: #959595;
  --card-bg: #f6f6f6;
  --footer-bg: #f3f3f3;
  --footer-bar: #e9e9e9;
  --line: #d0d0d0;
  --line-dark: #2f2f2f;
  --line-nav: #474747;
  --white: #fff;
  --radius: 12px;
}

/* ---------- Сброс ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif;
  font-size: 16px;
  line-height: normal;
  color: var(--dark);
  background: var(--white);
}

h1, h2, h3, p, dl, dd, figure { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

button {
  font: inherit;
  color: inherit;
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
}

:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Контейнер ---------- */
.container {
  width: min(1400px, 100% - 40px);
  margin-inline: auto;
}

/* ---------- Общие элементы ---------- */
.vline {
  flex-shrink: 0;
  width: 1px;
  height: 40px;
  background: var(--red);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 30px;
  border-radius: var(--radius);
  font-size: 18px;
  line-height: normal;
  color: var(--white);
  text-align: center;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}

.btn--primary { background: var(--red); }
.btn--primary:hover { background: var(--red-hover); }

.btn--outline {
  border: 1px solid var(--red);
  background: transparent;
}
.btn--outline:hover { background: var(--red); }

.btn--lg {
  width: 350px;
  max-width: 100%;
  padding: 12px 30px;
  font-size: 20px;
  font-weight: 700;
}

.link-red {
  font-size: 20px;
  font-weight: 600;
  color: var(--red);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.link-red:hover { color: var(--red-hover); }
/* ссылка на отчёт идёт второй строкой под ссылкой на Che168 */
.link-red + .link-red { display: inline-block; margin-top: 8px; }

.link-underline {
  font-size: 16px;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.link-underline:hover { color: var(--red); }

/* ---------- Блок «соц.сети / написать нам» ---------- */
.contacts {
  display: flex;
  align-items: center;
  gap: 20px;
}

.contacts__label {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 82px;
  font-size: 16px;
  color: var(--white);
}
.contacts__label--wide { width: 127px; }
.contacts__label span:last-child { width: 100%; }

.contacts--light .contacts__label { color: var(--gray-text); }

.socials {
  display: flex;
  align-items: center;
  gap: 14px;
}
.socials img {
  width: 40px;
  height: 40px;
  transition: transform .2s ease;
}
.socials a:hover img { transform: scale(1.08); }

/* ---------- Телефоны ---------- */
.phone {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 700;
  white-space: nowrap;
}
.phone img {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
}
.phone:hover { color: var(--red); }

/* ============================================================
   HEADER
   ============================================================ */
.topbar {
  height: 40px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--black);
}
.topbar__text {
  font-size: 16px;
  color: var(--white);
  white-space: nowrap;
}

.header__main {
  height: 92px;
  border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
  background: var(--black);
}

.header__inner {
  height: 100%;
  display: flex;
  align-items: center;
}

.header__logo img {
  width: 118px;
  height: 52px;
  object-fit: contain;
}

.header__license {
  flex-shrink: 0;
  width: 181px;
  margin-left: 28px;
  font-size: 16px;
  color: var(--white);
}

.header__inner .contacts--soc { margin-left: 65px; }
.header__inner .contacts--write { margin-left: 40px; }

.header__phones {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-left: auto;
  padding-left: 40px;
  color: var(--white);
}

.lang {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 46px;
}
.lang__flag {
  display: block;
  width: 34px;
  height: 22px;
  border: 1px solid #e4e4e4;
  border-radius: 4px;
  overflow: hidden;
}
.lang__flag img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.lang__code {
  font-size: 16px;
  font-weight: 600;
  color: var(--white);
}
.lang__caret {
  width: 12px;
  height: 10px;
  transform: scaleY(-1);
}

/* ---------- Навигация ---------- */
.navbar {
  height: 74px;
  background: var(--black);
}
.navbar__inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 30px;
}

.menu {
  display: flex;
  align-items: center;
  gap: 30px;
}
.menu__link {
  font-size: 18px;
  color: var(--white);
  text-transform: uppercase;
  transition: color .2s ease;
}
.menu__link:hover { color: var(--red); }

.menu__divider {
  width: 1px;
  height: 22px;
  background: var(--line-nav);
}

.navbar__actions {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-left: auto;
}

/* Бургер (появляется вместо горизонтального меню) */
.burger {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  margin-left: 20px;
  border-radius: 50%;
  background: var(--red);
  transition: background-color .2s ease;
}
.burger:hover { background: var(--red-hover); }
.burger span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 4px;
  background: var(--white);
  transition: transform .25s ease, opacity .25s ease;
}
.burger.is-open span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* ============================================================
   КАРТОЧКА АВТО
   ============================================================ */
.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  padding-top: 10px;
  font-size: 16px;
  color: var(--muted);
  text-transform: uppercase;
}
.breadcrumbs__link:hover { color: var(--dark); }
.breadcrumbs__link--current { pointer-events: none; }
.breadcrumbs__sep {
  width: 20px;
  height: 20px;
}

.page-title {
  margin-top: 70px;
  font-size: 42px;
  line-height: 1.22;
  font-weight: 800;
  text-transform: uppercase;
}
/* страница без хлебных крошек — заголовок отбит от меню */
.page-title--top { margin-top: 100px; }
.page-title--center { text-align: center; }

.car {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-top: 30px;
}

/* ---------- Галерея ---------- */
.gallery {
  flex: 0 0 572px;
  width: 572px;
}

.gallery__main {
  border-radius: var(--radius);
  overflow: hidden;
}
.gallery__link {
  display: block;
  cursor: zoom-in;
}
.gallery__main img {
  width: 100%;
  height: 424px;
  object-fit: cover;
}

.gallery__thumbs {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 12px;
}

.gallery__arrow {
  flex-shrink: 0;
  width: 28px;
  height: 91px;
}
.gallery__arrow img {
  width: 28px;
  height: 91px;
  transition: opacity .2s ease;
}
.gallery__arrow:hover img { opacity: .6; }
.gallery__arrow--next img { transform: rotate(180deg); }

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

.gallery__thumb {
  height: 91px;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
}
.gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .65;
  transition: opacity .2s ease;
}
.gallery__thumb:hover img,
.gallery__thumb.swiper-slide-thumb-active img { opacity: 1; }

/* ---------- Информация ---------- */
.car__info {
  flex: 1 1 auto;
  min-width: 0;
}

.car__row {
  display: grid;
  grid-template-columns: minmax(0, 388px) 400px;
  gap: 20px;
  align-items: start;
}

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

.divider {
  height: 0;
  margin: 22px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

/* Характеристики */
.specs {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 30px;
  font-size: 18px;
}
.specs__row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.specs dt {
  flex: 0 0 140px;
  width: 140px;
}
.specs dd {
  margin: 0;
  font-weight: 600;
}

.link-underline { margin-top: 16px; }
.link-underline + .link-underline { margin-top: 8px; }
.link-underline--red { color: var(--red); }

/* Примерная стоимость */
.cost__title {
  font-size: 22px;
  font-weight: 700;
}
.cost {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin-top: 14px;
  font-size: 18px;
}
.cost__row {
  display: flex;
  align-items: center;
  gap: 20px;
}
.cost dt { flex: 0 0 220px; }
.cost dd {
  margin: 0;
  min-width: 110px;
  font-weight: 600;
  white-space: nowrap;
}
.cost__row--total {
  font-size: 20px;
  font-weight: 700;
}
.cost__row--total dd { font-weight: 700; }

/* ---------- Карточки (цена / курс) ---------- */
.card {
  padding: 20px;
  border-radius: var(--radius);
  background: var(--card-bg);
  overflow: hidden;
}

.card--price {
  display: flex;
  flex-direction: column;
  gap: 38px;
  min-height: 329px;
}

.card--rates { min-height: 201px; }

.card__title {
  font-size: 18px;
  font-weight: 600;
}

.card__note {
  font-size: 16px;
}

.price {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.price__head {
  display: flex;
  align-items: center;
  gap: 18px;
}
.price__title {
  font-size: 18px;
  font-weight: 700;
}
.price__value {
  padding: 6px 14px;
  border-radius: var(--radius);
  background: var(--red);
  font-size: 22px;
  font-weight: 700;
  color: var(--white);
  white-space: nowrap;
}

.price__delivery {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
  font-size: 18px;
}
.price__delivery-main { font-weight: 700; }

.price__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 18px;
}

.rates {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
  font-size: 18px;
}

/* ---------- CTA ---------- */
.car__cta {
  display: grid;
  grid-template-columns: minmax(0, 388px) 400px;
  gap: 20px;
  align-items: center;
}

.car__note {
  margin-top: 18px;
  font-size: 16px;
}

/* ============================================================
   ПРЕИМУЩЕСТВА
   ============================================================ */
.advantages {
  padding: 102px 0 100px;
}

.advantages__title {
  font-size: 32px;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
}

.advantages__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 50px 20px;
  margin-top: 50px;
}

.adv-card {
  position: relative;
  min-height: 134px;
  padding: 48px 20px 20px;
  border-radius: var(--radius);
  background: var(--card-bg);
  font-size: 18px;
  font-weight: 700;
}
.adv-card--tall { min-height: 156px; }

.adv-card__num {
  position: absolute;
  top: -24px;
  left: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 8px;
  background: var(--red);
  font-size: 32px;
  font-weight: 700;
  color: var(--white);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  margin-top: 90px;
  background: var(--footer-bg);
}
main:has(.advantages) + .footer { margin-top: 0; }

.footer__main {
  height: 126px;
  display: flex;
  align-items: center;
}

.footer__inner {
  display: flex;
  align-items: center;
}

.footer__logo img {
  width: 118px;
  height: 52px;
  object-fit: contain;
}

.footer__license {
  flex-shrink: 0;
  width: 161px;
  margin-left: 20px;
  font-size: 14px;
  color: var(--gray-text);
}

.footer__inner .contacts--soc { margin-left: 100px; }
.footer__inner .contacts--write { margin-left: 100px; }

.footer__phones {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-left: auto;
  padding-left: 40px;
  color: var(--gray-text);
}
.footer__phones .phone { font-weight: 600; }

/* заголовок «Номера:» есть только в мобильном макете */
.footer__phones-title { display: none; }

.footer__bottom {
  min-height: 75px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 30px;
  padding: 12px 20px;
  background: var(--footer-bar);
}

.footer__policy {
  font-size: 14px;
  line-height: 1.4;
  color: var(--dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footer__policy:hover { color: var(--red); }
.footer__address {
  max-width: 578px;
  font-size: 14px;
  font-style: normal;
  line-height: 1.4;
  text-align: center;
  color: var(--dark);
}



/* ============================================================
   КАТАЛОГ «Цена HONDA в КИТАЕ»
   ============================================================ */
.catalog__intro {
  max-width: 1037px;
  margin-top: 20px;
  font-size: 18px;
}

/* ---------- свёрнутый список марок и моделей ---------- */
/* в выгрузке две сотни марок: рядом лежат две сетки — короткая и полная,
   видна всегда одна из них */
.models-box.is-collapsed .models--full { display: none; }
.models-box:not(.is-collapsed) .models--preview { display: none; }

button.all-brands {
  border: 0;
  background: none;
  cursor: pointer;
  font: inherit;
}

/* ---------- проверка «вы не робот» ---------- */
.captcha {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.captcha__label { font-size: 22px; font-weight: 700; }

.captcha__input {
  width: 120px;
  height: 54px;
  padding: 0 16px;
  border: 1px solid #d8dbe0;
  border-radius: 10px;
  font-size: 18px;
}

/* ---------- текст внизу страницы из раздела «SEO» ---------- */
.seo-text {
  max-width: 1037px;
  margin-top: 40px;
  color: #4a4f57;
  font-size: 16px;
  line-height: 26px;
}

.seo-text p + p { margin-top: 14px; }

@media (max-width: 767px) {
  .seo-text { margin-top: 28px; font-size: 15px; line-height: 24px; }
}

/* ---------- список моделей ---------- */
/* Колонки тянутся: в выгрузке встречаются длинные названия вроде
   «BYD FANGCHENG» и «ACCORD NEW ENERGY», под фиксированную ширину макета
   они не помещались и обрезались краем экрана. */
.models {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 24px;
  margin-top: 40px;
}
/* колонки марок на странице «Цена на авто» */
.models--brands {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  column-gap: 16px;
  row-gap: 30px;
}
.models__link { white-space: normal; }
.models__name { overflow-wrap: anywhere; }
.models--brands .all-brands {
  grid-column: -2;
  margin-top: 0;
  justify-self: start;
  align-self: start;
}

.models__list {
  display: flex;
  flex-direction: column;
  gap: 21px;
}
.models__link {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 18px;
}
.models__name { font-weight: 700; }
.models__count { color: #7e7e7e; }
.models__link:hover .models__name { color: var(--red); }

.all-brands {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 30px;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--dark);
  font-size: 18px;
  font-weight: 700;
}
.all-brands img {
  width: 22px;
  height: 22px;
}
.all-brands:hover {
  color: var(--red);
  border-bottom-color: var(--red);
}

/* ---------- подробная информация об авто ---------- */
/* переносы строк, как в макете (десктоп — своя точка, мобильный — своя) */
.desk-break { display: block; }
.mob-break { display: inline; }
.wide-break,
.narrow-break { display: inline; }
.modal--wide .wide-break { display: block; }

.specs-full {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
  margin: 30px 0 100px;
  font-size: 16px;
  line-height: 20px;
}
.specs-full__col > p { overflow-wrap: anywhere; }

/* заголовки разделов у поставщика идут строкой с двоеточием и без значения */
.specs-full__head {
  margin-top: 14px;
  font-weight: 700;
}
.specs-full__col > p:first-child.specs-full__head { margin-top: 0; }

/* ---------- поля фильтра ---------- */
.control {
  width: 100%;
  height: 60px;
  padding: 0 15px;
  border: 1px solid #e9e9e9;
  border-radius: var(--radius);
  background: var(--white);
  font-family: inherit;
  font-size: 18px;
  color: var(--dark);
  transition: border-color .2s ease;
}
.control::placeholder {
  color: var(--dark);
  opacity: 1;
}
.control:focus {
  outline: none;
  border-color: var(--red);
}

.select { position: relative; }
.select__input {
  width: 100%;
  height: 60px;
  padding: 0 44px 0 15px;
  border: 1px solid #e9e9e9;
  border-radius: var(--radius);
  background: var(--white) url("../img/icons/select-arrow.svg") no-repeat right 17px center;
  background-size: 22px 22px;
  -webkit-appearance: none;
  appearance: none;
  font-family: inherit;
  font-size: 18px;
  color: var(--dark);
  cursor: pointer;
  transition: border-color .2s ease;
}
.select__input:focus {
  outline: none;
  border-color: var(--red);
}
.select--active .select__input { font-weight: 700; }

.field-group__label {
  display: block;
  margin-bottom: 6px;
  font-size: 16px;
  line-height: 22px;
  color: #7e7e7e;
}
.field-group__pair {
  display: flex;
  gap: 10px;
}
.field-group__pair > * { width: calc(50% - 5px); }
.field-group__pair .select__input { padding-right: 39px; }

/* ---------- панель фильтров ---------- */
.filters {
  margin-top: 50px;
  padding: 30px;
  border-radius: var(--radius);
  background: var(--card-bg);
}
/* страница модели: фильтр идёт сразу за описанием */
.catalog--model .filters { margin-top: 40px; }
.filters__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px 20px;
}

.field-group--action {
  display: flex;
  flex-direction: column;
  padding-top: 26px;
}
.filters__submit {
  height: 60px;
  font-size: 20px;
  font-weight: 700;
}
.filters__reset {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
  font-size: 18px;
  line-height: 22px;
  color: #7e7e7e;
  transition: color .2s ease;
}
.filters__reset img {
  width: 22px;
  height: 22px;
}
.filters__reset:hover { color: var(--red); }

/* ---------- сортировка ---------- */
.sort {
  width: 420px;
  max-width: 100%;
  margin-top: 30px;
}
.sort .field-group__label { line-height: 20px; }

/* ---------- карточка авто в списке ---------- */
.car-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 20px;
}

.car-card {
  display: flex;
  min-height: 395px;
  border-radius: var(--radius);
  background: #f9f9f9;
  overflow: hidden;
}

.car-card__photo {
  position: relative;
  flex: 0 0 520px;

  /* Рамка держит пропорции макета и не растягивается по высоте карточки:
     раньше при длинном описании она становилась вертикальной, и машину
     обрезало по бокам. */
  align-self: flex-start;
  aspect-ratio: 520 / 395;

  /* полоски-буллеты слайдера, как в макете: 78×6, активная — красная */
  --swiper-pagination-bottom: 10px;
  --swiper-pagination-bullet-width: 78px;
  --swiper-pagination-bullet-height: 6px;
  --swiper-pagination-bullet-border-radius: 12px;
  --swiper-pagination-bullet-horizontal-gap: 5px;
  --swiper-pagination-bullet-inactive-color: #fff;
  --swiper-pagination-bullet-inactive-opacity: 1;
  --swiper-pagination-color: var(--red);
}
/* Снимок вписывается в рамку целиком. Пропорции фотографий у поставщика и
   у машин, добавленных вручную, разные, а высота карточки зависит от текста —
   при обрезке по краям у машины «отрезало» бампер. */
.car-card__photo .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* заглушка рисованная — её вписываем целиком, без обрезки */
.car-card__photo .car-card__photo-empty { object-fit: contain; }

/* у машин, добавленных вручную, снимков бывает два десятка — полоски делим
   по ширине фотографии, чтобы они не переносились на вторую строку и не
   закрывали автомобиль */
.car-card__dots.swiper-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  box-sizing: border-box;
  padding: 0 20px;
}
.car-card__dots .swiper-pagination-bullet {
  flex: 1 1 0;
  min-width: 6px;
  max-width: 78px;
  margin: 0 !important;
}

.car-card__main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 0 0 324px;
  margin: 20px 0 20px 50px;
}
.car-card__head {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.car-card__title {
  font-size: 22px;
  font-weight: 700;
  text-transform: uppercase;
}
.car-card__subtitle {
  font-size: 20px;
  text-transform: uppercase;
}

.specs--card {
  gap: 8px;
  margin-top: 16px;
  font-size: 16px;
}

.btn--ghost {
  border: 1px solid var(--red);
  background: var(--white);
  color: var(--red);
  font-weight: 500;
}
.btn--ghost:hover {
  background: var(--red);
  color: var(--white);
}
.btn--ghost:hover img { filter: brightness(0) invert(1); }

.car-card__more {
  gap: 8px;
  margin-top: 20px;
  padding: 12px 60px;
}
.car-card__more img {
  width: 22px;
  height: 6px;
}

.car-card .price__value { line-height: 27px; }

.car-card__price {
  display: flex;
  flex-direction: column;
  gap: 38px;
  flex: 0 0 382px;
  margin: 20px 0 20px 60px;
}

/* ---------- пагинация ---------- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 30px 0 100px;
}
.pagination__list {
  display: flex;
  align-items: center;
  gap: 14px;
}
.pagination__arrow img {
  width: 40px;
  height: 40px;
}
.pagination__arrow--next img { transform: rotate(180deg); }
.pagination__arrow:hover img { opacity: .7; }

.pagination__item,
.pagination__dots {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 4px;
  font-size: 18px;
  font-weight: 700;
  transition: background-color .2s ease, color .2s ease;
}
.pagination__item {
  background: #f4f4f4;
  color: var(--dark);
}
a.pagination__item:hover {
  background: var(--red);
  color: var(--white);
}
.pagination__item.is-active {
  background: var(--red);
  color: var(--white);
}

/* ============================================================
   POPUP «Отправить заявку»
   ============================================================ */
.modal {
  position: relative;
  width: 694px;
  max-width: calc(100vw - 30px);
  padding: 40px 80px;
  border-radius: var(--radius);
  background: var(--white);
}

/* широкий попап «Подробная информация об авто» */
.modal--wide {
  width: 1400px;
  padding: 40px;
}
.modal--wide .specs-full { margin: 30px 0 0; }

.modal__close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 24px;
  height: 24px;
  opacity: .8;
  transition: opacity .2s ease;
}
.modal__close:hover { opacity: 1; }
.modal__close img {
  width: 100%;
  height: 100%;
}

.modal__title {
  font-size: 28px;
  font-weight: 700;
  text-align: center;
}

.modal__form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

/* поля */
.field {
  width: 100%;
  height: 58px;
  padding: 0 19px;
  border: 1px solid #dfdfdf;
  border-radius: var(--radius);
  background: #f4f4f4;
  font-family: inherit;
  font-size: 18px;
  font-weight: 600;
  color: var(--dark);
  transition: border-color .2s ease;
}
.field::placeholder {
  color: #8d8d8d;
  opacity: 1;
}
.field:focus {
  outline: none;
  border-color: var(--red);
}
.field--area {
  height: 160px;
  padding: 17px 19px;
  resize: vertical;
}

/* группа «Как с вами удобнее связаться?» */
.modal__group {
  margin: 18px 0 0;
  padding: 0;
  border: 0;
}
.modal__legend {
  padding: 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--dark);
}
.radios {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

/* радио и чекбокс */
.check {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  cursor: pointer;
}
.check input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.check__mark {
  position: relative;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border: 1px solid #d3d3d3;
  border-radius: 100px;
  background: #f3f3f3;
  transition: background-color .2s ease, border-color .2s ease;
}
.check--box .check__mark { border-radius: 4px; }

.check input:checked + .check__mark {
  border-color: var(--red);
  background: var(--red);
  box-shadow: inset 0 0 0 4px var(--white);
}
.check--box input:checked + .check__mark { box-shadow: none; }
.check--box input:checked + .check__mark::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 7px;
  width: 5px;
  height: 10px;
  border: solid var(--white);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.check input:focus-visible + .check__mark {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

.modal__submit {
  height: 58px;
  margin-top: 18px;
  font-size: 18px;
  font-weight: 600;
}
.modal__agree { margin-top: 2px; }

/* окно поверх страницы */
.fancybox--modal .fancybox__backdrop { background: rgba(54, 54, 54, .6); }
.fancybox--modal .fancybox__slide { padding: 20px 0; }
.fancybox--modal .fancybox__nav { display: none; }

/* ============================================================
   АДАПТИВ
   Брейкпоинты:
   1439 — три колонки (фото | характеристики | карточка) больше не помещаются
   1199 — горизонтальное меню уезжает в бургер
    879 — правая колонка карточек уходит под текст
    767 — мобильный макет (Figma «Карточка (mob)», 360)
   ============================================================ */

/* ---------- < 1440: контейнер становится резиновым, галерея над текстом ---------- */
@media (max-width: 1439px) {
  .header__license { margin-left: 24px; }
  .header__inner .contacts--soc { margin-left: 40px; }
  .header__inner .contacts--write { margin-left: 24px; }
  .header__phones { padding-left: 24px; }
  .lang { margin-left: 24px; }

  .footer__inner .contacts--soc,
  .footer__inner .contacts--write { margin-left: 40px; }
  .footer__phones { padding-left: 24px; }

  .topbar {
    height: auto;
    padding: 8px 0;
  }
  .topbar__text {
    white-space: normal;
    text-align: center;
  }

  .header__license { display: none; }

  .menu { gap: 16px; }
  .navbar__inner { gap: 20px; }
  .navbar__actions { gap: 16px; }

  /* каталог: колонки марок в три ряда, карточка сжимается вместе с контейнером */
  .models--brands {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 20px;
  }
  .car-card__photo { flex: 0 0 38%; }
  .car-card__main {
    flex: 1 1 auto;
    margin-left: 30px;
  }
  .car-card__price {
    flex: 0 0 320px;
    margin-left: 30px;
  }

  .car { flex-wrap: wrap; }
  .gallery {
    flex: 0 0 auto;
    width: 100%;
    max-width: 572px;
  }
  .car__info { flex: 1 1 100%; }
}

/* ---------- < 1366: строка меню уже не помещается — уезжает в бургер ---------- */
@media (max-width: 1365px) {
  .burger { display: flex; }

  .navbar {
    display: none;
    height: auto;
    border-top: 1px solid var(--line-dark);
  }
  .navbar.is-open { display: block; }
  .navbar__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    height: auto;
    padding: 20px 0;
  }
  .menu {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .menu__divider { display: none; }
  .navbar__actions {
    flex-wrap: wrap;
    gap: 14px;
    margin-left: 0;
  }
}

/* ---------- < 1200: компактная шапка + меню в бургере ---------- */
@media (max-width: 1199px) {
  .header__inner .contacts { display: none; }
  .header__phones { margin-left: auto; padding-left: 0; }

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

  /* подробная информация об авто: две колонки */
  .specs-full {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px;
    font-size: 14px;
    line-height: 17px;
  }

  /* каталог */
  .models { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 40px; }
  /* марок втрое больше, чем моделей, — им и на планшете хватает трёх колонок */
  .models--brands { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  /* Развёрнутый список — газетными колонками, а не сеткой.
     В сетке колонки стоят строками, и более короткая оставляла под собой
     пустоту до конца строки; здесь названия перетекают из колонки в колонку. */
  .models--full {
    display: block;
    column-count: 2;
    column-gap: 40px;
  }
  /* марок вчетверо больше, чем моделей, — им и здесь хватает трёх колонок */
  .models--brands.models--full { column-count: 3; }
  .models--full .models__col { display: contents; }
  .models--full .models__list {
    display: block;
    gap: 0;
  }
  .models--full .models__item {
    break-inside: avoid;
    padding-bottom: 21px;
  }
  .models--full .all-brands {
    column-span: all;
    margin-top: 10px;
  }
  .filters__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field-group--action { padding-top: 0; }

  .car-card { flex-wrap: wrap; }
  .car-card__photo {
    flex: 0 0 100%;
    height: 320px;
    aspect-ratio: auto;
    align-self: stretch;
  }
  .car-card__main {
    flex: 1 1 300px;
    margin: 20px 0 20px 20px;
  }
  .car-card__price {
    flex: 1 1 320px;
    margin: 20px 20px 20px 30px;
  }

  .footer__inner { flex-wrap: wrap; row-gap: 20px; }
  .footer__inner .contacts--soc { margin-left: auto; }
  .footer__inner .contacts--write { margin-left: 40px; }
  .footer__phones {
    flex: 0 0 100%;
    margin-left: 0;
    padding-left: 0;
  }
  .footer__main { height: auto; padding: 30px 0; }
}

/* ---------- < 880: карточки цен уходят под текст ---------- */
@media (max-width: 879px) {
  .car__row,
  .car__cta {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
  .card--price,
  .card--rates {
    width: 100%;
    max-width: 400px;
    min-height: 0;
  }
  .car__cta { justify-items: start; }

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

/* ---------- < 768: мобильный макет ---------- */
@media (max-width: 767px) {
  .footer { margin-top: 60px; }

  .container { width: min(1400px, 100% - 30px); }

  /* --- шапка: логотип, язык, бургер (68px) --- */
  .topbar { display: none; }

  .header__main {
    height: 68px;
    padding: 0;
    border-top: 0;
  }
  .header__logo img { width: 90px; height: 40px; }
  .header__license,
  .header__phones { display: none; }
  .lang { margin-left: auto; }

  /* --- хлебные крошки прокручиваются, а не переносятся --- */
  .breadcrumbs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-top: 12px;
    scrollbar-width: none;
  }
  .breadcrumbs::-webkit-scrollbar { display: none; }
  .breadcrumbs__link { white-space: nowrap; }

  .page-title {
    margin-top: 60px;
    font-size: 32px;
  }

  /* --- галерея: фото 330×245, миниатюры 90×60 со свайпом --- */
  .car { margin-top: 20px; }
  .gallery { max-width: none; }
  .gallery__main img {
    height: auto;
    aspect-ratio: 330 / 245;
  }
  .gallery__thumbs {
    gap: 0;
    margin-top: 8px;
  }
  .gallery__arrow { display: none; }
  .gallery__thumb {
    width: 90px;
    height: 60px;
    border-radius: 8px;
  }

  /* --- порядок блоков как в мобильном макете --- */
  .divider { display: none; }

  .car__row--main {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  .car__row--main .car__col { display: contents; }
  .car__row--main .link-red { order: 1; }
  .car__row--main .card--price { order: 2; }
  .car__row--main .specs { order: 3; margin-top: 0; }
  .car__row--main .link-underline {
    order: 4;
    width: 100%;
    margin-top: 0;
    text-align: center;
  }

  .car__row--cost {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 40px;
  }

  .car__cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
  }
  .car__note { margin-top: 20px; }

  /* --- типографика мобильного макета --- */
  .link-red,
  .link-underline,
  .specs,
  .cost,
  .card__note,
  .car__note,
  .contacts__label { line-height: 20px; }

  .link-red {
    width: 100%;
    font-size: 16px;
    text-align: center;
  }
  .specs { font-size: 16px; }
  .price__value { font-size: 20px; }
  .cost__title { font-size: 20px; }
  .cost { font-size: 16px; }
  /* строка «Итого» крупнее — в макете её высота 24px */
  .cost__row--total { line-height: 24px; }
  .cost dt { flex: 0 1 200px; }
  .cost dd { min-width: 0; }
  .btn--lg { width: 100%; }

  .card--price,
  .card--rates { max-width: none; }

  /* в мобильном макете отступы внутри карточки цены плотнее */
  .card--price { gap: 16px; }
  /* в мобильном макете отступ до блока доставки — 14px */
  .price__delivery { margin-top: -2px; }

  /* --- преимущества: одна колонка --- */
  .advantages { padding: 60px 0; }
  .advantages__title { font-size: 28px; }
  .advantages__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
    margin-top: 40px;
  }
  .adv-card,
  .adv-card--tall { min-height: 0; }

  /* --- попап --- */
  .modal {
    width: 330px;
    padding: 30px 16px;
  }
  .modal__close {
    top: 16px;
    right: 16px;
    width: 22px;
    height: 22px;
  }
  .modal__title { font-size: 20px; }
  .modal__form { margin-top: 16px; }

  /* широкий попап: по макету 330px (на планшете тянется по ширине экрана) */
  .modal--wide {
    width: calc(100vw - 30px);
    padding: 30px 16px 16px;
  }
  .modal--wide .specs-full { margin: 16px 0 0; }

  .field {
    height: 52px;
    padding: 0 15px;
    font-size: 16px;
  }
  .field--area {
    height: 189px;
    padding: 15px;
  }

  .modal__group { margin-top: 8px; }
  .radios {
    gap: 14px;
    margin-top: 14px;
  }
  .modal__submit { margin-top: 8px; }
  .modal__agree { margin-top: 0; }

  .fancybox--modal .fancybox__slide { padding: 20px 0; }
.fancybox--modal .fancybox__nav { display: none; }

  /* --- подробная информация об авто: одна колонка, шрифт 14px --- */
  .desk-break { display: inline; }
  .mob-break { display: block; }
  .modal--wide .wide-break { display: inline; }
  .modal--wide .narrow-break { display: block; }
  .specs-full {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    margin: 20px 0 60px;
    font-size: 14px;
    line-height: 17px;
  }

  /* --- каталог --- */
  .catalog__intro { margin-top: 12px; }

  /* в мобильном макете строка ярлыка поля — 20px */
  .field-group__label { line-height: 20px; }

  .models {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    margin-top: 30px;
  }
  .models__list { gap: 20px; }
  .all-brands { margin-top: 24px; }

  /* На узком экране колонки встают друг под друга, поэтому «первые пять строк
     каждой колонки» превратились бы в дыры в алфавите. Пока список свёрнут,
     показываем подряд первые десять названий — как в макете. */
  .models-box.is-collapsed .models__item--extra,
  .models-box.is-collapsed .models__list--extra { display: none; }

  .models--full,
  .models--brands.models--full {
    column-count: 2;
    column-gap: 20px;
  }
  .models--full .models__item { padding-bottom: 20px; }

  /* в мобильном макете марки идут в две колонки */
  .models--brands { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .models--brands .all-brands {
    justify-self: end;
    margin-top: 10px;
  }

  .filters {
    margin: 40px -15px 0;
    padding: 30px 15px;
    border-radius: 0;
  }
  .filters__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
  .field-group--action { padding-top: 0; }
  .filters__reset { margin-top: 12px; }

  .sort {
    width: 100%;
    margin-top: 40px;
  }

  .car-list {
    gap: 18px;
    margin-top: 20px;
  }

  .car-card {
    flex-direction: column;
    flex-wrap: nowrap;
    min-height: 0;
    padding: 0 16px 18px;
  }
  .car-card__photo {
    flex: none;
    height: 240px;
    margin: 0 -16px 20px;
    aspect-ratio: auto;
    align-self: stretch;
  }
  .car-card__dots { display: none; }

  .car-card__main,
  .car-card__price {
    display: contents;
  }
  .car-card__head { order: 2; }
  .car-card__title,
  .car-card__subtitle { font-size: 18px; }

  .specs--card {
    order: 3;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 20px;
    margin-top: 14px;
  }
  .specs--card .specs__row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .specs--card dt {
    flex: none;
    width: auto;
  }
  /* в мобильном макете показаны только четыре характеристики */
  .specs--card .specs__row:nth-child(2),
  .specs--card .specs__row:nth-child(3),
  .specs--card .specs__row:nth-child(7),
  .specs--card .specs__row:nth-child(8) { display: none; }
  .specs--card .specs__row:nth-child(1) { order: 1; }
  .specs--card .specs__row:nth-child(4) { order: 2; }
  .specs--card .specs__row:nth-child(6) { order: 3; }
  .specs--card .specs__row:nth-child(5) { order: 4; }

  .car-card .price {
    order: 4;
    margin-top: 18px;
  }
  .car-card .price__head { gap: 19px; }
  .car-card .price__list,
  .car-card .card__note { display: none; }

  /* под ценой в Китае оставляем только первый город доставки */
  .car-card .price__delivery { margin-top: 14px; }
  .car-card .price__delivery > p:first-child { display: none; }
  .car-card .price__delivery-main {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 8px;
    background: #f3f3f3;
    font-size: 16px;
    line-height: 20px;
  }

  .car-card__more {
    order: 5;
    width: 100%;
    margin-top: 18px;
  }

  .pagination {
    gap: 8px;
    margin: 20px 0 60px;
  }
  .pagination__list { gap: 8px; }
  .pagination__list li:nth-child(4) { display: none; }

  /* --- подвал --- */
  .footer__main { padding: 40px 0 30px; }
  .footer__inner { row-gap: 16px; }
  .footer__logo { margin-left: 16px; }
  .footer__license {
    display: block;
    margin-left: 20px;
  }
  .footer__inner .contacts {
    display: grid;
    grid-template-columns: 159px auto;
    align-items: center;
    flex: 0 0 100%;
    margin-left: 0;
    gap: 0;
  }
  .footer__inner .contacts--soc { margin-top: 8px; }
  .footer__inner .contacts__label { display: flex; }

  .footer__phones {
    gap: 8px;
    margin-top: 8px;
  }
  .footer__phones-title {
    display: block;
    margin-bottom: 2px;
    font-size: 18px;
    font-weight: 700;
  }

  .footer__bottom {
    height: auto;
    min-height: 109px;
    padding: 12px 15px;
  }
  /* в мобильном макете строка адреса — 17px */
  .footer__address { line-height: 17px; }
}

/* ---------- < 480: узкие экраны ---------- */
@media (max-width: 479px) {
  .navbar__actions .btn { width: 100%; }

  /* попап тянется по ширине экрана, отступ по 15px с каждой стороны */
  .fancybox--modal .fancybox__slide { padding: 20px 15px; }
  .modal {
    width: 100%;
    max-width: none;
  }
}

/* ---------- < 360: уже мобильного макета — колонки сжимаются ---------- */
@media (max-width: 359px) {
  .specs dt { flex: 0 0 120px; width: 120px; }

  .cost__row {
    justify-content: space-between;
    gap: 12px;
  }
  .cost dt { flex: 0 1 auto; }
  .cost dd {
    width: auto;
    min-width: 0;
    text-align: right;
  }
}

/* ---------- всплывающие сообщения сайта ---------- */
.site-flash {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(420px, calc(100vw - 40px));
}
.site-flash__item {
  padding: 16px 20px;
  border-radius: 12px;
  background: #1c1c1c;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .18);
  color: #fff;
  font-size: 16px;
  line-height: 22px;
  animation: site-flash-in .25s ease;
}
.site-flash__item--error { background: var(--red); }

@keyframes site-flash-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

@media (max-width: 767px) {
  .site-flash {
    right: 12px;
    left: 12px;
    bottom: 12px;
    max-width: none;
  }
  .site-flash__item { font-size: 15px; }
}

/* карточка каталога открывается и по заголовку, и по фотографии */
.car-card__photo-link {
  display: block;
  width: 100%;
  height: 100%;
}
.car-card__title a { transition: color .2s ease; }
.car-card__title a:hover { color: var(--red); }

/* ---------- контакты внутри бургер-меню (только мобильная версия) ---------- */
.navbar__contacts { display: none; }

@media (max-width: 1365px) {
  .navbar__contacts {
    display: flex;
    flex-direction: column;
    gap: 22px;
    order: 3;
    width: 100%;
    padding-top: 22px;
    border-top: 1px solid var(--line-dark);
  }
  .navbar__contacts .contacts { display: flex; }
  .navbar__contacts .contacts__label { color: #fff; }
  .navbar__phones {
    display: flex;
    flex-direction: column;
    gap: 12px;
    color: var(--white);
  }
  .navbar__label {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
  }
  .navbar__inner { align-items: stretch; }
  .navbar__actions { order: 2; }
  .menu { order: 1; }
}

/* ---------- «Расширенный поиск»: свёрнутый фильтр на мобильном ---------- */
.filters__more { display: none; }

@media (max-width: 767px) {
  .filters .field-group--advanced { display: none; }
  .filters.is-expanded .field-group--advanced { display: block; }

  .filters__more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-bottom: 14px;
    padding-bottom: 2px;
    border-bottom: 1px dashed var(--dark);
    font-size: 18px;
    line-height: 22px;
    transition: color .2s ease;
  }
  .filters__more img { transition: transform .2s ease; }
  .filters.is-expanded .filters__more img { transform: rotate(180deg); }
  .filters__more:hover { color: var(--red); }
}

/* ---------- поле фильтра с ручным вводом и подсказками ---------- */
.select--combo .select__input:not(.combo__input) { display: none; }
.select--disabled .select__input {
  background-color: #f4f4f4;
  color: #a5a5a5;
  cursor: not-allowed;
}
.combo__input { cursor: text; }

.combo__list {
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 280px;
  overflow-y: auto;
  display: none;
  padding: 6px 0;
  border: 1px solid #e9e9e9;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .12);
}
.select.is-open .combo__list { display: block; }

.combo__item {
  padding: 9px 15px;
  font-size: 17px;
  line-height: 22px;
  cursor: pointer;
}
.combo__item:hover,
.combo__item.is-active { background: #f6f6f6; }
.combo__item.is-current { font-weight: 700; }
.combo__empty {
  padding: 9px 15px;
  font-size: 16px;
  color: #7e7e7e;
}

/* модификация под заголовком карточки автомобиля */
.page-subtitle {
  margin-top: 10px;
  font-size: 20px;
  line-height: 26px;
  font-weight: 400;
  color: #7e7e7e;
}

@media (max-width: 767px) {
  .page-subtitle {
    margin-top: 8px;
    font-size: 16px;
    line-height: 22px;
  }
}

/* ---------- пометка «Продано» на фотографии ---------- */
.sold-mark {
  position: absolute;
  z-index: 5;
  top: 16px;
  left: 16px;
  padding: 7px 16px;
  border-radius: 10px;
  background: var(--red);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
  color: var(--white);
  font-size: 16px;
  line-height: 20px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
  pointer-events: none;
}
.sold-mark--lg {
  top: 20px;
  left: 20px;
  padding: 9px 20px;
  font-size: 18px;
  line-height: 22px;
}

@media (max-width: 767px) {
  .sold-mark,
  .sold-mark--lg {
    top: 12px;
    left: 12px;
    padding: 6px 14px;
    font-size: 14px;
    line-height: 18px;
  }
}
