/* ============ Win Motoring — base.css (ported from the Apex Shopify theme) ============ */
/* local-font-start (build-artifact.py strips this block and embeds the font as a data URI) */
@font-face {
  font-family: 'Assistant'; font-style: normal; font-weight: 400 800;
  font-display: swap; src: url('fonts/assistant.woff2') format('woff2');
}
/* local-font-end */
/* Design tokens (originally from the theme's settings_data.json, baked in) */
:root {
  --font-body: 'Assistant', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Assistant', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body-weight: 400;
  --font-heading-weight: 800;

  --color-bg: #FAFAF8;
  --color-surface: #FFFFFF;
  --color-text: #15181D;
  --color-muted: rgba(21, 24, 29, 0.62);
  --color-line: rgba(21, 24, 29, 0.12);
  /* Brand gold from the Win Motoring logo (slightly deepened for UI contrast);
     buttons take dark text — white on gold is illegible */
  --color-accent: #C4952B;
  --color-on-accent: #15181D;
  /* White header so the brand logo's black elements read as designed;
     footer keeps the dark treatment */
  --color-header-bg: #FFFFFF;
  --color-header-text: #15181D;
  --color-footer-bg: #101216;
  --color-footer-text: #F5F6F8;
  --color-sale: #C8102E;

  --page-width: 1400px;
  --radius: 8px;
}
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: var(--font-body-weight);
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; display: block; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
ul[role="list"] { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); letter-spacing: -0.015em; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
h3 { font-size: 1.05rem; }
.page-width { max-width: var(--page-width); margin-inline: auto; padding-inline: 20px; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.skip-link {
  position: absolute; top: -60px; left: 8px; z-index: 100;
  background: var(--color-accent); color: var(--color-on-accent);
  padding: 10px 16px; border-radius: var(--radius);
  transition: top 0.15s ease;
}
.skip-link:focus { top: 8px; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

/* ---------- Buttons, inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; cursor: pointer;
  padding: 11px 22px; border-radius: var(--radius);
  border: 1.5px solid transparent; transition: transform 0.12s ease, opacity 0.15s ease;
}
.btn:hover { opacity: 0.9; }
.btn:active { transform: translateY(1px); }
.btn--accent { background: var(--color-accent); color: var(--color-on-accent); }
.btn--lg { padding: 14px 30px; font-size: 1rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.input, .select {
  font: inherit; color: inherit;
  padding: 10px 12px; border: 1.5px solid var(--color-line);
  border-radius: var(--radius); background: var(--color-surface); max-width: 100%;
}
.input:focus, .select:focus { border-color: var(--color-accent); outline: none; }
.input--qty { width: 84px; }

/* ---------- Header ---------- */
.site-header {
  background: var(--color-header-bg); color: var(--color-header-text);
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid var(--color-line);
}
.site-header__inner {
  display: flex; align-items: center; gap: 22px;
  min-height: 64px;
}
.site-header__logo { flex-shrink: 0; }
.site-header__logo-img { width: 220px; }
@media (max-width: 989px) { .site-header__logo-img { width: 172px; } }
@media (max-width: 380px) { .site-header__logo-img { width: 150px; } }
.site-header__logo-text {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 1.35rem; letter-spacing: 0.01em;
}
.site-header__actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.site-header__icon {
  display: inline-flex; padding: 9px; border-radius: 50%; position: relative;
}
.site-header__icon:hover { background: rgba(0,0,0,0.06); }
.cart-count {
  position: absolute; top: 1px; right: 0;
  background: var(--color-sale); color: #fff;
  font-size: 0.62rem; font-weight: 700; line-height: 1;
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px;
  display: inline-flex; align-items: center; justify-content: center;
}

/* Desktop nav + mega menu */
.site-nav { display: none; }
.site-nav__list { display: flex; list-style: none; margin: 0; padding: 0; }
.site-nav__link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 20px 14px; font-weight: 600; font-size: 0.9rem;
}
.site-nav__link:hover { color: var(--color-text); box-shadow: inset 0 -2px 0 var(--color-accent); }
.mega-menu {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--color-surface); color: var(--color-text);
  border-bottom: 1px solid var(--color-line);
  box-shadow: 0 24px 40px -24px rgba(0,0,0,0.35);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}
.site-nav__item.has-mega:hover .mega-menu,
.site-nav__item.has-mega:focus-within .mega-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.mega-menu__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 28px; padding-block: 30px;
}
.mega-menu__heading {
  display: block; font-weight: 700; font-size: 0.82rem;
  text-transform: uppercase; letter-spacing: 0.06em;
  margin-bottom: 12px; color: var(--color-muted);
}
a.mega-menu__heading:hover { color: var(--color-accent); }
.mega-menu__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.mega-menu__col ul a { font-size: 0.9rem; }
.mega-menu__col ul a:hover { color: var(--color-accent); }

