:root {
  color-scheme: light;
  --ink: #161616;
  --muted: #66615c;
  --line: #ded8d0;
  --paper: #f7f3ed;
  --panel: #fffdf8;
  --dark: #121212;
  --red: #b31f25;
  --gold: #c89c42;
  --green: #1f7a55;
  --shadow: 0 22px 55px rgba(25, 20, 16, .16);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}
a { color: inherit; }
button, input, textarea, select { font: inherit; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  gap: 18px;
  align-items: center;
  padding: 14px clamp(18px, 4vw, 48px);
  background: rgba(247, 243, 237, .94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.brand img {
  display: block;
  width: 150px;
  height: auto;
}
.main-nav, .language-switcher, .footer-links {
  display: flex;
  gap: 16px;
  align-items: center;
}
.main-nav { justify-content: center; }
.main-nav a, .language-switcher a, .footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 750;
}
.main-nav a:hover, .footer-links a:hover { color: var(--red); }
.language-switcher a {
  padding: 7px 9px;
  border: 1px solid var(--line);
  background: var(--panel);
}
.language-switcher .is-active { color: white; background: var(--dark); border-color: var(--dark); }
.icon-button, .cart-trigger {
  min-width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  background: var(--panel);
  cursor: pointer;
}
.cart-trigger {
  position: relative;
  display: inline-grid;
  place-items: center;
}
.cart-icon {
  width: 19px;
  height: 16px;
  border: 2px solid currentColor;
  border-top: 0;
  display: block;
}
.cart-icon::before {
  content: "";
  display: block;
  width: 9px;
  height: 7px;
  margin: -8px auto 0;
  border: 2px solid currentColor;
  border-bottom: 0;
}
.cart-count {
  position: absolute;
  right: -8px;
  top: -8px;
  min-width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--red);
  font-size: 12px;
  font-weight: 850;
}
.hero {
  min-height: calc(100vh - 74px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, .75fr);
  gap: clamp(28px, 5vw, 70px);
  align-items: center;
  padding: clamp(34px, 6vw, 80px) clamp(18px, 5vw, 72px);
  background:
    linear-gradient(100deg, rgba(247,243,237,.96) 0%, rgba(247,243,237,.88) 50%, rgba(18,18,18,.05) 100%),
    radial-gradient(circle at 85% 25%, rgba(179,31,37,.2), transparent 32%);
}
.hero-copy { max-width: 780px; }
.eyebrow {
  margin: 0 0 12px;
  color: var(--red);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}
