/* ============================================
   МЕТА: Мир Подшипников Крымск
   Автор: WebByKir
   Версия: 2.0 — SEO & Performance Optimized
   ============================================ */

/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* Улучшение скролла на iOS */
  -webkit-text-size-adjust: 100%;
}

/* Отключаем smooth scroll для тех, кому плохо от анимаций */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  line-height: 1.6;
  color: #333;
  background: #fff;
  /* Предотвращает горизонтальный скролл */
  overflow-x: hidden;
  /* Улучшает рендеринг текста */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeSpeed;
}

/* Блокировка скролла при открытом меню */
body.lock {
  overflow: hidden;
}

/* ===== УТИЛИТЫ ===== */
.container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 20px;
}

.highlight {
  color: #f59e0b;
}

/* Визуально скрытый текст для SEO и скринридеров */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Фокус для клавиатурной навигации */
:focus-visible {
  outline: 3px solid #f59e0b;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Убираем outline при клике мышью */
:focus:not(:focus-visible) {
  outline: none;
}

/* Плавная прокрутка к якорям с учётом sticky header */
:target {
  scroll-margin-top: 100px;
}

/* ===== ВЕРХНЯЯ ПОЛОСКА ===== */
.topbar {
  background: #1a1a2e;
  padding: 10px 0;
  font-size: 13px;
  color: #aaa;
}

.topbar__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.topbar__left {
  display: flex;
  gap: 32px;
}

.topbar__left i {
  color: #f59e0b;
  margin-right: 8px;
}

.topbar__right {
  display: flex;
  gap: 16px;
}

.topbar__right a {
  color: #aaa;
  font-size: 16px;
  transition: color 0.3s ease;
  /* Увеличиваем область клика для мобильных */
  padding: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  min-height: 32px;
}

.topbar__right a:hover {
  color: #f59e0b;
}

/* ===== ШАПКА ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: white;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  /* GPU-ускорение для sticky */
  will-change: transform;
}

.header__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

/* ===== ЛОГОТИП ===== */
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #1a1a2e;
}

.logo__icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 22px;
  /* Содержит анимацию внутри */
  contain: layout style;
}

/* Крутящийся подшипник */
.bearing-icon {
  animation: spin 6s linear infinite;
  display: block;
  /* GPU-ускорение */
  will-change: transform;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* При наведении крутится быстрее */
.logo:hover .bearing-icon {
  animation-duration: 1s;
}

/* Останавливаем анимацию когда не видно (экономия GPU) */
.bearing-icon:not(:hover) {
  animation-play-state: running;
}

.logo__name {
  display: block;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.05em;
  line-height: 1.2;
}

.logo__sub {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #f59e0b;
  letter-spacing: 0.2em;
}

/* ===== НАВИГАЦИЯ ===== */
.nav {
  display: flex;
  gap: 36px;
}

.nav a {
  color: #333;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  transition: color 0.3s ease;
  position: relative;
  padding: 8px 0;
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: #f59e0b;
  transition: width 0.3s ease;
  border-radius: 2px;
}

.nav a:hover {
  color: #f59e0b;
}

.nav a:hover::after {
  width: 100%;
}

/* Активная ссылка */
.nav a.active {
  color: #f59e0b;
}

.nav a.active::after {
  width: 100%;
}

/* ===== ТЕЛЕФОН В ШАПКЕ ===== */
.header__phone {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header__phone-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.5);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(245, 158, 11, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
  }
}

.header__phone-info a {
  display: block;
  color: #1a1a2e;
  text-decoration: none;
  font-size: 18px;
  font-weight: 700;
  transition: color 0.3s ease;
}

.header__phone-info a:hover {
  color: #f59e0b;
}

.header__phone-info span {
  font-size: 12px;
  color: #999;
}

/* ===== БУРГЕР ===== */
.burger {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  /* Минимальная область нажатия 44x44px (WCAG) */
  min-width: 44px;
  min-height: 44px;
  justify-content: center;
  align-items: center;
}

.burger span {
  width: 28px;
  height: 3px;
  background: #1a1a2e;
  border-radius: 2px;
  transition: all 0.3s ease;
  display: block;
  transform-origin: center;
}