/* Mobile drawer */
.menu-drawer-toggle summary { list-style: none; cursor: pointer; display: inline-flex; padding: 8px; }
.menu-drawer-toggle summary::-webkit-details-marker { display: none; }
.hamburger { display: inline-flex; flex-direction: column; gap: 5px; width: 22px; }
.hamburger span { height: 2px; background: currentColor; border-radius: 2px; }
.menu-drawer {
  position: fixed; inset: 0; top: 64px; z-index: 60;
  background: var(--color-header-bg); overflow-y: auto; padding: 16px 20px 40px;
}
.menu-drawer__list { list-style: none; margin: 0; padding: 0; }
.menu-drawer__list > li { border-bottom: 1px solid var(--color-line); }
.menu-drawer__list a, .menu-drawer summary {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0; font-weight: 600; cursor: pointer;
}
.menu-drawer details summary::-webkit-details-marker { display: none; }
.menu-drawer details[open] > summary .icon--chevron { transform: rotate(180deg); }
.menu-drawer ul { list-style: none; margin: 0; padding: 0 0 8px 16px; }
.menu-drawer ul a { font-weight: 400; padding: 9px 0; opacity: 0.85; }

/* Search drawer */
.search-toggle summary { list-style: none; cursor: pointer; display: inline-flex; padding: 9px; border-radius: 50%; }
.search-toggle summary:hover { background: rgba(0,0,0,0.06); }
.search-toggle summary::-webkit-details-marker { display: none; }
.search-drawer {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--color-surface); color: var(--color-text);
  border-bottom: 1px solid var(--color-line);
  box-shadow: 0 24px 40px -24px rgba(0,0,0,0.35);
}
.search-drawer__form { display: flex; gap: 10px; padding-block: 18px; }
.search-drawer__form input[type="search"] {
  flex: 1; font: inherit; padding: 12px 14px;
  border: 1.5px solid var(--color-line); border-radius: var(--radius);
}

