/*
Theme Name: All Car Parts Australia
Theme URI: https://allcarpartsaustralia.com/
Author: All Car Parts Australia
Description: Parts-catalogue storefront: vehicle finder, parts-book diagram, department navigation and WooCommerce templates.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: acpa
WC requires at least: 8.0
*/

/* ============================================================
   Tokens
   ============================================================ */
:root {
	--paper: #F3F5F7;
	--panel: #FFFFFF;
	--ink: #0F1B2D;
	--ink-soft: #2C3A4F;
	--muted: #5B6777;
	--faint: #9AA5B4;
	--line: #1F48C4;
	--line-deep: #173A9E;
	--tint: #E8EDFA;
	--rule: #D5DBE3;
	--callout: #D62839;
	--grid: rgba(31, 72, 196, 0.07);
	--f-display: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
	--f-body: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--f-mono: "Spline Sans Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
	--wrap: 1320px;
	--gut: clamp(16px, 3vw, 32px);
	--r: 4px;
	--caret: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%230F1B2D' stroke-width='1.6'/%3E%3C/svg%3E");
	/* WooCommerce's own colour variables, so its buttons and notices follow the theme */
	--wc-primary: #1F48C4;
	--wc-primary-text: #FFFFFF;
	--wc-secondary: #E8EDFA;
	--wc-secondary-text: #0F1B2D;
	--wc-highlight: #0F1B2D;
	--wc-highligh-text: #FFFFFF;
	--wc-form-border-color: #D5DBE3;
	--wc-form-border-radius: 4px;
}

/* ============================================================
   Base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.acpa { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.55 var(--f-body); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
a { color: var(--line); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--line-deep); }
:focus-visible { outline: 2px solid var(--line); outline-offset: 2px; }
h1, h2, h3 { margin: 0; }
button, input, select, textarea { font: inherit; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--panel); color: var(--ink); padding: 8px 12px; border: 1px solid var(--ink); }
.skip:focus { left: 12px; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); }
.n { margin-left: 0.5em; font: 400 0.8em/1 var(--f-mono); color: var(--muted); }

.eyebrow { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 14px; font: 500 13px/1.3 var(--f-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--callout); }
.eyebrow span { color: var(--muted); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5em; min-height: 44px; padding: 0 18px; border: 1px solid var(--ink); border-radius: var(--r); background: var(--panel); color: var(--ink); font: 600 15px/1.1 var(--f-body); text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--line); color: var(--line); }
.btn--solid { background: var(--line); border-color: var(--line); color: #fff; }
.btn--solid:hover { background: var(--line-deep); border-color: var(--line-deep); color: #fff; }

.grade { display: inline-block; align-self: flex-start; padding: 4px 6px; border: 1px solid var(--rule); border-radius: 2px; font: 500 11px/1 var(--f-mono); letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); }
.grade--oem { padding: 5px 8px; border: 1px solid var(--ink); color: var(--ink); box-shadow: inset 0 0 0 2px var(--panel), inset 0 0 0 3px var(--ink); }

/* ============================================================
   Header
   ============================================================ */
