/* Racewayy customer site. Navy livery, silver page, Saira italic for headlines and prices,
   Barlow for text. Three labels only: On sale (navy), Clearance sale (yellow), New (blue). */
@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url(/fonts/barlow-400.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-display: swap; src: url(/fonts/barlow-500.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url(/fonts/barlow-600.woff2) format("woff2"); }
@font-face { font-family: "Saira"; font-style: italic; font-weight: 100 900; font-stretch: 50% 125%; font-display: swap; src: url(/fonts/saira-italic.woff2) format("woff2"); }

:root {
  --navy: #0e2148; --navy-deep: #081633; --navy-line: #243f78;
  --on-navy: #fff; --on-navy-muted: #c2ccdb; --on-navy-subtle: #97a6c1; --stripe: #b9c3d3;
  --yellow: #ffd23f; --yellow-ink: #3d2f00; --yellow-note: #5c4700;
  --blue: #1f4fd8;
  --page: #e7ebf1; --surface: #fff; --photo: #fff;
  --ink: #0e2148; --muted: #4f5a70; --line: #c9d2df; --soft: #dfe4ec;
  --open: #4fd08a;
  --focus: #1f4fd8;
  --btn-bg: #0e2148; --btn-ink: #fff;
  --font: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --disp: "Saira", "Arial Narrow", sans-serif;
  --gutter: 16px;
  --width: 1120px;
  --r-card: 16px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #071230; --surface: #0f1f45; --ink: #e8edf6; --muted: #a3b0c8; --line: #24386a; --soft: #1a2c58;
    --focus: #ffd23f; --btn-bg: #e8edf6; --btn-ink: #0e2148; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --page: #071230; --surface: #0f1f45; --ink: #e8edf6; --muted: #a3b0c8; --line: #24386a; --soft: #1a2c58;
  --focus: #ffd23f; --btn-bg: #e8edf6; --btn-ink: #0e2148; color-scheme: dark;
}
@media (min-width: 700px) { :root { --gutter: 24px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font: 400 17px/1.45 var(--font); padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
@media (min-width: 900px) { body { padding-bottom: 0; } }
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }
.disp { font-family: var(--disp); font-style: italic; font-weight: 800; font-stretch: 62.5%; line-height: .95; letter-spacing: -.005em; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- Header ---------- */
.top { background: var(--navy); color: var(--on-navy); }
.top-in { max-width: var(--width); margin: 0 auto; padding: 10px var(--gutter); display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-height: 44px; }
.brand img { width: 40px; height: 40px; border-radius: 50%; }
.brand .disp { font-size: 30px; }
.topnav { display: none; }
.top-tools { margin-left: auto; display: flex; gap: 8px; }
.round { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--navy-deep); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.round svg { width: 20px; height: 20px; }
.theme .sun { display: none; }
.is-dark .theme .sun { display: block; }
.is-dark .theme .moon { display: none; }
@media (min-width: 900px) {
  .topnav { display: flex; gap: 4px; margin-left: 24px; }
  .topnav-a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 999px; color: var(--on-navy-muted); text-decoration: none; font-weight: 600; }
  .topnav-a svg { width: 18px; height: 18px; }
  .topnav-a:hover { color: #fff; background: rgba(255,255,255,.08); }
  .topnav-a.on { color: #fff; background: rgba(255,255,255,.12); }
}

/* ---------- Bottom tab bar (phones) ---------- */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--navy); padding: 4px 8px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -1px 0 rgba(255,255,255,.08); }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 56px; color: var(--on-navy-muted); font-size: 12px; font-weight: 600; text-decoration: none; }
.tab.on { color: #fff; }
.tab.on svg { color: var(--yellow); }
@media (min-width: 900px) { .tabbar { display: none; } }

/* ---------- Hero ---------- */
.hero { background: var(--navy); color: #fff; position: relative; overflow: hidden; }
.hero::before, .hero::after { content: ""; position: absolute; top: 0; bottom: 0; width: 14px; background: var(--stripe); opacity: .9; right: 58px; }
.hero::after { right: 80px; }
.hero::before, .hero::after { z-index: 0; }
.hero-in { position: relative; z-index: 1; max-width: var(--width); margin: 0 auto; padding: 18px var(--gutter) 0; }
.status { margin: 0; display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 500; color: var(--on-navy-muted); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #ff7a68; margin-right: 8px; vertical-align: middle; }
.status .dot { margin: 0; }
.dot.open { background: var(--open); }
.hero-title { margin: 8px 0 0; font-size: clamp(60px, 17vw, 120px); max-width: 9ch; }
.lede { margin: 12px 0 24px; color: var(--on-navy-muted); font-size: 17px; max-width: 40ch; }
.slider { margin-top: 22px; background: var(--navy-deep); border-radius: 20px 20px 0 0; max-width: 720px; }
.slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 20px 20px 0 0; }
.slides::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; scroll-snap-align: start; display: flex; gap: 14px; padding: 16px; text-decoration: none; color: #fff; }
.slide-ph { flex: none; width: 132px; height: 132px; background: var(--photo); border-radius: 14px; display: flex; align-items: center; justify-content: center; }
.slide-ph img { width: 120px; height: 120px; object-fit: contain; }
@media (min-width: 700px) { .slide-ph { width: 180px; height: 180px; } .slide-ph img { width: 164px; height: 164px; } }
.slide-txt { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tagline { align-self: flex-start; font-size: 12px; font-weight: 600; background: #fff; color: var(--navy); padding: 5px 9px; border-radius: 999px; line-height: 1; }
.tagline.t-clear { background: var(--yellow); color: var(--yellow-ink); }
.slide-name { font-size: 17px; font-weight: 600; line-height: 1.25; }
@media (min-width: 700px) { .slide-name { font-size: 22px; } }
.slide-price { margin-top: auto; font-size: 14px; color: var(--on-navy-muted); }
.slide-price .disp { font-size: 40px; color: #fff; }
.slide-foot { display: flex; align-items: center; gap: 6px; padding: 0 16px 16px; }
.dots { display: flex; gap: 6px; }
.dots span { width: 22px; height: 4px; border-radius: 2px; background: var(--navy-line); }
.dots span.on { background: #fff; }
.slide-when { margin-left: auto; font-size: 13px; color: var(--on-navy-subtle); }
.checker { height: 12px; background: repeating-linear-gradient(90deg, var(--navy) 0 12px, var(--page) 12px 24px); }
.checker.thin { height: 8px; background: repeating-linear-gradient(90deg, var(--navy) 0 8px, var(--page) 8px 16px); }

/* ---------- Sections and lists ---------- */
.sec { max-width: var(--width); margin: 0 auto; padding: 28px var(--gutter) 0; }
.sec.tight { padding-top: 4px; }
main > .sec:last-child { padding-bottom: 32px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sec-head h2, .wk .disp { margin: 0; font-size: 36px; }
.wk { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin: 0 0 14px; font-size: 14px; font-weight: 500; }
.wk .disp { font-size: 32px; }
.more { font-size: 15px; font-weight: 600; text-underline-offset: 3px; min-height: 44px; display: inline-flex; align-items: center; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 700px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.row { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x proximity; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter) 6px; scrollbar-width: thin; }
.row .card { flex: 0 0 152px; scroll-snap-align: start; }
@media (min-width: 700px) { .row .card { flex-basis: 200px; } }

/* ---------- Item card ---------- */
.card { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-card); overflow: hidden; text-decoration: none; color: var(--ink); box-shadow: 0 1px 0 var(--line); }
.card:hover .cn { text-decoration: underline; text-underline-offset: 3px; }
.ph { position: relative; aspect-ratio: 1 / 1; background: var(--photo); display: flex; align-items: center; justify-content: center; }
.ph img { width: 100%; height: 100%; object-fit: contain; padding: 14px 14px 32px; }
.badges { position: absolute; left: 8px; top: 8px; display: flex; flex-wrap: wrap; gap: 4px; z-index: 1; }
.badge { font-size: 12px; font-weight: 600; padding: 5px 9px; border-radius: 999px; line-height: 1; }
.b-sale { background: var(--navy); color: #fff; }
.b-clear { background: var(--yellow); color: var(--yellow-ink); }
.b-new { background: var(--blue); color: #fff; }
.plate { position: absolute; right: 8px; bottom: 8px; border-radius: 10px; padding: 6px 9px 5px; text-align: right; line-height: 1; }
.plate .p { font-family: var(--disp); font-style: italic; font-weight: 800; font-stretch: 62.5%; font-size: 26px; display: block; }
.plate .u { font-size: 11px; font-weight: 500; display: block; margin-top: 2px; }
.pl-sale { background: var(--navy); color: #fff; } .pl-sale .u { color: var(--on-navy-muted); }
.pl-clear { background: var(--yellow); color: var(--navy); } .pl-clear .u { color: var(--yellow-note); }
.pl-reg { background: #fff; color: var(--navy); box-shadow: inset 0 0 0 2px var(--navy); }
.cb { padding: 10px 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.cn { font-size: 15px; font-weight: 600; line-height: 1.25; }
.cm { font-size: 13px; color: var(--muted); }

/* ---------- Page heads, filters ---------- */
.page-head { background: var(--navy); color: #fff; }
.page-head-in { max-width: var(--width); margin: 0 auto; padding: 18px var(--gutter) 20px; display: flex; flex-direction: column; gap: 14px; }
.page-head h1 { margin: 0; font-size: clamp(44px, 12vw, 72px); }
.page-head .lede { margin: 0; }
.new-head { position: relative; overflow: hidden; }
.new-head::after { content: ""; position: absolute; right: -36px; top: -36px; width: 160px; height: 160px; border-radius: 50%; border: 14px solid var(--blue); opacity: .6; }
.search { display: flex; align-items: center; gap: 10px; background: #fff; color: #4f5a70; border-radius: 999px; padding: 0 16px; min-height: 50px; max-width: 560px; }
.search svg { width: 18px; height: 18px; }
.search input { border: 0; outline: 0; flex: 1; min-width: 0; font: 500 17px var(--font); color: #0e2148; background: transparent; }
.search:focus-within { outline: 3px solid var(--yellow); outline-offset: 2px; }
.filters { max-width: var(--width); margin: 0 auto; padding: 14px var(--gutter) 10px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 calc(var(--gutter) * -1); padding: 2px var(--gutter); scrollbar-width: none; flex: 1 1 100%; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: 999px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); font-weight: 600; font-size: 15px; text-decoration: none; }
.chip .n { font-weight: 500; opacity: .75; }
.chip.on { background: var(--btn-bg); color: var(--btn-ink); border-color: var(--btn-bg); }
.sort { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; margin-left: auto; }
.sort select { font: 600 15px var(--font); color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; min-height: 44px; padding: 0 10px; }
.count { margin: 0 0 12px; }
.more-wrap { display: flex; justify-content: center; padding: 20px 0 0; }
.empty, .empty-box p { margin: 0; }
.empty-box { padding: 20px; border-radius: var(--r-card); border: 1.5px dashed var(--line); display: flex; flex-direction: column; gap: 8px; background: var(--surface); }
.empty-box h1 { margin: 0 0 4px; font-size: 48px; }

/* ---------- Buttons ---------- */
.btns { display: flex; flex-wrap: wrap; gap: 10px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 999px; font: 600 16px var(--font); text-decoration: none; border: 0; cursor: pointer; }
.btn-p { background: var(--btn-bg); color: var(--btn-ink); }
.btn-s { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1.5px currentColor; }
.btn.wide { width: 100%; margin-top: 10px; }

/* ---------- Item page ---------- */
.item-photo { position: relative; background: var(--photo); max-width: var(--width); margin: 0 auto; }
.item-photo img { width: 100%; height: auto; max-width: 560px; aspect-ratio: 1 / 1; object-fit: contain; margin: 0 auto; padding: 64px 32px 24px; }
.back { position: absolute; left: 12px; top: 12px; z-index: 1; display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 14px 0 8px; border-radius: 999px; background: #e7ebf1; color: #0e2148; font-weight: 600; font-size: 15px; text-decoration: none; }
.back svg { width: 18px; height: 18px; }
.share { position: absolute; right: 12px; top: 12px; z-index: 1; background: #e7ebf1; color: #0e2148; }
.item-body { max-width: 720px; margin: 0 auto; padding: 20px var(--gutter) 0; display: flex; flex-direction: column; gap: 14px; }
.item-body .badges { position: static; }
.item-name { margin: 0; font-size: 26px; line-height: 1.2; font-weight: 600; }
.price-block { display: flex; align-items: flex-end; gap: 12px; background: var(--navy); color: #fff; border-radius: 18px; padding: 16px 18px; }
.price-block .disp { font-size: 64px; }
.price-block.clear { background: var(--yellow); color: var(--navy); }
.price-block.reg { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 2px currentColor; }
.pb-txt { display: flex; flex-direction: column; gap: 2px; padding-bottom: 6px; font-size: 14px; }
.pb-txt strong { font-size: 16px; }
.when { margin: 0; font-weight: 600; }
.details { margin: 0; }
.facts { display: grid; grid-template-columns: 110px minmax(0, 1fr); margin: 0; }
.facts dt, .facts dd { margin: 0; padding: 12px 0; border-top: 1px solid var(--line); }
.facts dt { color: var(--muted); }
.facts dd { font-weight: 500; }
.item-body .btn { flex: 1; }

/* ---------- Find us ---------- */
.visit-card { background: var(--surface); border-radius: var(--r-card); padding: 18px; display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; max-width: 640px; }
.visit-card h2 { margin: 0; font-size: 30px; }
.visit-card .h3 { font: 600 19px var(--font); }
.visit-card p { margin: 0; }
.addr { font-size: 19px; line-height: 1.35; }
.hours { width: 100%; border-collapse: collapse; font-size: 16px; }
.hours th, .hours td { text-align: left; padding: 10px 0; border-top: 1px solid var(--line); font-weight: 400; }
.hours td { text-align: right; }
.hours tr.today th, .hours tr.today td { font-weight: 600; }

/* ---------- Footer ---------- */
.foot { background: var(--navy); color: var(--on-navy-muted); margin-top: 40px; }
.foot-in { max-width: var(--width); margin: 0 auto; padding: 28px var(--gutter) 32px; display: grid; gap: 12px; font-size: 15px; }
.foot strong { color: #fff; }
.foot a { color: #fff; }
.foot p { margin: 0; }
.foot-logo { background: none; border: 0; padding: 0; width: 44px; height: 44px; cursor: default; }
.foot-logo img { width: 44px; height: 44px; border-radius: 50%; }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