h1, h2, h3, p { margin-top: 0; }
h1 {
  margin-bottom: 18px;
  font-size: clamp(42px, 7vw, 84px);
  line-height: .96;
  letter-spacing: 0;
}
h2 { margin-bottom: 10px; font-size: clamp(28px, 4vw, 48px); line-height: 1.02; }
.hero-copy > p, .section-note {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.62;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 46px;
  padding: 12px 18px;
  border: 1px solid var(--dark);
  text-decoration: none;
  font-weight: 850;
  cursor: pointer;
}
.button.primary { color: white; background: var(--red); border-color: var(--red); }
.button.secondary { background: transparent; }
.hero-media {
  min-height: 520px;
  position: relative;
  background:
    linear-gradient(135deg, #1b1b1b, #3a2d23 48%, #b31f25 49%, #161616 50%),
    var(--dark);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.hero-media::after {
  content: "AMERICAN PERFORMANCE";
  position: absolute;
  inset: auto -18px 24px;
  color: rgba(255,255,255,.08);
  font-size: 54px;
  font-weight: 950;
  white-space: nowrap;
}
.hero-product {
  position: absolute;
  width: 190px;
  padding: 22px;
  color: white;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  backdrop-filter: blur(10px);
}
.hero-product span { color: var(--gold); font-weight: 950; }
.hero-product strong { display: block; margin-top: 8px; font-size: 22px; }
.hero-product-one { top: 54px; right: 42px; }
.hero-product-two { left: 34px; top: 210px; }
.hero-product-three { right: 74px; bottom: 74px; }
.finder-section, .catalog-section, .contact-section {
  padding: 70px clamp(18px, 5vw, 72px);
}
.section-heading {
  max-width: 820px;
  margin-bottom: 28px;
}
.finder-tools {
  display: grid;
  grid-template-columns: minmax(260px, .78fr) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.vehicle-finder, .catalog-tools, .contact-form, .checkout-form {
  display: grid;
  gap: 14px;
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(30, 20, 10, .07);
}
label { display: grid; gap: 7px; color: var(--muted); font-size: 13px; font-weight: 800; }
input, textarea, select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
}
textarea { resize: vertical; }
.search-box input { min-height: 54px; font-size: 18px; }
.filter-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-pill {
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
}
.filter-pill.is-active { color: white; background: var(--dark); border-color: var(--dark); }
.catalog-heading {
  max-width: none;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
}
.sort-control { width: min(240px, 100%); }
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 18px;
}
.product-card {
  display: grid;
  grid-template-rows: 210px 1fr;
  min-height: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  overflow: hidden;
  min-width: 0;
}
.product-image {
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, #efebe4, #fff);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  min-width: 0;
  min-height: 0;
  height: 210px;
  padding: 16px;
}
.product-link { text-decoration: none; }
.product-image img {
  display: block;
  box-sizing: border-box;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 178px;
  object-fit: contain;
  padding: 0;
}
.product-placeholder {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  color: white;
  background: var(--dark);
  border-bottom: 5px solid var(--red);
  font-size: 28px;
  font-weight: 950;
}
.product-body {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 16px;
}
.product-meta { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 5px 8px;
  background: #f0ebe3;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}
.chip.stock-ok { color: #fff; background: var(--green); }
.chip.stock-none { color: #fff; background: #7f7164; }
.product-card h3 {
  margin: 0;
  min-height: 46px;
  font-size: 18px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.product-card h3 a {
  color: inherit;
  text-decoration: none;
}
.product-card h3 a:hover,
.product-more:hover { color: var(--red); }
.product-code { color: var(--red); font-weight: 950; }
.product-more {
  color: var(--dark);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}
.product-actions {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 8px;
  margin-top: auto;
}
.qty-input { min-height: 42px; text-align: center; }
.support-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  padding: 0 clamp(18px, 5vw, 72px) 70px;
}
.support-strip div {
  padding: 28px;
  background: var(--dark);
  color: white;
}
.support-strip span { color: var(--gold); font-weight: 950; }
.support-strip strong { display: block; margin: 10px 0; font-size: 22px; }
.support-strip p { color: rgba(255,255,255,.72); line-height: 1.55; }
.contact-section {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(280px, .6fr);
  gap: 28px;
  align-items: start;
}
.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(18px, 5vw, 72px);
  background: var(--dark);
  color: white;
}
.site-footer span { display: block; margin-top: 4px; color: rgba(255,255,255,.62); }
.account-panel, .cart-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 50;
  width: min(520px, 100vw);
  height: 100vh;
  overflow: auto;
  padding: 22px;
  background: var(--paper);
  box-shadow: var(--shadow);
  transform: translateX(105%);
  transition: transform .22s ease;
}
.account-panel.is-open, .cart-panel.is-open { transform: translateX(0); }
.overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0,0,0,.38);
  opacity: 0;
  pointer-events: none;
}
.overlay.is-open { opacity: 1; pointer-events: auto; }
.cart-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; }
.cart-header h2 { margin: 0; font-size: 30px; }
.cart-items { display: grid; gap: 10px; margin-bottom: 16px; }
.cart-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
}
.cart-item strong { display: block; }
.cart-item small { color: var(--muted); }
.cart-item-actions { display: flex; gap: 6px; align-items: center; }
.cart-item-actions button { width: 32px; height: 32px; border: 1px solid var(--line); background: white; cursor: pointer; }
.cart-summary {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.delivery-methods {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
}
.delivery-methods label, .consent-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.delivery-methods input, .consent-label input { width: auto; min-height: auto; margin-top: 3px; }
.form-status { margin: 0; color: var(--green); font-weight: 800; line-height: 1.45; }
.account-panel-form,
.account-box {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
}
.account-methods {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
}
.account-methods label {
  display: flex;
  align-items: center;
  gap: 8px;
}
.account-methods input { width: auto; min-height: auto; }
.account-fields { display: grid; gap: 12px; }
.small-button { min-height: 36px; padding: 8px 12px; font-size: 13px; }
.account-orders-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.account-orders-list { display: grid; gap: 10px; }
.account-order-card {
  display: grid;
  gap: 5px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
}
.account-order-card span,
.account-order-card p,
.account-orders-empty { color: var(--muted); margin: 0; }
.header-cart-link { justify-self: end; white-space: nowrap; }
.product-detail-page {
  padding: 36px clamp(18px, 5vw, 72px) 76px;
}
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 14px;
}
.breadcrumbs a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 800;
}
.breadcrumbs a:hover { color: var(--red); }
.product-detail {
  display: grid;
  grid-template-columns: minmax(280px, .78fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: start;
}
.detail-media {
  position: sticky;
  top: 120px;
  display: grid;
  place-items: center;
  min-height: 480px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(30, 20, 10, .07);
}
.detail-media img {
  max-width: 100%;
  max-height: 460px;
  object-fit: contain;
  padding: 26px;
}
.detail-placeholder {
  width: 140px;
  height: 140px;
  font-size: 44px;
}
.detail-content {
  display: grid;
  gap: 20px;
}
.detail-content h1 {
  margin-bottom: 0;
  font-size: clamp(34px, 5vw, 62px);
}
.detail-code {
  color: var(--muted);
  font-weight: 800;
}
.detail-lead {
  color: var(--muted);
  font-size: 20px;
  line-height: 1.62;
}
.detail-buybox {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
}
.detail-buybox span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.detail-buybox strong {
  display: block;
  margin-top: 4px;
  font-size: 24px;
}
.detail-section {
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
}
.detail-section h2 {
  font-size: 24px;
}
.detail-section h3 {
  margin-top: 18px;
  font-size: 16px;
}
.detail-section p,
.detail-section li {
  color: var(--muted);
  line-height: 1.62;
}
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.catalog-grid div,
.dimension-list div {
  padding: 12px;
  border: 1px solid var(--line);
  background: #fff;
}
.catalog-grid span,
.dimension-list dt {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.catalog-grid strong,
.dimension-list dd {
  display: block;
  margin: 5px 0 0;
  color: var(--ink);
  font-weight: 900;
}
.dimension-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0 0;
}
.fitment-list {
  columns: 2;
  gap: 28px;
  padding-left: 18px;
}
.fitment-list li {
  break-inside: avoid;
  margin-bottom: 6px;
}
.catalog-note {
  margin-top: 12px;
  font-size: 14px;
}
.related-section { margin-top: 70px; }
.related-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.empty-state, .cart-empty {
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--muted);
}
.is-hidden { display: none !important; }
@media (max-width: 980px) {
  .site-header { grid-template-columns: 1fr auto auto; }
  .main-nav { grid-column: 1 / -1; justify-content: flex-start; overflow-x: auto; }
  .language-switcher { display: none; }
  .hero, .finder-tools, .contact-section { grid-template-columns: 1fr; }
  .product-detail { grid-template-columns: 1fr; }
  .detail-media { position: static; min-height: 340px; }
  .catalog-grid,
  .dimension-list { grid-template-columns: 1fr; }
  .fitment-list { columns: 1; }
  .hero { min-height: auto; }
  .hero-media { min-height: 380px; }
  .support-strip { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .site-header { gap: 10px; padding: 12px; }
  .brand img { width: 116px; }
  .hero-product { width: 160px; padding: 16px; }
  .catalog-heading { display: grid; }
  .product-actions { grid-template-columns: 1fr; }
  .detail-buybox { grid-template-columns: 1fr; }
  .site-footer { display: grid; }
}
