:root {
  --bg: #f0f2f7;
  --card: #ffffff;
  --text: #1a1d27;
  --muted: #6b7280;
  --line: #e5e7eb;
  --brand-red: #e8231a;
  --brand-green: #1a9e3f;
  --primary: #1a1a1a;
  --primary-soft: #f3f4f6;
  --accent: #e8231a;
  --accent-hover: #c41a12;
  --shadow: 0 2px 12px rgba(0,0,0,.07);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.12);
  --radius: 12px;
  --radius-sm: 8px;
}

* { box-sizing: border-box; }

img {
  max-width: 100%;
  /* height: auto is intentionally NOT set globally — card images need height: 100% */
}

body {
  margin: 0;
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }

/* ── HEADER ── */
.site-header {
  background: #111;
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
}

.container {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.header-row {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo {
  margin: 0;
  display: inline-flex;
  align-items: center;
  font-family: "Arial Black", "Segoe UI", Arial, sans-serif;
  font-size: clamp(22px, 3.2vw, 34px);
  font-style: italic;
  text-transform: uppercase;
  line-height: 1;
  font-weight: 900;
}

.logo .box {
  padding: 6px 11px;
  display: flex;
  align-items: center;
  transform: skewX(-18deg);
  overflow: hidden;
}

.logo .text {
  display: inline-block;
  transform: skewX(18deg);
  letter-spacing: -1px;
}

.logo .auto-box { background: #000; margin-right: -4px; z-index: 2; border: 2px solid #333; }
.logo .auto { color: var(--brand-red); paint-order: stroke fill; }
.logo .rainbow-box { background: var(--brand-red); border: 2px solid #333333; padding-left: 4px; z-index: 1; }
.logo .rainbow { color: #000000; }

.nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.nav a {
  text-decoration: none;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  color: #ccc;
  font-size: 15px;
  transition: background .15s, color .15s, transform .1s;
  white-space: nowrap;
}

.nav a:hover { 
  background: rgba(255,255,255,.1); 
  color: #fff;
  transform: translateY(-1px);
}

.nav a:active {
  transform: translateY(0);
}

.nav a.active { 
  background: var(--brand-red); 
  color: #fff;
  box-shadow: 0 2px 8px rgba(232,35,26,.3);
}

/* ── HERO ── */
.hero {
  background: linear-gradient(135deg, #111 0%, #1e1e1e 50%, #0d2010 100%);
  padding: 32px 0 28px;
  color: #fff;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  align-items: start;
}

.hero-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius);
  padding: 24px;
}

.hero-card h2 {
  margin: 0 0 10px;
  font-size: 22px;
  color: #fff;
}

.hero-card p { color: #bbb; margin: 0 0 6px; font-size: 14px; }

.info-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--brand-green);
  border-radius: 999px;
  padding: 6px 14px;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

/* ── SEARCH BAR ── */
.search-hero {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-lg);
  margin-top: 20px;
}

.search-hero h3 { margin: 0 0 14px; font-size: 16px; color: #333; }

.search-form {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 10px;
}

.search-form select,
.search-form input[type="text"] {
  border: 1.5px solid var(--line);
  background: #fafafa;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text);
  transition: border-color .15s;
  width: 100%;
}

.search-form select:focus,
.search-form input[type="text"]:focus {
  outline: none;
  border-color: var(--brand-red);
  background: #fff;
}

/* ── MAIN ── */
.main { padding: 24px 0 48px; }

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* ── CARD ── */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  padding: 20px;
}

.card h3 {
  margin: 0 0 16px;
  font-size: 17px;
  font-weight: 700;
  color: #111;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-header h3 { margin: 0; }

.muted { color: var(--muted); font-size: 13px; }

/* ── BUTTONS ── */
.btn,
button,
input[type="submit"] {
  border: 0;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background .15s, transform .1s;
  white-space: nowrap;
}

.btn:hover, button:hover { background: #333; }
.btn-red { background: var(--brand-red); }
.btn-red:hover { background: var(--accent-hover); }
.btn-green { background: var(--brand-green); }
.btn-green:hover { background: #157a30; }
.btn.alt { background: var(--primary-soft); color: #333; }
.btn.alt:hover { background: #e5e7eb; }
.btn-sm { padding: 6px 12px; font-size: 13px; }

/* ── INPUTS ── */
input[type="text"],
input[type="password"],
input[type="file"],
select,
textarea {
  border: 1.5px solid var(--line);
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 14px;
  color: var(--text);
  transition: border-color .15s;
}

input[type="text"]:focus,
input[type="password"]:focus,
select:focus {
  outline: none;
  border-color: var(--brand-red);
}

/* ── TOOLBAR ── */
.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  align-items: center;
}

.toolbar input[type="text"],
.toolbar select {
  flex: 1;
  min-width: 160px;
}

/* ── TABLE ── */
table { width: 100%; border-collapse: collapse; }

th, td {
  border-bottom: 1px solid var(--line);
  text-align: left;
  padding: 10px 12px;
  font-size: 13px;
  vertical-align: top;
}

th {
  background: #f8f9fa;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--muted);
  position: sticky;
  top: 72px;
  z-index: 1;
}

tr:hover td { background: #fafbff; }

/* ── PARTS CARDS (Drom style) ── */
.parts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.part-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow .2s, transform .15s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.part-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

/* Fixed-height image wrapper — image can never escape this box */
.part-card-img-wrap {
  width: 100%;
  height: 180px;
  overflow: hidden;
  flex-shrink: 0;
  background: #f0f0f0;
  position: relative;
}

.part-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.part-card-img-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #f0f0f0, #e0e0e0);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #bbb;
  font-size: 40px;
  position: absolute;
  inset: 0;
}

.part-card-body { padding: 14px; }

.part-card-brand {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--brand-red);
  margin-bottom: 4px;
}

.part-card-name {
  font-size: 14px;
  font-weight: 600;
  color: #111;
  margin-bottom: 6px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.part-card-meta {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}

.part-card-meta span { margin-right: 8px; }

.part-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  background: #fafafa;
}

.part-price {
  font-size: 18px;
  font-weight: 800;
  color: #111;
}

.part-price-zero { color: var(--muted); font-size: 14px; }

.part-qty {
  font-size: 12px;
  color: var(--brand-green);
  font-weight: 600;
}

/* ── PART MODAL ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.open { display: flex; }

.modal {
  background: #fff;
  border-radius: var(--radius);
  max-width: 60%;
  width: 100%;
  max-height: 89%;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--line);
  gap: 12px;
}

.modal-header h2 { margin: 0; font-size: 18px; line-height: 1.3; }

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--muted);
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
}

.modal-close:hover { color: #111; background: none; }

.modal-body { padding: 20px 24px; }

.modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.modal-photos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.modal-photos img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: opacity .15s;
}

.modal-photos img:hover { opacity: .85; }

.modal-main-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 10px;
}

.detail-row {
  display: flex;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.detail-row:last-child { border-bottom: 0; }
.detail-label { color: var(--muted); min-width: 120px; flex-shrink: 0; }
.detail-value { font-weight: 500; color: #111; }

/* ── CATALOG ── */
.catalog-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.catalog-tab {
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  background: var(--primary-soft);
  color: #444;
  cursor: pointer;
  transition: background .15s, color .15s;
  border: 2px solid transparent;
}

.catalog-tab:hover { background: #e5e7eb; }
.catalog-tab.active { background: var(--brand-red); color: #fff; border-color: var(--brand-red); }

/* ── BRAND ACCORDION ── */
.brand-list { display: flex; flex-direction: column; gap: 8px; }

.brand-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
}

.brand-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  cursor: pointer;
  user-select: none;
  transition: background .15s;
  gap: 12px;
}

.brand-header:hover { background: #f8f9fa; }

.brand-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.brand-name {
  font-weight: 700;
  font-size: 15px;
  color: #111;
}

.brand-count {
  background: var(--brand-red);
  color: #fff;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 700;
}

.brand-count-zero {
  background: #e5e7eb;
  color: var(--muted);
}

.brand-arrow {
  color: var(--muted);
  font-size: 18px;
  transition: transform .2s;
  flex-shrink: 0;
}

.brand-item.open .brand-arrow { transform: rotate(180deg); }

.brand-models {
  display: none;
  padding: 0 18px 16px;
  border-top: 1px solid var(--line);
  background: #fafbff;
}

.brand-item.open .brand-models { display: block; }

.model-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 14px;
}

.model-chip {
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #333;
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.model-chip:hover {
  background: var(--brand-red);
  border-color: var(--brand-red);
  color: #fff;
}

.model-chip .chip-count {
  background: rgba(0,0,0,.1);
  border-radius: 999px;
  padding: 1px 6px;
  font-size: 11px;
}

.model-chip:hover .chip-count { background: rgba(255,255,255,.25); }

/* ── BRAND CLOUD ── */
.brand-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.brand-link {
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  color: #333;
  background: #fff;
  border: 1.5px solid var(--line);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  transition: all .15s;
}

.brand-link:hover {
  background: var(--brand-red);
  border-color: var(--brand-red);
  color: #fff;
}

/* ── PRODUCT GRID (homepage) ── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.product-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
  transition: box-shadow .2s;
  display: flex;
  flex-direction: column;
}

.product-card:hover { box-shadow: var(--shadow-lg); }

.product-card-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  object-position: center;
  background: #f0f0f0;
  display: block;
  max-width: 100%;
  flex-shrink: 0;
}

.product-card-img-ph {
  width: 100%;
  height: 140px;
  background: linear-gradient(135deg, #f5f5f5, #e8e8e8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: #ccc;
  flex-shrink: 0;
}

.product-card-body { padding: 10px 12px 12px; }

.product-card-brand {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--brand-red);
  letter-spacing: .5px;
}

.product-card h4 {
  margin: 4px 0 6px;
  font-size: 13px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-price {
  font-weight: 800;
  font-size: 16px;
  color: #111;
}

/* ── PAGINATION ── */
.pagination {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 24px;
  flex-wrap: wrap;
}

.page-btn {
  min-width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  background: #fff;
  border: 1.5px solid var(--line);
  color: #333;
  cursor: pointer;
  text-decoration: none;
  transition: all .15s;
}

.page-btn:hover { background: var(--brand-red); border-color: var(--brand-red); color: #fff; }
.page-btn.active { background: var(--brand-red); border-color: var(--brand-red); color: #fff; }
.page-btn.disabled { opacity: .4; pointer-events: none; }

/* ── STATS ROW ── */
.stats-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.stat-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 20px;
  flex: 1;
  min-width: 140px;
  text-align: center;
}

.stat-num {
  font-size: 28px;
  font-weight: 800;
  color: var(--brand-red);
  line-height: 1;
}

.stat-label { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ── SCHEDULE / PARTS ROW ── */
.schedule-row, .parts-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding: 9px 0;
  font-size: 14px;
}

.schedule-row:last-child, .parts-row:last-child { border-bottom: 0; }

/* ── LIST ── */
.list { list-style: none; padding: 0; margin: 0; }
.list li { border-bottom: 1px solid var(--line); padding: 10px 0; font-size: 14px; }
.list li:last-child { border-bottom: 0; }
.phone { font-weight: 700; color: var(--brand-red); }

/* ── CHIPS ── */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }

.chip {
  background: var(--primary-soft);
  color: #333;
  padding: 7px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  transition: all .15s;
  border: 1.5px solid transparent;
}

.chip:hover { background: var(--brand-red); color: #fff; }

/* ── BADGE ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.badge-green { background: #dcfce7; color: #166534; }
.badge-red { background: #fee2e2; color: #991b1b; }
.badge-gray { background: #f3f4f6; color: #6b7280; }

/* ── FILTER SIDEBAR ── */
.parts-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 20px;
  align-items: start;
}

.filter-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  position: sticky;
  top: 88px;
}

.filter-panel h4 {
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--muted);
}

.filter-group { margin-bottom: 18px; }
.filter-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }

.filter-group select,
.filter-group input[type="text"] {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 13px;
}

/* ── RESULTS HEADER ── */
.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 10px;
}

.results-count { font-size: 14px; color: var(--muted); }
.results-count strong { color: #111; }

.view-toggle { display: flex; gap: 4px; }

.view-btn {
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  background: var(--primary-soft);
  border: 1.5px solid var(--line);
  cursor: pointer;
  font-size: 16px;
  color: var(--muted);
  transition: all .15s;
}

.view-btn.active, .view-btn:hover {
  background: var(--brand-red);
  border-color: var(--brand-red);
  color: #fff;
}

/* ── MAP ── */
#yandex-map {
  width: 100%;
  height: 340px;
  border-radius: var(--radius);
  overflow: hidden;
}

/* ── FOOTER ── */
.site-footer {
  margin-top: 24px;
  padding: 28px 0 14px;
  background: #111;
  color: #e8e8e8;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.footer-grid h4 { margin: 0 0 12px; color: #fff; font-size: 14px; }
.footer-grid p { margin: 0 0 6px; color: #aaa; font-size: 13px; }
.footer-grid a { color: #ddd; }
.footer-grid a:hover { color: #fff; }

.footer-copy {
  text-align: center;
  color: #666;
  border-top: 1px solid #222;
  margin-top: 16px;
  padding-top: 12px;
  font-size: 12px;
}

/* ── ADMIN ── */
.admin-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }

/* ── RESPONSIVE ── */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .search-form { grid-template-columns: 1fr 1fr; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .modal-grid { grid-template-columns: 1fr; }
  .parts-layout { grid-template-columns: 1fr; }
  .filter-panel { position: static; }
}

/* ── TABLET ── */
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .parts-grid { grid-template-columns: repeat(2, 1fr); }
  
  /* Header adjustments for tablets */
  .header-row {
    min-height: 64px;
  }
  
  .logo {
    font-size: clamp(22px, 4vw, 28px);
  }
  
  .nav a {
    padding: 8px 12px;
    font-size: 14px;
  }
}

/* ── MOBILE ── */
@media (max-width: 37.5em) { /* 600px */
  /* Container */
  .container { 
    width: 95%;
    max-width: 100%;
    padding: 0 2.5%;
  }

  /* Header */
  .header-row {
    min-height: 3.75rem;
    padding: 0.5rem 0;
    gap: 0.5rem;
    position: relative;
  }

  .logo {
    font-size: clamp(1.125rem, 5vw, 1.375rem);
    flex-shrink: 0;
    flex: 1;
  }

  .logo .box { 
    padding: 0.25rem 0.5rem;
  }

  /* Hamburger button */
  .nav-toggle {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.25rem;
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.2);
    cursor: pointer;
    padding: 0.375rem;
    border-radius: 0.375rem;
    flex-shrink: 0;
    transition: all .2s;
    position: relative;
    z-index: 201;
  }

  .nav-toggle:hover {
    background: rgba(255,255,255,.15);
  }

  .nav-toggle:active {
    transform: scale(0.95);
  }

  .nav-toggle span {
    display: block;
    width: 1.25rem;
    height: 0.15625rem;
    background: #fff;
    border-radius: 0.125rem;
    transition: all .3s ease;
  }

  .nav-toggle.open {
    background: var(--brand-red);
    border-color: var(--brand-red);
  }

  .nav-toggle.open span:nth-child(1) { 
    transform: translateY(0.40625rem) rotate(45deg); 
  }
  
  .nav-toggle.open span:nth-child(2) { 
    opacity: 0;
    transform: scaleX(0);
  }
  
  .nav-toggle.open span:nth-child(3) { 
    transform: translateY(-0.40625rem) rotate(-45deg); 
  }

  /* Nav drawer */
  .nav {
    display: none !important;
    position: fixed;
    top: 3.75rem;
    left: 0;
    right: 0;
    bottom: 0;
    background: #1a1a1a;
    flex-direction: column;
    gap: 0;
    z-index: 200;
    box-shadow: 0 0.5rem 1.5rem rgba(0,0,0,.5);
    animation: slideDown 0.3s ease-out;
    overflow-y: auto;
    padding-bottom: 1.25rem;
  }

  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-0.625rem);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .nav.open { 
    display: flex !important;
  }

  .nav::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,.5);
    z-index: -1;
    animation: fadeIn 0.3s ease-out;
  }

  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  .nav a {
    padding: 0.875rem 1.25rem;
    border-radius: 0;
    border-bottom: 1px solid rgba(255,255,255,.08);
    font-size: 0.9375rem;
    color: #ddd;
    font-weight: 600;
    transition: all .2s;
    display: flex;
    align-items: center;
    gap: 0.625rem;
  }

  .nav a:last-child {
    border-bottom: none;
  }

  .nav a.active { 
    background: var(--brand-red); 
    color: #fff;
    border-left: 0.25rem solid #fff;
    padding-left: 1rem;
  }
  
  .nav a:hover { 
    background: rgba(255,255,255,.1); 
    color: #fff;
    padding-left: 1.5rem;
  }

  .nav a:active {
    background: rgba(255,255,255,.15);
  }

  /* Hero */
  .hero { 
    padding: 1rem 0 0.75rem;
  }
  
  .hero-grid { 
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .hero-card { 
    padding: 0.875rem 1rem;
  }
  
  .hero-card h2 { 
    font-size: 1rem;
    margin-bottom: 0.5rem;
  }
  
  .hero-card p {
    font-size: 0.8125rem;
    margin-bottom: 0.25rem;
  }

  /* Search */
  .search-hero { 
    padding: 0.75rem;
    margin-top: 0.75rem;
  }
  
  .search-hero h3 { 
    font-size: 0.875rem;
    margin-bottom: 0.625rem;
  }
  
  .search-form { 
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  
  .search-form button { 
    width: 100%;
    justify-content: center;
  }

  /* Main */
  .main { 
    padding: 0.75rem 0 1.5rem;
  }

  /* Stats */
  .stats-row { 
    gap: 0.5rem;
    margin-bottom: 0.75rem;
  }
  
  .stat-box { 
    min-width: calc(50% - 0.25rem);
    padding: 0.625rem 0.75rem;
  }
  
  .stat-num { 
    font-size: 1.25rem;
  }
  
  .stat-label {
    font-size: 0.6875rem;
  }

  /* Grids */
  .grid-2, .grid-3 { 
    grid-template-columns: 1fr;
    gap: 0.625rem;
  }
  
  .footer-grid { 
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .admin-stats { 
    grid-template-columns: 1fr;
  }

  /* Cards */
  .card { 
    padding: 0.75rem 0.875rem;
    border-radius: 0.625rem;
    margin-bottom: 0.75rem;
  }
  
  .card h3 { 
    font-size: 0.9375rem;
    margin-bottom: 0.625rem;
  }
  
  .card-header {
    margin-bottom: 0.75rem;
  }

  /* Parts grid — 2 columns on mobile */
  .parts-grid { 
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }
  
  .part-card-img-wrap { 
    height: 8.125rem;
  }
  
  .part-card-body { 
    padding: 0.5rem 0.625rem;
  }
  
  .part-card-name { 
    font-size: 0.75rem;
    -webkit-line-clamp: 2;
    margin-bottom: 0.25rem;
  }
  
  .part-card-brand { 
    font-size: 0.625rem;
    margin-bottom: 0.1875rem;
  }
  
  .part-card-meta { 
    font-size: 0.625rem;
    margin-bottom: 0.375rem;
  }
  
  .part-card-footer { 
    padding: 0.375rem 0.5rem;
  }
  
  .part-price { 
    font-size: 0.875rem;
  }
  
  .part-qty { 
    font-size: 0.625rem;
  }
  
  .btn-cart {
    min-width: 2.25rem;
    height: 1.75rem;
    font-size: 1rem;
    padding: 0.25rem 0.5rem;
  }

  /* Product grid */
  .product-grid { 
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }
  
  .product-card-img { 
    height: 6.25rem;
  }
  
  .product-card-img-ph { 
    height: 6.25rem;
    font-size: 1.75rem;
  }
  
  .product-card-body { 
    padding: 0.5rem 0.625rem;
  }
  
  .product-card h4 { 
    font-size: 0.75rem;
    margin: 0.1875rem 0 0.25rem;
  }
  
  .product-price { 
    font-size: 0.875rem;
  }
  
  .product-card-brand {
    font-size: 0.5625rem;
  }

  /* Parts layout — filter toggle */
  .parts-layout { 
    grid-template-columns: 1fr;
    gap: 0.625rem;
  }

  .filter-panel {
    position: static;
    border-radius: 0.625rem;
    padding: 0.75rem;
  }

  .filter-panel-body {
    display: none;
  }

  .filter-panel-body.open {
    display: block;
  }

  .filter-toggle-btn {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    background: none;
    border: none;
    padding: 0 0 0.75rem 0;
    cursor: pointer;
    color: var(--text);
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--line);
  }

  .filter-toggle-btn:hover { 
    background: none;
  }

  .filter-toggle-icon {
    font-size: 1rem;
    color: var(--muted);
    transition: transform .2s;
  }

  .filter-toggle-btn.open .filter-toggle-icon { 
    transform: rotate(180deg);
  }

  .filter-panel h4 { 
    display: none;
  }
  
  .filter-group {
    margin-bottom: 0.75rem;
  }
  
  .filter-group label {
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
  }
  
  .filter-group input,
  .filter-group select {
    font-size: 0.875rem;
    padding: 0.5rem 0.625rem;
  }

  /* Results header */
  .results-header {
    margin-bottom: 0.625rem;
    gap: 0.5rem;
  }
  
  .results-count {
    font-size: 0.8125rem;
  }

  /* Modal — full screen on mobile */
  .modal-overlay { 
    padding: 0;
    align-items: flex-end;
  }

  .modal {
    max-width: 100%;
    width: 100%;
    max-height: 92vh;
    border-radius: var(--radius) var(--radius) 0 0;
  }

  .modal-header { 
    padding: 0.75rem 0.875rem 0.625rem;
  }
  
  .modal-title { 
    font-size: 0.875rem;
  }
  
  .modal-brand-tag {
    font-size: 0.625rem;
  }
  
  .modal-body { 
    padding: 0.75rem 0.875rem;
  }
  
  .modal-grid { 
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .modal-thumbs { 
    grid-template-columns: repeat(5, 1fr);
    gap: 0.25rem;
  }
  
  .modal-price { 
    font-size: 1.375rem;
  }
  
  .modal-price-block {
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
  }
  
  .detail-label { 
    min-width: 4.375rem;
    font-size: 0.6875rem;
  }
  
  .detail-value { 
    font-size: 0.6875rem;
  }
  
  .detail-row {
    padding: 0.375rem 0;
  }
  
  .modal-phones {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
  }
  
  .modal-phone-list li {
    font-size: 0.75rem;
    padding: 0.25rem 0;
  }

  /* Catalog tabs */
  .catalog-tabs { 
    gap: 0.375rem;
  }
  
  .catalog-tab { 
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
  }

  /* Brand accordion */
  .brand-header { 
    padding: 0.625rem 0.75rem;
  }
  
  .brand-name { 
    font-size: 0.8125rem;
  }
  
  .brand-models { 
    padding: 0 0.75rem 0.625rem;
  }
  
  .model-chip { 
    padding: 0.3125rem 0.625rem;
    font-size: 0.6875rem;
  }
  
  .brand-cloud {
    gap: 0.375rem;
  }
  
  .brand-link {
    padding: 0.375rem 0.625rem;
    font-size: 0.75rem;
  }

  /* Pagination */
  .page-btn { 
    min-width: 2rem;
    height: 2rem;
    font-size: 0.8125rem;
  }
  
  .pagination {
    gap: 0.25rem;
    margin-top: 1rem;
  }

  /* Table — horizontal scroll */
  .card table { 
    font-size: 0.6875rem;
  }
  
  th, td { 
    padding: 0.375rem 0.5rem;
  }

  /* Map */
  #yandex-map { 
    height: 15rem;
  }

  /* Footer */
  .site-footer { 
    padding: 1rem 0 0.5rem;
    margin-top: 1rem;
  }
  
  .footer-grid h4 {
    font-size: 0.8125rem;
    margin-bottom: 0.5rem;
  }
  
  .footer-grid p {
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
  }
  
  .footer-copy { 
    font-size: 0.625rem;
    padding-top: 0.5rem;
    margin-top: 0.75rem;
  }
  
  /* Buttons */
  .btn, button {
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
  }
  
  .btn-sm {
    padding: 0.375rem 0.625rem;
    font-size: 0.75rem;
  }
  
  /* Inputs */
  input[type="text"],
  input[type="password"],
  input[type="email"],
  input[type="tel"],
  select,
  textarea {
    font-size: 0.875rem;
    padding: 0.5rem 0.625rem;
  }
  
  /* Autocomplete */
  .ac-list {
    max-height: 15rem;
    font-size: 0.8125rem;
  }
  
  .ac-item {
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
  }
}
}

/* Very small phones */
@media (max-width: 360px) {
  .parts-grid { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: 1fr; }
  .stat-box { min-width: 100%; }
}

/* ── MODAL EXTRAS ── */
.modal-brand-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--brand-red);
  margin-bottom: 5px;
}

