/* RH Racing website
   Colours taken from the shop building: dark larch facade, white plaster,
   warm wall lamps, asphalt. Type: Barlow Condensed (italic, like the logo) + Barlow. */

@font-face { font-family: "Barlow Condensed"; font-style: italic; font-weight: 600; font-display: swap;
  src: url(fonts/barlow-condensed-latin-600-italic.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: italic; font-weight: 700; font-display: swap;
  src: url(fonts/barlow-condensed-latin-700-italic.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 500; font-display: swap;
  src: url(fonts/barlow-condensed-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(fonts/barlow-condensed-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(fonts/barlow-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 500; font-display: swap;
  src: url(fonts/barlow-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(fonts/barlow-latin-600-normal.woff2) format("woff2"); }

:root {
  --plaster: #f3f3f1;
  --paper: #ffffff;
  --ink: #1e1c1a;
  --larch: #2b2521;
  --lamp: #e2a548;
  --slate: #5f6367;
  --line: #d8d7d3;
  --wrap: 1180px;
  --pad: clamp(20px, 4vw, 40px);
  --cond: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--plaster);
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--body);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--lamp); outline-offset: 2px; }
.muted { color: var(--slate); }
[hidden] { display: none !important; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

h1, h2 {
  font-family: var(--cond);
  font-style: italic;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.005em;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.5rem, 6.4vw, 4.75rem); }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
h3 { font: 600 1.05rem/1.3 var(--body); margin: 1.6em 0 .3em; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 10;
  background: var(--paper); padding: 8px 14px; border-radius: 3px;
}
.skip:focus { top: 12px; }

/* ---------- Header ---------- */
.top { position: relative; z-index: 2; background: var(--plaster); border-bottom: 1px solid var(--line); }
.top-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 14px var(--pad);
  display: flex; align-items: center; gap: 28px;
}
.brand { margin-right: auto; }
.logo { height: 34px; width: auto; }
.logo-light { display: none; }
.nav { display: flex; gap: 24px; }
.nav a, .langs a {
  font: 500 1.15rem/1 var(--cond);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: currentColor; }
.langs { display: flex; gap: 2px; }
.langs a { font-size: 1rem; padding: 6px 7px; color: var(--slate); }
.langs a[aria-current="true"] { color: inherit; font-weight: 600; }
.langs a:hover { color: inherit; }

/* Home: header sits on the photo */
.home .top {
  position: absolute; left: 0; right: 0; top: 0;
  background: none; border: 0; color: #fff;
}
.home .logo-light { display: block; }
.home .logo-dark { display: none; }
.home .langs a { color: rgba(255,255,255,.7); }
.home .langs a[aria-current="true"], .home .langs a:hover { color: #fff; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: min(68vh, 620px);
  display: flex; align-items: flex-end;
  background: var(--larch);
  color: #fff;
  overflow: hidden;
}
.hero picture, .hero-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
}
.hero-img { object-fit: cover; object-position: 62% 42%; }
.hero::after {           /* darkens the lower part so the text stays readable */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(24,21,19,.75) 0%, rgba(24,21,19,.2) 26%, rgba(24,21,19,0) 40%),
              linear-gradient(to bottom, rgba(24,21,19,.45) 0%, rgba(24,21,19,0) 18%);
}
.hero-text {
  position: relative; z-index: 1;
  width: 100%; max-width: var(--wrap); margin: 0 auto;
  padding: 0 var(--pad) clamp(28px, 6vh, 56px);
}
.hero h1 { max-width: 13ch; margin-bottom: .35em; }
.hero-tagline { margin: 0 0 10px; font: italic 700 clamp(2rem, 5vw, 3.4rem)/1.05 var(--cond); }
.today {
  margin: 0 0 4px;
  font: 500 1.35rem/1.25 var(--cond);
  display: flex; align-items: center; gap: 10px;
}
.today::before {
  content: ""; width: 10px; height: 10px; border-radius: 50%;
  background: rgba(255,255,255,.45); flex: none;
}
.today.is-open::before { background: var(--lamp); box-shadow: 0 0 0 4px rgba(226,165,72,.25); }