/* Исправленная анимация бургера */
.burger.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.burger.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.burger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* ===== КНОПКИ ===== */
.btn {
  padding: 16px 32px;
  font-size: 15px;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease, color 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-family: 'Montserrat', sans-serif;
  /* Предотвращает мерцание на мобильных */
  -webkit-tap-highlight-color: transparent;
}

.btn-yellow {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.btn-yellow:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.5);
}

.btn-yellow:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.btn-white {
  background: white;
  color: #1a1a2e;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-white:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.btn-white:active {
  transform: translateY(-1px);
}

.btn-outline-white {
  background: transparent;
  color: white;
  border: 2px solid white;
  border-radius: 8px;
}

.btn-outline-white:hover {
  background: white;
  color: #1a1a2e;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

/* ===== HERO СЕКЦИЯ ===== */
.hero {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  padding: 100px 0;
  position: relative;
  overflow: hidden;
}

.hero__overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  /* 
     SEO/Performance: Используйте локальное изображение вместо Unsplash!
     Замените на: url('/images/hero-bg.webp')
     Создайте версии: .webp (основная) + .jpg (fallback)
  */
  background: url('/images/og-image.jpg') center/cover no-repeat;
  opacity: 0.08;
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: white;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 24px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 50px;
  font-size: 14px;
  color: #f59e0b;
  margin-bottom: 32px;
  font-weight: 600;
}

.hero__title {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 24px;
  letter-spacing: 0.02em;
}

.hero__desc {
  font-size: clamp(16px, 2vw, 20px);
  color: rgba(255, 255, 255, 0.7);
  max-width: 700px;
  margin: 0 auto 48px;
  line-height: 1.7;
}

.hero__buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 80px;
  flex-wrap: wrap;
}

.hero__stats {
  display: flex;
  justify-content: center;
  gap: 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 40px 0;
  max-width: 900px;
  margin: 0 auto;
  /* Ускорение рендера */
  contain: layout style;
}

.hero__stat {
  flex: 1;
  text-align: center;
  padding: 0 30px;
}

.hero__stat-number {
  font-size: clamp(36px, 4vw, 48px);
  font-weight: 900;
  color: #f59e0b;
  line-height: 1;
  margin-bottom: 8px;
}

.hero__stat-number span {
  font-size: 0.67em;
}

.hero__stat-text {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  line-height: 1.4;
}

.hero__stat-divider {
  width: 1px;
  background: rgba(255, 255, 255, 0.1);
}

/* ===== ПОИСК ===== */
.search {
  padding: 0;
  margin-top: -40px;
  position: relative;
  z-index: 10;
}

.search__box {
  background: white;
  border-radius: 16px;
  padding: 48px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 32px;
}

.search__icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: white;
  flex-shrink: 0;
}

.search__content {
  flex: 1;
}

.search__content h2 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 16px;
  color: #1a1a2e;
}

.search__form {
  display: flex;
  gap: 0;
  margin-bottom: 12px;
}

.search__form input {
  flex: 1;
  padding: 16px 20px;
  border: 2px solid #e5e5e5;
  border-right: none;
  border-radius: 8px 0 0 8px;
  font-size: 16px;
  font-family: 'Montserrat', sans-serif;
  transition: border-color 0.3s ease;
  /* Убираем синюю подсветку на мобильных */
  -webkit-appearance: none;
}

.search__form input:focus {
  outline: none;
  border-color: #f59e0b;
}

.search__form .btn {
  border-radius: 0 8px 8px 0;
  white-space: nowrap;
}

.search__hint {
  font-size: 14px;
  color: #999;
}

.search__hint a {
  color: #f59e0b;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.search__hint a:hover {
  color: #d97706;
  text-decoration: underline;
}

/* ===== ЗАГОЛОВКИ СЕКЦИЙ ===== */
.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-header__line {
  width: 60px;
  height: 4px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-radius: 2px;
  margin: 0 auto 20px;
}

.section-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 900;
  color: #1a1a2e;
  margin-bottom: 12px;
  letter-spacing: 0.02em;
}

.section-subtitle {
  font-size: clamp(16px, 2vw, 18px);
  color: #999;
}

