:root {
  --bg: #f5f7fb; --card: #fff; --ink: #0f1a2e; --muted: #5b6678; --line: #e3e8f0;
  --brand: #1f4fff; --brand-ink: #fff; --hero: #0b1b3a; --hero-ink: #fff;
  --ok: #0f9d58; --ok-bg: #e7f6ee; --bad: #d93025; --bad-bg: #fdecea; --info-bg: #eef3ff;
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220; --card: #131c2e; --ink: #e8edf6; --muted: #9aa6ba; --line: #24314a;
    --hero: #060c18; --ok-bg: #0f2a1d; --bad-bg: #2d1414; --info-bg: #17223a;
  }
}
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.55 system-ui, -apple-system, "Segoe UI", "Noto Sans Georgian", sans-serif; background: var(--bg); color: var(--ink); }
a { color: var(--brand); }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px; }

header { background: var(--hero); color: var(--hero-ink); }
.top { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { color: #fff; text-decoration: none; font-weight: 800; font-size: 20px; letter-spacing: -.3px; }
.logo b { color: #6f8dff; }
.langs a { color: #c9d4ff; text-decoration: none; margin-left: 12px; font-size: 14px; }
.langs a.on { color: #fff; font-weight: 700; }

.hero { padding: 48px 0 56px; text-align: center; }
.hero h1 { font-size: clamp(26px, 5vw, 42px); line-height: 1.15; margin: 0 0 12px; }
.hero p { color: #c9d4ff; margin: 0 auto 28px; max-width: 620px; }
form.search { display: flex; gap: 8px; max-width: 640px; margin: 0 auto; }
form.search input {
  flex: 1; min-width: 0; font: inherit; font-size: 18px; letter-spacing: 1px; text-transform: uppercase;
  padding: 14px 16px; border-radius: 12px; border: 0; outline: none; color: #0f1a2e; background: #fff;
}
form.search input::placeholder { text-transform: none; letter-spacing: 0; color: #8a94a6; }
button, .btn {
  font: inherit; font-weight: 700; border: 0; border-radius: 12px; padding: 14px 22px;
  background: var(--brand); color: var(--brand-ink); cursor: pointer; text-decoration: none; display: inline-block;
}
button:disabled { opacity: .6; cursor: wait; }
.note { font-size: 14px; color: #9fb0e6; margin-top: 12px; }
.err { color: #ffb4ab; margin-top: 12px; min-height: 1.5em; }

main section { padding: 40px 0; }
h2 { font-size: 24px; margin: 0 0 18px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }

#result { margin-top: -28px; }
.vehicle { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; margin-bottom: 16px; }
.vehicle .name { font-size: 22px; font-weight: 800; }
.vehicle .vin { color: var(--muted); font-family: ui-monospace, monospace; }
.free { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 14px 0; margin-bottom: 16px; }
.free h3 { margin: 0 0 10px; font-size: 17px; }
.specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; margin-bottom: 12px; }
.specs div { background: var(--info-bg); border-radius: 10px; padding: 8px 12px; display: flex; flex-direction: column; }
.specs span { font-size: 12px; color: var(--muted); }
.free details { background: transparent; border: 0; padding: 0 4px; margin: 0; }
.free details p { font-size: 14px; color: var(--muted); }
.free .src { font-size: 12px; color: var(--muted); margin: 0; }
.sale + .sale { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; }
.photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; display: block; }
.avail { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.pill { padding: 4px 10px; border-radius: 99px; font-size: 14px; background: var(--info-bg); }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.no { background: var(--bad-bg); color: var(--bad); }
.products { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.product { position: relative; display: flex; flex-direction: column; gap: 8px; }
.product.best { border: 2px solid var(--brand); }
.product .tag { position: absolute; top: -11px; right: 14px; background: var(--brand); color: #fff; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 99px; }
.product h3 { margin: 0; font-size: 18px; }
.product p { margin: 0; color: var(--muted); font-size: 14px; flex: 1; }
.price { font-size: 26px; font-weight: 800; }
.buyrow { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; align-items: center; }
.buyrow input { font: inherit; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); flex: 1; min-width: 220px; }
.paysel label { margin-right: 14px; font-size: 14px; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; counter-reset: s; }
.steps .card::before { counter-increment: s; content: counter(s); display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; margin-bottom: 8px; display: grid; }
.what { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; list-style: none; padding: 0; margin: 0; }
.what li { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.what li::before { content: "✓ "; color: var(--ok); font-weight: 800; }
details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; }
summary { font-weight: 700; cursor: pointer; }

.banner { background: #fff4d6; color: #6b4e00; text-align: center; padding: 8px 16px; font-size: 14px; font-weight: 600; }
.summary-list { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 8px; }
.summary-list li { padding: 10px 14px; border-radius: 10px; background: var(--info-bg); }
.summary-list li.ok { background: var(--ok-bg); color: var(--ok); }
.summary-list li.bad { background: var(--bad-bg); color: var(--bad); font-weight: 600; }
.items { display: grid; gap: 10px; }
.item { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.spinner { width: 22px; height: 22px; border: 3px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin 1s linear infinite; display: inline-block; vertical-align: middle; margin-right: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }

footer { color: var(--muted); font-size: 14px; padding: 30px 0 40px; border-top: 1px solid var(--line); margin-top: 20px; }
@media (max-width: 560px) {
  form.search { flex-direction: column; }
  .langs a { margin-left: 8px; }
}
