/* ============================================
   Electro Auto KG — стили
   Минимализм, много воздуха, современный UI
   ============================================ */

/* ----- Бирюзово-серый: современно, «электро» ----- */
:root {
  /* Фон — холодноватый светлый */
  --color-bg: #f0f4f8;
  --color-bg-elevated: #ffffff;
  --color-surface: #ffffff;
  --color-surface-hover: #f8fafc;
  --color-surface-strong: #e2e8f0;
  /* Текст — slate */
  --color-text: #1e293b;
  --color-text-muted: #64748b;
  --color-text-subtle: #94a3b8;
  /* Акцент — бирюза/teal */
  --color-accent: #0d9488;
  --color-accent-hover: #0f766e;
  --color-accent-muted: rgba(13, 148, 136, 0.12);
  /* CTA — красный */
  --color-brand: #c41e3a;
  --color-brand-hover: #a61a30;
  --color-brand-muted: rgba(196, 30, 58, 0.12);
  /* Доп. акцент */
  --color-highlight: #475569;
  --color-highlight-hover: #0d9488;
  /* Семантика */
  --color-success: #059669;
  --color-warning: #d97706;
  /* Границы и тени */
  --color-border: rgba(0, 0, 0, 0.06);
  --color-border-strong: rgba(13, 148, 136, 0.3);
  --color-border-accent: rgba(13, 148, 136, 0.2);
  --color-overlay: rgba(0, 0, 0, 0.35);
  --shadow-card: 0 2px 14px rgba(0, 0, 0, 0.04);
  --shadow-card-hover: 0 14px 36px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(13, 148, 136, 0.15);
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  --transition-fast: 0.2s ease;
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --radius: 8px;
  --header-height: 72px;
  --max-width: 1400px;
}

/* ----- Сброс и база ----- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  height: 100%;
}

body {
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-bg);
  background-image: linear-gradient(180deg, #f8fafc 0%, #f0f4f8 50%, #e2e8f0 100%);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Контейнер экранов: скролл внутри main, футер внизу прокрутки */
.app-main {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-top: var(--header-height);
  background: var(--color-bg);
}

/* Один «экран» приложения: в потоке, футер после контента */
.view {
  display: none;
}

.view.view--active {
  display: block;
}

.view__content {
  padding: var(--space-lg) var(--space-md);
  max-width: var(--max-width);
  margin: 0 auto;
}

.view__content--center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  text-align: center;
  padding: var(--space-2xl);
}

.view__placeholder {
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast), opacity var(--transition-fast);
}

ul {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ----- Кнопки ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius);
  transition: background-color var(--transition-smooth), color var(--transition-smooth),
    transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btn--primary {
  background: var(--color-accent);
  color: #fff;
}

.btn--primary:hover {
  background: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(13, 148, 136, 0.3);
}

.btn--outline {
  border: 2px solid var(--color-text);
  color: var(--color-text);
}

.btn--outline:hover {
  background: var(--color-text);
  color: #fff;
  transform: translateY(-2px);
}

/* ========== HEADER ========== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
  transition: background var(--transition-smooth), box-shadow var(--transition-smooth);
}

.header__container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
}

/* Логотип: изображение (машина + ELECTRO AUTO) */
.header__logo {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  padding: 6px 12px;
  margin: 0 -12px 0 0;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: background var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.header__logo:hover {
  background: #f8f9fa;
  border-color: var(--color-border-strong);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.header__logo-img {
  display: block;
  height: 42px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  object-position: left center;
  vertical-align: middle;
}

/* Текст вместо логотипа, если картинка не загрузилась */
.header__logo-fallback {
  display: block;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-brand);
  letter-spacing: -0.02em;
  line-height: 1.2;
  white-space: nowrap;
}

.header__logo-fallback-sub {
  font-size: 0.85em;
  font-weight: 500;
  color: var(--color-text-muted);
}

/* Навигация */
.header__nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.nav__link {
  position: relative;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text);
  padding: var(--space-xs) var(--space-sm);
  white-space: nowrap;
}

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

.nav__link--cta {
  color: var(--color-brand);
  font-weight: 600;
}

