/*
Theme Name: Auto Parts Australia
Theme URI: https://autopartsaustralia.com
Author: Auto Parts Australia
Description: Premium storefront for a genuine and aftermarket car parts catalogue. Graphite and amber, engineered layout, vehicle-first navigation.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: apa
*/

/* ============================================================
   1. Tokens
   ============================================================ */
:root {
  --ink:        #0B0F14;
  --ink-800:    #131A22;
  --ink-700:    #1D2732;
  --ink-600:    #2B3846;
  --steel:      #5D6875;
  --steel-300:  #98A2AE;
  --line:       #E3E7EC;
  --line-soft:  #EFF2F5;
  --paper:      #FFFFFF;
  --ground:     #F4F6F8;
  --amber:      #E9A23B;
  --amber-dk:   #B87C1C;
  --amber-soft: #FDF4E4;
  --ok:         #1B6B41;
  --ok-soft:    #E9F3ED;
  --warn:       #A8341F;

  --font-head: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --wrap: 1360px;
  --gut: 24px;
  --r: 2px;

  --shadow-1: 0 1px 2px rgba(11,15,20,.06);
  --shadow-2: 0 4px 16px rgba(11,15,20,.08);
  --shadow-3: 0 12px 40px rgba(11,15,20,.14);
}

/* ============================================================
   2. Reset and base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4, h5 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.02em;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(30px, 4vw, 46px); }
h2 { font-size: clamp(23px, 2.6vw, 32px); }
h3 { font-size: 19px; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link:focus {
  position: fixed; left: 16px; top: 16px; z-index: 999;
  background: var(--ink); color: #fff; padding: 12px 18px; clip: auto; width: auto; height: auto;
}
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

.eyebrow {
  font-family: var(--font-head);
  font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--amber-dk); margin: 0 0 10px;
}
.lede { font-size: 16px; color: var(--steel); max-width: 62ch; }

/* ============================================================
   3. Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-head); font-weight: 600; font-size: 13px;
  letter-spacing: .06em; text-transform: uppercase;
  padding: 13px 22px; border: 1px solid transparent; border-radius: var(--r);
  cursor: pointer; transition: background .15s, color .15s, border-color .15s;
  background: var(--ink); color: #fff;
}
.btn:hover { background: var(--ink-700); }
.btn--amber { background: var(--amber); color: var(--ink); }
.btn--amber:hover { background: var(--amber-dk); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); background: transparent; }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: var(--ground); }
.btn--sm { padding: 9px 14px; font-size: 12px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* ============================================================
   4. Header
   ============================================================ */
