:root {
  color-scheme: light;
  --ink: #211e1d;
  --paper: #fbfaf8;
  --surface: #fff;
  --soft: #f4efeb;
  --muted: #625b56;
  --line: #e1d9d3;
  --accent: #a9202d;
  --accent-hover: #861823;
  --pad: clamp(16px, 4vw, 48px);
  --radius: 12px;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); }
body.locked { overflow: hidden; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.container { width: min(100%, 1280px); margin-inline: auto; padding-inline: var(--pad); }

.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  min-height: 76px;
}
.logo {
  display: block;
  position: relative;
  width: 156px;
  max-width: 100%;
  aspect-ratio: 4.05;
  overflow: hidden;
  background: #fdfdfd;
}
.logo img {
  position: absolute;
  width: 137%;
  max-width: none;
  height: auto;
  left: -16%;
  top: -52%;
}
.site-nav, .footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(14px, 3vw, 32px); }
.site-nav a, .footer-links a { text-decoration: none; font-size: .9rem; }
.site-nav a:hover, .footer-links a:hover { color: var(--accent); text-decoration: underline; }
.bag-button {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font-size: .875rem;
  font-weight: 700;
}
.bag-button:hover { border-color: var(--accent); }
.bag-count { min-width: 24px; padding: 2px 5px; border-radius: 4px; background: var(--soft); color: var(--accent); text-align: center; }

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: .9rem;
  font-weight: 700;
  text-decoration: none;
}
.button-outline { color: var(--accent); background: var(--surface); border-color: var(--line); }
.button-outline:hover { border-color: var(--accent); }

.catalog, .fitment-band { scroll-margin-top: 20px; }
.catalog { padding-top: clamp(20px, 3.5vw, 42px); }
.section-heading, .catalog-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.section-heading h1, .fitment-band h2 { margin: 0; font-size: clamp(1.55rem, 3vw, 2.25rem); line-height: 1.15; letter-spacing: -.035em; }
.section-heading p, .result-count { margin: 0; color: var(--muted); font-size: .875rem; }
.usage-notice { margin-top: 16px; padding: 14px 16px; border: 1px solid #ead6c8; border-inline-start: 4px solid var(--accent); border-radius: 6px; background: #fbf1e9; }
.usage-notice h3 { margin: 0; color: var(--accent); font-size: 1rem; }
.usage-notice p { max-width: 82ch; margin: 4px 0 6px; font-size: .875rem; }
.usage-notice a { color: var(--accent); font-size: .8rem; text-underline-offset: 2px; }
.catalog-toolbar { margin-block: 18px; padding-block: 12px; border-block: 1px solid var(--line); }
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filter {
  min-height: 36px;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font-size: .825rem;
  font-weight: 700;
}
.filter:hover { border-color: var(--accent); }
.filter[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 265px), 1fr)); gap: 16px; }
.empty-catalog { margin: 10px 0; color: var(--muted); }
.product-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.product-image { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-bottom: 1px solid var(--line); background: #f9f8f6; }
.product-image-link { display: block; height: 100%; }
.product-image-link:focus-visible { position: relative; z-index: 1; outline-offset: -3px; }
.product-image img { width: 100%; height: 100%; object-fit: contain; }
.product-image.detail img { transform: scale(1.28); }
.product-image.mono img { filter: grayscale(.85); }
.product-image.bronze img { filter: sepia(.35); }
.product-badge { position: absolute; top: 10px; left: 10px; padding: 4px 7px; border-radius: 4px; background: var(--soft); color: var(--ink); font-size: .72rem; font-weight: 700; }
.quick-add {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: white;
  font-size: 1.35rem;
  line-height: 1;
}
.quick-add:hover { background: var(--accent-hover); }
.product-content { padding: 14px; overflow-wrap: anywhere; }
.product-info { display: flex; align-items: start; justify-content: space-between; gap: 8px; }
.product-info p { margin: 0 0 4px; color: var(--accent); font-size: .75rem; font-weight: 700; }
.product-info h3 { margin: 0; font-size: 1rem; line-height: 1.3; }
.product-info h3 a { text-decoration: none; }
.product-info h3 a:hover { text-decoration: underline; text-underline-offset: 2px; }
.product-info strong { white-space: nowrap; font-size: .9rem; }
.product-enquiry { flex: 0 0 7.5em; color: var(--accent); font-size: .8rem; font-weight: 700; text-underline-offset: 2px; }
.size-link { display: inline-block; margin-top: 8px; }
.fitment-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 12px; }
.fitment-tags:empty { display: none; }
.fitment-tags span { padding: 3px 6px; border-radius: 4px; background: var(--soft); font-size: .72rem; }
.car-list, .product-note { margin: 9px 0 0; color: var(--muted); font-size: .8rem; }

.fitment-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(20px, 4vw, 40px);
  margin-block: clamp(40px, 6vw, 76px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
}
.fitment-band p { max-width: 56ch; margin: 10px 0 0; color: var(--muted); }
.fitment-band .button { flex-shrink: 0; }
.site-footer { background: var(--surface); border-top: 1px solid var(--line); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-block: 22px; }
.footer-logo { width: 140px; }