.nav__link--cta:hover {
  color: var(--color-brand-hover);
  opacity: 1;
}

.nav__link--active {
  color: var(--color-accent);
  font-weight: 600;
}

.nav__link--active::after {
  content: '';
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 2px;
  background: var(--color-accent);
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(13, 148, 136, 0.2);
}


/* Правая часть: язык (глобус + RU), телефон, поиск */
.header__right {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  flex-shrink: 0;
}

/* Иконки в шапке */
.icon {
  flex-shrink: 0;
}

.header__phone {
  font-weight: 500;
  font-size: 1rem;
  color: var(--color-text);
  white-space: nowrap;
}

.header__phone:hover {
  color: var(--color-highlight);
}

/* Телефон в меню — только на мобильном */
.nav__phone-item {
  display: none;
}

/* Оверлей меню (только мобильный, показывается через JS) */
.header__nav-backdrop {
  display: none;
}

/* Бургер-меню (скрыт на десктопе) */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 10px;
  -webkit-tap-highlight-color: transparent;
}

.burger__line {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text);
  border-radius: 1px;
  transition: transform var(--transition-smooth), opacity var(--transition-smooth);
}

.burger[aria-expanded="true"] .burger__line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.burger[aria-expanded="true"] .burger__line:nth-child(2) {
  opacity: 0;
}

.burger[aria-expanded="true"] .burger__line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ========== HERO ========== */
.hero {
  position: relative;
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Hero на главном экране заполняет весь видимый объём */
#view-home .hero {
  min-height: calc(100vh - var(--header-height));
  min-height: calc(100dvh - var(--header-height));
}

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

.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: heroZoom 20s ease-out forwards;
}

@keyframes heroZoom {
  from {
    transform: scale(1.05);
  }
  to {
    transform: scale(1);
  }
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: var(--color-overlay);
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: var(--space-xl);
  max-width: 800px;
}

.hero__label {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  color: var(--color-accent);
  margin-bottom: var(--space-xs);
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero__title {
  font-size: clamp(3rem, 10vw, 5.5rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: var(--space-lg);
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero__btn {
  animation: fadeInUp 0.8s ease-out 0.6s both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========== Контент: левое меню + модели (3 в ряд) + правое меню ========== */
.content-layout {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-md);
}

/* Боковое меню */
.sidebar {
  position: sticky;
  top: calc(var(--header-height) + var(--space-lg));
}

.sidebar__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.sidebar__link {
  display: block;
  padding: var(--space-sm) var(--space-md);
  font-size: 0.95rem;
  color: var(--color-text);
  border-radius: var(--radius);
  transition: background var(--transition-fast), color var(--transition-fast),
    padding-left var(--transition-fast);
}

.sidebar__link:hover {
  background: var(--color-surface-hover);
  color: var(--color-highlight);
  padding-left: calc(var(--space-md) + 4px);
}

/* Секция автомобилей */
.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: var(--space-xl);
  color: var(--color-text);
}

.cars__intro {
  font-size: 1rem;
  color: var(--color-text-muted);
  margin: calc(-1 * var(--space-lg)) 0 var(--space-xl);
}

/* Сортировка каталога (незаметная) */
.cars__toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
}

.cars__sort-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-subtle);
  letter-spacing: 0.01em;
}

.cars__sort {
  padding: var(--space-xs) var(--space-sm);
  font-size: 0.9rem;
  font-family: var(--font-main);
  color: var(--color-text-muted);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  cursor: pointer;
  min-width: 200px;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}

.cars__sort:hover,
.cars__sort:focus {
  border-color: var(--color-border-strong);
  color: var(--color-text);
  outline: none;
}

.cars__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.cars__empty {
  color: var(--color-text-muted);
  text-align: center;
  padding: var(--space-2xl);
  grid-column: 1 / -1;
}

/* ========== Карточка автомобиля (кликабельная ссылка на детали) ========== */
.car-card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-top: 2px solid var(--color-accent);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 0;
}

.car-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--color-border-strong);
  border-top-color: var(--color-accent-hover);
  background: var(--color-surface-hover);
}