/* ---------- Strip: current offers and used items, swipe left/right ---------- */
.strip { max-width: var(--wrap); margin: 0 auto; padding: clamp(40px, 6vw, 64px) var(--pad) 0; }
.strip-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.strip-head h2 { margin: 0; }
.strip-nav { display: flex; gap: 8px; }
.strip-nav button {
  width: 44px; height: 44px; border: 2px solid var(--ink); background: transparent; color: var(--ink);
  border-radius: 2px; font: 600 1.6rem/1 var(--body); cursor: pointer;
}
.strip-nav button:hover:not(:disabled) { background: var(--ink); color: #fff; }
.strip-nav button:disabled { opacity: .3; cursor: default; }
.strip-track {
  display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-behavior: smooth; padding-bottom: 6px; scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.card {
  flex: 0 0 clamp(250px, 30%, 340px); scroll-snap-align: start;
  display: flex; flex-direction: column; text-decoration: none;
  background: var(--paper); border-top: 3px solid var(--ink);
}
.card-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--plaster); }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-badge { font: 600 .9rem/1 var(--body); color: var(--slate); }
.card-badge.is-offer { color: #9a6a1c; }
.card-title { font: italic 600 1.45rem/1.1 var(--cond); margin: 4px 0 2px; }
.card-specs { color: var(--slate); font-size: .95rem; }
.card-price { margin-top: auto; padding-top: 10px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; }
.card-price .price { font-size: 1.6rem; }
.card:hover .card-title { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .12em; }
.strip + .info { padding-top: clamp(40px, 6vw, 64px); }

/* ---------- Hours + contact ---------- */
.info {
  max-width: var(--wrap); margin: 0 auto;
  padding: clamp(48px, 8vw, 96px) var(--pad);
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 96px);
}
.notice {
  background: var(--paper); border-left: 4px solid var(--lamp);
  padding: 10px 14px; margin: 0 0 18px;
}
.hours { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.hours th, .hours td {
  text-align: left; padding: 11px 0; border-bottom: 1px solid var(--line); font-weight: 400;
}
.hours th { width: 45%; }
.hours tr:first-child th, .hours tr:first-child td { border-top: 2px solid var(--ink); }
.hours tr.is-today th, .hours tr.is-today td { font-weight: 600; }
.hours tr.is-today th::after {
  content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--lamp); margin-left: 10px; vertical-align: middle;
}
address { font-style: normal; margin: 0 0 14px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.btn {
  display: inline-block;
  font: 600 1.15rem/1 var(--cond);
  padding: 13px 20px 12px;
  background: var(--ink); color: #fff;
  border: 2px solid var(--ink); border-radius: 2px;
  text-decoration: none;
}
.btn:hover { background: var(--larch); }
.btn-quiet { background: transparent; color: var(--ink); }
.btn-quiet:hover { background: var(--paper); }

/* ---------- Brands ---------- */
.brands {
  max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad) clamp(48px, 8vw, 96px);
}
.brands h2 { font-size: 1.1rem; font-family: var(--body); font-style: normal; font-weight: 600; color: var(--slate); }
.brands ul {
  list-style: none; margin: 0; padding: 18px 0 0;
  border-top: 2px solid var(--ink);
  display: flex; flex-wrap: wrap; align-items: center;
  column-gap: clamp(36px, 6vw, 80px); row-gap: 20px;
}
.brands li { display: flex; align-items: center; min-height: 56px; }
.brands img { height: 40px; width: auto; max-width: 190px; object-fit: contain; }
.brand-name { font: italic 700 clamp(1.9rem, 4.2vw, 3.1rem)/1.1 var(--cond); color: var(--larch); }

/* ---------- Sub pages ---------- */
.page {
  max-width: var(--wrap); margin: 0 auto;
  padding: clamp(40px, 7vw, 80px) var(--pad) clamp(56px, 9vw, 112px);
}
.intro { max-width: 60ch; margin: 0 0 clamp(28px, 5vw, 48px); color: var(--slate); font-size: 1.125rem; }
.group { margin-top: 48px; }
.group:first-of-type { margin-top: 0; }

.listing { border-top: 2px solid var(--ink); }
.item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 32px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.item.has-image { grid-template-columns: 180px minmax(0, 1fr) auto; }
.item-img { width: 180px; aspect-ratio: 4 / 3; object-fit: cover; background: var(--paper); border-radius: 2px; }
.item-title { font: italic 600 clamp(1.45rem, 2.4vw, 1.85rem)/1.1 var(--cond); margin: 0 0 8px; }
.item-specs { display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 0; color: var(--slate); }
.item-specs dt { display: inline; }
.item-specs dd { display: inline; margin: 0 0 0 5px; color: var(--ink); }
.item-note { margin: 8px 0 0; }
.item-desc { margin: 10px 0 0; max-width: 62ch; color: var(--slate); }
.item-link { font-weight: 500; }
.item-photo { position: relative; display: block; padding: 0; border: 0; background: none; cursor: zoom-in; }
.item-photo-count {
  position: absolute; right: 6px; bottom: 6px; padding: 2px 7px; border-radius: 2px;
  background: rgba(30,28,26,.75); color: #fff; font-size: .85rem;
}
.brands[hidden] { display: none; }

