/* Улучшенная бело-голубая тема: карточки, сетки, формы, хедер/футер */
:root {
  --brand: #0ea5e9;        /* sky-500 */
  --brand-600: #0284c7;    /* sky-600 */
  --brand-100: #e0f2fe;    /* sky-100 */
  --brand-50: #f0f9ff;     /* sky-50 */
  --bg: #f8fafc;           /* slate-50 */
  --card: #ffffff;
  --muted: #64748b;        /* slate-500 */
  --text: #0f172a;         /* slate-900 */
  --border: #e2e8f0;       /* slate-200 */
  --ring: rgba(14,165,233, .35);
}

html, body {
  scroll-behavior: smooth;
}
body {
  background: radial-gradient(1200px 600px at 100% -10%, var(--brand-50), transparent), var(--bg);
}

/* Контейнеры */
.container { max-width: 1200px; padding: 0 20px; }

/* Хедер */
.site-header { position: sticky; top: 0; z-index: 50; backdrop-filter: saturate(1.1) blur(6px); }
.site-header .container { display:flex; align-items:center; justify-content:space-between; height:64px; }
.logo { display:flex; align-items:center; gap:10px; font-weight:800; letter-spacing:.3px; }
.logo-badge { width:28px; height:28px; border-radius:8px; background: linear-gradient(135deg, var(--brand), var(--brand-600)); box-shadow: 0 6px 16px rgba(2,132,199,.25) inset, 0 2px 8px rgba(2,132,199,.25); }
.nav a { padding:10px 12px; border-radius:8px; transition: .2s ease; text-decoration: none; }
.nav a:hover { background: var(--brand-100); color: var(--brand-600); }

/* Герой-блок */
.hero { position:relative; overflow:hidden; background: linear-gradient(180deg, var(--card), var(--brand-50)); border:1px solid var(--border); }
.hero h1 { font-size: clamp(28px, 3.5vw, 44px); line-height:1.1; }
.hero p { color: var(--muted); max-width: 60ch; }
.hero .cta { display:flex; gap: 12px; margin-top: 14px; }

/* Кнопки */
.btn { background: linear-gradient(180deg, var(--brand), var(--brand-600)); color:#fff; border:none; padding:11px 16px; border-radius:10px; font-weight:600; box-shadow: 0 8px 20px rgba(2,132,199,.25); transition: transform .05s ease, filter .2s ease; text-decoration: none; -webkit-text-decoration-skip: none; text-decoration-skip-ink: none; display:inline-flex; align-items:center; justify-content:center; gap:8px; }
.btn:hover { filter: brightness(.98); }
.btn:active { transform: translateY(1px); }
.btn.alt { background: var(--card); color: var(--brand-600); border:1px solid var(--border); box-shadow: none; text-decoration: none; -webkit-text-decoration-skip: none; text-decoration-skip-ink: none; }

/* Карточки и сетки */
.grid { display:grid; gap: 16px; }
@media (min-width: 640px) { .grid.cols-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) { .grid.cols-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .grid.cols-4 { grid-template-columns: repeat(4, 1fr); } }

.card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; transition: box-shadow .2s ease, transform .15s ease; text-decoration: none; color: inherit; }
.card:hover { box-shadow: 0 8px 28px rgba(2,132,199,.12), 0 2px 8px rgba(2,132,199,.08); transform: translateY(-1px); }
.card .img { display:block; width:100%; height:170px; background: var(--brand-50); object-fit: contain; }
.card .body { padding: 12px; }
.price { color: var(--brand-600); font-weight: 800; }
.old-price { text-decoration: line-through; color: var(--muted); margin-right: 8px; }

/* Формы и поля */
.filters { display:flex; gap:10px; flex-wrap:wrap; }
.filters select, .filters input[type="text"], .filters input[type="number"] {
  padding: 10px 12px; border-radius: 10px; border:1px solid var(--border); background: #fff;
  outline: none; transition: box-shadow .2s ease, border-color .2s ease;
}
.filters select:focus, .filters input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--ring); }

/* Удаляем спиннеры у number-глобально */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; appearance: textfield; }

/* Бейджи/статусы */
.badge { display:inline-flex; align-items:center; gap:6px; height:28px; padding:0 10px; border-radius: 999px; background: var(--brand-100); color: var(--brand-600); font-weight:600; font-size: 12px; }