.car-card__header {
  padding: var(--space-md) var(--space-md) 0;
  flex-shrink: 0;
}

.car-card__title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.car-card__badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.car-card__img-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  order: 0;
  flex-shrink: 0;
}

.car-card__discount {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  z-index: 1;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  background: var(--color-accent, #0d9488);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.car-card__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.car-card:hover .car-card__img {
  transform: scale(1.05);
}

/* Декоративный оверлей при наведении (не блокирует клики) */
.car-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.2), transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.car-card:hover .car-card__overlay {
  opacity: 1;
}

.car-card__body {
  padding: var(--space-md) var(--space-md) var(--space-lg);
  margin-top: auto;
}

.car-card__status {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: var(--space-xs);
}

.car-card[data-status="in_stock"] .car-card__status {
  color: var(--color-success);
}

.car-card__specs {
  list-style: none;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-sm);
  line-height: 1.5;
}

.car-card__specs li {
  margin-bottom: 2px;
}

.car-card__old-price {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  text-decoration: line-through;
  margin: 0 0 var(--space-xs);
}

.car-card__price-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: var(--space-xs);
  letter-spacing: 0.02em;
}

.car-card__location {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin: 0;
}

/* Кнопка «Подробнее» (визуально; клик по всей карточке) */
.car-card__action {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  margin-top: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-accent);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius);
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.2);
}

.car-card:hover .car-card__action {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  color: #fff;
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.3);
  transform: translateY(-1px);
}

/* Подробная карточка машины (экран по клику) */
.car-detail {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-lg) var(--space-md);
}

.car-detail__back {
  display: inline-flex;
  align-items: center;
  margin-bottom: var(--space-lg);
  padding: var(--space-xs) 0;
  font-size: 0.95rem;
  color: var(--color-highlight);
  font-weight: 500;
  transition: color var(--transition-fast), opacity var(--transition-fast);
}

.car-detail__back:hover {
  color: var(--color-highlight-hover);
}

.car-detail__hero {
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  margin-bottom: var(--space-xl);
}

.car-detail__gallery {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  max-height: 50vh;
}

.car-detail__gallery::-webkit-scrollbar {
  height: 8px;
}

.car-detail__gallery::-webkit-scrollbar-track {
  background: var(--color-surface-strong);
}

.car-detail__gallery::-webkit-scrollbar-thumb {
  background: var(--color-border-strong);
  border-radius: 4px;
}

.car-detail__gallery-item {
  flex: 0 0 100%;
  min-width: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.car-detail__gallery-item .car-detail__img {
  width: 100%;
  height: auto;
  max-height: 50vh;
  object-fit: contain;
  display: block;
  cursor: zoom-in;
}

.car-detail__thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  padding: var(--space-sm);
  background: var(--color-surface-strong);
  border-top: 1px solid var(--color-border);
}

.car-detail__thumb {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  padding: 0;
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-surface);
  cursor: pointer;
  transition: border-color var(--transition-fast), opacity var(--transition-fast);
}

.car-detail__thumb:hover {
  border-color: var(--color-accent);
  opacity: 0.95;
}

.car-detail__thumb--active {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 1px var(--color-accent);
}

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

.car-detail__content {
  padding-bottom: var(--space-2xl);
}

.car-detail__videos {
  margin: var(--space-xl) 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-md);
}

.car-detail__video {
  width: 100%;
  max-height: 360px;
  border-radius: var(--radius);
  background: #000;
}

.car-detail__title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
  color: var(--color-text);
}

.car-detail__price {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-xl);
}

.car-detail__specs {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-xs) var(--space-xl);
  margin-bottom: var(--space-xl);
}

.car-detail__specs dt {
  font-weight: 600;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.car-detail__specs dd {
  margin: 0;
  color: var(--color-text);
}

.car-detail__notes {
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border);
}

.car-detail__notes h3 {
  font-size: 1rem;
  margin-bottom: var(--space-sm);
  color: var(--color-text-muted);
}

.car-detail__notes p {
  margin: 0;
  line-height: 1.6;
  color: var(--color-text);
}