.utility {
  background: var(--ink); color: var(--steel-300);
  font-size: 12px; border-bottom: 1px solid rgba(255,255,255,.07);
}
.utility__in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 38px; }
.utility a { color: var(--steel-300); }
.utility a:hover { color: #fff; }
.utility__notes { display: flex; gap: 26px; }
.utility__notes span { display: inline-flex; align-items: center; gap: 7px; }
.utility svg { width: 13px; height: 13px; stroke: var(--amber); fill: none; stroke-width: 1.6; }

.masthead { background: var(--ink); color: #fff; position: sticky; top: 0; z-index: 60; }
.masthead__in {
  display: grid; grid-template-columns: auto 1fr auto;
  align-items: center; gap: 32px; padding-top: 18px; padding-bottom: 18px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand__mark { width: 34px; height: 34px; flex: none; }
.brand__text { line-height: 1.05; }
.brand__name {
  display: block; font-family: var(--font-head); font-weight: 700;
  font-size: 17px; letter-spacing: -.02em; color: #fff; text-transform: uppercase;
}
.brand__sub {
  display: block; font-family: var(--font-head); font-size: 9.5px; font-weight: 600;
  letter-spacing: .26em; text-transform: uppercase; color: var(--amber);
}

.searchbar { display: flex; max-width: 620px; width: 100%; }
.searchbar input[type="search"] {
  flex: 1; min-width: 0; height: 46px; padding: 0 16px;
  background: #fff; border: 1px solid #fff; border-right: 0;
  border-radius: var(--r) 0 0 var(--r); font-size: 14px;
}
.searchbar input::placeholder { color: var(--steel-300); }
.searchbar button {
  height: 46px; padding: 0 20px; background: var(--amber); color: var(--ink);
  border: 0; border-radius: 0 var(--r) var(--r) 0; cursor: pointer;
  font-family: var(--font-head); font-weight: 700; font-size: 12px;
  letter-spacing: .08em; text-transform: uppercase;
}
.searchbar button:hover { background: var(--amber-dk); color: #fff; }

.masthead__tools { display: flex; align-items: center; gap: 6px; }
.tool {
  display: inline-flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 7px 12px; color: #fff; position: relative; border-radius: var(--r);
}
.tool:hover { background: rgba(255,255,255,.08); }
.tool svg { width: 21px; height: 21px; stroke: currentColor; fill: none; stroke-width: 1.5; }
.tool span { font-size: 10.5px; letter-spacing: .04em; color: var(--steel-300); }
.tool__count {
  position: absolute; top: 2px; right: 4px; min-width: 17px; height: 17px;
  background: var(--amber); color: var(--ink); border-radius: 9px;
  font-size: 10px; font-weight: 700; line-height: 17px; text-align: center; padding: 0 4px;
}

/* Primary nav */
.mainnav { background: var(--ink-800); border-top: 1px solid rgba(255,255,255,.07); }
.mainnav__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.mainnav__list > li { position: relative; }
.mainnav__list > li > a {
  display: flex; align-items: center; gap: 6px; padding: 14px 18px;
  font-family: var(--font-head); font-size: 12.5px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: #fff;
  border-bottom: 2px solid transparent;
}
.mainnav__list > li > a:hover,
.mainnav__list > li:hover > a { color: var(--amber); border-bottom-color: var(--amber); }
.mainnav__list > li:first-child > a { padding-left: 0; }
.mainnav .caret { width: 9px; height: 9px; stroke: currentColor; fill: none; stroke-width: 2.2; opacity: .7; }

.submenu {
  position: absolute; left: 0; top: 100%; z-index: 70;
  min-width: 268px; background: #fff; border: 1px solid var(--line);
  box-shadow: var(--shadow-3); padding: 8px 0; list-style: none; margin: 0;
  opacity: 0; visibility: hidden; transform: translateY(4px); transition: .16s;
}
.mainnav__list > li:hover > .submenu,
.mainnav__list > li:focus-within > .submenu { opacity: 1; visibility: visible; transform: none; }
.submenu li a {
  display: flex; justify-content: space-between; gap: 14px;
  padding: 9px 20px; font-size: 13.5px; color: var(--ink-700);
}
.submenu li a:hover { background: var(--ground); color: var(--ink); }
.submenu .cnt { color: var(--steel-300); font-size: 12px; font-family: var(--font-mono); }
.submenu--wide { min-width: 640px; columns: 2; padding: 12px 0; }
.submenu--makes { min-width: 560px; columns: 3; }

.navtoggle { display: none; }

/* ============================================================
   5. Vehicle finder
   ============================================================ */
.finder { background: var(--ink-800); border: 1px solid rgba(255,255,255,.1); padding: 22px; }
.finder__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.finder__title {
  font-family: var(--font-head); font-size: 14px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: #fff; margin: 0;
}
.finder__count { font-size: 12px; color: var(--steel-300); font-family: var(--font-mono); }
.finder__row { display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: 10px; }
.finder select {
  height: 48px; padding: 0 38px 0 14px; width: 100%;
  background: #fff url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235D6875' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 14px center;
  border: 1px solid var(--line); border-radius: var(--r);
  appearance: none; -webkit-appearance: none; font-size: 14px; cursor: pointer;
}
.finder select { color: var(--ink); }
.finder select option { color: var(--ink); background: #fff; }
.finder select:disabled { background-color: #E9ECEF; color: var(--steel); cursor: not-allowed; }
.hero .finder { padding: 26px; }
.hero .finder__row { grid-template-columns: 1fr 1fr; }
.finder .btn { height: 48px; white-space: nowrap; }
.finder--light { background: var(--ground); border-color: var(--line); }
.finder--light .finder__title { color: var(--ink); }
.finder--light .finder__count { color: var(--steel); }
.finder--light select { border-color: var(--line); }

/* ============================================================
   6. Hero
   ============================================================ */
.hero { position: relative; background: var(--ink); color: #fff; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(120% 90% at 78% 45%, #000 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(120% 90% at 78% 45%, #000 0%, transparent 72%);
}
.hero::after {
  content: ""; position: absolute; right: -10%; top: -30%; width: 720px; height: 720px;
  background: radial-gradient(circle, rgba(233,162,59,.16) 0%, transparent 62%);
  pointer-events: none;
}
.hero__in { position: relative; z-index: 2; padding-top: 68px; padding-bottom: 60px; display: grid; gap: 44px; grid-template-columns: 1.05fr .95fr; align-items: center; }
.hero h1 { color: #fff; margin-bottom: 16px; max-width: 15ch; }
.hero h1 em { font-style: normal; color: var(--amber); }
.hero__lede { color: var(--steel-300); font-size: 16.5px; max-width: 46ch; margin-bottom: 26px; }
.hero__rule { width: 56px; height: 3px; background: var(--amber); margin-bottom: 22px; }
.hero__stats { display: flex; gap: 40px; margin-top: 30px; padding-top: 26px; border-top: 1px solid rgba(255,255,255,.12); }
.hero__stat b {
  display: block; font-family: var(--font-head); font-size: 25px; font-weight: 700;
  letter-spacing: -.02em; color: #fff;
}
.hero__stat span { font-size: 12px; color: var(--steel-300); letter-spacing: .03em; }

/* ============================================================
   7. Marquee strip
   ============================================================ */
.assure { background: var(--ground); border-bottom: 1px solid var(--line); }
.assure__in { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; }
.assure__item { display: flex; align-items: center; gap: 13px; padding: 20px 4px; }
.assure__item svg { width: 25px; height: 25px; flex: none; stroke: var(--ink); fill: none; stroke-width: 1.4; }
.assure__item b { display: block; font-family: var(--font-head); font-size: 13.5px; font-weight: 700; letter-spacing: -.01em; }
.assure__item span { font-size: 12.5px; color: var(--steel); }

/* ============================================================
   8. Sections
   ============================================================ */
.section { padding: 70px 0; }
.section--tight { padding: 48px 0; }
.section--ground { background: var(--ground); }
.section--ink { background: var(--ink); color: #fff; }
.section--ink h2 { color: #fff; }
.section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.section__head h2 { margin: 0; }
.section__link {
  font-family: var(--font-head); font-size: 12.5px; font-weight: 600;
  letter-spacing: .07em; text-transform: uppercase;
  border-bottom: 2px solid var(--amber); padding-bottom: 3px; white-space: nowrap;
}
.section__link:hover { color: var(--amber-dk); }

/* Category tiles */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.tile {
  position: relative; display: block; background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.tile:hover { border-color: var(--ink); box-shadow: var(--shadow-2); transform: translateY(-2px); }
.tile__media { aspect-ratio: 4 / 3; background: var(--ground); display: grid; place-items: center; padding: 22px; }
.tile__media img { max-height: 100%; width: auto; object-fit: contain; mix-blend-mode: multiply; }
.tile__body { padding: 16px 18px 18px; border-top: 1px solid var(--line-soft); }
.tile__body h3 { margin: 0 0 3px; font-size: 15.5px; }
.tile__body span { font-size: 12.5px; color: var(--steel); font-family: var(--font-mono); }

/* Make grid */
.makes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.make {
  display: grid; place-items: center; text-align: center; gap: 3px;
  padding: 20px 10px; background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--r);
  transition: border-color .15s, background .15s;
}
.make:hover { border-color: var(--ink); background: var(--ground); }
.make b {
  font-family: var(--font-head); font-size: 13.5px; font-weight: 700;
  letter-spacing: .03em; text-transform: uppercase;
}
.make span { font-size: 11.5px; color: var(--steel-300); font-family: var(--font-mono); }

/* Split feature */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split__list { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 14px; }
.split__list li { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; }
.split__list svg { width: 18px; height: 18px; flex: none; margin-top: 2px; stroke: var(--amber); fill: none; stroke-width: 2; }
.panelgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.panel { background: var(--ink-800); border: 1px solid rgba(255,255,255,.1); padding: 24px; border-radius: var(--r); }
.panel b { display: block; font-family: var(--font-head); font-size: 15px; margin-bottom: 6px; color: #fff; }
.panel span { font-size: 13px; color: var(--steel-300); }

/* ============================================================
   9. Product cards
   ============================================================ */
ul.products {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
ul.products.cols-3 { grid-template-columns: repeat(3, 1fr); }
ul.products li.product { margin: 0; }

.card {
  position: relative; display: flex; flex-direction: column; height: 100%;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r);
  transition: border-color .15s, box-shadow .15s;
}
.card:hover { border-color: var(--ink-600); box-shadow: var(--shadow-2); }
.card__media { position: relative; aspect-ratio: 1 / 1; background: var(--ground); padding: 18px; display: grid; place-items: center; }
.card__media img { max-height: 100%; width: auto; object-fit: contain; mix-blend-mode: multiply; }
.card__flags { position: absolute; top: 10px; left: 10px; display: flex; flex-direction: column; gap: 5px; align-items: flex-start; }
.card__body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; gap: 9px; }
.card__title {
  font-family: var(--font-body); font-size: 13.5px; font-weight: 500; line-height: 1.42;
  letter-spacing: 0; margin: 0; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card:hover .card__title { color: var(--amber-dk); }
.card__sku { font-family: var(--font-mono); font-size: 11.5px; color: var(--steel-300); letter-spacing: .02em; }
.card__foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.card__price { font-family: var(--font-head); font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.card__price del { font-size: 13px; font-weight: 500; color: var(--steel-300); margin-right: 6px; }
.card__price ins { text-decoration: none; }
.card__cta { flex: none; }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-head); font-size: 9.5px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  padding: 4px 8px; border-radius: var(--r);
}
.badge--oem { background: var(--ink); color: #fff; }
.badge--aftermarket { background: #fff; color: var(--ink-700); border: 1px solid var(--line); }
.badge--sale { background: var(--amber); color: var(--ink); }
.badge--out { background: var(--ink-600); color: #fff; }
.badge--stock { background: var(--ok-soft); color: var(--ok); }

/* ============================================================
   10. Shop layout
   ============================================================ */
.pagehead { background: var(--ground); border-bottom: 1px solid var(--line); padding: 26px 0; }
.crumbs { font-size: 12.5px; color: var(--steel); margin-bottom: 8px; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs .sep { margin: 0 7px; color: var(--steel-300); }
.pagehead h1 { margin: 0; font-size: clamp(25px, 3vw, 34px); }
.pagehead p { margin: 8px 0 0; color: var(--steel); max-width: 70ch; font-size: 14px; }

.shop { display: grid; grid-template-columns: 262px 1fr; gap: 34px; padding-top: 34px; padding-bottom: 70px; align-items: start; }
.filters { position: sticky; top: 128px; }
.filters__box { border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); }
.filters__group { border-bottom: 1px solid var(--line-soft); }
.filters__group:last-child { border-bottom: 0; }
.filters__group > summary {
  list-style: none; cursor: pointer; padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-head); font-size: 12px; font-weight: 700;
  letter-spacing: .09em; text-transform: uppercase;
}
.filters__group > summary::-webkit-details-marker { display: none; }
.filters__group > summary::after {
  content: ""; width: 8px; height: 8px; border-right: 2px solid var(--steel);
  border-bottom: 2px solid var(--steel); transform: rotate(45deg) translateY(-2px); transition: transform .15s;
}
.filters__group[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
.filters__body { padding: 0 16px 14px; max-height: 268px; overflow-y: auto; }
.filters__body::-webkit-scrollbar { width: 6px; }
.filters__body::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
.fopt { display: flex; align-items: center; gap: 9px; padding: 5px 0; font-size: 13.5px; cursor: pointer; }
.fopt input { width: 15px; height: 15px; accent-color: var(--ink); flex: none; cursor: pointer; }
.fopt .n { flex: 1; }
.fopt .c { font-family: var(--font-mono); font-size: 11.5px; color: var(--steel-300); }
.fopt:hover .n { color: var(--amber-dk); }
.filters__actions { padding: 14px 16px; display: grid; gap: 8px; border-top: 1px solid var(--line-soft); }

.toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-bottom: 16px; margin-bottom: 20px; border-bottom: 1px solid var(--line);
}
.toolbar__count { font-size: 13.5px; color: var(--steel); }
.toolbar__count b { color: var(--ink); font-family: var(--font-mono); }
.toolbar select {
  height: 40px; padding: 0 36px 0 13px; border: 1px solid var(--line); border-radius: var(--r);
  background: #fff url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235D6875' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 13px center;
  appearance: none; -webkit-appearance: none; font-size: 13.5px; cursor: pointer;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px;
  background: var(--ground); border: 1px solid var(--line); border-radius: var(--r); font-size: 12.5px;
}
.chip b { font-weight: 600; }
.chip a { color: var(--steel); font-size: 15px; line-height: 1; }
.chip a:hover { color: var(--warn); }

.pager { display: flex; gap: 6px; justify-content: center; margin-top: 44px; }
.pager .page-numbers {
  min-width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r); font-size: 13.5px;
  font-family: var(--font-head); font-weight: 600;
}
.pager .page-numbers:hover { border-color: var(--ink); }
.pager .page-numbers.current { background: var(--ink); color: #fff; border-color: var(--ink); }
.pager .dots { border: 0; }

.emptystate { padding: 60px 20px; text-align: center; border: 1px dashed var(--line); border-radius: var(--r); }

/* ============================================================
   11. Single product
   ============================================================ */
.product-main { display: grid; grid-template-columns: 1.05fr .95fr; gap: 52px; padding-top: 34px; padding-bottom: 60px; align-items: start; }
.gallery { position: sticky; top: 128px; }
.gallery__main {
  border: 1px solid var(--line); border-radius: var(--r); background: var(--ground);
  aspect-ratio: 1 / 1; display: grid; place-items: center; padding: 38px; margin-bottom: 12px;
}
.gallery__main img { max-height: 100%; width: auto; object-fit: contain; mix-blend-mode: multiply; }
.gallery__thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.gallery__thumbs button {
  border: 1px solid var(--line); border-radius: var(--r); background: var(--ground);
  aspect-ratio: 1 / 1; padding: 8px; cursor: pointer; display: grid; place-items: center;
}
.gallery__thumbs button[aria-current="true"] { border-color: var(--ink); }
.gallery__thumbs img { max-height: 100%; width: auto; object-fit: contain; mix-blend-mode: multiply; }

.psum__flags { display: flex; gap: 7px; margin-bottom: 14px; }
.psum h1 { font-size: clamp(21px, 2.2vw, 27px); line-height: 1.24; letter-spacing: -.015em; margin-bottom: 12px; }
.psum__meta { display: flex; flex-wrap: wrap; gap: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--steel); }
.psum__meta b { color: var(--ink); font-family: var(--font-mono); font-weight: 500; }
.psum__price { display: flex; align-items: baseline; gap: 12px; padding: 20px 0 6px; }
.psum__price .amt { font-family: var(--font-head); font-size: 34px; font-weight: 700; letter-spacing: -.03em; }
.psum__price del { color: var(--steel-300); font-size: 17px; }
.psum__price ins { text-decoration: none; }
.psum__tax { font-size: 12.5px; color: var(--steel); margin-bottom: 20px; }
.psum__buy { display: flex; gap: 10px; align-items: stretch; margin-bottom: 18px; }
.psum__buy .qty-wrap { display: flex; border: 1px solid var(--line); border-radius: var(--r); }
.psum__buy .qty-wrap button {
  width: 42px; background: var(--paper); border: 0; cursor: pointer; font-size: 17px; color: var(--steel);
}
.psum__buy .qty-wrap button:hover { color: var(--ink); background: var(--ground); }
.psum__buy input.qty {
  width: 52px; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line);
  text-align: center; font-family: var(--font-mono); font-size: 15px; -moz-appearance: textfield;
}
.psum__buy input.qty::-webkit-outer-spin-button, .psum__buy input.qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.psum__buy .btn { flex: 1; height: 52px; }
.psum__notes { display: grid; gap: 11px; padding: 18px; background: var(--ground); border-radius: var(--r); border: 1px solid var(--line); }
.psum__notes div { display: flex; gap: 11px; align-items: flex-start; font-size: 13.5px; }
.psum__notes svg { width: 17px; height: 17px; flex: none; margin-top: 2px; stroke: var(--ink); fill: none; stroke-width: 1.6; }

.pdetail { border-top: 1px solid var(--line); padding-top: 44px; padding-bottom: 66px; }
.acc { border-bottom: 1px solid var(--line); }
.acc > summary {
  list-style: none; cursor: pointer; padding: 20px 0;
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-head); font-size: 15px; font-weight: 700; letter-spacing: -.01em;
}
.acc > summary::-webkit-details-marker { display: none; }
.acc > summary::after {
  content: ""; width: 10px; height: 10px; border-right: 2px solid var(--steel);
  border-bottom: 2px solid var(--steel); transform: rotate(45deg) translateY(-3px); transition: transform .15s;
}
.acc[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
.acc__body { padding: 0 0 24px; max-width: 78ch; font-size: 14.5px; color: var(--ink-700); }
.acc__body p:last-child { margin-bottom: 0; }
.spec { width: 100%; border-collapse: collapse; font-size: 14px; }
.spec th, .spec td { text-align: left; padding: 11px 0; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.spec th { width: 190px; font-weight: 500; color: var(--steel); }
.spec td { font-family: var(--font-mono); font-size: 13px; }

/* ============================================================
   12. Content pages, cart, checkout, forms
   ============================================================ */
.page-body { padding-top: 40px; padding-bottom: 70px; }
.prose { max-width: 76ch; font-size: 15.5px; }
.prose h2 { margin-top: 1.7em; }
.prose h3 { margin-top: 1.5em; }
.prose ul, .prose ol { padding-left: 1.2em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .45em; }
.prose a { color: var(--amber-dk); text-decoration: underline; text-underline-offset: 2px; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: 14.5px; }
.prose th, .prose td { padding: 11px 12px; border: 1px solid var(--line); text-align: left; }
.prose th { background: var(--ground); font-family: var(--font-head); font-size: 13px; letter-spacing: .04em; text-transform: uppercase; }

.woocommerce-message, .woocommerce-info, .woocommerce-error {
  list-style: none; margin: 0 0 22px; padding: 14px 18px; border-radius: var(--r);
  border-left: 3px solid var(--ink); background: var(--ground); font-size: 14px;
}
.woocommerce-message { border-left-color: var(--ok); background: var(--ok-soft); }
.woocommerce-error { border-left-color: var(--warn); background: #FBEDEA; }
.woocommerce-info { border-left-color: var(--amber); background: var(--amber-soft); }
.woocommerce-message .button, .woocommerce-info .button { float: right; }

table.shop_table { width: 100%; border-collapse: collapse; font-size: 14px; }
table.shop_table th, table.shop_table td { padding: 14px 12px; border-bottom: 1px solid var(--line); text-align: left; }
table.shop_table th { font-family: var(--font-head); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }

.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; }
input[type="text"], input[type="email"], input[type="tel"], input[type="password"],
input[type="number"], input[type="search"], textarea, select.apa-select {
  width: 100%; height: 46px; padding: 0 14px; border: 1px solid var(--line);
  border-radius: var(--r); background: #fff; font-size: 14.5px;
}
textarea { height: auto; padding: 12px 14px; min-height: 130px; }
input:focus, textarea:focus, select:focus { border-color: var(--ink); outline: none; }
.woocommerce .button, .woocommerce button.button, .woocommerce input.button, .woocommerce a.button {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 600; font-size: 13px;
  letter-spacing: .06em; text-transform: uppercase;
  padding: 13px 22px; border: 1px solid transparent; border-radius: var(--r);
  background: var(--ink); color: #fff; cursor: pointer;
}
.woocommerce .button:hover { background: var(--ink-700); color: #fff; }
.woocommerce .button.alt, .woocommerce button.button.alt { background: var(--amber); color: var(--ink); }
.woocommerce .button.alt:hover { background: var(--amber-dk); color: #fff; }

/* ============================================================
   13. Footer
   ============================================================ */
.prefoot { background: var(--ink-800); color: #fff; padding: 44px 0; }
.prefoot__in { display: grid; grid-template-columns: 1fr auto; gap: 34px; align-items: center; }
.prefoot h2 { font-size: 25px; margin: 0 0 7px; color: #fff; }
.prefoot p { margin: 0; color: var(--steel-300); font-size: 14.5px; }
.prefoot form { display: flex; gap: 10px; }
.prefoot input { height: 48px; width: 290px; border-color: transparent; }

.footer { background: var(--ink); color: var(--steel-300); padding: 56px 0 0; font-size: 13.5px; }
.footer a { color: var(--steel-300); }
.footer a:hover { color: var(--amber); }
.footer__cols { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 44px; }
.footer h3 {
  font-family: var(--font-head); font-size: 11.5px; font-weight: 700;
  letter-spacing: .13em; text-transform: uppercase; color: #fff; margin: 0 0 16px;
}
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer__about p { max-width: 34ch; margin: 16px 0 0; }
.footer__contact { display: grid; gap: 10px; margin-top: 18px; }
.footer__contact div { display: flex; gap: 10px; align-items: flex-start; }
.footer__contact svg { width: 15px; height: 15px; flex: none; margin-top: 3px; stroke: var(--amber); fill: none; stroke-width: 1.6; }
.footer__bar {
  border-top: 1px solid rgba(255,255,255,.1); padding: 20px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 18px; font-size: 12.5px;
}
.footer__social { display: flex; gap: 8px; }
.footer__social a {
  width: 34px; height: 34px; display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,.16); border-radius: var(--r);
}
.footer__social a:hover { border-color: var(--amber); }
.footer__social svg { width: 15px; height: 15px; fill: currentColor; }

/* ============================================================
   14. Responsive
   ============================================================ */
@media (max-width: 1180px) {
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .makes { grid-template-columns: repeat(4, 1fr); }
  ul.products { grid-template-columns: repeat(3, 1fr); }
  .hero__in { grid-template-columns: 1fr; gap: 34px; }
  .hero h1 { max-width: none; }
}
@media (max-width: 1000px) {
  .masthead__in { grid-template-columns: auto auto; gap: 16px; }
  .searchbar { grid-column: 1 / -1; order: 3; max-width: none; }
  .shop { grid-template-columns: 1fr; }
  .filters { position: static; }
  .filters__box { display: none; }
  .filters[open] .filters__box, .filters.is-open .filters__box { display: block; }
  .product-main { grid-template-columns: 1fr; gap: 30px; }
  .gallery { position: static; }
  .split { grid-template-columns: 1fr; gap: 30px; }
  .assure__in { grid-template-columns: repeat(2, 1fr); }
  .footer__cols { grid-template-columns: 1fr 1fr; gap: 30px; }
  .prefoot__in { grid-template-columns: 1fr; }
  .finder__row { grid-template-columns: 1fr 1fr; }
  .finder .btn { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .utility__notes { display: none; }
  .navtoggle {
    display: inline-flex; align-items: center; gap: 8px; background: transparent;
    border: 1px solid rgba(255,255,255,.2); color: #fff; padding: 10px 14px;
    border-radius: var(--r); cursor: pointer; margin: 10px 0;
    font-family: var(--font-head); font-size: 12px; font-weight: 600;
    letter-spacing: .08em; text-transform: uppercase;
  }
  .mainnav__list { display: none; flex-direction: column; padding-bottom: 10px; }
  .mainnav.is-open .mainnav__list { display: flex; }
  .mainnav__list > li > a { padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
  .mainnav__list > li:first-child > a { padding-left: 0; }
  .submenu {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: 0; background: transparent; padding: 4px 0 10px 14px; columns: 1; min-width: 0;
  }
  .submenu li a { color: var(--steel-300); padding: 7px 0; }
  .submenu li a:hover { background: transparent; color: var(--amber); }
  .submenu .cnt { display: none; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .makes { grid-template-columns: repeat(3, 1fr); }
  ul.products { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .panelgrid { grid-template-columns: 1fr; }
  .hero__stats { gap: 26px; flex-wrap: wrap; }
  .section { padding: 48px 0; }
  .toolbar { flex-direction: column; align-items: stretch; gap: 10px; }
  .footer__bar { flex-direction: column; align-items: flex-start; }
  .card__foot { flex-direction: column; align-items: stretch; gap: 10px; }
  .card__cta .btn { width: 100%; }
}
@media (max-width: 460px) {
  .tiles, .makes, ul.products { grid-template-columns: 1fr 1fr; }
  .assure__in { grid-template-columns: 1fr; }
  .finder__row, .hero .finder__row { grid-template-columns: 1fr; }
  .footer__cols { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ============================================================
   15. WooCommerce pages, notices and cart states
   ============================================================ */
.wc-page { width: 100%; }
.wc-page a { color: var(--ink); text-decoration: none; }
.wc-page a:hover { color: var(--amber-dk); }
.wc-page .wc-block-components-product-name { font-weight: 600; font-size: 14px; line-height: 1.4; }
.wc-page .wc-block-components-button:not(.is-link),
.wc-page .wc-block-cart__submit-button,
.wc-page .wc-block-components-checkout-place-order-button {
  background: var(--amber); color: var(--ink); border: 0; border-radius: var(--r);
  font-family: var(--font-head); font-weight: 700; font-size: 13px;
  letter-spacing: .06em; text-transform: uppercase; text-decoration: none; min-height: 50px;
}
.wc-page .wc-block-components-button:not(.is-link):hover,
.wc-page .wc-block-cart__submit-button:hover,
.wc-page .wc-block-components-checkout-place-order-button:hover { background: var(--amber-dk); color: #fff; }
.wc-page .wc-block-components-button:not(.is-link) .wc-block-components-button__text { color: inherit; }

.apa-notices .woocommerce-notices-wrapper:not(:empty) { padding-top: 24px; }
.shop__main .woocommerce-notices-wrapper:not(:empty) { margin-bottom: 18px; }
.wc-block-components-notice-banner {
  display: flex; align-items: center; gap: 12px; margin: 0 0 12px; padding: 14px 18px;
  background: var(--ground); border: 1px solid var(--line); border-left: 3px solid var(--ink);
  border-radius: var(--r); font-size: 14px; color: var(--ink);
}
.wc-block-components-notice-banner.is-success { background: var(--ok-soft); border-left-color: var(--ok); }
.wc-block-components-notice-banner.is-error { background: #FBEDEA; border-left-color: var(--warn); }
.wc-block-components-notice-banner.is-info { background: var(--amber-soft); border-left-color: var(--amber); }
.wc-block-components-notice-banner > svg { width: 22px; height: 22px; flex: none; fill: currentColor; }
.wc-block-components-notice-banner__content { flex: 1; }
.wc-block-components-notice-banner__content .wc-forward {
  float: right; margin-left: 16px; padding: 0; background: none; color: var(--ink);
  font-family: var(--font-head); font-weight: 700; font-size: 12px; letter-spacing: .06em;
  text-transform: uppercase; border-bottom: 2px solid var(--amber);
}

/* Card add-to-cart: "Add" becomes "Added"; the header count confirms it. */
.card .added_to_cart { display: none; }
.card .add_to_cart_button.loading { opacity: .6; pointer-events: none; }
.card .add_to_cart_button.added { background: var(--ok); }
.card .add_to_cart_button.added::after { content: "ed"; }

/* ============================================================
   16. Homepage showcase sections
   ============================================================ */
/* Departments */
.depts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.dept { display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.dept:hover { border-color: var(--ink-600); box-shadow: var(--shadow-2); }
.dept__media { display: grid; grid-template-columns: 1.35fr 1fr; grid-template-rows: 1fr 1fr; gap: 2px; height: 230px; background: var(--line); }
.dept__media span { display: grid; place-items: center; background: var(--ground); padding: 14px; overflow: hidden; }
.dept__media span:first-child { grid-row: 1 / span 2; padding: 20px; }
.dept__media span:only-child { grid-column: 1 / -1; }
.dept__media img { max-width: 100%; max-height: 100%; width: auto; object-fit: contain; mix-blend-mode: multiply; }
.dept__body { display: flex; flex-direction: column; flex: 1; padding: 22px 22px 24px; }
.dept__body h3 { font-size: 21px; margin-bottom: 6px; }
.dept__body h3 a:hover { color: var(--amber-dk); }
.dept__body p { font-size: 14px; color: var(--steel); margin-bottom: 16px; }
.dept__links { list-style: none; margin: 0 0 20px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; font-size: 13.5px; }
.dept__links a { display: flex; justify-content: space-between; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line-soft); }
.dept__links a:hover { color: var(--amber-dk); }
.dept__links .cnt { font-family: var(--font-mono); font-size: 11.5px; color: var(--steel-300); }
.dept .btn { margin-top: auto; align-self: flex-start; }

/* Tabs */
.tabs { display: flex; flex-wrap: wrap; gap: 2px; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.tabs button {
  margin-bottom: -1px; padding: 12px 18px; background: none; border: 0; border-bottom: 2px solid transparent;
  font-family: var(--font-head); font-size: 12.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
  color: var(--steel); cursor: pointer;
}
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--amber); }
.tabpanel__foot { margin-top: 26px; text-align: center; }

/* Sale band */
.saleband { border-top: 3px solid var(--amber); }

/* Popular models */
.models { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.model {
  display: grid; grid-template-columns: 92px 1fr; gap: 14px; align-items: center; padding: 12px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); transition: border-color .15s, box-shadow .15s;
}
.model:hover { border-color: var(--ink); box-shadow: var(--shadow-2); }
.model__img { display: grid; place-items: center; width: 92px; height: 92px; padding: 8px; background: var(--ground); }
.model__img img { max-height: 100%; width: auto; object-fit: contain; mix-blend-mode: multiply; }
.model small { display: block; font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--amber-dk); }
.model b { display: block; margin: 2px 0; font-family: var(--font-head); font-size: 16px; letter-spacing: -.01em; }
.model span span { font-family: var(--font-mono); font-size: 12px; color: var(--steel-300); }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.step__media { position: relative; display: grid; place-items: center; height: 190px; padding: 22px; background: var(--ground); border-bottom: 1px solid var(--line-soft); }
.step__media img { max-height: 100%; width: auto; object-fit: contain; mix-blend-mode: multiply; }
.step__num {
  position: absolute; top: 14px; left: 14px; display: grid; place-items: center; width: 36px; height: 36px;
  background: var(--ink); color: var(--amber); font-family: var(--font-head); font-size: 16px; font-weight: 700;
}
.step__body { padding: 18px 20px 22px; }
.step__body h3 { font-size: 17px; margin-bottom: 6px; }
.step__body p { margin: 0; font-size: 14px; color: var(--steel); }

/* Editorial */
.editorial { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.collage { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.collage span { display: grid; place-items: center; aspect-ratio: 1 / 1; padding: 22px; background: var(--ground); border: 1px solid var(--line); border-radius: var(--r); }
.collage span:nth-child(2), .collage span:nth-child(4) { margin-top: 28px; margin-bottom: -28px; }
.collage img { max-height: 100%; width: auto; object-fit: contain; mix-blend-mode: multiply; }
.editorial .prose { font-size: 15px; color: var(--ink-700); }

/* FAQ */
.faq { max-width: 900px; border-top: 1px solid var(--line); }
.faq .acc > summary { font-size: 16px; }

@media (max-width: 1180px) {
  .depts { grid-template-columns: repeat(2, 1fr); }
  .models { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1000px) {
  .editorial { grid-template-columns: 1fr; gap: 40px; }
  .collage span:nth-child(2), .collage span:nth-child(4) { margin: 0; }
  .steps { grid-template-columns: 1fr; }
  .step { display: grid; grid-template-columns: 180px 1fr; }
  .step__media { height: auto; min-height: 150px; border-bottom: 0; border-right: 1px solid var(--line-soft); }
  .models { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .depts { grid-template-columns: 1fr; }
  .dept__media { height: 200px; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .tabs button { white-space: nowrap; padding: 12px 14px; }
  .step { grid-template-columns: 1fr; }
  .step__media { height: 170px; border-right: 0; border-bottom: 1px solid var(--line-soft); }
}
@media (max-width: 460px) {
  .models { grid-template-columns: 1fr; }
  .dept__links { grid-template-columns: 1fr; }
}

/* ============================================================
   17. Make / model / part landing pages and link sets
   ============================================================ */
.landing-details .landing-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: start; margin-bottom: 36px; }
.landing-details .landing-grid h2 { font-size: clamp(21px, 2.2vw, 26px); }
.landing-details .spec th { width: auto; font-family: var(--font-mono); font-size: 13px; color: var(--ink); }
.landing-details .spec td { font-family: var(--font-body); color: var(--steel); text-align: right; }
.linkset { margin-top: 28px; }
.linkset h3 { font-size: 16px; margin-bottom: 12px; }
.linkset ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.linkset a {
  display: flex; justify-content: space-between; gap: 10px; padding: 10px 14px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); font-size: 13.5px;
  transition: border-color .15s;
}
.linkset a:hover { border-color: var(--ink); color: var(--amber-dk); }
.linkset .cnt { font-family: var(--font-mono); font-size: 12px; color: var(--steel-300); }
@media (max-width: 1000px) { .landing-details .landing-grid { grid-template-columns: 1fr; gap: 28px; } }