/* Сбрасываем подчеркивание у ссылок-кнопок глобально во всех состояниях */
a.btn, a.btn.alt { text-decoration: none !important; -webkit-text-decoration-skip: none; text-decoration-skip-ink: none; }
a.btn:link, a.btn:visited, a.btn:hover, a.btn:active, a.btn:focus { text-decoration: none !important; -webkit-text-decoration-skip: none; text-decoration-skip-ink: none; }
button.btn, .btn { border: none; outline: none; }
.btn:focus { outline: none; box-shadow: 0 0 0 2px rgba(14,165,233,.35); }

/* Убираем подчёркивание у карточек-линков на всех состояниях */
a.card, a.no-underline { text-decoration: none !important; color: inherit; }
a.card:link, a.card:visited, a.card:hover, a.card:active, a.card:focus,
a.no-underline:link, a.no-underline:visited, a.no-underline:hover, a.no-underline:active, a.no-underline:focus {
  text-decoration: none !important; color: inherit;
}

/* Футер */
.site-footer { margin-top: 24px; border-top:1px solid var(--border); background: linear-gradient(180deg, transparent, var(--brand-50)); }

/* Доп. утилиты и стили для страницы Контакты */
.muted { color: var(--muted); }
.workhours { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 6px; }
.workhours li { display:flex; align-items:center; justify-content:space-between; border-bottom: 1px dashed var(--border); padding: 4px 0; }
.workhours li span:first-child { color: var(--muted); }

.map-placeholder { position: relative; height: 100%; min-height: 260px; background:
  radial-gradient(800px 300px at 80% -20%, var(--brand-50), transparent),
  repeating-linear-gradient(45deg, #f8fafc, #f8fafc 10px, #f1f5f9 10px, #f1f5f9 20px);
  border-left: 1px solid var(--border);
}
.map-placeholder .pin { position:absolute; width:18px; height:18px; background: linear-gradient(180deg, var(--brand), var(--brand-600)); border-radius: 6px; top: 38%; left: 58%; box-shadow: 0 10px 24px rgba(2,132,199,.35); transform: rotate(45deg); }
.map-placeholder .map-caption { position:absolute; left: 16px; bottom: 12px; background: rgba(255,255,255,.9); backdrop-filter: blur(6px); padding: 10px 12px; border-radius: 10px; border:1px solid var(--border); box-shadow: 0 6px 18px rgba(2,132,199,.10); font-weight: 600; }

/* ============================================
   Общие компоненты страниц
   ============================================ */

/* Заголовок страницы */
.page-header { margin: 24px 0 20px; }
.page-header h1 { margin: 0 0 6px; font-size: clamp(24px, 3vw, 36px); }
.subtitle { color: var(--muted); margin: 0; font-size: 15px; line-height: 1.5; }
.section-title { margin: 0 0 14px 4px; font-size: 22px; }

/* Hero поиск */
.hero-search { display: flex; gap: 8px; max-width: 500px; margin: 0 auto; }
.search-input {
  flex: 1; padding: 12px 16px; border-radius: 10px; border: 1px solid var(--border);
  background: #fff; font-size: 15px; outline: none; transition: border-color .2s, box-shadow .2s;
}
.search-input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--ring); }

/* Хлебные крошки */
.breadcrumb { margin: 16px 0 20px; font-size: 14px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; }
.breadcrumb a { color: var(--brand-600); }

/* Иконки категорий и преимуществ */
.category-icon, .feature-icon { font-size: 32px; margin-bottom: 4px; }
.category-icon img, .feature-icon img { width: 36px; height: 36px; }
.category-card .body { transition: background .2s; }
.category-card:hover .body { background: var(--brand-50); }

/* Карточки моделей авто */
.vehicle-icon { font-size: 36px; margin-bottom: 4px; }
.vehicle-icon img { width: 40px; height: 40px; }
.vehicle-card .body { transition: background .2s; }
.vehicle-card:hover .body { background: var(--brand-50); }

/* Шаги заказа */
.step-number {
  width: 44px; height: 44px; margin: 0 auto 4px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-600));
  color: #fff; font-size: 20px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(2,132,199,.25);
}