/* Правая колонка: брошюры и предложения */
.sidebar-right {
  position: sticky;
  top: calc(var(--header-height) + var(--space-lg));
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.sidebar-right__btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-weight: 600;
  color: var(--color-text);
  transition: background var(--transition-fast), color var(--transition-fast),
    border-color var(--transition-fast);
}

.sidebar-right__btn:hover {
  background: var(--color-accent);
  color: #fff;
}

.sidebar-right__arrow {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-left: var(--space-sm);
}

.sidebar-right__cards {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.sidebar-right__card {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-text);
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.sidebar-right__card:hover {
  border-color: var(--color-accent);
  background: var(--color-accent-muted);
}

.sidebar-right__card-icon {
  font-size: 1.5rem;
}

.sidebar-right__card-title {
  font-size: 0.95rem;
  font-weight: 500;
}

/* ========== Баннер сервиса ========== */
.service-banner {
  position: relative;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin: var(--space-2xl) 0;
}

.service-banner__bg {
  position: absolute;
  inset: 0;
}

.service-banner__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service-banner__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.service-banner__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: var(--space-xl);
  max-width: 600px;
}

.service-banner__title {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: var(--space-sm);
}

.service-banner__text {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: var(--space-lg);
}

.service-banner--in-view {
  min-height: 100%;
}

/* ========== Сервис (карточки услуг + блок записи) ========== */
.service__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

.service-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: var(--space-xl);
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), border-color var(--transition-fast);
  animation: serviceCardIn 0.5s ease-out both;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-hover));
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.service-card:nth-child(1) { animation-delay: 0.08s; }
.service-card:nth-child(2) { animation-delay: 0.16s; }
.service-card:nth-child(3) { animation-delay: 0.24s; }
.service-card:nth-child(4) { animation-delay: 0.32s; }

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--color-border-accent);
}

.service-card:hover::before {
  opacity: 1;
}

.service-card__icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--color-accent-muted);
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
  transition: transform var(--transition-smooth), background var(--transition-fast), color var(--transition-fast);
}

.service-card__icon svg {
  width: 28px;
  height: 28px;
}

.service-card:hover .service-card__icon {
  transform: scale(1.08);
  background: var(--color-accent);
  color: #fff;
}

.service-card__title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
}

.service-card__list {
  list-style: none;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--color-text-muted);
}

.service-card__list li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: var(--space-xs);
}

.service-card__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-accent);
  opacity: 0.8;
}

.service__booking {
  background: var(--color-accent-muted);
  border: 1px solid var(--color-border-accent);
  border-radius: 12px;
  padding: var(--space-xl);
  text-align: center;
  animation: creditFadeIn 0.5s ease-out 0.4s both;
}

.service__booking-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
}

.service__booking-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

.service__booking-phone {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
}

.service__booking-phone a {
  color: var(--color-accent);
  text-decoration: none;
}

.service__booking-phone a:hover {
  text-decoration: underline;
}

@keyframes serviceCardIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========== Кредитное предложение (две карточки) ========== */
.section-page {
  padding: var(--space-xl) 0 var(--space-2xl);
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-page__title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-md);
  letter-spacing: -0.02em;
  animation: creditFadeIn 0.5s ease-out;
}

.section-page__desc {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2xl);
  max-width: 720px;
  animation: creditFadeIn 0.5s ease-out 0.08s both;
}

.about-page {
  position: relative;
}

.about-page::before {
  content: '';
  position: absolute;
  inset: -40px -40px auto -40px;
  max-width: 900px;
  margin: 0 auto;
  background: radial-gradient(circle at top left, rgba(13, 148, 136, 0.12), transparent 60%);
  opacity: 0.8;
  pointer-events: none;
}

.about-page__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

.about-card {
  background: var(--color-surface);
  border-radius: 14px;
  border: 1px solid var(--color-border);
  padding: var(--space-lg);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), border-color var(--transition-fast);
}

.about-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(13, 148, 136, 0.14), transparent 60%);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.about-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--color-border-accent);
}

.about-card:hover::before {
  opacity: 1;
}

.about-card__icon {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: var(--color-accent-muted);
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-sm);
}