.modal-title {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
  color: #111;
  word-break: break-word;
}

.modal-photo-col { display: flex; flex-direction: column; gap: 10px; }

.modal-main-wrap {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: #f5f5f5;
  width: 100%;
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-main-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  max-width: 100%;
  max-height: 100%;
}

.modal-img-ph {
  width: 100%;
  height: 100%;
  min-height: 200px;
  background: #f0f0f0;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  color: #ccc;
}

.modal-thumbs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.modal-thumb {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color .15s, opacity .15s;
  opacity: .75;
}

.modal-thumb:hover { opacity: 1; }
.modal-thumb.active { border-color: var(--brand-red); opacity: 1; }

.modal-detail-col { display: flex; flex-direction: column; gap: 0; }

.modal-price-block {
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.modal-price {
  font-size: 30px;
  font-weight: 800;
  color: #111;
  line-height: 1;
}

.modal-price-req { font-size: 18px; color: var(--muted); font-weight: 600; }

.modal-instock {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-green);
  margin-top: 6px;
}

.detail-table { flex: 1; }

.detail-row {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  align-items: flex-start;
}

.detail-row:last-child { border-bottom: 0; }

.detail-label {
  color: var(--muted);
  min-width: 90px;
  flex-shrink: 0;
  padding-top: 1px;
}