.product-page { min-height: 70svh; padding-block: clamp(22px, 4vw, 48px); }
.back-link { display: inline-block; margin-bottom: 20px; color: var(--accent); text-underline-offset: 3px; }
.product-detail:has(.detail-image) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(20px, 5vw, 64px);
}
.detail-image {
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.detail-image img { width: 100%; max-height: 560px; object-fit: contain; }
.product-detail h1 { margin: 0 0 12px; font-size: clamp(1.65rem, 4vw, 2.75rem); line-height: 1.15; overflow-wrap: anywhere; }
.detail-content h2 { margin: 18px 0 6px; font-size: 1rem; }
.detail-content p, .detail-content ul { margin: 0 0 10px; }
.detail-content ul { padding-left: 20px; }
.detail-category { color: var(--accent); font-size: .875rem; font-weight: 700; }
.detail-badge { color: var(--muted); }
.detail-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-block: 22px 12px; }
.detail-options { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.detail-options label { display: grid; gap: 4px; font-size: .875rem; font-weight: 700; }
.detail-options input, .detail-options select { min-height: 44px; padding: 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); font: inherit; }
.detail-options input { width: 6em; }
.detail-feedback { color: var(--accent); font-size: .875rem; }
.detail-feedback:empty { display: none; }
.detail-actions > strong { font-size: 1.25rem; }
.detail-add { color: white; background: var(--accent); }
.detail-add:hover { background: var(--accent-hover); }
.detail-content .detail-usage { color: var(--muted); font-size: .85rem; }

.legal-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding-block: 16px; }
.legal-header > a:last-child, .legal-page a { color: var(--accent); text-underline-offset: 3px; }
.legal-page { max-width: 850px; padding-block: clamp(28px, 5vw, 64px); }
.legal-page h1 { margin: 0 0 16px; font-size: clamp(1.8rem, 5vw, 2.8rem); line-height: 1.15; }
.legal-nav { display: flex; flex-wrap: wrap; gap: 10px 18px; font-size: .9rem; }
.legal-page section { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); scroll-margin-top: 16px; }
.legal-page h2 { margin: 0 0 10px; line-height: 1.2; }
.legal-page p { margin: 0 0 12px; }

.cart-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(100%, 440px);
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  margin: 0 0 0 auto;
  padding: 22px;
  border: 0;
  border-left: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}
.cart-drawer[open] { display: flex; flex-direction: column; }
.cart-drawer::backdrop { background: #211e1d66; }
.drawer-head, .cart-item { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.drawer-head { justify-content: space-between; }
.drawer-head h2, .cart-item h3, .cart-item p { margin: 0; }
.drawer-close, .cart-item button { min-width: 36px; min-height: 36px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); font-size: 1.25rem; }
.cart-items { flex: 1; overflow: auto; }
.cart-item { padding-top: 12px; }
.cart-item img { width: 55px; height: 55px; object-fit: contain; }
.cart-item > div { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.cart-item h3 { font-size: .9rem; }
.cart-quantity { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.cart-quantity button { font-size: .95rem; }
.cart-quantity button:disabled { opacity: .5; cursor: default; }
.cart-quantity span { min-width: 2ch; text-align: center; font-variant-numeric: tabular-nums; }
.cart-size { display: block; margin-block: 5px; color: var(--muted); font-size: .8rem; }
.cart-size select { display: block; max-width: 100%; margin-top: 4px; padding: 6px; font: inherit; }
.cart-item small, .empty-cart, .drawer-total p { color: var(--muted); }
.drawer-total { display: grid; grid-template-columns: 1fr auto; gap: 4px; padding-top: 12px; border-top: 1px solid var(--line); }
.drawer-total p { grid-column: 1 / -1; margin: 0; font-size: .85rem; }
.drawer-total .cart-usage { margin-block: 7px 2px; color: var(--accent); }
.drawer-total[hidden], .checkout-panel[hidden] { display: none; }
.checkout-button { grid-column: 1 / -1; margin-top: 8px; border: 0; }
.checkout-button:disabled { opacity: .5; cursor: default; }
.checkout-panel { flex: 1; overflow: auto; padding-top: 12px; }
.checkout-panel h3 { margin: 0; }
.checkout-panel p { color: var(--muted); font-size: .9rem; }
.checkout-panel label { display: block; margin-bottom: 6px; font-size: .875rem; font-weight: 700; }
.checkout-panel input { box-sizing: border-box; width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 6px; font: 700 1.45rem/1.4 monospace; color: var(--ink); background: var(--soft); }
.checkout-panel .detail-actions { margin-block: 12px; }
.checkout-feedback:empty, .cart-feedback:empty { display: none; }

@media (max-width: 650px) {
  .header-inner { grid-template-columns: minmax(0, 1fr) auto; min-height: 0; gap: 10px; padding-block: 12px; }
  .site-nav { grid-column: 1 / -1; grid-row: 2; }
  .fitment-band { align-items: flex-start; flex-direction: column; }
  .product-detail:has(.detail-image) { grid-template-columns: 1fr; }
  .detail-image img { max-height: 360px; }
}

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