.about-card__icon svg {
  width: 26px;
  height: 26px;
}

.about-card__title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-xs);
}

.about-card__text {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.about-page__stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

.about-page__stat {
  min-width: 140px;
}

.about-page__stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 2px;
}

.about-page__stat-label {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.about-page__columns {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.4fr);
  gap: var(--space-xl);
  align-items: flex-start;
  margin-bottom: var(--space-xl);
}

.about-page__block {
  margin-bottom: var(--space-xl);
  max-width: 640px;
}

.about-page__block--accent {
  background: var(--color-surface);
  border-radius: 14px;
  border: 1px solid var(--color-border);
  padding: var(--space-lg);
  box-shadow: var(--shadow-card);
}

.about-page__subtitle {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
}

.about-page__list {
  list-style: disc;
  padding-left: var(--space-lg);
  color: var(--color-text-muted);
  line-height: 1.7;
}

.about-page__list li {
  margin-bottom: var(--space-xs);
}

.about-page__text {
  font-size: 1rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-xs);
}

.about-page__text--small {
  font-size: 0.9rem;
}

.about-page__text a {
  color: var(--color-accent);
}

.about-page__text a:hover {
  color: var(--color-accent-hover);
}

.about-page__cta {
  margin-top: var(--space-md);
}

/* ----- Полноэкранный просмотр фото авто ----- */
.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.85);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-smooth);
}

.image-lightbox--open {
  opacity: 1;
  pointer-events: auto;
}

.image-lightbox__content {
  position: relative;
  max-width: 96vw;
  max-height: 92vh;
  padding: var(--space-sm);
}

.image-lightbox__img {
  display: block;
  max-width: 100%;
  max-height: 88vh;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.image-lightbox__close {
  position: absolute;
  top: 0;
  right: 0;
  transform: translate(30%, -30%);
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  border: 1px solid rgba(148, 163, 184, 0.6);
}

.image-lightbox__close:hover {
  background: rgba(15, 23, 42, 1);
  color: #fff;
}

@keyframes creditFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes creditCardIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.credit__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
}

.credit-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: var(--space-xl);
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), border-color var(--transition-fast);
  animation: creditCardIn 0.5s ease-out both;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.credit-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-hover));
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.credit-card:nth-child(1) { animation-delay: 0.12s; }
.credit-card:nth-child(2) { animation-delay: 0.22s; }

.credit-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--color-border-accent);
}

.credit-card:hover::before {
  opacity: 1;
}

.credit-card__icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: var(--color-accent-muted);
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
  flex-shrink: 0;
  transition: transform var(--transition-smooth), background var(--transition-fast), color var(--transition-fast);
}

.credit-card__icon svg {
  width: 30px;
  height: 30px;
}

.credit-card:hover .credit-card__icon {
  transform: scale(1.08);
  background: var(--color-accent);
  color: #fff;
}

.credit-card__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
}

.credit-card__desc {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

.credit-card__list {
  list-style: none;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
  flex-grow: 1;
}

.credit-card__list li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: var(--space-xs);
}

.credit-card__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-accent);
}

.credit-card__btn {
  margin-top: auto;
  text-align: center;
  display: inline-block;
}

/* ========== О заказе (возможности сервиса + звонок) ========== */
.order-info__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

.order-info__card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: var(--space-xl);
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), border-color var(--transition-fast);
}

.order-info__card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--color-border-accent);
}

.order-info__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--color-accent-muted);
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
}

.order-info__icon svg {
  width: 24px;
  height: 24px;
}

.order-info__card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-xs);
}

.order-info__card-text {
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--color-text-muted);
  margin: 0;
}

.order-info__call {
  background: var(--color-accent-muted);
  border: 1px solid var(--color-border-accent);
  border-radius: 12px;
  padding: var(--space-xl);
  text-align: center;
}

.order-info__call-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-xs);
}

.order-info__call-text {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-sm);
}

.order-info__call-phone {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
}

.order-info__call-phone a {
  color: var(--color-accent);
  text-decoration: none;
}

.order-info__call-phone a:hover {
  text-decoration: underline;
}