/* Photo viewer: all photos of an entry, large, swipe or arrows */
.viewer { position: fixed; inset: 0; z-index: 20; background: rgba(20,19,18,.94); }
.viewer[hidden] { display: none; }
.viewer-track {
  display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.viewer-track::-webkit-scrollbar { display: none; }
.viewer-slide { flex: 0 0 100%; height: 100%; margin: 0; scroll-snap-align: center;
  display: flex; align-items: center; justify-content: center; padding: 56px 16px; }
.viewer-slide img { max-width: 100%; max-height: 100%; object-fit: contain; }
.viewer button {
  position: absolute; border: 0; background: rgba(255,255,255,.12); color: #fff;
  width: 48px; height: 48px; font-size: 2rem; line-height: 1; cursor: pointer;
}
.viewer button:hover:not(:disabled) { background: rgba(255,255,255,.25); }
.viewer button:disabled { opacity: .25; cursor: default; }
.viewer-close { top: 10px; right: 10px; }
.viewer-prev { left: 10px; top: 50%; transform: translateY(-50%); }
.viewer-next { right: 10px; top: 50%; transform: translateY(-50%); }
.viewer.is-single .viewer-prev, .viewer.is-single .viewer-next { display: none; }
.viewer-count { position: absolute; left: 0; right: 0; bottom: 14px; margin: 0; text-align: center;
  color: rgba(255,255,255,.75); font-variant-numeric: tabular-nums; }
body.viewer-open { overflow: hidden; }
.item-side { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.price { font: 600 1.9rem/1 var(--cond); font-variant-numeric: tabular-nums; white-space: nowrap; }
.price-was { color: var(--slate); white-space: nowrap; }
.price-was s { text-decoration-thickness: 1px; }
.saving {
  display: inline-block; font: 600 .95rem/1 var(--body);
  background: var(--lamp); color: var(--ink); padding: 4px 7px 3px; border-radius: 2px;
}
.item-ask { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; margin-top: 8px; }
.item-ask-label { font-weight: 500; }
.ask-icons { display: flex; gap: 4px; margin-right: -6px; }
.ask-icon { display: inline-flex; padding: 6px; color: var(--ink); border-radius: 2px; }
.ask-icon:hover { background: var(--paper); }
.ask-icon .icon { display: block; }
.listing-status:empty { display: none; }
.listing-status p, .listing > p { padding: 18px 0; margin: 0; }

/* Legal page */
.prose { max-width: calc(68ch + 2 * var(--pad)); }
.prose h2 { margin-top: 1.4em; }
.prose p { margin: 0 0 1em; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 28px; margin: 0 0 1em; }
.facts dt { color: var(--slate); }
.facts dd { margin: 0; }

/* ---------- Footer ---------- */
.foot { background: var(--ink); color: rgba(255,255,255,.82); font-size: .95rem; }
.home .foot { border-top: 1px solid rgba(255,255,255,.1); }
.foot-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 44px var(--pad) 52px;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px;
}
.foot p { margin: 0 0 10px; }
.foot-logo { height: 26px; width: auto; margin-bottom: 14px; }
.foot a { color: #fff; }
.social { display: flex; gap: 16px; }
.social a { display: inline-flex; color: #fff; opacity: .85; }
.social a:hover { opacity: 1; }
.social .icon { display: block; }

/* ---------- Small screens ---------- */
/* Home on a desktop: bigger logo (phones keep 28 px) */
@media (min-width: 761px) {
  .home .logo { height: 58px; }
}

@media (max-width: 760px) {
  .top-inner { flex-wrap: wrap; gap: 4px 16px; padding-top: 12px; padding-bottom: 10px; }
  .logo { height: 28px; }
  .nav { order: 3; width: 100%; gap: 20px; }
  .nav a { font-size: 1.1rem; }
  .langs { margin-right: -7px; }
  .hero { min-height: 62svh; }
  .hero-img { object-position: 72% 30%; }
  .info { grid-template-columns: 1fr; }
  .item, .item.has-image { grid-template-columns: 1fr; }
  .item.has-image .item-img { width: 100%; }
  .viewer-prev, .viewer-next { display: none; }
  .item-side { text-align: left; align-items: flex-start; flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
  .item-ask { width: 100%; align-items: flex-start; }
  .ask-icons { margin: 0 0 0 -6px; }
  .card { flex-basis: 78%; }
  .strip-nav { display: none; }
  .foot-inner { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; gap: 0; }
  .facts dd { margin-bottom: 10px; }
}

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