/* ===== ПРЕИМУЩЕСТВА ===== */
.advantages {
  padding: 120px 0;
  background: #f8f9fa;
}

.advantages__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.advantage-card {
  background: white;
  padding: 40px 32px;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  position: relative;
  overflow: hidden;
  border: 1px solid #eee;
  /* Ускорение рендера карточек */
  contain: layout style;
}

.advantage-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.advantage-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.advantage-card:hover::before {
  transform: scaleX(1);
}

.advantage-card__number {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 64px;
  font-weight: 900;
  color: rgba(245, 158, 11, 0.08);
  line-height: 1;
  /* Не мешает взаимодействию */
  pointer-events: none;
  user-select: none;
}

.advantage-card__icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(217, 119, 6, 0.1));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.advantage-card__icon i {
  font-size: 28px;
  color: #f59e0b;
}

.advantage-card h3 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 12px;
  color: #1a1a2e;
}

.advantage-card p {
  color: #666;
  font-size: 15px;
  line-height: 1.7;
}

/* ===== БРЕНДЫ ===== */
.brands {
  padding: 120px 0;
  background: #1a1a2e;
}

.brands .section-title {
  color: white;
}

.brands .section-subtitle {
  color: #666;
}

.brands .section-header__line {
  background: #f59e0b;
}

.brands__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.brand-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 32px 16px;
  text-align: center;
  transition: all 0.3s ease;
  contain: layout style;
}

.brand-card:hover {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
  transform: translateY(-4px);
}

