:root {
  --bg: #f6f8fb;
  --ink: #152033;
  --muted: #5d6b82;
  --line: #dfe5ee;
  --card: #ffffff;
  --accent: #1d63d8;
  --accent-dark: #154ba8;
  --green: #14804a;
  --shadow: 0 8px 28px rgba(21, 32, 51, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.wrap { width: min(1180px, calc(100% - 32px)); margin-inline: auto; }

.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner { display: flex; align-items: center; gap: 24px; min-height: 64px; }

.logo {
  font-weight: 800;
  font-size: 20px;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.logo-mark { color: var(--accent); font-size: 22px; }

.nav { display: flex; gap: 20px; margin-left: auto; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 600; }
.nav a:hover { color: var(--accent); }

.cart {
  background: #eef3fc;
  color: var(--accent-dark);
  padding: 8px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
}
.cart span { display: inline-block; min-width: 20px; text-align: center; }

.hero {
  background: linear-gradient(135deg, #10233f 0%, #163d75 55%, #1d63d8 100%);
  color: #fff;
  padding: 64px 0 70px;
}

.hero-inner { text-align: center; }

.badge {
  display: inline-block;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.25);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero h1 { font-size: clamp(30px, 5vw, 52px); line-height: 1.1; margin: 20px 0 12px; }
.hero h1 span { color: #9fc4ff; }
.lead { color: #d9e6fa; font-size: 17px; margin-bottom: 28px; }

.search-card {
  max-width: 880px;
  margin: 0 auto;
  background: #fff;
  color: var(--ink);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 18px 50px rgba(0,0,0,0.25);
  text-align: left;
}

.search-row { display: flex; gap: 10px; }

.search-input-wrap { position: relative; flex: 1; }
.search-icon { position: absolute; left: 14px; top: 9px; font-size: 22px; color: var(--muted); }

input[type="search"], select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}
input[type="search"] { padding-left: 42px; }

.btn {
  border: 0;
  border-radius: 10px;
  padding: 11px 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost { background: #eef3fc; color: var(--accent-dark); }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.vehicle-row { display: flex; gap: 12px; margin-top: 14px; align-items: end; }
.vehicle-row label { flex: 1; font-size: 12px; font-weight: 700; color: var(--muted); }
.vehicle-row select { margin-top: 4px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; align-items: center; font-size: 13px; color: var(--muted); }
.chips button {
  border: 1px solid var(--line);
  background: #f8fafc;
  border-radius: 999px;
  padding: 5px 12px;
  cursor: pointer;
  color: var(--ink);
}
.chips button:hover { border-color: var(--accent); color: var(--accent); }

.results-section { padding: 48px 0 64px; }
.results-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 22px; }
.results-head h2 { margin: 0 0 4px; font-size: 26px; }
.results-head p { margin: 0; color: var(--muted); }
.per-page { font-size: 13px; color: var(--muted); }
.per-page select { width: auto; margin-left: 8px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.card-img { height: 180px; background: #f1f4f9; display: grid; place-items: center; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: contain; }
.card-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card h3 { font-size: 15px; line-height: 1.35; margin: 0; min-height: 41px; }
.price { color: var(--accent-dark); font-size: 22px; font-weight: 800; }
.stock { color: var(--green); font-weight: 700; font-size: 13px; }
.card p { margin: 0; color: var(--muted); font-size: 12px; }
.cat { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.btn-add { margin-top: auto; background: var(--accent); color: #fff; }
.btn-add:hover { background: var(--accent-dark); }

.pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 30px; }
.pagination button {
  min-width: 38px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  color: var(--ink);
}
.pagination button.active { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.pagination button:disabled { opacity: .45; cursor: not-allowed; }

.notice { text-align: center; color: var(--muted); min-height: 22px; margin-top: 14px; }
.empty { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 40px; }

.site-footer { background: #10233f; color: #c8d7ee; padding: 24px 0; font-size: 13px; }

@media (max-width: 640px) {
  .nav { display: none; }
  .search-row { flex-direction: column; }
  .vehicle-row { flex-direction: column; align-items: stretch; }
  .results-head { flex-direction: column; align-items: start; }
}