.detail-value { font-weight: 500; color: #111; word-break: break-word; }
.detail-value.mono { font-family: monospace; font-size: 12px; }
.detail-value.small { font-size: 12px; line-height: 1.5; }

.modal-cta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 20px;
}

.modal-cta .btn { justify-content: center; }

/* Hamburger — hidden on desktop */
.nav-toggle { display: none; }
.part-article { color: #aaa; font-size: 11px; font-family: monospace; }

/* ── CONDITION BADGE on card ── */
.part-condition-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: .3px;
}

.badge-used { background: #e8f5e9; color: #2e7d32; }
.badge-new  { background: #e3f2fd; color: #1565c0; }

.cond-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 4px;
  margin-top: 6px;
}

/* ── BODY TAG on card ── */
.part-body-tag {
  font-family: monospace;
  font-size: 10px;
  background: #f0f0f0;
  border-radius: 4px;
  padding: 1px 5px;
  color: #666;
}

/* ── MODAL PHONES LIST ── */
.modal-phones {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.modal-phones-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--muted);
  margin-bottom: 8px;
}

.modal-phone-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.modal-phone-list li {
  padding: 5px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}

.modal-phone-list li:last-child { border-bottom: 0; }

.modal-phone-list a {
  font-weight: 700;
  color: var(--brand-red);
  white-space: nowrap;
}