.head { position: relative; z-index: 50; background: var(--panel); border-bottom: 1px solid var(--rule); }
.head__bar { display: flex; align-items: center; gap: 24px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand__mark { width: 34px; height: 34px; color: var(--callout); }
.brand__name { font: 800 26px/1 var(--f-display); letter-spacing: 0.01em; text-transform: uppercase; }
.brand__name span { color: var(--line); }

.search { display: flex; flex: 1; max-width: 620px; }
.search input { flex: 1; min-width: 0; height: 46px; padding: 0 14px; border: 1px solid var(--rule); border-right: 0; border-radius: var(--r) 0 0 var(--r); background: var(--paper); color: var(--ink); font-size: 15px; }
.search input:focus { outline: 2px solid var(--line); outline-offset: -1px; background: var(--panel); }
.search button { height: 46px; padding: 0 20px; border: 1px solid var(--line); border-radius: 0 var(--r) var(--r) 0; background: var(--line); color: #fff; font-weight: 600; font-size: 15px; cursor: pointer; }
.search button:hover { background: var(--line-deep); border-color: var(--line-deep); }

.head__actions { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.head__link { color: var(--ink); font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap; }
.head__link:hover { color: var(--line); }
.cartcount { display: inline-grid; place-items: center; min-width: 22px; height: 22px; margin-left: 4px; padding: 0 6px; border-radius: 3px; background: var(--ink); color: #fff; font: 500 12px/1 var(--f-mono); }
.menu-toggle { display: none; align-items: center; min-height: 40px; padding: 0 14px; border: 1px solid var(--ink); border-radius: var(--r); background: var(--panel); color: var(--ink); font-weight: 600; font-size: 14px; cursor: pointer; }

.mainnav { position: relative; border-top: 1px solid var(--rule); }
.mainnav__list { display: flex; margin: 0 auto; list-style: none; }
.mainnav__link { display: block; padding: 13px 16px; border-bottom: 2px solid transparent; color: var(--ink); font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap; }
.mainnav__item:first-child .mainnav__link { padding-left: 0; }
.mainnav__item:hover > .mainnav__link,
.mainnav__item:focus-within > .mainnav__link { color: var(--line); border-bottom-color: var(--line); }

.mega { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--panel); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); box-shadow: 0 22px 32px -22px rgba(15, 27, 45, 0.3); }
.mainnav__item:hover > .mega,
.mainnav__item:focus-within > .mega { display: block; }
.mega__inner { padding-top: 22px; padding-bottom: 26px; max-height: 70vh; overflow: auto; }
.mega__title { display: flex; align-items: baseline; margin: 0 0 16px; font: 500 13px/1.2 var(--f-mono); letter-spacing: 0.06em; text-transform: uppercase; }
.mega__cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px 32px; }
.mega__group { margin: 0 0 6px; padding-bottom: 6px; border-bottom: 1px solid var(--rule); font: 600 15px/1.3 var(--f-body); }
.mega__group a { color: var(--ink); text-decoration: none; }
.mega__group a:hover { color: var(--line); }
.mega ul { margin: 0; padding: 0; list-style: none; }
.mega li a { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 0; color: var(--ink); font-size: 14.5px; text-decoration: none; }
.mega li a:hover { color: var(--line); }
.mega__makes { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0 32px; }

.drawer { background: var(--panel); border-top: 1px solid var(--rule); }
.drawer__inner { padding: 4px var(--gut) 20px; }
.drawer__group { border-bottom: 1px solid var(--rule); }
.drawer summary { display: flex; justify-content: space-between; padding: 14px 0; font-weight: 600; cursor: pointer; list-style: none; }
.drawer summary::-webkit-details-marker { display: none; }
.drawer summary::after { content: "+"; font-family: var(--f-mono); color: var(--muted); }
.drawer details[open] > summary::after { content: "\2212"; }
.drawer ul { margin: 0 0 12px; padding: 0; list-style: none; }
.drawer li a { display: flex; justify-content: space-between; padding: 8px 0; color: var(--ink); text-decoration: none; }
.drawer__store { margin-top: 12px !important; }

/* ============================================================
   Hero: finder + parts-book sheet
   ============================================================ */
.hero { padding-top: clamp(28px, 4vw, 56px); padding-bottom: clamp(40px, 5vw, 72px); border-bottom: 1px solid var(--rule); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 8fr); gap: clamp(28px, 4vw, 56px); align-items: start; }
.hero__title { margin-bottom: 20px; font: 800 clamp(46px, 5.6vw, 88px)/0.9 var(--f-display); letter-spacing: 0.005em; text-transform: uppercase; text-wrap: balance; }
.hero__lead { max-width: 46ch; margin: 0 0 26px; color: var(--ink-soft); font-size: 18px; }
.hero__aside { margin: 14px 0 0; color: var(--muted); font-size: 14px; }

