/* NW Tire Wheel — Tires pages. Same tokens as the home page. */
:root {
  --navy: #111111;
  --navy-2: #262626;
  --blue: #d0121b;          /* brand red (named "blue" on the home page; kept for parity) */
  --blue-dark: #a80e15;
  --ink: #111827;
  --muted: #5b6475;
  --bg: #f4f6fa;
  --card: #ffffff;
  --line: #e3e7ee;
  --ok: #15803d;
  --warn: #b45309;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(11, 18, 32, .08);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue-dark); }
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
.wrap { width: min(1120px, 100% - 32px); margin: 0 auto; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 22px; border-radius: 10px; font-weight: 700; font-size: 16px; font-family: inherit;
  text-decoration: none; border: 2px solid transparent; cursor: pointer; line-height: 1.1;
  transition: transform .08s ease, background .15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid #ff8a8f; outline-offset: 2px; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); }
.btn-ghost:hover { border-color: #fff; }
.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:hover { background: var(--navy-2); }
.btn-line { background: #fff; color: var(--ink); border-color: #cfd6e1; }
.btn-line:hover { border-color: var(--ink); }
.btn-sm { padding: 10px 14px; font-size: 14px; border-radius: 9px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* Header (matches the home page) */
.site-header { position: sticky; top: 0; z-index: 20; background: #fff; color: var(--ink); border-bottom: 3px solid var(--blue); }
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-logo { height: 39px; width: auto; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: #222; text-decoration: none; font-weight: 600; font-size: 15px; padding: 6px 0; border-bottom: 3px solid transparent; }
.nav a:hover { color: var(--blue); }
.nav a[aria-current="page"] { color: var(--blue); border-bottom-color: var(--blue); }
.header-call { padding: 10px 16px; font-size: 15px; white-space: nowrap; }

/* Finder band */
.finder { position: relative; color: #fff;
  background: radial-gradient(900px 500px at 85% 10%, #3a0d10 0%, transparent 60%), linear-gradient(160deg, #1b1b1b 0%, var(--navy) 65%); }
.finder .wrap { padding: 40px 0 44px; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: #ff8a8f; margin-bottom: 10px; }
.finder h1 { font-size: clamp(28px, 4.2vw, 44px); line-height: 1.1; margin: 0 0 8px; letter-spacing: -.01em; font-weight: 800; }
.finder .lead { font-size: clamp(15px, 1.5vw, 18px); color: #d4d4d4; margin: 0 0 22px; max-width: 62ch; }

.finder-card { background: #fff; color: var(--ink); border-radius: var(--radius); box-shadow: 0 18px 50px rgba(0,0,0,.35); overflow: hidden; }
.tabs { display: flex; background: #f0f2f6; border-bottom: 1px solid var(--line); }
.tab {
  flex: 1 1 0; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 15px 10px; font: inherit; font-weight: 700; font-size: 15px; color: #3c4658;
  background: none; border: 0; border-bottom: 3px solid transparent; cursor: pointer; text-align: center;
}
.tab svg { width: 20px; height: 20px; flex: none; }
.tab:hover { color: var(--ink); background: #e8ebf1; }
.tab[aria-selected="true"] { background: #fff; color: var(--blue-dark); border-bottom-color: var(--blue); }
.tab:focus-visible { outline: 3px solid #ff8a8f; outline-offset: -3px; }
.panel { padding: 22px; }
.panel h2 { margin: 0 0 4px; font-size: 18px; }
.panel .hint { margin: 0 0 16px; color: var(--muted); font-size: 14px; }

.row { display: grid; gap: 12px; align-items: end; }
.row-3 { grid-template-columns: repeat(3, 1fr) auto; }
.row-2 { grid-template-columns: 2fr 1fr auto; }
.field { display: block; min-width: 0; }
.field > span { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; color: #2b3444; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; padding: 12px 14px; border: 1px solid #cfd6e1; border-radius: 10px; background: #fff; color: var(--ink);
}
.field select { appearance: none; -webkit-appearance: none; padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6475' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; }
.field select:disabled { background-color: #f3f5f8; color: #8a93a3; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
.field textarea { resize: vertical; min-height: 84px; }
.field .err { display: block; color: #b91c1c; font-size: 13px; font-weight: 600; margin-top: 4px; }
.field.invalid input, .field.invalid select { border-color: #dc2626; }
.or { display: flex; align-items: center; gap: 12px; margin: 18px 0 14px; color: var(--muted); font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--blue-dark); text-decoration: underline; cursor: pointer; }
.plate-input { text-transform: uppercase; letter-spacing: .12em; font-weight: 800; font-size: 18px !important; }

.notice { margin-top: 16px; padding: 14px 16px; border-radius: 12px; background: #f6f8fb; border: 1px solid var(--line); font-size: 15px; }
.notice strong { display: block; margin-bottom: 2px; }
.notice.good { background: #ecfdf3; border-color: #bbf7d0; }
.notice.bad { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.notice .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.ws-wrap { min-height: 220px; }
.ws-wrap iframe { width: 100%; border: 0; }

/* Trust strip */
.strip { background: #fff; border-bottom: 1px solid var(--line); }
.strip .wrap { display: flex; flex-wrap: wrap; gap: 8px 28px; padding: 14px 0; font-size: 14px; color: #37404f; font-weight: 600; }
.strip span { display: inline-flex; align-items: center; gap: 8px; }
.strip svg { width: 18px; height: 18px; color: var(--blue); flex: none; }

/* Results */
section { padding: 40px 0; }
.section-title { font-size: clamp(22px, 2.8vw, 30px); margin: 0 0 6px; letter-spacing: -.01em; }
.section-lead { color: var(--muted); margin: 0 0 22px; max-width: 70ch; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: end; margin: 0 0 18px; }
.toolbar .field { width: auto; min-width: 170px; }
.toolbar .field select { padding-top: 10px; padding-bottom: 10px; }
.toolbar .count { margin-left: auto; color: var(--muted); font-size: 14px; padding-bottom: 10px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.tire { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  display: flex; flex-direction: column; overflow: hidden; }
.tire-top { display: flex; gap: 14px; padding: 18px 18px 0; }
.tire-pic { width: 76px; height: 76px; flex: none; border-radius: 12px; background: #15171c; color: #fff; display: grid; place-items: center; overflow: hidden; }
.tire-pic svg { width: 56px; height: 56px; }
.tire-pic img { width: 100%; height: 100%; object-fit: cover; }
.tire-brand { font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--blue-dark); }
.tire h3 { margin: 2px 0 2px; font-size: 19px; line-height: 1.2; }
.tire-size { color: #37404f; font-weight: 600; font-size: 15px; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 18px 0; }
.badge { font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 999px; background: #eef1f6; color: #2f3949; white-space: nowrap; }
.badge.red { background: #fdeaea; color: var(--blue-dark); }
.tire details { margin: 12px 18px 0; border-top: 1px solid var(--line); }
.tire summary { cursor: pointer; padding: 10px 0 4px; font-size: 14px; font-weight: 700; color: #37404f; list-style: none; display: flex; align-items: center; gap: 6px; }
.tire summary::-webkit-details-marker { display: none; }
.tire summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin-left: 2px; margin-top: -3px; transition: transform .15s ease; }
.tire details[open] summary::after { transform: rotate(-135deg); margin-top: 3px; }
.specs { margin: 4px 0 6px; padding: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: 14px; }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; font-weight: 600; }
.tire-buy { margin-top: auto; padding: 14px 18px 18px; display: grid; grid-template-columns: 1fr auto; gap: 10px 12px; align-items: end; }
.price { font-size: 26px; font-weight: 800; letter-spacing: -.01em; line-height: 1; }
.price small { font-size: 14px; font-weight: 600; color: var(--muted); }
.price-sub { font-size: 13px; color: var(--muted); margin-top: 5px; }
.price-ask { font-size: 15px; font-weight: 700; color: #37404f; line-height: 1.25; }
.ship { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; font-weight: 600; }
.ship .ok { color: var(--ok); }
.ship .low { color: var(--warn); }
.ship span { display: inline-flex; align-items: center; gap: 5px; }
.ship svg { width: 15px; height: 15px; }

.empty { background: #fff; border: 1px dashed #c9d1dd; border-radius: var(--radius); padding: 28px; text-align: center; }
.empty h3 { margin: 0 0 6px; font-size: 20px; }
.empty p { margin: 0 auto 16px; color: var(--muted); max-width: 54ch; }

/* Popular sizes */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-block; padding: 9px 14px; border-radius: 999px; background: #fff; border: 1px solid #cfd6e1; color: var(--ink); font-weight: 700; font-size: 14px; text-decoration: none; }
.chip:hover { border-color: var(--blue); color: var(--blue-dark); }
.chip small { color: var(--muted); font-weight: 600; }

/* How to read a size */
.howto { background: #fff; border-top: 1px solid var(--line); }
.size-read { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 8px; }
.size-read div { flex: 1 1 150px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.size-read b { display: block; font-size: 26px; font-weight: 800; color: var(--blue-dark); line-height: 1.1; }
.size-read span { font-size: 14px; color: #37404f; }
.fine { font-size: 13px; color: var(--muted); }

/* Quote dialog */
dialog.quote { width: min(560px, calc(100% - 24px)); border: 0; border-radius: 16px; padding: 0; box-shadow: 0 30px 80px rgba(0,0,0,.45); color: var(--ink); }
dialog.quote::backdrop { background: rgba(10, 12, 18, .6); }
.quote-head { display: flex; align-items: flex-start; gap: 12px; padding: 20px 22px 0; }
.quote-head h2 { margin: 0; font-size: 21px; flex: 1; }
.quote-close { background: none; border: 0; font-size: 28px; line-height: 1; cursor: pointer; color: #5b6475; padding: 0 4px; }
.quote-body { padding: 8px 22px 22px; }
.quote-item { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 10px 0 16px; font-size: 15px; }
.quote-item b { display: block; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.quote .field { margin-bottom: 12px; }
.mini-select { font: inherit; padding: 6px 8px; border-radius: 8px; border: 1px solid #cfd6e1; max-width: 100%; background: #fff; color: var(--ink); }
.form-msg { display: none; padding: 12px 14px; border-radius: 10px; font-weight: 600; margin-bottom: 14px; }
.form-msg.show { display: block; }
.form-msg.ok { background: #ecfdf3; border: 1px solid #bbf7d0; color: var(--ok); }
.form-msg.error { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }

/* Footer */
footer { background: var(--navy); color: #b8b8b8; padding: 30px 0; font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; }
footer a { color: #e4e4e4; text-decoration: none; }
footer a:hover { color: #fff; }
footer .links { display: flex; gap: 18px; flex-wrap: wrap; }
.photo-note { font-size: 12px; color: #8f8f8f; }

@media (max-width: 820px) {
  .nav a:not(.nav-keep) { display: none; }
  .site-header .wrap { flex-wrap: wrap; gap: 0 12px; min-height: 0; padding-top: 8px; }
  .nav { order: 3; width: 100%; margin: 0; gap: 20px; padding-top: 4px; }
  .nav + .header-call { margin-left: auto; }
  .brand-logo { height: 33px; }
  .finder .wrap { padding: 26px 0 30px; }
  .row-3, .row-2 { grid-template-columns: 1fr 1fr; }
  .row-3 .btn, .row-2 .btn { grid-column: 1 / -1; }
  .row-3 .field:first-child { grid-column: 1 / -1; }
  .tab { flex-direction: column; gap: 4px; font-size: 13px; padding: 12px 6px; }
  .panel { padding: 18px 16px; }
  section { padding: 32px 0; }
  .toolbar .count { margin-left: 0; width: 100%; padding-bottom: 0; }
  .toolbar .field { flex: 1 1 140px; min-width: 0; }
}
@media (max-width: 480px) {
  .two { grid-template-columns: 1fr; }
  .header-call { padding: 9px 12px; font-size: 14px; }
  .brand-logo { height: 29px; }
  .grid { grid-template-columns: 1fr; }
  .tire-buy { grid-template-columns: 1fr; }
  .tire-buy .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .tire summary::after { transition: none; }
}

/* Owner preview banner */
.preview-bar { background: #fde68a; color: #422006; padding: 10px 16px; text-align: center; font-size: 14px; position: sticky; top: 71px; z-index: 19; }
.preview-bar a { color: #422006; font-weight: 700; margin-left: 10px; }