/* ========== Машины «на заказ» (заказы от Кашка) ========== */
.orders-list {
  margin-bottom: var(--space-2xl);
}

.orders-list__loading,
.orders-list__error,
.orders-list__empty {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

.orders-list__error {
  color: var(--color-brand);
}

/* Карточки используются стандартные .car-card из раздела «Модели» */

/* ========== Книга жалоб и предложений (данные на сайт бухгалтерии) ========== */
.complaint-book {
  max-width: 560px;
  margin: 0 auto;
}

.complaint-book__intro {
  color: var(--color-text-muted);
  margin-bottom: var(--space-xl);
  line-height: 1.6;
}

.complaint-form__row {
  margin-bottom: var(--space-md);
}

.complaint-form__label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-xs);
}

.complaint-form__input {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  font-family: var(--font-main);
  font-size: 1rem;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.complaint-form__input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px var(--color-accent-muted);
}

.complaint-form__input::placeholder {
  color: var(--color-text-subtle);
}

.complaint-form__select {
  cursor: pointer;
  appearance: auto;
}

.complaint-form__textarea {
  resize: vertical;
  min-height: 120px;
}

.complaint-form__row--submit {
  margin-top: var(--space-xl);
  margin-bottom: 0;
}

.complaint-form__status {
  padding: var(--space-md);
  margin-bottom: var(--space-md);
  border-radius: var(--radius);
  font-size: 0.95rem;
}

.complaint-form__status--success {
  background: rgba(5, 150, 105, 0.12);
  color: var(--color-success);
  border: 1px solid rgba(5, 150, 105, 0.3);
}

.complaint-form__status--error {
  background: rgba(220, 38, 38, 0.08);
  color: var(--color-brand);
  border: 1px solid rgba(220, 38, 38, 0.25);
}

/* ========== Форма записи на тест-драйв ========== */
.testdrive-form-wrap {
  max-width: 520px;
  margin: 0 auto;
  padding: var(--space-xl) 0;
}

.testdrive-form__intro {
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
  line-height: 1.5;
}

.testdrive-form__label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-xs);
  margin-top: var(--space-sm);
}

.testdrive-form__label:first-of-type { margin-top: 0; }

.testdrive-form__input {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  font-family: var(--font-main);
  font-size: 1rem;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.testdrive-form__textarea {
  resize: vertical;
  min-height: 80px;
}

.testdrive-form__input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px var(--color-accent-muted);
}

.testdrive-form .btn--primary {
  margin-top: var(--space-lg);
}

.testdrive-form__status {
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius);
  margin-bottom: var(--space-md);
  font-size: 0.95rem;
}

.testdrive-form__status--success {
  background: rgba(5, 150, 105, 0.12);
  color: var(--color-success);
  border: 1px solid rgba(5, 150, 105, 0.3);
}

.testdrive-form__status--error {
  background: rgba(220, 38, 38, 0.08);
  color: var(--color-brand);
  border: 1px solid rgba(220, 38, 38, 0.25);
}

/* ----- Honeypot: скрыто от пользователя, видно ботам ----- */
.form-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.form-hp__input {
  position: absolute;
  left: -9999px;
}

/* ----- Математическая captcha ----- */
.form-captcha {
  margin-bottom: var(--space-md);
}

.form-captcha__input {
  max-width: 6em;
}

/* ========== FOOTER (компактный, не растягивается) ========== */
.footer {
  flex-shrink: 0;
  background: #e2e8f0;
  border-top: 1px solid var(--color-border);
  color: var(--color-text);
  padding: var(--space-lg) var(--space-md);
}

.footer__container {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
  margin-bottom: var(--space-md);
}

.footer__heading {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
}

.footer__link {
  display: block;
  color: var(--color-text-muted);
  margin-bottom: var(--space-xs);
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}

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

.footer__address {
  font-style: normal;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.footer__social {
  display: flex;
  gap: var(--space-sm);
}

.footer__social-link {
  padding: var(--space-xs) var(--space-sm);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.85rem;
  color: var(--color-text-muted);
  transition: border-color var(--transition-fast), background var(--transition-fast), color var(--transition-fast);
}

.footer__social-link:hover {
  border-color: var(--color-accent);
  background: var(--color-accent-muted);
  color: var(--color-accent);
}

.footer__bottom {
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border);
}