.modal-phone-list a:hover { color: var(--accent-hover); }

.modal-phone-list span {
  color: var(--muted);
  font-size: 12px;
}
.modal-comment {
  background: #fff8f8;
  border-left: 3px solid var(--brand-red);
  padding: 10px 14px;
  border-radius: 0 6px 6px 0;
  font-size: 13px;
  color: var(--text);
  margin-top: 10px;
  line-height: 1.5;
}

.modal-comment-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--brand-red);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 4px;
}

/* ── CATALOG model-chip-all ── */
.model-chip-all {
  background: #fff0f0;
  border-color: #fca5a5;
  font-weight: 700;
}

/* ── RESPONSIVE MODAL ── */
@media (max-width: 640px) {
  .modal-grid { grid-template-columns: 1fr; }
  .modal-thumbs { grid-template-columns: repeat(4, 1fr); }
  .modal-price { font-size: 24px; }
  .modal { max-height: 95vh; }
}

/* ══════════════════════════════════════════════════════════════════════════
   WARRANTY PAGE STYLES
   ══════════════════════════════════════════════════════════════════════════ */

.warranty-hero {
  background: linear-gradient(135deg, var(--brand-red) 0%, #c41a12 100%);
  color: #fff;
  padding: 40px;
  border-radius: var(--radius);
  margin-bottom: 24px;
  text-align: center;
}

.warranty-hero h1 {
  margin: 0 0 12px;
  font-size: 32px;
  font-weight: 800;
}

.warranty-subtitle {
  margin: 0;
  font-size: 16px;
  opacity: .95;
  max-width: 700px;
  margin: 0 auto;
}

.warranty-grid {
  display: grid;
  gap: 20px;
  margin-bottom: 24px;
}

.warranty-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  overflow: hidden;
}

