/* rideit — calm, minimal storefront. One accent colour, prices as quiet meta. */
:root {
  --bg: #fff;
  --fg: #111;
  --muted: #5f5f5f;
  --soft: #44403c;
  --line: #e7e5e4;
  --field: #d6d3d1;
  --surface: #f5f5f4;
  --accent: #1d4ed8;
  --ok: #2f855a;
  --wait: #b45309;
  --radius: 10px;
  --head: "Space Grotesk", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.5 Inter, system-ui, -apple-system, sans-serif; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; }
h1, h2 { font-family: var(--head); margin: 0; line-height: 1.15; }
h1 { font-size: 34px; }
h2 { font-size: 24px; }
.wrap { max-width: 1200px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
.muted { color: var(--muted); }
.stack { display: flex; flex-direction: column; gap: 16px; }
main.wrap { padding-block: 20px 64px; display: flex; flex-direction: column; gap: 48px; }
.link { text-decoration: underline; text-underline-offset: 4px; font-weight: 500; }

/* Header */
.site-head { border-bottom: 1px solid var(--line); }
.site-head .bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; padding-block: 16px; }
.logo { font: 700 26px var(--head); letter-spacing: -0.5px; }
.logo span { color: var(--accent); }
.search { flex: 1 1 280px; display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; border: 1px solid var(--field); border-radius: 8px; color: var(--muted); }
.search input { border: 0; outline: 0; flex: 1; min-width: 0; font: inherit; background: transparent; color: var(--fg); }
.cart-link { display: flex; align-items: center; gap: 8px; height: 44px; font-weight: 500; }
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.nav { display: flex; gap: 24px; overflow-x: auto; font-size: 14px; font-weight: 500; scrollbar-width: none; }
.nav a { padding: 10px 0; white-space: nowrap; }
.nav a.on { color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }

/* Home */
.hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.banner { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; padding: 32px; background: var(--surface); border-radius: 12px; min-width: 0; }
.banner.wide { grid-column: span 2; }
.banner .text { flex: 1 1 240px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.banner h1 { font-size: clamp(28px, 4vw, 40px); }
.banner img { flex: 1 1 200px; max-width: 320px; aspect-ratio: 1; object-fit: contain; mix-blend-mode: multiply; }
.banner.dark { background: #1c1917; color: #fff; flex-direction: column; align-items: stretch; justify-content: space-between; }
.banner.dark .eyebrow { color: #93c5fd; }
.banner.dark img { max-width: 100%; width: 100%; aspect-ratio: 4 / 3; background: #fff; border-radius: 8px; mix-blend-mode: normal; }
.banner.dark .title { font: 700 22px var(--head); }
.eyebrow { font-size: 13px; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: 0.6px; }
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.cat { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 12px; border: 1px solid var(--line); border-radius: var(--radius); text-align: center; }
.cat img { width: 88px; height: 88px; object-fit: contain; }
.cat strong { font-size: 14px; }
.cat span { font-size: 13px; color: var(--muted); }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { display: inline-flex; align-items: center; height: 44px; padding: 0 18px; border: 1px solid var(--line); border-radius: 22px; font-weight: 600; font-size: 14px; }
.trust { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; padding: 24px; background: var(--surface); border-radius: 12px; font-size: 14px; }
.trust div { display: flex; flex-direction: column; gap: 4px; }
.trust span { color: var(--muted); }

/* Product cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 24px 16px; }
.card { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.card .img { background: var(--surface); border-radius: var(--radius); padding: 16px; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; }
.card .img img { max-width: 100%; max-height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.brand { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.card .brand { margin-top: 6px; }
.card .name { font-weight: 500; line-height: 1.35; }
.card .price { font-weight: 600; }
.stock { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--soft); }
.stock::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); flex: none; }
.stock.restock::before { background: var(--wait); }
.stock.out::before { background: var(--field); }

/* Listing */
.crumbs { font-size: 13px; color: var(--muted); }
.list-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border: 1px solid var(--field); border-radius: 16px; font-size: 14px; font-weight: 500; background: #fff; }
.chip.on { background: var(--fg); color: #fff; border-color: var(--fg); }
.listing { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.filters { flex: 1 1 220px; max-width: 260px; display: flex; flex-direction: column; gap: 24px; font-size: 14px; }
.filters fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.filters legend { font-weight: 600; margin-bottom: 8px; }
.filters label { display: flex; gap: 10px; align-items: center; min-height: 28px; }
.filters input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--fg); }
.filters .scroll { max-height: 260px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.range { display: flex; gap: 8px; align-items: center; }
.range input, select, .field input, .field textarea { height: 40px; padding: 0 10px; border: 1px solid var(--field); border-radius: 8px; font: inherit; background: #fff; color: var(--fg); }
.range input { width: 84px; }
.results { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.results-bar { display: flex; justify-content: flex-end; align-items: center; gap: 8px; font-size: 14px; color: var(--soft); }
.pager { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }
.pager a, .pager span { min-width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; }
.pager span { background: var(--fg); color: #fff; border-color: var(--fg); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; height: 52px; padding: 0 24px; border: 0; border-radius: var(--radius); background: var(--fg); color: #fff; font: inherit; font-size: 16px; font-weight: 600; cursor: pointer; }
.btn:hover { background: var(--accent); color: #fff; }
.btn.ghost { background: #fff; color: var(--fg); border: 1px solid var(--field); font-weight: 500; }
.btn:disabled { background: var(--field); cursor: not-allowed; }

/* Product */
.pdp { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.gallery { flex: 1 1 400px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.gallery .main { background: var(--surface); border-radius: 12px; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; padding: 40px; }
.gallery .main img { max-height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.thumbs button { width: 72px; height: 72px; padding: 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; }
.thumbs button.on { border: 2px solid var(--fg); }
.thumbs img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.buy { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.buy .price { font-size: 26px; font-weight: 600; }
.options { display: flex; flex-wrap: wrap; gap: 8px; }
.option { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--field); border-radius: 8px; font-size: 14px; font-weight: 500; }
.option.on { border: 2px solid var(--fg); }
.option.out { color: var(--muted); text-decoration: line-through; }
.deliv { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; background: var(--surface); border-radius: var(--radius); font-size: 14px; }
.deliv .stock { font-size: 15px; font-weight: 600; color: var(--fg); }
.qty-row { display: flex; gap: 8px; }
.qty-row select { height: 52px; width: 80px; }
.qty-row .btn { flex: 1; }
.added { padding: 12px 16px; border-radius: var(--radius); background: #eff6ff; color: #1e3a8a; font-size: 14px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.specs { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 24px; margin: 0; font-size: 14px; border-top: 1px solid var(--line); padding-top: 20px; }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; }
.desc { max-width: 720px; color: var(--soft); }
.desc ul { padding-left: 20px; }

/* Cart + checkout */
.cart-line { display: grid; grid-template-columns: 80px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding-block: 16px; border-bottom: 1px solid var(--line); }
.cart-line img { width: 80px; height: 80px; object-fit: contain; background: var(--surface); border-radius: 8px; padding: 6px; mix-blend-mode: multiply; }
.cart-line .meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cart-line .right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.cart-line select { height: 36px; }
.totals { display: grid; grid-template-columns: 1fr auto; gap: 8px; max-width: 360px; margin-left: auto; font-size: 15px; }
.totals .sum { font-weight: 700; font-size: 18px; }
.two-col { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.two-col > * { flex: 1 1 340px; min-width: 0; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 500; }
.field textarea { height: 96px; padding: 10px; }
.field .err { color: #b91c1c; font-weight: 400; }
.note { font-size: 13px; color: var(--muted); }
.hp { position: absolute; left: -9999px; }

/* Footer */
.site-foot { border-top: 1px solid var(--line); }
.site-foot .wrap { padding-block: 32px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; font-size: 14px; color: var(--muted); }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 16px; }

.filters summary { list-style: none; }
.filters summary::-webkit-details-marker { display: none; }

@media (max-width: 640px) {
  h1 { font-size: 28px; }
  /* Header: logo + cart on one row, search full width below. */
  .site-head .bar { gap: 12px 16px; }
  .cart-link { margin-left: auto; }
  .search { order: 3; flex-basis: 100%; }
  .banner { padding: 24px; }
  .banner.wide { grid-column: auto; }
  .banner img { flex-basis: auto; max-width: 180px; max-height: 140px; margin: 0 auto; }
  .banner.dark img { max-width: 100%; }
  .cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
  .card .img { padding: 10px; }
  .filters { max-width: none; flex-basis: 100%; }
  .filters summary { justify-content: center; border: 1px solid var(--field); border-radius: 8px; }
  .listing { gap: 16px; }
  .pdp { gap: 24px; }
}
