:root {
  --ah-black: #0d0d0d;
  --ah-black-soft: #161616;
  --ah-card: #1c1c1c;
  --ah-yellow: #FFC72C;
  --ah-yellow-dim: #E6B326;
  --ah-text: #F5F5F0;
  --ah-text-dim: #A8A8A0;
  --ah-line: #2c2c2c;
  --ah-green: #4CAF50;
  --ah-red: #E5484D;
  --radius: 14px;
  --font-display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ah-black);
  color: var(--ah-text);
  font-family: var(--font-body);
  padding-bottom: 90px; /* room for sticky CTA */
  -webkit-tap-highlight-color: transparent;
}

.wrap { max-width: 480px; margin: 0 auto; padding: 0 16px; }

header.topbar {
  background: var(--ah-black-soft);
  border-bottom: 3px solid var(--ah-yellow);
  padding: 14px 16px;
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 10px;
}
header.topbar .logo { display: flex; align-items: center; }
header.topbar .logo img {
  height: 26px;
  width: auto;
  display: block;
}
header.topbar .step {
  margin-left: auto;
  font-size: 12px;
  color: var(--ah-text-dim);
  font-variant-numeric: tabular-nums;
}

.hero {
  padding: 28px 0 8px;
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 30px;
  line-height: 1.1;
  margin: 0 0 6px;
  letter-spacing: 0.3px;
}
.hero h1 .accent { color: var(--ah-yellow); }
.hero p { color: var(--ah-text-dim); margin: 0; font-size: 14.5px; }

.card {
  background: var(--ah-card);
  border: 1px solid var(--ah-line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}

label.field-label {
  display: block;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--ah-text-dim);
  margin-bottom: 6px;
  font-weight: 600;
}

input[type=text], input[type=tel], input[type=number], input[type=datetime-local], select {
  width: 100%;
  background: var(--ah-black-soft);
  border: 1.5px solid var(--ah-line);
  border-radius: 10px;
  color: var(--ah-text);
  padding: 13px 14px;
  font-size: 16px; /* prevents iOS zoom-on-focus */
  font-family: var(--font-body);
  margin-bottom: 14px;
}
input:focus, select:focus {
  outline: none;
  border-color: var(--ah-yellow);
}
input::placeholder { color: #6b6b64; }

.autocomplete-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--ah-black-soft);
  border: 1.5px solid var(--ah-yellow);
  border-radius: 10px;
  overflow-y: auto;
  max-height: 280px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  z-index: 100; /* above .sticky-cta (60) so results are never obscured by the fixed footer */
  display: none;
}
.autocomplete-results.active { display: block; }
.autocomplete-item {
  padding: 12px 14px;
  border-bottom: 1px solid var(--ah-line);
  cursor: pointer;
  font-size: 15px;
}
.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover, .autocomplete-item.highlighted { background: #262620; }
.autocomplete-item .cat-tag {
  float: right;
  font-size: 10.5px;
  color: var(--ah-yellow);
  border: 1px solid var(--ah-yellow-dim);
  border-radius: 999px;
  padding: 2px 8px;
}

.btn {
  display: block;
  width: 100%;
  text-align: center;
  background: var(--ah-yellow);
  color: var(--ah-black);
  font-weight: 700;
  font-size: 16px;
  border: none;
  border-radius: 12px;
  padding: 15px;
  cursor: pointer;
  text-decoration: none;
  font-family: var(--font-body);
}
.btn:active { background: var(--ah-yellow-dim); }
.btn.secondary {
  background: transparent;
  color: var(--ah-text);
  border: 1.5px solid var(--ah-line);
}
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.sticky-cta {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, var(--ah-black) 60%, transparent);
  padding: 18px 16px 20px;
  z-index: 60;
}
.sticky-cta .wrap { padding: 0; }

.section-title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.3px;
  margin: 22px 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title .badge {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  background: var(--ah-yellow);
  color: var(--ah-black);
  border-radius: 999px;
  padding: 2px 9px;
}