.warranty-card-header {
  padding: 24px;
  border-bottom: 2px solid var(--line);
  display: flex;
  align-items: center;
  gap: 16px;
}

.warranty-card-new .warranty-card-header {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
}

.warranty-card-used .warranty-card-header {
  background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
}

.warranty-card-extended .warranty-card-header {
  background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
}

.warranty-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
}

.warranty-card h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #111;
}

.warranty-content {
  padding: 24px;
}

.warranty-term {
  background: #f8f9fa;
  border-left: 4px solid var(--brand-red);
  padding: 12px 16px;
  border-radius: 0 8px 8px 0;
  margin-bottom: 20px;
  font-size: 15px;
}

.warranty-content h3 {
  margin: 20px 0 12px;
  font-size: 16px;
  font-weight: 700;
  color: #111;
}

.warranty-list {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}

.warranty-list li {
  padding: 10px 0 10px 28px;
  position: relative;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.6;
}

.warranty-list li:last-child {
  border-bottom: 0;
}

.warranty-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 10px;
  color: var(--brand-green);
  font-weight: 700;
  font-size: 16px;
}

.warranty-note {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  margin: 16px 0;
  font-size: 14px;
  line-height: 1.6;
}

.warranty-note strong {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.warranty-note ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.warranty-note-important {
  background: #fff3cd;
  border-left: 4px solid #ffc107;
  color: #856404;
}

.warranty-note-warning {
  background: #fff8e1;
  border-left: 4px solid #ff9800;
  color: #e65100;
}

.warranty-note-danger {
  background: #ffebee;
  border-left: 4px solid #f44336;
  color: #c62828;
}

.warranty-legal {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.warranty-terms-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 16px 0;
}

.warranty-term-box {
  background: #f8f9fa;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
}

.warranty-term-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
  letter-spacing: .5px;
}