/* ---------- Hero ---------- */
.hero {
  position: relative; display: flex; align-items: center;
  min-height: var(--hero-height, 80vh); overflow: hidden;
  color: #fff;
}
.hero__media { position: absolute; inset: 0; }
.hero__image { width: 100%; height: 100%; object-fit: cover; }
.hero__overlay { position: absolute; inset: 0; background: #05070c; }
.hero__content { position: relative; width: 100%; padding-block: 60px; }
.hero__eyebrow {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; margin: 0 0 14px; color: #D6A72F;
}
.hero__heading { font-size: clamp(2.4rem, 6.5vw, 4.6rem); margin-bottom: 0.3em; max-width: 14ch; letter-spacing: -0.02em; }
.hero__text { max-width: 44ch; margin-bottom: 28px; font-size: 1.08rem; opacity: 0.85; }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn--ghost { background: transparent; border-color: rgba(255,255,255,0.35); color: #fff; }
.btn--ghost:hover { border-color: #fff; opacity: 1; }

/* ---------- Sections ---------- */
.section { padding-block: 52px 20px; }
.section__header {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; margin-bottom: 6px;
}
.section__title { margin: 0; }
.section__title strong { color: var(--color-accent); }
.section__title a:hover { color: var(--color-accent); }
.section__subtitle { margin: 0 0 18px; color: var(--color-muted); }
.section__footer { display: flex; justify-content: center; padding-block: 26px 8px; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.link-arrow:hover { color: var(--color-accent); }

/* ---------- Carousels ---------- */
.carousel {
  display: grid; grid-auto-flow: column;
  grid-auto-columns: 72%;
  gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding-block: 16px 8px; scrollbar-width: none;
}
.carousel::-webkit-scrollbar { display: none; }
.carousel > * { scroll-snap-align: start; }
.carousel-controls { display: none; gap: 8px; }
.carousel-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1.5px solid var(--color-line); background: var(--color-surface);
  color: var(--color-text); cursor: pointer; transition: border-color 0.15s;
}
.carousel-btn:hover { border-color: var(--color-text); }
.carousel-btn[disabled] { opacity: 0.35; cursor: default; }
@media (min-width: 750px) {
  .carousel { grid-auto-columns: calc((100% - 32px) / 3); }
  .carousel-controls { display: inline-flex; }
}
@media (min-width: 990px) {
  .carousel { grid-auto-columns: calc((100% - 48px) / 4); }
}

/* ---------- Collection cards ---------- */
.collection-card {
  background: var(--color-surface); border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--color-line);
  display: flex; flex-direction: column; transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.collection-card:hover { box-shadow: 0 14px 30px -18px rgba(0,0,0,0.35); transform: translateY(-2px); }
.collection-card__media { aspect-ratio: 4 / 3; overflow: hidden; background: #eee; }
.collection-card__media img, .collection-card__media svg { width: 100%; height: 100%; object-fit: cover; }
.collection-card__body { padding: 16px 16px 18px; display: grid; gap: 6px; }
.collection-card__body h3 { margin: 0; }
.collection-card__body p { margin: 0; font-size: 0.85rem; color: var(--color-muted); }
.collection-card__cta {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.85rem; font-weight: 700; color: var(--color-accent); margin-top: 4px;
}
.collection-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px; padding-block: 10px 40px;
}

/* ---------- Product cards ---------- */
.product-card {
  background: var(--color-surface); border-radius: var(--radius);
  border: 1px solid var(--color-line); overflow: hidden;
  display: flex; flex-direction: column; position: relative;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.product-card:hover { box-shadow: 0 14px 30px -18px rgba(0,0,0,0.35); transform: translateY(-2px); }
.product-card__media { position: relative; aspect-ratio: 1; background: #f2f2f0; overflow: hidden; }
.product-card__img { width: 100%; height: 100%; object-fit: cover; }
.badge {
  position: absolute; top: 10px; left: 10px;
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.04em;
  padding: 4px 9px; border-radius: 4px; text-transform: uppercase;
}
.badge--sale { background: var(--color-sale); color: #fff; }
.badge--soldout { background: var(--color-text); color: var(--color-bg); }
.product-card__body { padding: 14px 14px 16px; display: grid; gap: 4px; }
.product-card__vendor {
  margin: 0; font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.07em; color: var(--color-muted);
}
.product-card__title { margin: 0; font-size: 0.92rem; font-weight: 600; font-family: var(--font-body); }
.price { display: flex; align-items: baseline; gap: 8px; margin: 0; font-weight: 700; }
.price--sale .price__amount { color: var(--color-sale); }
.price__compare { color: var(--color-muted); font-weight: 400; font-size: 0.85em; }
.product-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px;
  padding-block: 8px 30px;
}
@media (min-width: 750px) { .product-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
@media (min-width: 990px) { .product-grid { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Vehicle finder + tiles (wheels shop-by-vehicle) ---------- */
.vehicle-finder {
  background: var(--color-surface); border: 1px solid var(--color-line);
  border-radius: var(--radius); padding: 16px 18px; margin-bottom: 18px;
  display: grid; gap: 10px;
}
.vehicle-finder > label { font-weight: 700; font-size: 0.92rem; }
.vehicle-finder__row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.vehicle-finder__row .select { flex: 1; min-width: 200px; }
.vehicle-tiles--bolts { grid-template-columns: repeat(auto-fill, minmax(102px, 1fr)); }
@media (min-width: 990px) {
  .vehicle-tiles--bolts { grid-template-columns: repeat(9, 1fr); }
}
.collection-grid--modes { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); padding-block: 6px 10px; }
.wheels-mode-nav {
  display: flex; justify-content: space-between; gap: 16px;
  padding-block: 2px 14px; font-size: 0.88rem; font-weight: 600;
}
.wheels-mode-nav a { display: inline-flex; align-items: center; gap: 6px; }
.wheels-mode-nav a:hover { color: var(--color-accent); }
.vehicle-tiles {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(102px, 1fr));
  gap: 12px; padding-block: 4px 24px;
}
@media (min-width: 990px) {
  .vehicle-tiles { grid-template-columns: repeat(9, 1fr); }
}
.vehicle-tile {
  display: grid; gap: 7px; text-align: center; align-content: start;
  font-size: 0.76rem; font-weight: 600; line-height: 1.3;
}
.vehicle-tile__label { min-height: 2.6em; }
.vehicle-tile__media {
  display: block; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden;
  border: 1.5px solid var(--color-line); background: var(--color-surface);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.vehicle-tile__media img { width: 100%; height: 100%; object-fit: cover; }
.vehicle-tile:hover .vehicle-tile__media { border-color: var(--color-accent); }
.vehicle-tile.is-active .vehicle-tile__media {
  border-color: var(--color-accent); box-shadow: 0 0 0 2px var(--color-accent);
}
.vehicle-tile.is-active .vehicle-tile__label { color: var(--color-accent); }

/* ---------- Collection / listing pages ---------- */
.collection-header { padding-block: 40px 8px; }
.collection-header__desc { max-width: 70ch; color: var(--color-muted); }
.collection-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding-block: 8px 4px; flex-wrap: wrap;
}
.collection-toolbar__count { margin: 0; color: var(--color-muted); font-size: 0.9rem; }
.collection-toolbar__sort { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; }
.empty-state { padding-block: 40px; color: var(--color-muted); font-size: 1.05rem; }

/* ---------- Product page ---------- */
.product-page { padding-block: 34px 60px; }
.product-page__grid { display: grid; gap: 34px; }
@media (min-width: 990px) {
  .product-page__grid { grid-template-columns: 1.15fr 1fr; align-items: start; }
}
.product-gallery__main {
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--color-line); background: var(--color-surface);
  aspect-ratio: 1;
}
.product-gallery__main img, .product-gallery__main svg { width: 100%; height: 100%; object-fit: cover; }
.product-gallery__thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; }
.product-gallery__thumb {
  flex: 0 0 72px; aspect-ratio: 1; padding: 0; cursor: pointer;
  border: 1.5px solid var(--color-line); border-radius: var(--radius);
  overflow: hidden; background: var(--color-surface);
}
.product-gallery__thumb.is-active { border-color: var(--color-accent); }
.product-gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-info__vendor {
  margin: 0 0 6px; font-size: 0.78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-muted);
}
.product-info__title { margin-bottom: 10px; }
.product-info__price { font-size: 1.25rem; margin-bottom: 22px; }
.product-info__fitment {
  margin: -8px 0 20px; font-size: 0.88rem; color: var(--color-muted);
  line-height: 1.9; max-width: 46ch;
}
.product-info__fitment a { text-decoration: underline; text-underline-offset: 3px; }
.product-info__fitment a:hover { color: var(--color-accent); }
.product-info__variants, .product-info__qty { display: grid; gap: 6px; margin-bottom: 16px; max-width: 420px; }
.product-info__variants label, .product-info__qty label { font-weight: 700; font-size: 0.85rem; }
.product-info form .btn--block { max-width: 420px; margin-top: 6px; }
.product-info__description { margin-top: 28px; border-top: 1px solid var(--color-line); padding-top: 22px; }

/* ---------- Cart ---------- */
.cart-page { padding-block: 40px 70px; }
.cart-table { width: 100%; border-collapse: collapse; margin-block: 10px 22px; }
.cart-table th {
  text-align: left; font-size: 0.75rem; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--color-muted);
  border-bottom: 1px solid var(--color-line); padding: 10px 8px;
}
.cart-table td { padding: 16px 8px; border-bottom: 1px solid var(--color-line); vertical-align: middle; }
.cart-table__media img { width: 84px; border-radius: var(--radius); border: 1px solid var(--color-line); }
.cart-table__title { font-weight: 700; }
.cart-table__variant, .cart-table__price { margin: 3px 0 0; font-size: 0.85rem; color: var(--color-muted); }
.cart-table__remove {
  font: inherit; font-size: 0.8rem; text-decoration: underline; color: var(--color-muted);
  background: none; border: 0; padding: 0; cursor: pointer;
}
.cart-footer { display: flex; justify-content: flex-end; }
.cart-footer__summary { display: grid; gap: 12px; width: min(380px, 100%); }
.cart-footer__subtotal { display: flex; justify-content: space-between; font-size: 1.1rem; margin: 0; }
.cart-footer__note { margin: 0; font-size: 0.82rem; color: var(--color-muted); }

/* ---------- Static pages / misc ---------- */
.page-content { padding-block: 44px 70px; max-width: 860px; }
.rte img { border-radius: var(--radius); }
.rte a { color: var(--color-accent); text-decoration: underline; text-underline-offset: 3px; }
.search-page__form { display: flex; gap: 10px; max-width: 520px; margin-top: 14px; }
.search-page__form .input { flex: 1; }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 60px;
  background: var(--color-footer-bg); color: var(--color-footer-text);
}
.site-footer__logo { width: 210px; margin-bottom: 14px; }
.site-footer__tagline { margin: 0; font-size: 0.92rem; opacity: 0.8; max-width: 34ch; }
.site-footer__grid {
  display: grid; gap: 34px; padding-block: 52px 36px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.site-footer__heading {
  font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 16px; color: rgba(255,255,255,0.65);
}
.site-footer__links { display: grid; gap: 9px; }
.site-footer__links a { font-size: 0.92rem; opacity: 0.9; }
.site-footer__links a:hover { color: #fff; opacity: 1; }
.site-footer .rte { font-size: 0.92rem; opacity: 0.9; }
.social-list { display: flex; gap: 8px; margin-top: 18px; }
.social-list a {
  display: inline-flex; padding: 9px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
}
.social-list a:hover { border-color: #fff; }
.site-footer__bottom {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; padding-block: 18px 26px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.82rem; opacity: 0.85;
}

/* ---------- Responsive header switch ---------- */
@media (min-width: 990px) {
  .menu-drawer-toggle { display: none; }
  .site-nav { display: block; }
}
@media (max-width: 989px) {
  .site-header__inner { justify-content: flex-start; }
  .site-header__logo { margin-inline: auto; transform: translateX(-14px); }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