/* CTA-баннер */
.cta-banner { border: 1px solid var(--border); }
.cta-banner:hover { transform: none; }

/* ============================================
   Каталог — товарные карточки
   ============================================ */
.product-grid { margin: 20px 0 24px; }
.product-name { font-weight: 700; font-size: 14px; line-height: 1.3; margin-bottom: 2px; }
.product-article { font-size: 12px; color: var(--muted); }
.product-price-row { margin-top: 8px; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.product-card .body { padding: 14px; }

/* Фильтры каталога */
.filter-card { margin-bottom: 20px; }
.filter-card .body { padding: 16px; }
.filter-form { display: flex; flex-direction: column; gap: 10px; }
.filter-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.form-input {
  padding: 10px 14px; border-radius: 10px; border: 1px solid var(--border); background: #fff;
  font-size: 14px; outline: none; transition: border-color .2s, box-shadow .2s; flex: 1; min-width: 140px;
}
.form-input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--ring); }
textarea.form-input { resize: vertical; }
.checkbox-label { display: flex; align-items: center; gap: 6px; font-size: 14px; white-space: nowrap; cursor: pointer; }

/* Пагинация */
.pagination { margin: 24px 0; display: flex; gap: 10px; align-items: center; justify-content: center; }
.pagination-info { color: var(--muted); font-size: 14px; }