.warranty-term-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--brand-red);
  line-height: 1.2;
}

.warranty-extended-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 20px;
}

.warranty-extended-box {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}

.warranty-extended-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.warranty-extended-title {
  font-size: 15px;
  font-weight: 700;
  color: #111;
  margin-bottom: 12px;
}

.warranty-extended-term {
  font-size: 20px;
  font-weight: 800;
  color: var(--brand-red);
  line-height: 1.4;
  margin-bottom: 8px;
}

.warranty-extended-note {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
}

.warranty-important-section {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  padding: 28px;
  margin-bottom: 24px;
}

.warranty-important-section h2 {
  margin: 0 0 20px;
  font-size: 24px;
  font-weight: 700;
  color: #111;
  text-align: center;
}

.warranty-rules-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.warranty-rule-card {
  background: #f8f9fa;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 20px;
  text-align: center;
}

.warranty-rule-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.warranty-rule-card h3 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
  color: #111;
}

.warranty-rule-card p {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.6;
  color: #333;
}

.warranty-rule-card p:last-child {
  margin-bottom: 0;
}

.warranty-alert {
  background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
  border: 2px solid #ff9800;
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.warranty-alert-icon {
  font-size: 48px;
  flex-shrink: 0;
}

.warranty-alert-content h3 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 700;
  color: #e65100;
}

.warranty-alert-content p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #333;
}

.warranty-contact-section {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  padding: 32px;
  text-align: center;
}

.warranty-contact-section h2 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 700;
  color: #111;
}

.warranty-contact-section > p {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 15px;
}

.warranty-contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 800px;
  margin: 0 auto;
}

.warranty-contact-box {
  background: #f8f9fa;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 24px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  text-align: left;
}

.warranty-contact-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.warranty-contact-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
  letter-spacing: .5px;
}

.warranty-contact-phone {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: var(--brand-red);
  text-decoration: none;
  margin-bottom: 4px;
}

.warranty-contact-phone:hover {
  color: var(--accent-hover);
}

.warranty-contact-address {
  font-size: 15px;
  font-weight: 600;
  color: #111;
  margin-bottom: 4px;
}

.warranty-contact-hours {
  font-size: 13px;
  color: var(--muted);
}

/* Responsive warranty page */
@media (max-width: 960px) {
  .warranty-extended-grid {
    grid-template-columns: 1fr;
  }
  
  .warranty-rules-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .warranty-contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .warranty-hero {
    padding: 24px 20px;
  }
  
  .warranty-hero h1 {
    font-size: 24px;
  }
  
  .warranty-subtitle {
    font-size: 14px;
  }
  
  .warranty-card-header {
    padding: 20px;
    flex-direction: column;
    text-align: center;
  }
  
  .warranty-icon {
    width: 48px;
    height: 48px;
    font-size: 24px;
  }
  
  .warranty-card h2 {
    font-size: 18px;
  }
  
  .warranty-content {
    padding: 20px;
  }
  
  .warranty-terms-grid {
    grid-template-columns: 1fr;
  }
  
  .warranty-rules-grid {
    grid-template-columns: 1fr;
  }
  
  .warranty-alert {
    flex-direction: column;
    padding: 20px;
    text-align: center;
  }
  
  .warranty-contact-section {
    padding: 24px 20px;
  }
  
  .warranty-contact-box {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   IMPROVED CATALOG BRAND GRID STYLES (like the reference image)
   ══════════════════════════════════════════════════════════════════════════ */

.brand-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.brand-grid-item {
  background: var(--card);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
  color: inherit;
  position: relative;
}

.brand-grid-item:hover {
  background: #f8f9fa;
  transform: scale(1.02);
  z-index: 1;
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
}

.brand-grid-bullet {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-red);
  flex-shrink: 0;
}

.brand-grid-name {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  flex: 1;
}

.brand-grid-item:hover .brand-grid-name {
  color: var(--brand-red);
}

.brand-grid-count {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  background: #f0f0f0;
  padding: 2px 8px;
  border-radius: 999px;
}

/* Responsive brand grid */
@media (max-width: 960px) {
  .brand-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 600px) {
  .brand-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .brand-grid-item {
    padding: 12px 14px;
  }
  
  .brand-grid-name {
    font-size: 13px;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   CATALOG PAGE HEADER
   ══════════════════════════════════════════════════════════════════════════ */

.catalog-header {
  text-align: center;
  margin-bottom: 28px;
}

.catalog-header h1 {
  margin: 0 0 8px;
  font-size: 32px;
  font-weight: 800;
  color: #111;
}

.catalog-subtitle {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
}

@media (max-width: 600px) {
  .catalog-header h1 {
    font-size: 24px;
  }
  
  .catalog-subtitle {
    font-size: 14px;
  }
}


/* ══════════════════════════════════════════════════════════════════════════
   CART STYLES
   ══════════════════════════════════════════════════════════════════════════ */

.cart-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 20px;
  align-items: start;
}

.cart-items {
  min-height: 400px;
}

.empty-cart {
  text-align: center;
  padding: 80px 20px;
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.cart-items-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cart-item {
  padding: 16px;
}

.cart-sidebar {
  position: sticky;
  top: 88px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #333;
}

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="email"] {
  width: 100%;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  font-weight: 400 !important;
}

.checkbox-label input[type="checkbox"] {
  margin-top: 2px;
  cursor: pointer;
  flex-shrink: 0;
}

.checkbox-label span {
  font-size: 13px;
  line-height: 1.5;
}

.cart-total {
  font-size: 14px;
}

/* Cart button on product card */
.btn-cart {
  background: var(--brand-red);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 18px;
  cursor: pointer;
  transition: all .15s;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 32px;
}

.btn-cart:hover {
  background: var(--accent-hover);
  transform: scale(1.05);
}

/* Cart badge in navigation */
.cart-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--brand-red);
  color: #fff;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  border: 2px solid #111;
}