.brand-card span {
  display: block;
  font-size: 28px;
  font-weight: 900;
  color: white;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.brand-card p {
  font-size: 12px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ===== CTA БАННЕР ===== */
.cta {
  padding: 80px 0;
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.cta__box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.cta__content h2 {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 900;
  color: white;
  margin-bottom: 8px;
}

.cta__content p {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.8);
}

.cta__buttons {
  display: flex;
  gap: 16px;
  flex-shrink: 0;
}

.cta .btn-yellow {
  background: #1a1a2e;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.cta .btn-yellow:hover {
  background: #0f0f1e;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

/* ===== КОНТАКТЫ ===== */
.contact {
  padding: 120px 0;
  background: #f8f9fa;
}

.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

/* Убираем стили address по умолчанию */
.contact__info {
  font-style: normal;
}

.contact-card {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 24px;
  background: white;
  border-radius: 12px;
  margin-bottom: 16px;
  border: 1px solid #eee;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-card:hover {
  border-color: #f59e0b;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.1);
}

.contact-card__icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(217, 119, 6, 0.1));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-card__icon i {
  font-size: 20px;
  color: #f59e0b;
}

.contact-card h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #999;
  margin-bottom: 6px;
  font-weight: 700;
}

.contact-card p {
  color: #333;
  font-size: 15px;
  line-height: 1.6;
}

.contact-card a {
  display: block;
  color: #1a1a2e;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  transition: color 0.3s ease;
}

.contact-card a:hover {
  color: #f59e0b;
}

.contact__messengers {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.messenger-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  /* Минимальная область нажатия */
  min-height: 44px;
}

.messenger-btn.whatsapp {
  background: #25d366;
  color: white;
}

.messenger-btn.whatsapp:hover {
  background: #20bd5a;
}

.messenger-btn.telegram {
  background: #0088cc;
  color: white;
}

.messenger-btn.telegram:hover {
  background: #0077b3;
}

.messenger-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.messenger-btn:active {
  transform: translateY(-1px);
}

/* ===== ФОРМА ===== */
.contact-form {
  background: white;
  padding: 48px;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  border: 1px solid #eee;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #999;
  margin-bottom: 8px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #e5e5e5;
  border-radius: 8px;
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  -webkit-appearance: none;
  appearance: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

/* Стиль для ошибки валидации */
.contact-form input:invalid:not(:placeholder-shown),
.contact-form textarea:invalid:not(:placeholder-shown) {
  border-color: #ef4444;
}

.contact-form textarea {
  resize: vertical;
  min-height: 100px;
}

.form-privacy {
  text-align: center;
  margin-top: 16px;
  font-size: 12px;
  color: #999;
  line-height: 1.5;
}

.form-privacy a {
  color: #f59e0b;
  text-decoration: none;
}

.form-privacy a:hover {
  text-decoration: underline;
}

.form-privacy i {
  color: #f59e0b;
  margin-right: 4px;
}

/* Исправлено: не скрываем через display:none для aria-live */
.form-response {
  margin-top: 16px;
  text-align: center;
  font-size: 14px;
  min-height: 0;
  overflow: hidden;
  transition: min-height 0.3s ease;
}

.form-response.success {
  color: #10b981;
  font-weight: 600;
  min-height: 40px;
}

.form-response.error {
  color: #ef4444;
  font-weight: 600;
  min-height: 40px;
}

/* ===== ФУТЕР ===== */
.footer {
  background: #1a1a2e;
  padding: 80px 0 0;
  color: white;
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 60px;
  padding-bottom: 60px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo .logo__icon {
  background: rgba(245, 158, 11, 0.2);
}

.footer-logo .logo__name {
  color: white;
}

.footer__desc {
  color: #666;
  font-size: 14px;
  margin-top: 16px;
  line-height: 1.7;
}

.footer__col h4 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 24px;
  color: #f59e0b;
  font-weight: 700;
}

.footer__col a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #888;
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 16px;
  transition: color 0.3s ease;
  /* Минимальная область нажатия */
  padding: 4px 0;
}

.footer__col a:hover {
  color: #f59e0b;
}

.footer__col a i {
  color: #f59e0b;
  width: 20px;
  flex-shrink: 0;
}

/* Навигация в футере */
.footer__col nav {
  display: flex;
  flex-direction: column;
}

.footer__bottom {
  text-align: center;
  padding: 24px 0;
  font-size: 13px;
  color: #666;
}

.footer__bottom a {
  color: #f59e0b;
  text-decoration: none;
}

.footer__bottom a:hover {
  text-decoration: underline;
}

/* ============================================
   АДАПТИВНАЯ ВЁРСТКА
   ============================================ */

/* Планшет */
@media (max-width: 1024px) {
  .topbar__left {
    flex-direction: column;
    gap: 4px;
  }

  .advantages__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .brands__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .contact__grid {
    grid-template-columns: 1fr;
  }

  .cta__box {
    flex-direction: column;
    text-align: center;
  }

  .cta__buttons {
    justify-content: center;
  }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .search__box {
    flex-direction: column;
    text-align: center;
  }

  .hero {
    padding: 80px 0;
  }

  .advantages,
  .brands,
  .contact {
    padding: 80px 0;
  }
}

/* Мобильный */
@media (max-width: 768px) {
  .topbar {
    display: none;
  }

  /* Мобильное меню */
  .nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    height: 100dvh; /* Динамическая высота для мобильных */
    background: white;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 32px;
    transition: right 0.4s ease;
    z-index: 999;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
  }

  .nav.active {
    right: 0;
  }

  .nav a {
    font-size: 20px;
  }

  .burger {
    display: flex;
    z-index: 1001;
  }

  .header__phone {
    display: none;
  }

  .header__inner {
    height: 64px;
  }

  /* Hero мобильный */
  .hero {
    padding: 60px 0 80px;
  }

  .hero__title {
    font-size: 28px;
  }

  .hero__desc {
    font-size: 16px;
    margin-bottom: 32px;
  }

  .hero__stats {
    flex-direction: column;
    gap: 24px;
    padding: 32px 20px;
  }

  .hero__stat-divider {
    width: 60px;
    height: 1px;
    margin: 0 auto;
  }

  .hero__buttons {
    flex-direction: column;
    align-items: center;
    margin-bottom: 48px;
  }

  .hero__buttons .btn {
    width: 100%;
    max-width: 320px;
    justify-content: center;
  }

  /* Секции мобильные */
  .section-title {
    font-size: 24px;
  }

  .section-header {
    margin-bottom: 40px;
  }

  .advantages,
  .brands,
  .contact {
    padding: 60px 0;
  }

  .advantages__grid {
    grid-template-columns: 1fr;
  }

  .brands__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Поиск мобильный */
  .search__box {
    padding: 32px 20px;
  }

  .search__form {
    flex-direction: column;
    gap: 12px;
  }

  .search__form input {
    border-right: 2px solid #e5e5e5;
    border-radius: 8px;
  }

  .search__form input:focus {
    border-color: #f59e0b;
  }

  .search__form .btn {
    border-radius: 8px;
  }

  .search__icon {
    width: 60px;
    height: 60px;
    font-size: 24px;
  }

  /* Контакты мобильные */
  .contact__messengers {
    flex-direction: column;
  }

  .contact-form {
    padding: 32px 20px;
  }

  /* CTA мобильный */
  .cta {
    padding: 60px 0;
  }

  .cta__buttons {
    flex-direction: column;
    width: 100%;
  }

  .cta__buttons .btn {
    width: 100%;
    justify-content: center;
  }

  /* Футер мобильный */
  .footer {
    padding: 60px 0 0;
  }

  .footer__grid {
    gap: 32px;
    padding-bottom: 32px;
  }
}