/* ============================================
   Детали товара
   ============================================ */
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 24px; }
@media (max-width: 768px) { .detail-grid { grid-template-columns: 1fr; } }
.detail-image-card .body { display: flex; align-items: center; justify-content: center; min-height: 320px; }
.detail-main-img { width: 100%; max-height: 380px; object-fit: contain; border-radius: 8px; background: var(--brand-50); }
.detail-no-img { width: 100%; height: 320px; display: flex; align-items: center; justify-content: center; background: var(--brand-50); border-radius: 8px; color: var(--muted); }
.detail-info-card .body { padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.detail-title { margin: 0; font-size: clamp(22px, 2.5vw, 32px); line-height: 1.2; }
.detail-article { color: var(--muted); font-size: 14px; }
.detail-price-block { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.detail-stock { display: flex; gap: 8px; flex-wrap: wrap; }
.detail-cart-form { display: flex; gap: 10px; flex-wrap: wrap; }
.detail-meta { font-size: 14px; }
.detail-sections { display: flex; flex-direction: column; gap: 16px; margin-bottom: 32px; }
.detail-desc { line-height: 1.6; color: var(--text); }

/* Таблица характеристик */
.spec-table { width: 100%; border-collapse: collapse; }
.spec-table td { padding: 8px 12px; border-bottom: 1px solid var(--border); font-size: 14px; }
.spec-table td:first-child { width: 40%; color: var(--muted); }

/* Список применяемости */
.compat-list { list-style: none; padding: 0; margin: 0; }
.compat-list li { padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.compat-list li:last-child { border-bottom: none; }

/* ============================================
   Корзина
   ============================================ */
.cart-card { margin-bottom: 16px; }
.cart-row {
  display: grid; grid-template-columns: 80px 1fr 120px 140px 100px;
  gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--border); align-items: center;
}
.cart-header { font-weight: 700; font-size: 13px; color: var(--muted); background: var(--brand-50); }
.cart-thumb { width: 80px; height: 60px; object-fit: contain; background: var(--brand-50); border-radius: 8px; }
.cart-thumb-empty {
  width: 80px; height: 60px; display: flex; align-items: center; justify-content: center;
  background: var(--brand-50); border-radius: 8px; color: var(--muted); font-size: 11px;
}
.cart-item-name { font-weight: 700; font-size: 14px; }
.cart-item-article { font-size: 12px; color: var(--muted); }
.btn-remove {
  background: none; border: 1px solid var(--border); border-radius: 8px; padding: 4px 10px;
  font-size: 12px; color: #dc2626; cursor: pointer; transition: background .2s;
}
.btn-remove:hover { background: #fee2e2; }
.qty-form { display: flex; gap: 4px; align-items: center; }
.qty-btn {
  width: 32px; height: 32px; border: 1px solid var(--border); border-radius: 8px;
  background: #fff; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.qty-btn:hover { background: var(--brand-50); }
.qty-input {
  width: 52px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px;
  text-align: center; font-size: 14px; appearance: textfield; -moz-appearance: textfield;
}
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cart-footer { display: flex; justify-content: space-between; align-items: center; margin-bottom: 32px; flex-wrap: wrap; gap: 16px; }
.cart-summary { text-align: right; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.cart-total-sum { font-size: 22px; font-weight: 800; }
@media (max-width: 768px) {
  .cart-row { grid-template-columns: 60px 1fr; gap: 8px; }
  .cart-header { display: none; }
}

/* ============================================
   Оформление заказа
   ============================================ */
/* Прогресс-шаги */
.checkout-steps { display: flex; align-items: center; justify-content: center; gap: 0; margin: 0 auto 28px; max-width: 420px; }
.checkout-step { display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; z-index: 1; }
.step-num { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; background: var(--brand-50); color: var(--muted); border: 2px solid var(--border); transition: all .2s; }
.step-label { font-size: 13px; color: var(--muted); font-weight: 500; }
.checkout-step.active .step-num { background: var(--brand-600); color: #fff; border-color: var(--brand-600); box-shadow: 0 0 0 4px rgba(37,99,235,.15); }
.checkout-step.active .step-label { color: var(--brand-600); font-weight: 600; }
.checkout-step.done .step-num { background: var(--brand-600); color: #fff; border-color: var(--brand-600); }
.checkout-step.done .step-label { color: var(--text); }
.checkout-step-line { flex: 1; height: 2px; background: var(--border); }
.checkout-step-line.done { background: var(--brand-600); }

.checkout-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 32px; }
@media (max-width: 768px) { .checkout-grid { grid-template-columns: 1fr; } }
.checkout-form-card .body { padding: 24px; }
.checkout-form-card h3 { margin: 0 0 4px; font-size: 20px; }
.form-section { background: var(--brand-50); border-radius: 10px; padding: 16px; }
.form-group { margin-bottom: 14px; }
.form-group:last-child { margin-bottom: 0; }
.form-label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.form-hint { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }
.required { color: #dc2626; }
.form-error { color: #dc2626; font-size: 13px; margin-top: 4px; }
.btn-full { width: 100%; padding: 14px; font-size: 16px; margin-top: 8px; }

.checkout-summary-card .body { padding: 24px; }
.checkout-summary-card h3 { margin: 0 0 16px; font-size: 20px; }
.checkout-items { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.checkout-item { display: flex; gap: 12px; align-items: center; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.checkout-item:last-child { border-bottom: none; }
.checkout-item-img { flex-shrink: 0; }
.checkout-item-img img { width: 56px; height: 42px; object-fit: contain; background: var(--brand-50); border-radius: 6px; }
.no-photo-sm { width: 56px; height: 42px; display: flex; align-items: center; justify-content: center; background: var(--brand-50); border-radius: 6px; color: var(--muted); font-size: 10px; }
.checkout-item-info { flex: 1; min-width: 0; }
.checkout-item-name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.checkout-item-meta { font-size: 13px; color: var(--muted); }
.checkout-item-total { font-weight: 700; font-size: 14px; white-space: nowrap; }
.checkout-total { display: flex; justify-content: space-between; align-items: center; padding-top: 16px; border-top: 2px solid var(--border); }
.checkout-total-sum { font-size: 22px; font-weight: 800; color: var(--brand-600); }
.back-link { display: inline-block; margin-top: 14px; font-size: 14px; color: var(--muted); text-decoration: none; }
.back-link:hover { color: var(--brand-600); }

/* ============================================
   Успешный заказ
   ============================================ */
.success-page { display: flex; justify-content: center; padding: 40px 0; }
.success-card { max-width: 520px; width: 100%; }
.success-card .body { padding: 36px 32px; text-align: center; }
.success-icon { font-size: 56px; margin-bottom: 12px; }
.success-card h1 { margin: 0 0 8px; }
.success-details { text-align: left; margin-top: 24px; background: var(--brand-50); border-radius: 10px; padding: 16px 20px; }
.success-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.success-row:last-child { border-bottom: none; }
.success-label { color: var(--muted); font-weight: 600; }