/* Notification toast */
.notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--brand-green);
  color: #fff;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
  font-size: 14px;
  font-weight: 600;
  z-index: 10000;
  opacity: 0;
  transform: translateY(20px);
  transition: all .3s ease;
}

.notification.show {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive cart */
@media (max-width: 960px) {
  .cart-layout {
    grid-template-columns: 1fr;
  }
  
  .cart-sidebar {
    position: static;
  }
}

@media (max-width: 600px) {
  .notification {
    bottom: 10px;
    right: 10px;
    left: 10px;
    font-size: 13px;
    padding: 12px 16px;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   AUTOCOMPLETE INPUTS - иконки поиска
   ══════════════════════════════════════════════════════════════════════════ */

/* Иконки поиска для всех autocomplete полей */
#brand-input,
#model-input,
#body-input,
#engine-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%23999' d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}


/* ══════════════════════════════════════════════════════════════════════════
   AUTOCOMPLETE (кастомный, фильтрация по началу строки)
   ══════════════════════════════════════════════════════════════════════════ */

.ac-wrap {
  position: relative;
}

.ac-wrap input[type="text"] {
  width: 100%;
}

.ac-list {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 2px solid var(--brand-red);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(232,35,26,.2);
  list-style: none;
  margin: 0;
  padding: 6px 0;
  z-index: 500;
  max-height: 320px;
  overflow-y: auto;
  animation: acSlideDown 0.15s ease-out;
}

@keyframes acSlideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ac-list::-webkit-scrollbar {
  width: 8px;
}

.ac-list::-webkit-scrollbar-track {
  background: #f5f5f5;
  border-radius: 4px;
}

.ac-list::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}

.ac-list::-webkit-scrollbar-thumb:hover {
  background: #999;
}

.ac-item {
  padding: 10px 16px;
  font-size: 14px;
  cursor: pointer;
  color: #333;
  transition: all .12s ease;
  font-weight: 500;
  border-left: 3px solid transparent;
}

.ac-item:hover,
.ac-item.ac-active {
  background: linear-gradient(90deg, #fff5f5 0%, #fff 100%);
  color: var(--brand-red);
  font-weight: 600;
  border-left-color: var(--brand-red);
}

.ac-item:active {
  background: #ffe5e5;
}

/* Первый элемент (самое точное совпадение) */
.ac-item:first-child {
  color: var(--brand-red);
  font-weight: 600;
  background: #fff8f8;
  border-left-color: var(--brand-red);
}

/* ══════════════════════════════════════════════════════════════════════════
   CART PAGE — чистый профессиональный дизайн
   ══════════════════════════════════════════════════════════════════════════ */

.cart-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.cart-page-header h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: #111;
}

.cart-items-col {
  min-height: 300px;
}

.empty-cart {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.empty-cart-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: .5;
}

.empty-cart h3 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 600;
}

/* Карточка товара */
.cart-item-card {
  display: flex;
  gap: 12px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 8px;
  transition: border-color .15s;
}

.cart-item-card:hover {
  border-color: #ccc;
}

.cart-item-img {
  width: 70px;
  height: 56px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  background: #f5f5f5;
}

.cart-item-img-ph {
  width: 70px;
  height: 56px;
  border-radius: 6px;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #ccc;
  flex-shrink: 0;
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-brand {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .3px;
  color: var(--brand-red);
  margin-bottom: 2px;
}

.cart-item-name {
  font-size: 13px;
  font-weight: 600;
  color: #222;
  margin-bottom: 4px;
  line-height: 1.3;
}

.cart-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11px;
  color: #888;
  margin-bottom: 4px;
}

.cart-item-price {
  font-size: 15px;
  font-weight: 700;
  color: #111;
}

.cart-price-req {
  font-size: 12px;
  font-weight: 600;
  color: #888;
}

.cart-item-remove {
  background: #f5f5f5;
  border: none;
  border-radius: 4px;
  color: #666;
  font-size: 16px;
  width: 28px;
  height: 28px;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
}

.cart-item-remove:hover {
  background: #fee;
  color: #c00;
}

/* Итог */
.cart-summary-card {
  background: #f9fafb;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 12px;
}

.cart-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 13px;
}

.cart-summary-label {
  color: #666;
  font-weight: 500;
}

.cart-summary-count {
  font-size: 18px;
  font-weight: 700;
  color: #111;
}

.cart-summary-total {
  padding-top: 10px;
  margin-top: 8px;
  border-top: 1px solid #ddd;
  font-size: 15px;
  font-weight: 600;
}

.cart-summary-total span:last-child {
  font-size: 18px;
  font-weight: 700;
  color: #111;
}

.cart-summary-note {
  margin: 8px 0 0;
  font-size: 10px;
  color: #888;
  line-height: 1.4;
}

/* Форма заявки */
.order-form-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 20px;
}