/* Маленькие мобильные */
@media (max-width: 380px) {
  .container {
    padding: 0 16px;
  }

  .hero__badge {
    font-size: 12px;
    padding: 8px 16px;
  }

  .hero__title {
    font-size: 24px;
  }

  .brands__grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .brand-card {
    padding: 24px 12px;
  }

  .brand-card span {
    font-size: 22px;
  }

  .advantage-card {
    padding: 32px 24px;
  }
}

/* ===== СТИЛИ ДЛЯ ПЕЧАТИ ===== */
@media print {
  .topbar,
  .burger,
  .header__phone-icon,
  .hero__overlay,
  .search,
  .cta,
  .contact-form,
  .contact__messengers,
  .footer {
    display: none !important;
  }

  body {
    color: #000;
    background: #fff;
    font-size: 12pt;
  }

  .header {
    position: static;
    box-shadow: none;
  }

  .hero {
    background: #fff !important;
    color: #000 !important;
    padding: 20px 0;
  }

  .hero__content {
    color: #000;
  }

  .hero__title {
    color: #000;
    font-size: 24pt;
  }

  .hero__desc {
    color: #333;
  }

  .highlight {
    color: #000;
    font-weight: 900;
  }

  .advantage-card,
  .brand-card,
  .contact-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
  }

  .brands {
    background: #fff;
  }

  .brands .section-title {
    color: #000;
  }

  .brand-card span {
    color: #000;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 10pt;
    color: #666;
  }

  .logo a[href]::after,
  .nav a[href]::after {
    content: none;
  }
}
/* ===== НОВЫЕ СТИЛИ ДЛЯ JS-ФУНКЦИЙ ===== */

/* Оверлей мобильного меню */
.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  z-index: 998;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Шапка при скролле */
.header--scrolled {
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15) !important;
}

/* Авто-скрытие шапки (опционально) */
.header--hidden {
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}

/* Анимация карточек — невидимы только когда JS загружен */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.animated {
  opacity: 1;
  transform: translateY(0);
}

/* Ошибка валидации поля */
.input-error {
  border-color: #ef4444 !important;
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

.form-error {
  display: block;
  color: #ef4444;
  font-size: 12px;
  margin-top: 6px;
  font-weight: 600;
}

/* Результат поиска */
.search__result {
  margin-top: 16px;
  min-height: 0;
  transition: min-height 0.3s ease;
}

.search__result-box {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px 20px;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  font-size: 14px;
  color: #92400e;
  animation: slideDown 0.3s ease;
}

.search__result-box i {
  font-size: 20px;
  color: #f59e0b;
  margin-top: 2px;
  flex-shrink: 0;
}

.search__result-box strong {
  display: block;
  margin-bottom: 4px;
  color: #78350f;
}

.search__result-box p {
  margin: 0;
  line-height: 1.5;
}

.search__result-box a {
  color: #d97706;
  font-weight: 700;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Активная ссылка навигации */
.nav a.active {
  color: #f59e0b;
}

.nav a.active::after {
  width: 100%;
}

/* Спиннер кнопки */
.fa-spin {
  animation: fa-spin 1s linear infinite;
}

@keyframes fa-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}