.footer__copyright {
  font-size: 0.8rem;
  color: var(--color-text-subtle);
}

/* ========== ГАРАНТИЯ (премиум-карточки) ========== */
.warranty {
  padding: var(--space-xl) 0 var(--space-2xl);
  max-width: var(--max-width);
  margin: 0 auto;
}

.warranty__title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-md);
  letter-spacing: -0.02em;
  animation: warrantyFadeIn 0.6s ease-out;
}

.warranty__desc {
  font-size: 1.1rem;
  line-height: 1.65;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2xl);
  max-width: 640px;
  animation: warrantyFadeIn 0.6s ease-out 0.1s both;
}

.warranty__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

.warranty-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: var(--space-xl);
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), border-color var(--transition-fast);
  animation: warrantyCardIn 0.5s ease-out both;
  position: relative;
  overflow: hidden;
}

.warranty-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-hover));
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.warranty-card:nth-child(1) { animation-delay: 0.15s; }
.warranty-card:nth-child(2) { animation-delay: 0.25s; }
.warranty-card:nth-child(3) { animation-delay: 0.35s; }
.warranty-card:nth-child(4) { animation-delay: 0.45s; }

.warranty-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--color-border-accent);
}

.warranty-card:hover::before {
  opacity: 1;
}

.warranty-card__icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--color-accent-muted);
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
  transition: transform var(--transition-smooth), background var(--transition-fast), color var(--transition-fast);
}

.warranty-card__icon svg {
  width: 28px;
  height: 28px;
}

.warranty-card:hover .warranty-card__icon {
  transform: scale(1.08);
  background: var(--color-accent);
  color: #fff;
}

.warranty-card__title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
  letter-spacing: -0.01em;
}

.warranty-card__list {
  list-style: none;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--color-text-muted);
}

.warranty-card__list li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: var(--space-xs);
}

.warranty-card__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-accent);
  opacity: 0.8;
}

.warranty-card:hover .warranty-card__list li::before {
  opacity: 1;
}

.warranty__cta {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
  animation: warrantyFadeIn 0.5s ease-out 0.5s both;
}

.warranty .btn--primary {
  animation: warrantyFadeIn 0.5s ease-out 0.55s both;
}

@keyframes warrantyFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes warrantyCardIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========== АДАПТИВ: планшет ========== */
@media (max-width: 1024px) {
  .content-layout {
    grid-template-columns: 1fr;
  }

  .sidebar-right {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--space-md);
  }

  .sidebar-right__btn {
    flex: 1;
    min-width: 200px;
  }

  .sidebar-right__cards {
    flex-direction: row;
    flex: 1;
  }

  .sidebar-right__card {
    flex: 1;
    min-width: 140px;
  }

  .sidebar {
    position: static;
    display: flex;
    overflow-x: auto;
    padding-bottom: var(--space-sm);
    -webkit-overflow-scrolling: touch;
  }

  .sidebar__list {
    flex-direction: row;
    gap: var(--space-sm);
    flex-wrap: nowrap;
  }

  .sidebar__link {
    white-space: nowrap;
  }

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

  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-sm);
  }

  .warranty__grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .credit__grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .service__grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .order-info__grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
}