.order-form-header {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.order-form-header h3 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
  color: #111;
}

.order-form-header p {
  margin: 0;
  font-size: 12px;
  color: #888;
}

#order-form {
  padding: 0;
}

.oform-group {
  margin-bottom: 12px;
}

.oform-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #444;
  margin-bottom: 4px;
}

.oform-required {
  color: var(--brand-red);
}

.oform-input {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 9px 12px;
  font-size: 13px;
  color: #222;
  background: #fff;
  transition: border-color .15s;
}

.oform-input:focus {
  outline: none;
  border-color: var(--brand-red);
}

/* Чекбокс */
.oform-consent {
  margin-bottom: 16px;
}

.oform-consent-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
}

.oform-consent-label input[type="checkbox"] {
  margin-top: 2px;
  cursor: pointer;
  width: 16px;
  height: 16px;
.oform-consent-text {
  font-size: 11px;
  color: #666;
  line-height: 1.4;
}

/* Responsive cart */
@media (max-width: 960px) {
  .cart-layout {
    grid-template-columns: 1fr;
  }
  .cart-sidebar {
    position: static;
  }
}

@media (max-width: 600px) {
  .cart-page-header h1 { font-size: 20px; }
  .cart-item-img, .cart-item-img-ph { width: 60px; height: 48px; }
  .cart-item-name { font-size: 12px; }
  .cart-item-price { font-size: 14px; }
  .cart-summary-count { font-size: 16px; }
  .cart-summary-total span:last-child { font-size: 16px; }
}

    position: static;
  }
}

@media (max-width: 600px) {
  /* Cart page header */
  .cart-page-header {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
    padding: 0;
  }
  
  .cart-page-header h1 { 
    font-size: 22px;
    margin: 0;
    font-weight: 700;
  }
  
  .cart-page-header .btn {
    align-self: flex-start;
  }
  
  /* Cart layout */
  .cart-layout {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  
  .cart-items-col {
    width: 80%;
  }
  
  .cart-sidebar {
    width: 100%;
    position: static !important;
  }
  
  /* Empty cart */
  .empty-cart {
    padding: 40px 20px;
    text-align: center;
  }
  
  .empty-cart-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: .5;
  }
  
  .empty-cart h3 {
    font-size: 18px;
    margin: 0 0 6px;
  }
  
  /* Cart item card */
  .cart-item-card {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 10px;
  }
  
  .cart-item-img {
    width: 70px;
    height: 56px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    background: #f5f5f5;
  }
  
  .cart-item-img-ph {
    width: 70px;
    height: 56px;
    border-radius: 6px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #ccc;
    flex-shrink: 0;
  }
  
  .cart-item-info {
    flex: 1;
    min-width: 0;
  }
  
  .cart-item-brand {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .3px;
    color: var(--brand-red);
    margin-bottom: 2px;
  }
  
  .cart-item-name {
    font-size: 13px;
    font-weight: 600;
    color: #222;
    margin-bottom: 4px;
    line-height: 1.3;
    word-break: break-word;
  }
  
  .cart-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 11px;
    color: #888;
    margin-bottom: 6px;
  }
  
  .cart-item-meta span {
    white-space: nowrap;
  }
  
  .cart-item-price {
    font-size: 16px;
    font-weight: 700;
    color: #111;
  }
  
  .cart-price-req {
    font-size: 13px;
    font-weight: 600;
    color: #888;
  }
  
  .cart-item-remove {
    background: #f5f5f5;
    border: none;
    border-radius: 6px;
    color: #666;
    font-size: 18px;
    width: 32px;
    height: 32px;
    padding: 0;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
  }
  
  .cart-item-remove:hover {
    background: #fee;
    color: #c00;
  }
  
  /* Cart summary */
  .cart-summary-card {
    background: #f9fafb;
    border: 1px solid var(--line);
    max-width: 45%;
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 12px;
    
  }
  
  .cart-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 14px;
    max-width: 45%;
  }
  
  .cart-summary-label {
    color: #666;
    font-weight: 500;
  }
  
  .cart-summary-count {
    font-size: 18px;
    font-weight: 700;
    color: #111;
  }
  
  .cart-summary-total {
    padding-top: 10px;
    margin-top: 8px;
    border-top: 1px solid #ddd;
    font-size: 15px;
    font-weight: 600;
  }
  
  .cart-summary-total span:last-child {
    font-size: 20px;
    font-weight: 700;
    color: #111;
  }
  
  .cart-summary-note {
    margin: 8px 0 0;
    font-size: 11px;
    color: #888;
    line-height: 1.4;
  }
  
  /* Order form */
  .order-form-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
  }
  
  .order-form-header {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
  }
  
  .order-form-header h3 {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 700;
    color: #111;
  }
  
  .order-form-header p {
    margin: 0;
    font-size: 12px;
    color: #888;
  }
  
  #order-form {
    padding: 0;
  }
  
  .oform-group {
    margin-bottom: 14px;
  }
  
  .oform-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #444;
    margin-bottom: 6px;
  }
  
  .oform-required {
    color: var(--brand-red);
  }
  
  .oform-input {
    width: 100%;
    border: 1.5px solid #ddd;
    border-radius: 6px;
    padding: 11px 12px;
    font-size: 15px;
    color: #222;
    background: #fff;
    transition: border-color .15s;
    -webkit-appearance: none;
    appearance: none;
  }
  
  .oform-input:focus {
    outline: none;
    border-color: var(--brand-red);
  }
  
  .oform-input::placeholder {
    color: #aaa;
  }
  
  /* Checkbox */
  .oform-consent {
    margin-bottom: 16px;
  }
  
  .oform-consent-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
  }
  
  .oform-consent-label input[type="checkbox"] {
    margin-top: 2px;
    cursor: pointer;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
  }
  
  .oform-consent-text {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
  }
  
  /* Submit button */
  #order-form .btn {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    font-weight: 700;
    justify-content: center;
  }
  
  #order-form .btn-red {
    background: var(--brand-red);
    color: #fff;
  }
  
  #order-form .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
  }
}