.finder fieldset { margin: 0; padding: 18px; border: 1px solid var(--rule); border-radius: var(--r); background: var(--panel); }
.finder legend { margin-left: -6px; padding: 0 6px; font: 500 12px/1 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.finder__fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.field { display: grid; gap: 6px; }
.field > span { font-weight: 600; font-size: 14px; }
.field select { width: 100%; height: 46px; padding: 0 36px 0 12px; border: 1px solid var(--rule); border-radius: var(--r); background: var(--paper) var(--caret) no-repeat right 12px center / 12px; color: var(--ink); font-size: 15px; -webkit-appearance: none; appearance: none; }
.field select:disabled { color: var(--faint); cursor: not-allowed; }
.finder .btn { width: 100%; min-height: 50px; font-size: 16px; }

.sheet { position: relative; background: var(--panel); border: 1px solid var(--rule); border-radius: var(--r); }
.sheet__block { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 16px; padding: 12px 16px; font: 500 12px/1.3 var(--f-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.sheet__drawing, .sheet__showing { margin: 0; }
.sheet__drawing { color: var(--ink); }
.sheet__drawing span { margin-left: 10px; color: var(--muted); }
.sheet__showing strong { color: var(--line); font-weight: 500; }
.sheet__note { margin: 0; padding: 10px 16px 14px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 13px; }

.dia { display: block; width: 100%; height: auto; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 20px 20px; }
.dia__body { stroke: var(--line); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.dia__body .thin { stroke-width: 1; }
.dia__body .thick { stroke-width: 3; }
.dia__body .hidden-line { stroke-dasharray: 5 4; stroke-width: 1.1; opacity: 0.75; }
.dia__body .ground { stroke: var(--rule); stroke-width: 1.2; }
.dia__labels text { font: 500 12px var(--f-mono); letter-spacing: 0.12em; fill: var(--muted); }

.callout { cursor: pointer; outline: none; }
.callout__leader { stroke: var(--ink); stroke-width: 1; opacity: 0.55; }
.callout__dot { fill: var(--callout); }
.callout__balloon { fill: var(--panel); stroke: var(--callout); stroke-width: 2; transition: fill 0.15s; }
.callout__num { font: 600 13px var(--f-mono); fill: var(--callout); text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.callout:hover .callout__balloon, .callout.is-hot .callout__balloon, .callout:focus-visible .callout__balloon { fill: var(--callout); }
.callout:hover .callout__num, .callout.is-hot .callout__num, .callout:focus-visible .callout__num { fill: #fff; }
.callout:hover .callout__leader, .callout.is-hot .callout__leader, .callout:focus-visible .callout__leader { stroke: var(--callout); stroke-width: 1.5; opacity: 1; }
.callout:focus-visible .callout__balloon { stroke: var(--ink); stroke-width: 3; }
.callout.is-empty { cursor: default; }
.callout.is-empty .callout__balloon { fill: var(--paper); stroke: var(--rule); }
.callout.is-empty .callout__num { fill: var(--faint); }
.callout.is-empty .callout__dot { fill: var(--rule); }
.callout.is-empty .callout__leader { opacity: 0.2; stroke: var(--ink); }

@media (prefers-reduced-motion: no-preference) {
	.callout__leader { stroke-dasharray: 320; animation: acpa-draw 0.6s ease-out both; animation-delay: calc(var(--i, 0) * 45ms); }
	.callout__dot, .callout__balloon, .callout__num { animation: acpa-fade 0.3s ease-out both; animation-delay: calc(var(--i, 0) * 45ms + 0.35s); }
}
@keyframes acpa-draw { from { stroke-dashoffset: 320; } to { stroke-dashoffset: 0; } }
@keyframes acpa-fade { from { opacity: 0; } to { opacity: 1; } }

.legend { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; margin: 0; padding: 8px 12px 6px; list-style: none; }
.legend__row { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 7px 6px; border-bottom: 1px solid var(--rule); color: var(--ink); font-size: 14.5px; line-height: 1.25; text-decoration: none; }
.legend li:nth-last-child(-n+3) .legend__row { border-bottom: 0; }
.legend__num { display: grid; place-items: center; width: 24px; height: 24px; border: 1.5px solid var(--callout); border-radius: 50%; color: var(--callout); font: 600 11.5px/1 var(--f-mono); }
.legend__n { color: var(--muted); font: 500 13px/1 var(--f-mono); }
.legend__row:hover, .legend__row.is-hot, .legend__row:focus-visible { background: var(--tint); color: var(--line); }
.legend__row:hover .legend__num, .legend__row.is-hot .legend__num, .legend__row:focus-visible .legend__num { background: var(--callout); color: #fff; }
.legend__row.is-empty { color: var(--faint); cursor: default; }
.legend__row.is-empty:hover { background: none; color: var(--faint); }
.legend__row.is-empty .legend__num, .legend__row.is-empty:hover .legend__num { background: none; border-color: var(--rule); color: var(--faint); }

/* ============================================================
   Homepage bands
   ============================================================ */
.band { padding-top: clamp(44px, 6vw, 80px); padding-bottom: clamp(44px, 6vw, 80px); border-bottom: 1px solid var(--rule); }
.band--panel { background: var(--panel); }
.band__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.band__title { font: 800 clamp(34px, 3.6vw, 52px)/0.95 var(--f-display); text-transform: uppercase; }
.band__more { font-weight: 600; white-space: nowrap; }

.index { columns: 4 220px; column-gap: 40px; margin: 0; padding: 0; list-style: none; }
.index li { break-inside: avoid; }
.index a { display: flex; align-items: baseline; gap: 8px; padding: 7px 0; color: var(--ink); text-decoration: none; }
.index__name { font-weight: 600; }
.index__dots { flex: 1; border-bottom: 2px dotted #AEB8C5; transform: translateY(-4px); }
.index a .n { margin-left: 0; font-size: 13px; }
.index a:hover .index__name { color: var(--line); }
.index a:hover .index__dots { border-color: var(--line); }

.depts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 16px; }
.dept { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 18px; padding: 16px; background: var(--panel); border: 1px solid var(--rule); border-radius: var(--r); }
.dept__media { display: block; aspect-ratio: 1; background: #fff; border: 1px solid var(--rule); border-radius: 2px; }
.dept__media img { display: block; width: 100%; height: 100%; padding: 6px; object-fit: contain; }
.dept__name { display: flex; align-items: baseline; flex-wrap: wrap; margin: 2px 0 10px; font: 800 26px/1 var(--f-display); text-transform: uppercase; }
.dept__name a { color: var(--ink); text-decoration: none; }
.dept__name a:hover { color: var(--line); }
.dept__name .n { font-size: 13px; }
.dept__list { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 14px; margin: 0; padding: 0; list-style: none; }
.dept__list a { color: var(--ink); font-size: 14.5px; text-decoration: none; }
.dept__list a:hover { color: var(--line); text-decoration: underline; }

.order { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: clamp(28px, 4vw, 64px); }
.order__sub { margin-bottom: 16px; font: 600 20px/1.3 var(--f-body); }
.grades { display: grid; gap: 14px; margin: 0; }
.grades__row { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 16px; align-items: start; padding-bottom: 14px; border-bottom: 1px solid var(--rule); }
.grades dt { padding-top: 2px; }
.grades dd { margin: 0; }
.grades dd a { display: block; margin-top: 4px; font-weight: 600; }

.anno { display: flex; flex-wrap: wrap; align-items: baseline; gap: 34px 10px; margin: 0 0 24px; padding: 6px 0 28px; font: 500 clamp(17px, 1.7vw, 22px)/1.5 var(--f-mono); }
.anno__seg { position: relative; padding-bottom: 2px; border-bottom: 2px solid var(--line); }
.anno__seg::after { content: attr(data-k); position: absolute; left: 0; top: calc(100% + 6px); color: var(--callout); font: 500 11px/1 var(--f-mono); letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.anno__plain { color: var(--muted); }
.notes { display: grid; gap: 12px; margin: 0; }
.notes div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 16px; }
.notes dt { padding-top: 3px; color: var(--muted); font: 500 12px/1.3 var(--f-mono); letter-spacing: 0.06em; text-transform: uppercase; }
.notes dd { margin: 0; }
.order__example { margin: 18px 0 0; color: var(--muted); font-size: 14px; }

/* ============================================================
   Product grid + cards (overrides WooCommerce floats)
   ============================================================ */
body.acpa ul.products { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 0 0 32px !important; padding: 0; list-style: none; }
body.acpa ul.products::before, body.acpa ul.products::after { display: none !important; }
body.acpa ul.products li.product { float: none !important; width: auto !important; margin: 0 !important; padding: 0 !important; }
.card { display: flex; flex-direction: column; overflow: hidden; background: var(--panel); border: 1px solid var(--rule); border-radius: var(--r); transition: border-color 0.15s; }
.card:hover { border-color: #AFC0E8; }
.card__media { position: relative; display: block; aspect-ratio: 1; background: #fff; border-bottom: 1px solid var(--rule); }
body.acpa .card__media img { display: block; width: 100%; height: 100%; margin: 0 !important; padding: 10px; object-fit: contain; }
.card__flag { position: absolute; top: 10px; left: 10px; padding: 3px 7px; border-radius: 2px; background: var(--callout); color: #fff; font: 600 11px/1.2 var(--f-mono); letter-spacing: 0.06em; text-transform: uppercase; }
.card__body { display: flex; flex: 1; flex-direction: column; gap: 6px; padding: 12px 14px 14px; }
.card__title { margin: 0; font: 600 15px/1.35 var(--f-body); }
.card__title a { color: var(--ink); text-decoration: none; }
.card__title a:hover { color: var(--line); text-decoration: underline; }
.card__sku { margin: 0; color: var(--muted); font: 400 12px/1.3 var(--f-mono); }
.card__sku span { color: var(--ink); }
.card__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 8px; }
body.acpa .card .price { margin: 0 !important; color: var(--ink) !important; font: 700 18px/1.2 var(--f-body) !important; }
body.acpa .price del { color: var(--muted); font-size: 0.78em; font-weight: 400; opacity: 1; }
body.acpa .price ins { color: var(--callout); text-decoration: none; }

body.acpa .button, body.acpa a.button, body.acpa button.button, body.acpa input.button,
body.acpa .woocommerce a.button, body.acpa .woocommerce button.button, body.acpa .woocommerce a.button.alt, body.acpa .woocommerce button.button.alt {
	padding: 10px 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--line); color: #fff; font: 600 14px/1.1 var(--f-body); text-decoration: none;
}
body.acpa .button:hover, body.acpa a.button:hover, body.acpa button.button:hover,
body.acpa .woocommerce a.button:hover, body.acpa .woocommerce button.button:hover, body.acpa .woocommerce a.button.alt:hover, body.acpa .woocommerce button.button.alt:hover {
	background: var(--line-deep); border-color: var(--line-deep); color: #fff;
}
body.acpa .card .button { padding: 8px 12px; background: var(--panel); color: var(--line); font-size: 13.5px; }
body.acpa .card .button:hover { background: var(--line); color: #fff; }
body.acpa .card .added_to_cart { font-size: 13px; font-weight: 600; }

/* ============================================================
   Shop archive
   ============================================================ */
.crumbs { margin-bottom: 10px; color: var(--muted); font-size: 13.5px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--line); }
.crumbs__sep { margin: 0 8px; color: #AEB8C5; }

.shop { padding-top: 28px; padding-bottom: 64px; }
.shop__head { margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--rule); }
.shop__title { font: 800 clamp(38px, 4.4vw, 64px)/0.92 var(--f-display); text-transform: uppercase; }
.shop__desc { max-width: 70ch; margin-top: 12px; color: var(--ink-soft); }
.shop__body { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 32px; align-items: start; }
.shop__tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.shop__tools .woocommerce-notices-wrapper { flex-basis: 100%; }
.shop__tools .woocommerce-notices-wrapper:empty { display: none; }
body.acpa .woocommerce-result-count { float: none !important; margin: 0 !important; color: var(--muted); font: 400 13px/1.3 var(--f-mono); }
body.acpa .woocommerce-ordering { float: none !important; margin: 0 !important; }
body.acpa .woocommerce-ordering select { height: 42px; padding: 0 34px 0 12px; border: 1px solid var(--rule); border-radius: var(--r); background: var(--panel) var(--caret) no-repeat right 12px center / 12px; color: var(--ink); font-size: 14px; -webkit-appearance: none; appearance: none; }
body.acpa .shop ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.filters__toggle { display: none; }
.filter { margin-bottom: 12px; padding: 14px 14px 10px; background: var(--panel); border: 1px solid var(--rule); border-radius: var(--r); }
.filter__title { margin: 0 0 8px; color: var(--muted); font: 500 12px/1.2 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; }
.filter ul { margin: 0; padding: 0; list-style: none; }
.filter li { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 4px 0; font-size: 14.5px; }
.filter li a { color: var(--ink); text-decoration: none; }
.filter li a:hover { color: var(--line); }
.filter .count { color: var(--muted); font: 400 12px/1 var(--f-mono); }
.filter li.chosen a { color: var(--line); font-weight: 600; }
.filter__cats li a { display: flex; justify-content: space-between; width: 100%; }
.filter--scroll .filter ul { max-height: 280px; overflow: auto; padding-right: 6px; }
body.acpa .widget_layered_nav_filters ul { display: flex; flex-wrap: wrap; gap: 6px; }
body.acpa .widget_layered_nav_filters li { padding: 0; }
body.acpa .widget_layered_nav_filters li a { display: inline-block; padding: 4px 8px; border: 1px solid var(--line); border-radius: 2px; color: var(--line); font-size: 13px; }

body.acpa nav.woocommerce-pagination ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; border: 0 !important; }
body.acpa nav.woocommerce-pagination ul li { border: 0 !important; }
body.acpa nav.woocommerce-pagination ul li a, body.acpa nav.woocommerce-pagination ul li span { display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 8px; border: 1px solid var(--rule); border-radius: var(--r); background: var(--panel); color: var(--ink); font: 500 14px/1 var(--f-mono); }
body.acpa nav.woocommerce-pagination ul li span.current { background: var(--ink); border-color: var(--ink); color: #fff; }
body.acpa nav.woocommerce-pagination ul li a:hover { background: var(--tint); color: var(--line); }

/* ============================================================
   Single product
   ============================================================ */
.product-page { padding-top: 24px; padding-bottom: 64px; }
body.acpa div.product { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 48px; margin-top: 16px; }
body.acpa div.product div.images, body.acpa div.product div.summary { float: none !important; width: auto !important; margin: 0 !important; }
body.acpa div.product .woocommerce-tabs, body.acpa div.product .related, body.acpa div.product .upsells { grid-column: 1 / -1; }
/* WooCommerce hides the gallery until its slider script runs; a stalled script would leave the photo invisible. */
body.acpa div.product .woocommerce-product-gallery { opacity: 1 !important; }
body.acpa div.product .woocommerce-product-gallery { padding: 16px; background: #fff; border: 1px solid var(--rule); border-radius: var(--r); }
body.acpa div.product .woocommerce-product-gallery .flex-control-thumbs { display: flex; gap: 8px; margin-top: 12px !important; }
body.acpa div.product .woocommerce-product-gallery .flex-control-thumbs li { width: 72px !important; border: 1px solid var(--rule); }
body.acpa span.onsale { top: 12px !important; left: 12px !important; min-width: 0 !important; min-height: 0 !important; padding: 4px 8px !important; border-radius: 2px !important; background: var(--callout) !important; font: 600 12px/1.2 var(--f-mono) !important; letter-spacing: 0.06em; text-transform: uppercase; }
body.acpa .product_title { margin: 12px 0 8px; font: 800 clamp(30px, 3vw, 44px)/1.02 var(--f-display); letter-spacing: 0.005em; text-wrap: balance; }
.partno { margin: 0 0 14px; color: var(--muted); font: 400 13px/1.3 var(--f-mono); }
.partno span { color: var(--ink); }
body.acpa div.product .summary p.price { margin: 0 0 18px; color: var(--ink) !important; font: 700 28px/1.2 var(--f-body); }
.fitment { width: 100%; margin: 0 0 8px; border-collapse: collapse; background: var(--panel); border: 1px solid var(--rule); font-size: 15px; }
.fitment caption { padding-bottom: 6px; color: var(--muted); font: 500 12px/1.2 var(--f-mono); letter-spacing: 0.08em; text-align: left; text-transform: uppercase; }
.fitment th { width: 38%; padding: 9px 12px; border-bottom: 1px solid var(--rule); background: var(--paper); font-weight: 600; text-align: left; }
.fitment td { padding: 9px 12px; border-bottom: 1px solid var(--rule); }
.fitment__note { margin: 0 0 20px; color: var(--muted); font-size: 13.5px; }
body.acpa div.product form.cart { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
body.acpa div.product form.cart .quantity input.qty { width: 72px; height: 48px; border: 1px solid var(--rule); border-radius: var(--r); font-size: 16px; }
body.acpa div.product form.cart .single_add_to_cart_button { min-height: 48px; padding: 0 28px; font-size: 16px; }
body.acpa div.product .stock { font: 500 13px/1.3 var(--f-mono); }
body.acpa div.product .stock.in-stock { color: #1C7A4A; }

body.acpa .woocommerce-tabs ul.tabs { margin: 24px 0 16px !important; padding: 0 !important; border-bottom: 1px solid var(--rule); }
body.acpa .woocommerce-tabs ul.tabs::before, body.acpa .woocommerce-tabs ul.tabs li::before, body.acpa .woocommerce-tabs ul.tabs li::after { display: none !important; }
body.acpa .woocommerce-tabs ul.tabs li { margin: 0 18px 0 0 !important; padding: 0 !important; background: none !important; border: 0 !important; border-radius: 0 !important; }
body.acpa .woocommerce-tabs ul.tabs li a { padding: 10px 0 !important; color: var(--muted) !important; font-weight: 600 !important; }
body.acpa .woocommerce-tabs ul.tabs li.active a { color: var(--ink) !important; box-shadow: inset 0 -2px 0 var(--line); }
body.acpa .woocommerce-Tabs-panel > h2 { display: none; }
body.acpa .related > h2, body.acpa .upsells > h2 { margin: 36px 0 16px; font: 800 34px/1 var(--f-display); text-transform: uppercase; }

/* ============================================================
   Pages, cart, checkout, notices
   ============================================================ */
.page { padding-top: 32px; padding-bottom: 64px; }
.page__title { margin-bottom: 24px; font: 800 clamp(38px, 4.4vw, 60px)/0.95 var(--f-display); text-transform: uppercase; }
.prose { max-width: 72ch; }
body.acpa table.shop_table { background: var(--panel); border-color: var(--rule) !important; border-radius: var(--r) !important; }
body.acpa .woocommerce form .form-row input.input-text,
body.acpa .woocommerce form .form-row select,
body.acpa .woocommerce form .form-row textarea { padding: 10px 12px; border: 1px solid var(--rule); border-radius: var(--r); background: #fff; color: var(--ink); font-size: 15px; }
body.acpa .woocommerce-message, body.acpa .woocommerce-info { border-top-color: var(--line); background: var(--panel); }
body.acpa .woocommerce-message::before, body.acpa .woocommerce-info::before { color: var(--line); }
body.acpa .woocommerce-error { border-top-color: var(--callout); background: var(--panel); }
.postlist { padding-left: 1.2em; }

.notfound .search--page { max-width: 560px; margin: 20px 0 28px; }
.notfound__depts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0; padding: 0; list-style: none; font-weight: 600; }

/* ============================================================
   Footer
   ============================================================ */
.foot { background: var(--ink); color: #C7D0DC; }
.foot a { color: #fff; text-decoration: none; }
.foot a:hover { color: #fff; text-decoration: underline; }
.foot__grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; padding-top: 56px; padding-bottom: 40px; }
.foot__name { margin: 0 0 10px; color: #fff; font: 800 30px/1 var(--f-display); text-transform: uppercase; }
.foot__line { max-width: 32ch; margin: 0; }
.foot h2 { margin: 0 0 12px; color: #8C99AA; font: 500 12px/1.2 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; }
.foot ul { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.foot__base { padding-top: 18px; padding-bottom: 18px; border-top: 1px solid rgba(255, 255, 255, 0.12); font-size: 13px; }
.foot__base p { margin: 0; }

/* Product pages put .woocommerce on <body> itself, so the generic button rules above do not reach them. */
body.acpa.woocommerce button.button.alt, body.acpa.woocommerce a.button.alt, body.acpa.woocommerce-page button.button.alt,
body.acpa div.product form.cart .button, body.acpa .woocommerce-cart .checkout-button, body.acpa #place_order {
	background: var(--line); border-color: var(--line); color: #fff;
}
body.acpa.woocommerce button.button.alt:hover, body.acpa.woocommerce a.button.alt:hover, body.acpa div.product form.cart .button:hover, body.acpa #place_order:hover {
	background: var(--line-deep); border-color: var(--line-deep); color: #fff;
}
body.acpa .filter li { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 0; padding: 4px 0; }
body.acpa .filter li a { flex: 1; padding: 0; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1180px) {
	body.acpa ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	body.acpa .shop ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.legend { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.legend li:nth-last-child(-n+3) .legend__row { border-bottom: 1px solid var(--rule); }
	.legend li:last-child .legend__row { border-bottom: 0; }
}
@media (max-width: 1024px) {
	.hero__grid { grid-template-columns: minmax(0, 1fr); }
	.hero__lead { max-width: 60ch; }
	.mainnav__link { padding-left: 11px; padding-right: 11px; font-size: 14px; }
	.order { grid-template-columns: minmax(0, 1fr); }
	.foot__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
	.mainnav { display: none; }
	.menu-toggle { display: inline-flex; }
	.head__bar { flex-wrap: wrap; gap: 12px 16px; min-height: 0; padding-top: 12px; padding-bottom: 12px; }
	.search { order: 3; flex-basis: 100%; max-width: none; }
	.shop__body { grid-template-columns: minmax(0, 1fr); }
	.filters__toggle { display: inline-flex; margin-bottom: 12px; }
	.filters__panel { display: none; }
	.filters__panel.is-open { display: block; }
	body.acpa ul.products, body.acpa .shop ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	body.acpa div.product { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}
@media (max-width: 560px) {
	.brand__name { font-size: 20px; line-height: 0.92; }
	.brand__name span { display: block; }
	.brand__mark { width: 28px; height: 28px; }
	.head__link:not(.head__cart) { display: none; }
	.finder__fields { grid-template-columns: 1fr; }
	.legend { grid-template-columns: minmax(0, 1fr); }
	.legend li:nth-last-child(-n+3) .legend__row { border-bottom: 1px solid var(--rule); }
	.legend li:last-child .legend__row { border-bottom: 0; }
	.dept { grid-template-columns: 88px minmax(0, 1fr); gap: 14px; }
	.dept__list { grid-template-columns: 1fr; }
	.grades__row, .notes div { grid-template-columns: minmax(0, 1fr); gap: 6px; }
	.foot__grid { grid-template-columns: 1fr; }
	.card__body { padding: 10px; }
	.card__title { font-size: 14px; }
	body.acpa .card .price { font-size: 16px !important; }
	.index { columns: 2 140px; column-gap: 24px; }
	.band__head { flex-wrap: wrap; }
}

/* ============================================================
   Homepage: video reel, best-seller spotlight, product rails
   ============================================================ */
.band--ink { background: var(--ink); color: #C7D0DC; border-bottom: 0; }
.band--ink .band__title { color: #fff; }
.band--ink .eyebrow { color: #9FB4F5; }
.band__note { margin: 6px 0 0; color: var(--muted); font-size: 15px; }
.band__title--sm { font-size: clamp(28px, 2.8vw, 40px); }
.band--rail { padding-top: clamp(32px, 4vw, 52px); padding-bottom: clamp(32px, 4vw, 52px); }

.showreel__grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.showreel__media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--r); background: #000; }
.showreel__video { display: block; width: 100%; height: 100%; object-fit: cover; }
.showreel__toggle { position: absolute; right: 12px; top: 12px; min-height: 36px; padding: 0 12px; border: 1px solid rgba(255, 255, 255, 0.5); border-radius: var(--r); background: rgba(15, 27, 45, 0.78); color: #fff; font: 500 12px/1 var(--f-mono); letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer; }
.showreel__toggle:hover { background: var(--ink); border-color: #fff; }
.showreel__side .band__title { margin-bottom: 4px; }
.reel-list { display: grid; margin: 18px 0 24px; padding: 0; list-style: none; counter-reset: reel; }
.reel-list a { display: grid; grid-template-columns: 22px 48px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.12); color: #fff; font-size: 14.5px; line-height: 1.3; text-decoration: none; }
.reel-list a::before { counter-increment: reel; content: counter(reel); color: #9FB4F5; font: 500 12px/1 var(--f-mono); }
.reel-list img { width: 48px; height: 48px; padding: 2px; border-radius: 2px; background: #fff; object-fit: contain; }
.reel-list a:hover .reel-name { text-decoration: underline; }
body.acpa .reel-price, body.acpa .reel-price .amount { color: #fff; font-weight: 600; white-space: nowrap; }
body.acpa .reel-price del, body.acpa .reel-price del .amount { color: #8C99AA; font-weight: 400; }
body.acpa .reel-price ins, body.acpa .reel-price ins .amount { color: #FF9AA5; text-decoration: none; }

.spots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.spot { display: flex; flex-direction: column; overflow: hidden; background: var(--panel); border: 1px solid var(--rule); border-radius: var(--r); }
.spot:hover { border-color: #AFC0E8; }
.spot__media { position: relative; background: #fff; border-bottom: 1px solid var(--rule); }
.spot__main { display: block; aspect-ratio: 1; }
.spot__img { display: block; width: 100%; height: 100%; padding: 14px; object-fit: contain; }
.spot__rank { position: absolute; top: 12px; left: 12px; padding: 4px 8px; border-radius: 2px; background: var(--ink); color: #fff; font: 500 11px/1.2 var(--f-mono); letter-spacing: 0.06em; text-transform: uppercase; }
.spot__thumbs { display: flex; gap: 6px; padding: 0 12px 12px; }
.spot__thumb { width: 52px; height: 52px; padding: 2px; border: 1px solid var(--rule); border-radius: 2px; background: #fff; cursor: pointer; }
.spot__thumb img { display: block; width: 100%; height: 100%; object-fit: contain; }
.spot__thumb:hover, .spot__thumb.is-on { border-color: var(--line); box-shadow: 0 0 0 1px var(--line); }
.spot__body { display: flex; flex: 1; flex-direction: column; gap: 6px; padding: 14px 16px 16px; }
.spot__title { margin: 0; font: 600 17px/1.3 var(--f-body); }
.spot__title a { color: var(--ink); text-decoration: none; }
.spot__title a:hover { color: var(--line); text-decoration: underline; }
.spot__fit { margin: 0; color: var(--muted); font-size: 14px; }
.spot__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 10px; }
body.acpa .spot .price { margin: 0 !important; color: var(--ink) !important; font: 700 22px/1.2 var(--f-body) !important; }

.rail { overflow-x: auto; padding-bottom: 10px; scroll-snap-type: x mandatory; scrollbar-width: thin; outline-offset: 4px; }
body.acpa ul.products.rail__list { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: calc((100% - 48px) / 4.35); margin: 0 !important; }
body.acpa ul.products.rail__list > li { scroll-snap-align: start; }
.rail__nav { display: flex; align-items: center; gap: 10px; }
.rail__nav .band__more { margin-right: 6px; }
.rail__btn { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--rule); border-radius: var(--r); background: var(--panel); color: var(--ink); cursor: pointer; }
.rail__btn:hover { border-color: var(--line); color: var(--line); }
.rail__btn svg { width: 16px; height: 16px; }

@media (max-width: 1180px) {
	.spots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	body.acpa ul.products.rail__list { grid-auto-columns: calc((100% - 32px) / 3.3); }
	.showreel__grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
	body.acpa ul.products.rail__list { grid-auto-columns: calc((100% - 10px) / 2.2); }
	.rail__btn { display: none; }
}
@media (max-width: 560px) {
	.spots { grid-template-columns: minmax(0, 1fr); }
	body.acpa ul.products.rail__list { grid-auto-columns: 64%; }
	.reel-list a { grid-template-columns: 20px 44px minmax(0, 1fr); }
	.reel-list .reel-price { grid-column: 3; }
	.band--rail .band__head { align-items: flex-start; }
}