/* ========== АДАПТИВ: мобильные ========== */
@media (max-width: 768px) {
  :root {
    --header-height: 64px;
  }

  .header {
    /* На мобильных даём шапке авто-высоту под логотип и вкладки */
    height: auto;
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }

  /* Контейнер шапки: логотип сверху, вкладки ниже, в две строки не ломаются */
  .header__container {
    height: auto;
    padding-top: var(--space-xs);
    padding-bottom: var(--space-xs);
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .header__nav-backdrop {
    /* На мобильных больше не используем затемняющий оверлей */
    display: none;
  }

  .header__nav-backdrop.is-visible {
    opacity: 0;
    pointer-events: none;
  }

  /* На мобильных показываем навигацию как на десктопе — всегда под шапкой */
  .header__nav {
    position: static;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    z-index: auto;
    flex: none;
    width: 100%;
    box-sizing: border-box;
    /* Делаем отдельную белую полосу с горизонтальным скроллом вкладок */
    background: #ffffff;
    padding: 0 var(--space-sm);
    transform: none;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    border-bottom: 1px solid var(--color-border);
    justify-content: flex-start;
  }

  .header__nav.is-open {
    transform: none;
  }

  .nav__list {
    flex-direction: row;
    align-items: center;
    gap: var(--space-sm);
    padding: 0.35rem 0;
    /* Чтобы вкладки не переносились и не наезжали на контент */
    flex-wrap: nowrap;
    /* Делаем ширину по содержимому, чтобы работал горизонтальный скролл */
    width: max-content;
  }

  .nav__list li {
    border-bottom: none;
  }

  .nav__link {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0.35rem 0.75rem;
    min-height: auto;
    line-height: 1.4;
    font-size: 0.9rem;
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap;
  }

  /* В мобильной шапке не рисуем стрелки у пунктов */
  .nav__link::after {
    content: '';
  }

  .nav__phone-item {
    display: none;
  }

  .header__right .header__phone {
    font-size: 0.9rem;
  }

  .burger {
    /* На мобильных убираем бургер — меню всегда видно в шапке */
    display: none;
  }

  /* Чуть больше отступ сверху у контента, чтобы не залезал под увеличенную шапку */
  .app-main {
    padding-top: 104px;
  }

  .hero {
    min-height: 70vh;
  }

  .hero__content {
    padding: var(--space-lg);
  }

  .cars__grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .content-layout {
    padding: var(--space-xl) var(--space-md);
  }

  .section-page {
    padding: var(--space-lg) 0 var(--space-xl);
  }

  .credit-card {
    padding: var(--space-lg);
  }

  .service-card {
    padding: var(--space-md) var(--space-lg);
  }

  .service__booking {
    padding: var(--space-lg);
  }

  .order-info__card {
    padding: var(--space-lg);
  }

  .order-info__call {
    padding: var(--space-lg);
  }

  .service-banner {
    min-height: 320px;
  }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
    margin-bottom: var(--space-sm);
  }

  .warranty {
    padding: var(--space-lg) 0 var(--space-xl);
  }

  .warranty-card {
    padding: var(--space-md) var(--space-lg);
  }

  .warranty-card__icon {
    width: 44px;
    height: 44px;
  }

  .warranty-card__icon svg {
    width: 24px;
    height: 24px;
  }

  .about-page__grid {
    grid-template-columns: 1fr;
  }

  .about-page__columns {
    grid-template-columns: 1fr;
  }

  .footer {
    padding: var(--space-md) var(--space-md);
  }

  .app-main {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }

  .view__content {
    padding-left: var(--space-sm);
    padding-right: var(--space-sm);
  }

  .btn {
    min-height: 44px;
    padding: 12px 20px;
    -webkit-tap-highlight-color: transparent;
  }

  .cars__sort,
  .complaint-form__input,
  .testdrive-form__input,
  .testdrive-form__select {
    min-height: 44px;
    font-size: 16px; /* убирает зум на iOS при фокусе */
  }

  .car-detail__gallery {
    margin-left: calc(-1 * env(safe-area-inset-left));
    margin-right: calc(-1 * env(safe-area-inset-right));
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
}

@media (max-width: 480px) {
  .header__phone {
    display: none;
  }

  .hero__title {
    font-size: 2.25rem;
  }

  .section-page__title {
    font-size: 1.5rem;
  }

  .view__content {
    padding: var(--space-md) var(--space-sm);
  }

  .header__logo-img {
    max-width: 140px;
    height: 36px;
  }

  .credit-card,
  .complaint-form,
  .testdrive-form {
    padding: var(--space-md);
  }
}

@media (max-width: 360px) {
  .header__container {
    padding-left: var(--space-sm);
    padding-right: var(--space-sm);
  }

  .view__content {
    padding-left: var(--space-xs);
    padding-right: var(--space-xs);
  }
}