.oil-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border: 1.5px solid var(--ah-line);
  border-radius: 12px;
  margin-bottom: 8px;
  cursor: pointer;
}
.oil-option.selected {
  border-color: var(--ah-yellow);
  background: rgba(255,199,44,0.06);
}
.oil-option .info { flex: 1; }
.oil-option .brand-line { font-weight: 700; font-size: 15px; }
.oil-option .grade-line { font-size: 12.5px; color: var(--ah-text-dim); margin-top: 2px; }
.oil-option .tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 5px;
  margin-top: 5px;
}
.tag.best-value { background: #2c3f22; color: #8FD14F; }
.tag.performance { background: #2a2440; color: #B39DFF; }
.tag.budget { background: #3a2a1c; color: #E8A96B; }
.oil-option .price { font-weight: 700; font-size: 17px; white-space: nowrap; }

/* ---------- Step pills ---------- */
.step-pills {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 14px 16px 4px;
  scrollbar-width: none;
}
.step-pills::-webkit-scrollbar { display: none; }
.step-pill {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--ah-line);
  color: var(--ah-text-dim);
  white-space: nowrap;
}
.step-pill .num {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--ah-line);
  color: var(--ah-text-dim);
  font-size: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.step-pill.done { border-color: var(--ah-green); color: var(--ah-text); }
.step-pill.done .num { background: var(--ah-green); color: #0d0d0d; }
.step-pill.current { border-color: var(--ah-yellow); color: var(--ah-text); background: rgba(255,199,44,0.08); }
.step-pill.current .num { background: var(--ah-yellow); color: #0d0d0d; }

/* ---------- Recommendation cards (oil options) ---------- */
.rec-card {
  position: relative;
  background: var(--ah-card);
  border: 1.5px solid var(--ah-line);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 10px;
  cursor: pointer;
}
.rec-card.selected { border-color: var(--ah-green); box-shadow: 0 0 0 1px var(--ah-green); }
.rec-badge {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.rec-badge.recommended { background: var(--ah-green); color: #0d1a0d; }
.rec-badge.best-value { background: var(--ah-yellow); color: #1a1400; }
.rec-badge.premium { background: #B39DFF; color: #1a1030; }
.rec-card .rec-name { font-weight: 700; font-size: 16px; margin-bottom: 2px; }
.rec-card .rec-grade { font-size: 12.5px; color: var(--ah-text-dim); margin-bottom: 8px; }
.rec-card .rec-desc { font-size: 12.5px; color: var(--ah-text-dim); margin-bottom: 10px; line-height: 1.4; }
.rec-card .rec-price { font-size: 22px; font-weight: 700; color: var(--ah-yellow); margin-bottom: 8px; }
.rec-card .rec-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--ah-text-dim);
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 4px;
}
.rec-card .confidence-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  margin-right: 4px;
}
.confidence-dot.high { background: var(--ah-green); }
.confidence-dot.medium { background: var(--ah-yellow); }
.confidence-dot.low { background: var(--ah-red); }
.rec-card .rec-select-btn {
  width: 100%;
  text-align: center;
  padding: 10px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13.5px;
  border: 1.5px solid var(--ah-line);
  color: var(--ah-text);
  background: transparent;
}
.rec-card.selected .rec-select-btn {
  background: var(--ah-green);
  border-color: var(--ah-green);
  color: #0d1a0d;
}

/* ---------- Transmission card ---------- */
.trans-card {
  background: var(--ah-card);
  border: 1.5px solid var(--ah-line);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
}
.trans-card .trans-title {
  font-weight: 700;
  font-size: 14.5px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.trans-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 12px;
}
.trans-grid .label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.4px; color: var(--ah-text-dim); margin-bottom: 4px; }
.trans-grid .value { font-size: 13px; line-height: 1.4; }
.trans-status {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(140,220,140,0.12);
  color: #8FD14F;
  margin-bottom: 12px;
}
.trans-add-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--ah-line);
}
.trans-add-row .trans-add-label { display: flex; align-items: center; gap: 10px; font-size: 13.5px; }
.trans-add-row .trans-price { font-weight: 700; color: var(--ah-yellow); }

/* ---------- Gearbox chip selector (step 1) ---------- */
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chip {
  padding: 9px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--ah-line);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ah-text-dim);
  cursor: pointer;
}
.chip.selected { border-color: var(--ah-yellow); color: var(--ah-yellow); background: rgba(255,199,44,0.08); }

.item-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--ah-line);
}
.item-row:last-child { border-bottom: none; }
.item-row .check {
  width: 22px; height: 22px;
  border: 2px solid var(--ah-line);
  border-radius: 6px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.item-row.checked .check { background: var(--ah-yellow); border-color: var(--ah-yellow); }
.item-row .check svg { display: none; width: 14px; height: 14px; }
.item-row.checked .check svg { display: block; }
.item-row .name { flex: 1; font-size: 14.5px; }
.item-row .name .bm { display: block; font-size: 12px; color: var(--ah-text-dim); }
.item-row .due-flag {
  font-size: 10px; font-weight: 700; color: var(--ah-black);
  background: var(--ah-yellow); border-radius: 999px; padding: 2px 8px; margin-left: 6px;
}
.item-row .item-price { font-size: 14px; color: var(--ah-text-dim); white-space: nowrap; }

.symptom-row {
  padding: 13px 14px;
  border: 1.5px solid var(--ah-line);
  border-radius: 12px;
  margin-bottom: 8px;
  cursor: pointer;
}
.symptom-row.selected { border-color: var(--ah-yellow); background: rgba(255,199,44,0.06); }
.symptom-row .s-label { font-weight: 600; font-size: 14.5px; }
.symptom-row .s-range { font-size: 13px; color: var(--ah-yellow); margin-top: 3px; }
.symptom-row .s-note { font-size: 12px; color: var(--ah-text-dim); margin-top: 4px; }

.total-bar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 4px 2px 12px;
}
.total-bar .label { font-size: 13px; color: var(--ah-text-dim); }
.total-bar .amount { font-family: var(--font-display); font-size: 26px; font-weight: 700; color: var(--ah-yellow); }

.notice {
  font-size: 12.5px;
  color: var(--ah-text-dim);
  background: var(--ah-black-soft);
  border-left: 3px solid var(--ah-yellow);
  padding: 10px 12px;
  border-radius: 6px;
  margin: 10px 0 4px;
}

.confirm-box { text-align: center; padding: 30px 0; }
.confirm-box .ref {
  font-family: var(--font-display);
  font-size: 32px;
  color: var(--ah-yellow);
  letter-spacing: 1px;
  margin: 10px 0;
}
