/*
 * HFM.Parts — product archive layout (woocommerce/archive-product.php).
 *
 * Header → category rail → filter sidebar + results → long-form guide, plus
 * the phone filter sheet (modules/drawer). Card styles live in
 * product-card.css; tokens come from the .hfm-shop scope there.
 */

.hfm-archive,
.hfm-filter-sheet {
	--ease: cubic-bezier(0.22, 1, 0.36, 1); /* ease-out-quint */
	--t-fast: 150ms;
	--t: 250ms;
	--hfm-f-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.hfm-archive {
	--gutter: 32px;
	--side: 256px;
	--stick: var(--wp-admin--admin-bar--height, 0px);
	--cols: 5;
	--gap: 16px;
	background: var(--hfm-bg);
}
@media (max-width: 767px) {
	.hfm-archive { --gutter: 16px; }
}
.hfm-archive__wrap { padding-inline: var(--gutter); }
.hfm-archive :focus-visible,
.hfm-filter-sheet :focus-visible { outline: 2px solid var(--hfm-accent); outline-offset: 2px; }
.hfm-archive [hidden],
.hfm-filter-sheet [hidden] { display: none !important; }

/* ── Header ───────────────────────────────────────────────────────── */
.hfm-archive .hfm-shop__breadcrumb { padding-top: 20px; margin: 0; }
.hfm-archive .hfm-shop__breadcrumb .woocommerce-breadcrumb { margin: 0; font-size: 12.5px; }
.hfm-archive__head {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 24px 48px;
	align-items: end;
	padding-block: 12px 24px;
}
.hfm-archive__head--vehicle { grid-template-columns: minmax(0, 1fr) auto; }
.hfm-archive__eyebrow {
	font-family: var(--hfm-f-mono);
	font-size: 10.5px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--hfm-accent);
}
.hfm-archive__title {
	margin: 6px 0 8px;
	font-size: 2.5rem;
	line-height: 1;
	letter-spacing: -0.035em;
	font-weight: 800;
	color: var(--hfm-ink);
	text-wrap: balance;
}
.hfm-archive__intro {
	margin: 0;
	max-width: 62ch;
	color: var(--hfm-ink-2);
	font-size: 15px;
	line-height: 1.55;
	text-wrap: pretty;
}
.hfm-archive__perks {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 18px;
	margin-top: 14px;
	font-size: 12.5px;
	color: var(--hfm-ink-2);
}
.hfm-archive__perks > span { display: inline-flex; align-items: center; gap: 6px; }
.hfm-archive__perks svg { color: var(--hfm-ok); flex: none; }

/* Vehicle landing: the car, how many parts fit, save to garage */
.hfm-archive__vehicle {
	display: grid;
	justify-items: end;
	gap: 10px;
}
.hfm-archive__vehicle img {
	width: min(320px, 40vw);
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: contain;
}
.hfm-archive__vehicle-meta {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 13px;
	color: var(--hfm-ink-2);
}
.hfm-archive__vehicle-saved { display: inline-flex; align-items: center; gap: 6px; color: var(--hfm-ok); font-weight: 700; }
@media (max-width: 767px) {
	.hfm-archive__title { font-size: 2rem; }
	.hfm-archive__perks { display: none; }
	.hfm-archive__head--vehicle { grid-template-columns: minmax(0, 1fr); }
	.hfm-archive__vehicle { justify-items: start; grid-row: 1; }
	.hfm-archive__vehicle img { width: 200px; }
}

/* ── Category rail ───────────────────────────────────────────────── */
.hfm-rail { position: relative; border-block: 1px solid var(--hfm-line); }
.hfm-rail__track {
	--fade-l: 48px;
	--fade-r: 48px;
	display: flex;
	gap: 8px;
	overflow-x: auto;
	padding-block: 14px;
	scroll-snap-type: x proximity;
	scroll-behavior: smooth;
	scrollbar-width: none;
	mask-image: linear-gradient(to right, transparent, #000 var(--fade-l), #000 calc(100% - var(--fade-r)), transparent);
}
.hfm-rail__track::-webkit-scrollbar { display: none; }
.hfm-rail[data-at~="start"] .hfm-rail__track { --fade-l: 0px; }
.hfm-rail[data-at~="end"] .hfm-rail__track { --fade-r: 0px; }
.hfm-rail__item {
	flex: none;
	scroll-snap-align: start;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	padding: 5px 14px;
	border: 1px solid var(--hfm-line);
	border-radius: 999px;
	background: var(--hfm-bg);
	color: var(--hfm-ink);
	font-size: 13.5px;
	font-weight: 700;
	text-decoration: none;
	transition: border-color var(--t-fast) var(--ease), background-color var(--t) var(--ease), color var(--t) var(--ease);
}
.hfm-rail__item:has(img) { padding-left: 5px; }
.hfm-rail__item:hover { border-color: var(--hfm-accent); color: var(--hfm-ink); }
.hfm-rail__item img {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	object-fit: cover;
	background: #fff;
	border: 1px solid var(--hfm-line);
}
.hfm-rail__n { font-family: var(--hfm-f-mono); font-size: 10.5px; font-weight: 600; color: var(--hfm-ink-2); }
.hfm-rail__item[aria-current] { border-color: var(--hfm-accent); background: var(--hfm-accent-faint); color: var(--hfm-accent); }
.hfm-rail__item[aria-current] .hfm-rail__n { color: inherit; }
.hfm-rail__item.is-zero { opacity: 0.45; }
.hfm-rail__btn {
	position: absolute;
	top: 50%;
	translate: 0 -50%;
	width: 32px;
	height: 32px;
	padding: 0;
	display: grid;
	place-items: center;
	border-radius: 50%;
	border: 1px solid var(--hfm-line-2);
	background: var(--hfm-bg);
	color: var(--hfm-ink);
	cursor: pointer;
	transition: opacity var(--t) var(--ease);
}
.hfm-rail__btn--l { left: -14px; }
.hfm-rail__btn--r { right: -14px; }
.hfm-rail[data-at~="start"] .hfm-rail__btn--l,
.hfm-rail[data-at~="end"] .hfm-rail__btn--r { opacity: 0; pointer-events: none; }
@media (hover: none) { .hfm-rail__btn { display: none; } }

/* ── Shop: sidebar + results ─────────────────────────────────────── */
.hfm-archive__shop {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 40px;
	align-items: start;
	padding-top: 24px;
	padding-bottom: 80px;
}
.hfm-archive__shop.has-filters { grid-template-columns: var(--side) minmax(0, 1fr); }
.hfm-archive__side {
	position: sticky;
	top: calc(var(--stick) + 16px);
	max-height: calc(100dvh - var(--stick) - 32px);
	overflow: auto;
	overscroll-behavior: contain;
	margin-right: -8px;
	padding-right: 8px;
	scrollbar-width: thin;
	scrollbar-color: var(--hfm-line-2) transparent;
}
.hfm-archive__main { min-width: 0; }

/* ── Filters ─────────────────────────────────────────────────────── */
.hfm-f__head { display: flex; align-items: baseline; justify-content: space-between; padding-bottom: 12px; }
.hfm-f__head h2 { margin: 0; font-size: 15px; font-weight: 800; color: var(--hfm-ink); }
.hfm-f__clear { font-size: 12.5px; font-weight: 700; color: var(--hfm-accent); text-decoration: none; }
.hfm-f__group { border-top: 1px solid var(--hfm-line); }
.hfm-f__group summary {
	display: flex;
	align-items: center;
	gap: 8px;
	padding-block: 14px;
	list-style: none;
	cursor: pointer;
	user-select: none;
	font-size: 13.5px;
	font-weight: 800;
	color: var(--hfm-ink);
}
.hfm-f__group summary::-webkit-details-marker { display: none; }
.hfm-f__chev { margin-left: auto; color: var(--hfm-ink-2); transition: rotate var(--t) var(--ease); }
.hfm-f__group[open] .hfm-f__chev { rotate: 180deg; }
.hfm-f__group::details-content {
	block-size: 0;
	overflow: clip;
	transition: block-size var(--t) var(--ease), content-visibility var(--t) allow-discrete;
}
.hfm-f__group[open]::details-content { block-size: auto; }
.hfm-archive,
.hfm-filter-sheet { interpolate-size: allow-keywords; }
.hfm-f__sel {
	display: grid;
	place-items: center;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 999px;
	background: var(--hfm-accent);
	color: var(--hfm-accent-ink);
	font-family: var(--hfm-f-mono);
	font-size: 10px;
	font-weight: 600;
	scale: 0;
	transition: scale var(--t) var(--ease);
}
.hfm-f__sel.is-on { scale: 1; }
.hfm-f__opts { display: grid; gap: 1px; padding-bottom: 14px; }
.hfm-f__opt,
.hfm-f__switch {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 34px;
	padding: 0 8px;
	margin-inline: -8px;
	border-radius: var(--hfm-r-2);
	font-size: 14px;
	color: var(--hfm-ink);
	text-decoration: none;
	cursor: pointer;
	transition: background-color var(--t-fast) var(--ease), opacity var(--t) var(--ease);
}
.hfm-f__opt:hover,
.hfm-f__switch:hover { background: var(--hfm-bg-1); color: var(--hfm-ink); }
.hfm-f__opt.is-zero { opacity: 0.4; cursor: default; }
.hfm-f__opt.is-zero:hover { background: none; }
.hfm-f__n {
	margin-left: auto;
	font-family: var(--hfm-f-mono);
	font-size: 10.5px;
	color: var(--hfm-ink-2);
	font-variant-numeric: tabular-nums;
}
/* Checkbox with a drawn tick */
.hfm-f__cb {
	flex: none;
	display: grid;
	place-items: center;
	width: 18px;
	height: 18px;
	border: 1.5px solid var(--hfm-line-2);
	border-radius: var(--hfm-r-2);
	background: var(--hfm-bg);
	transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), transform 80ms ease;
}
.hfm-f__cb::after {
	content: "";
	width: 10px;
	height: 6px;
	border: 2px solid var(--hfm-accent-ink);
	border-width: 0 0 2px 2px;
	rotate: -45deg;
	translate: 0 -1px;
	clip-path: inset(0 100% 0 0);
	transition: clip-path var(--t) var(--ease);
}
.hfm-f__opt[aria-checked="true"] .hfm-f__cb { background: var(--hfm-accent); border-color: var(--hfm-accent); }
.hfm-f__opt[aria-checked="true"] .hfm-f__cb::after { clip-path: inset(0); }
.hfm-f__opt:hover .hfm-f__cb { border-color: var(--hfm-accent); }
.hfm-f__opt:active .hfm-f__cb { transform: scale(0.9); }
/* Switch */
.hfm-f__switch { min-height: 40px; }
.hfm-f__track {
	position: relative;
	flex: none;
	width: 34px;
	height: 20px;
	border-radius: 999px;
	background: var(--hfm-line-2);
	transition: background-color var(--t) var(--ease);
}
.hfm-f__track::after {
	content: "";
	position: absolute;
	top: 2px;
	left: 2px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 2px color-mix(in srgb, #191919 20%, transparent);
	transition: translate var(--t) var(--ease);
}
.hfm-f__switch[aria-checked="true"] .hfm-f__track { background: var(--hfm-ok); }
.hfm-f__switch[aria-checked="true"] .hfm-f__track::after { translate: 14px 0; }

/* ── Category tree: up links, current, children (or siblings) ─────── */
.hfm-cat { display: grid; gap: 1px; padding-bottom: 14px; }
.hfm-cat__up,
.hfm-cat__head,
.hfm-cat__item {
	display: flex;
	align-items: center;
	gap: 6px;
	min-height: 34px;
	padding: 0 8px;
	border-radius: var(--hfm-r-2);
	font-size: 14px;
	color: var(--hfm-ink);
	text-decoration: none;
	transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.hfm-cat__up { min-height: 30px; font-size: 13px; color: var(--hfm-ink-2); }
.hfm-cat__up svg { flex: none; margin-left: -2px; }
.hfm-cat__up:hover,
.hfm-cat__item:hover { background: var(--hfm-bg-1); color: var(--hfm-ink); }
.hfm-cat__head { font-weight: 800; }
.hfm-cat__list.is-children { margin-left: 8px; padding-left: 6px; border-left: 1px solid var(--hfm-line); }
.hfm-cat__item[aria-current] { background: var(--hfm-accent-faint); color: var(--hfm-accent); font-weight: 700; }
.hfm-cat__item[aria-current] .hfm-f__n,
.hfm-cat__head .hfm-f__n { color: inherit; }
.hfm-filter-sheet .hfm-cat__item,
.hfm-filter-sheet .hfm-cat__head { min-height: 44px; font-size: 15px; }
.hfm-filter-sheet .hfm-cat__up { min-height: 40px; }

/* ── Vehicle ─────────────────────────────────────────────────────── */
.hfm-veh { padding-bottom: 14px; }
/* GeneratePress paints every <button> (dark fill, 17px, 10px 20px padding);
   the text buttons here reset all of it. */
.hfm-veh :is(.hfm-veh__savebtn, .hfm-veh__make button, .hfm-veh__empty button),
.hfm-veh :is(.hfm-veh__savebtn, .hfm-veh__make button, .hfm-veh__empty button):is(:hover, :focus) {
	min-height: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	font-family: inherit;
	line-height: 1.3;
	letter-spacing: 0;
	text-transform: none;
	text-decoration: none;
}
.hfm-veh :is(.hfm-veh__make, .hfm-veh__empty) button:is(:hover, :focus) { color: var(--hfm-accent); }
.hfm-veh__garage { display: grid; gap: 2px; }
.hfm-veh__row {
	position: relative;
	display: grid;
	grid-template-columns: 48px minmax(0, 1fr) auto;
	align-items: center;
	gap: 10px;
	width: 100%;
	min-height: 44px;
	padding: 5px 8px;
	margin: 0;
	border: 1px solid transparent;
	border-radius: var(--hfm-r-3);
	background: none;
	font: inherit;
	text-align: left;
	color: var(--hfm-ink);
	text-decoration: none;
	cursor: pointer;
	transition: background-color var(--t-fast) var(--ease), border-color var(--t) var(--ease), opacity var(--t) var(--ease);
}
.hfm-veh__row:hover { background: var(--hfm-bg-1); color: var(--hfm-ink); }
.hfm-veh__pic {
	display: grid;
	place-items: center;
	height: 32px;
	border: 1px solid var(--hfm-line-2);
	border-radius: var(--hfm-r-2);
	background: #fff;
	overflow: hidden;
	transition: border-color var(--t) var(--ease), background-color var(--t) var(--ease);
}
.hfm-veh__pic img { width: 100%; height: 100%; object-fit: contain; }
.hfm-veh__pic--icon { background: var(--hfm-bg); color: var(--hfm-ink-2); }
.hfm-veh__pic--icon svg { width: 16px; height: 16px; }
.hfm-veh__nm { display: grid; min-width: 0; line-height: 1.25; }
.hfm-veh__nm b { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hfm-veh__nm small { font-family: var(--hfm-f-mono); font-size: 10.5px; color: var(--hfm-ink-2); }
.hfm-veh__n { font-family: var(--hfm-f-mono); font-size: 10.5px; font-weight: 600; color: var(--hfm-ink-2); font-variant-numeric: tabular-nums; }
.hfm-veh__row.is-zero { opacity: 0.45; }
/* Active vehicle: pinned above the search, not highlighted in the list.
   Green only on the fit count. */
.hfm-veh__current {
	display: grid;
	grid-template-columns: 56px minmax(0, 1fr) auto;
	align-items: center;
	gap: 4px 10px;
	margin-bottom: 10px;
	padding: 8px;
	border: 1px solid var(--hfm-line);
	border-radius: var(--hfm-r-3);
	background: var(--hfm-bg-1);
	animation: hfm-pop var(--t) var(--ease) both;
}
.hfm-veh__current .hfm-veh__pic { height: 38px; }
.hfm-veh__fit { color: var(--hfm-ok); font-weight: 600; }
.hfm-veh__clear {
	display: grid;
	place-items: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	color: var(--hfm-ink-2);
	transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.hfm-veh__clear:hover { background: var(--hfm-bg); color: var(--hfm-ink); }
.hfm-veh__savebtn {
	grid-column: 2 / -1;
	justify-self: start;
	margin-top: -2px;
	font-size: 11.5px !important;
	font-weight: 600 !important;
	color: var(--hfm-ink-2) !important;
}
.hfm-veh__savebtn:hover { color: var(--hfm-accent) !important; }
.hfm-veh__empty {
	padding: 12px;
	border: 1px dashed var(--hfm-line-2);
	border-radius: var(--hfm-r-3);
	font-size: 13px;
	line-height: 1.45;
	color: var(--hfm-ink-2);
	text-wrap: pretty;
}
.hfm-veh__empty button {
	display: block;
	margin-top: 8px;
	padding: 0;
	border: 0;
	background: none;
	font: inherit;
	font-weight: 700;
	color: var(--hfm-accent);
	cursor: pointer;
}
.hfm-veh__search {
	display: flex;
	align-items: center;
	gap: 8px;
	height: 38px;
	margin-bottom: 6px;
	padding: 0 10px;
	border: 1px solid var(--hfm-line-2);
	border-radius: var(--hfm-r-3);
	background: var(--hfm-bg);
	color: var(--hfm-ink-2);
	transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.hfm-veh__search:focus-within { border-color: var(--hfm-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--hfm-accent) 18%, transparent); }
.hfm-veh__search input[type="search"],
.hfm-veh__search input[type="search"]:focus {
	flex: 1;
	min-width: 0;
	height: auto;
	padding: 0;
	border: 0;
	background: none;
	outline: none;
	box-shadow: none;
	font-size: 13.5px;
	color: var(--hfm-ink);
}
.hfm-veh__search input::placeholder { color: var(--hfm-ink-2); }
.hfm-veh__search kbd {
	padding: 1px 5px;
	border: 1px solid var(--hfm-line-2);
	border-radius: var(--hfm-r-1);
	background: none;
	font: 600 10px var(--hfm-f-mono);
	color: var(--hfm-ink-2);
}
@media (hover: none) { .hfm-veh__search kbd { display: none; } }
.hfm-veh__list {
	max-height: 340px;
	overflow: auto;
	overscroll-behavior: contain;
	scrollbar-width: thin;
	mask-image: linear-gradient(#000 calc(100% - 24px), transparent);
}
.hfm-veh__make {
	position: sticky;
	top: 0;
	z-index: 1;
	padding: 8px 0 4px;
	background: var(--hfm-bg);
	font-family: var(--hfm-f-mono);
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--hfm-ink-2);
}
.hfm-veh__make[data-hfm-garage-head] { display: flex; justify-content: space-between; align-items: baseline; }
.hfm-veh__make button {
	padding: 0;
	border: 0;
	background: none;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0;
	text-transform: none;
	color: var(--hfm-accent);
	cursor: pointer;
}
.hfm-veh__make[hidden], .hfm-veh__empty[hidden] { display: none; }
.hfm-veh__none { margin: 0; padding: 10px 0 20px; font-size: 13px; color: var(--hfm-ink-2); }
.hfm-veh__none a { color: var(--hfm-accent); font-weight: 700; }
@keyframes hfm-pop { from { opacity: 0; transform: scale(0.94); } }

/* ── Price ───────────────────────────────────────────────────────── */
.hfm-price { padding-bottom: 16px; }
.hfm-price__hist { display: flex; align-items: flex-end; gap: 2px; height: 44px; padding-inline: 9px; }
.hfm-price__hist i {
	flex: 1;
	height: 100%;
	border-radius: var(--hfm-r-1) var(--hfm-r-1) 0 0;
	background: var(--hfm-line-2);
	transform: scaleY(var(--h, 0.04));
	transform-origin: bottom;
	transition: background-color var(--t-fast) var(--ease), transform var(--t) var(--ease);
}
.hfm-price__hist i.in { background: color-mix(in srgb, var(--hfm-accent) 55%, var(--hfm-line-2)); }
.hfm-price__range { position: relative; height: 24px; margin-top: -2px; }
.hfm-price__track,
.hfm-price__fill { position: absolute; top: 11px; height: 2px; border-radius: 2px; }
.hfm-price__track { left: 9px; right: 9px; background: var(--hfm-line-2); }
.hfm-price__fill { background: var(--hfm-accent); }
.hfm-price__range input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 24px;
	margin: 0;
	padding: 0;
	border: 0;
	appearance: none;
	background: none;
	pointer-events: none;
}
.hfm-price__range input::-webkit-slider-thumb {
	appearance: none;
	pointer-events: auto;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	border: 2px solid var(--hfm-accent);
	background: var(--hfm-bg);
	cursor: grab;
	transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.hfm-price__range input::-moz-range-thumb {
	pointer-events: auto;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	border: 2px solid var(--hfm-accent);
	background: var(--hfm-bg);
	cursor: grab;
}
.hfm-price__range input:active::-webkit-slider-thumb { cursor: grabbing; transform: scale(1.15); box-shadow: 0 0 0 6px color-mix(in srgb, var(--hfm-accent) 18%, transparent); }
.hfm-price__range input:focus-visible { outline: none; }
.hfm-price__range input:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px color-mix(in srgb, var(--hfm-accent) 40%, transparent); }
.hfm-price__io { display: flex; align-items: center; gap: 8px; margin-top: 10px; color: var(--hfm-ink-2); }
.hfm-price__io label {
	flex: 1;
	display: flex;
	align-items: center;
	height: 36px;
	padding-left: 10px;
	border: 1px solid var(--hfm-line-2);
	border-radius: var(--hfm-r-3);
	background: var(--hfm-bg);
	font-size: 13px;
	transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.hfm-price__io label:focus-within { border-color: var(--hfm-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--hfm-accent) 18%, transparent); }
.hfm-price__io input {
	width: 100%;
	min-width: 0;
	height: auto;
	padding: 0 8px 0 2px;
	border: 0;
	background: none;
	outline: none;
	box-shadow: none;
	font-size: 13.5px;
	color: var(--hfm-ink);
	font-variant-numeric: tabular-nums;
}
.hfm-price__go {
	height: 36px;
	padding: 0 12px;
	border: 1px solid var(--hfm-line-2);
	border-radius: var(--hfm-r-3);
	background: var(--hfm-bg);
	font-weight: 700;
	color: var(--hfm-ink);
	cursor: pointer;
}
.hfm-js .hfm-price__go { display: none; }

/* ── Results bar ─────────────────────────────────────────────────── */
.hfm-archive__sentinel { height: 1px; margin-top: -1px; }
.hfm-archive__bar {
	position: sticky;
	top: var(--stick);
	z-index: 20;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin-inline: -12px;
	padding: 10px 12px;
	background: var(--hfm-bg);
	view-transition-name: hfm-results-bar;
}
.hfm-archive__bar::before {
	content: "";
	position: absolute;
	inset: auto 0 0;
	height: 1px;
	background: var(--hfm-line);
	opacity: 0;
	transition: opacity var(--t) var(--ease);
}
.hfm-archive__bar.is-stuck::before { opacity: 1; }
/* Fetch in flight: a thin accent line runs along the bottom of the bar */
.hfm-archive__bar::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -1px;
	width: 100%;
	height: 2px;
	background: var(--hfm-accent);
	transform-origin: left;
	transform: scaleX(0);
	opacity: 0;
}
.hfm-shop__main.hfm-shop-loading .hfm-archive__bar::after { opacity: 1; animation: hfm-load 900ms var(--ease) forwards; }
@keyframes hfm-load { from { transform: scaleX(0); } to { transform: scaleX(0.85); } }
/* The bar stays crisp while the grid dims */
.hfm-shop__main.hfm-shop-loading { opacity: 1; }
.hfm-shop__main.hfm-shop-loading ul.products,
.hfm-shop__main.hfm-shop-loading .hfm-archive__chips { opacity: 0.55; transition: opacity 0.2s ease; }

.hfm-archive__count { order: 1; flex: 1; min-width: 0; margin: 0; font-size: 14px; color: var(--hfm-ink-2); }
.hfm-archive__count b { color: var(--hfm-ink); font-variant-numeric: tabular-nums; }
.hfm-archive__fit { color: var(--hfm-ok); font-weight: 700; }
.hfm-archive__sort { order: 2; }
.hfm-archive__view { order: 3; }
.hfm-archive__sort .woocommerce-ordering { margin: 0; float: none; }
.hfm-archive__sort select {
	height: 36px;
	padding: 0 32px 0 12px;
	border: 1px solid var(--hfm-line-2);
	border-radius: var(--hfm-r-3);
	background: var(--hfm-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none' stroke='%23737373' stroke-width='1.8'%3E%3Cpath d='M2.5 4.5L6 8l3.5-3.5'/%3E%3C/svg%3E") no-repeat right 10px center;
	appearance: none;
	font-size: 13px;
	font-weight: 700;
	color: var(--hfm-ink);
	cursor: pointer;
	transition: border-color var(--t-fast) var(--ease);
}
.hfm-archive__sort select:hover { border-color: var(--hfm-accent); }
.hfm-archive__view {
	position: relative;
	isolation: isolate;
	display: flex;
	padding: 2px;
	border: 1px solid var(--hfm-line-2);
	border-radius: var(--hfm-r-3);
}
.hfm-archive__view::before {
	content: "";
	position: absolute;
	z-index: -1;
	top: 2px;
	left: 2px;
	width: 32px;
	height: 30px;
	border-radius: var(--hfm-r-2);
	background: var(--hfm-bg-1);
	box-shadow: inset 0 0 0 1px var(--hfm-line);
	transition: translate var(--t) var(--ease);
}
.hfm-archive.is-list .hfm-archive__view::before { translate: 32px 0; }
.hfm-archive__view button {
	display: grid;
	place-items: center;
	width: 32px;
	height: 30px;
	padding: 0;
	border: 0;
	border-radius: var(--hfm-r-2);
	background: none;
	color: var(--hfm-ink-2);
	cursor: pointer;
	transition: color var(--t) var(--ease);
}
.hfm-archive:not(.is-list) [data-hfm-view="grid"],
.hfm-archive.is-list [data-hfm-view="list"] { color: var(--hfm-ink); }

.hfm-archive__veh-btn,
.hfm-archive__filters-btn {
	display: none;
	align-items: center;
	gap: 8px;
	height: 36px;
	padding: 0 14px;
	border: 1px solid var(--hfm-line-2);
	border-radius: var(--hfm-r-3);
	background: var(--hfm-bg);
	font-size: 13px;
	font-weight: 700;
	color: var(--hfm-ink);
	white-space: nowrap;
	cursor: pointer;
}
.hfm-archive__veh-btn .dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--hfm-ink-4); }
.hfm-archive__veh-btn span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.hfm-archive__veh-btn svg { flex: none; margin-left: auto; color: var(--hfm-ink-2); }
.hfm-archive__veh-btn.is-set { background: color-mix(in srgb, var(--hfm-ok) 5%, var(--hfm-bg)); border-color: color-mix(in srgb, var(--hfm-ok) 22%, var(--hfm-line-2)); }
.hfm-archive__veh-btn.is-set .dot { background: var(--hfm-ok); }
.hfm-archive__badge {
	display: grid;
	place-items: center;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 999px;
	background: var(--hfm-accent);
	color: var(--hfm-accent-ink);
	font-family: var(--hfm-f-mono);
	font-size: 10px;
}

/* Active filter chips */
.hfm-archive__chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 0 14px; }
.hfm-chip {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	height: 30px;
	padding: 0 8px 0 12px;
	border: 1px solid transparent;
	border-radius: 999px;
	background: var(--hfm-accent-faint);
	color: var(--hfm-accent);
	font-size: 12.5px;
	font-weight: 700;
	text-decoration: none;
	animation: hfm-pop var(--t) var(--ease) both;
	transition: border-color var(--t-fast) var(--ease);
}
.hfm-chip:hover { border-color: currentColor; color: var(--hfm-accent); }
.hfm-chip svg { opacity: 0.7; }
.hfm-chip--fit { background: color-mix(in srgb, var(--hfm-ok) 8%, var(--hfm-bg)); color: var(--hfm-ok); }
.hfm-chip--fit:hover { color: var(--hfm-ok); }
.hfm-chip--clear { padding: 0 8px; background: none; color: var(--hfm-ink-2); text-decoration: underline; text-underline-offset: 2px; }
.hfm-chip--clear:hover { border-color: transparent; color: var(--hfm-ink); }

/* Brake-pad compound block */
.hfm-padspec { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 22px; font-size: 13px; color: var(--hfm-ink-2); }
.hfm-padspec img { max-width: 280px; height: auto; border: 1px solid var(--hfm-line); border-radius: var(--hfm-r-3); }
.hfm-padspec > div { flex: 1; min-width: 240px; }
.hfm-padspec strong { color: var(--hfm-ink); }

/* ── Grid: auto-fill, capped at --cols wide cards ────────────────── */
.hfm-archive ul.products {
	display: grid;
	gap: var(--gap);
	grid-template-columns: repeat(auto-fill, minmax(max(240px, (100% - (var(--cols) - 1) * var(--gap)) / var(--cols)), 1fr));
}
.hfm-archive ul.products::before,
.hfm-archive ul.products::after { content: none; } /* WooCommerce clearfix pseudo-elements become grid items */

/* List view: dense rows for workshop / trade buyers */
.hfm-archive.is-list ul.products { grid-template-columns: minmax(0, 1fr); gap: 0; border-top: 1px solid var(--hfm-line); }
.hfm-archive.is-list li.product.product-card {
	flex-direction: row;
	align-items: center;
	gap: 16px;
	padding: 10px 4px;
	border-width: 0 0 1px;
	border-radius: 0;
	overflow: visible;
}
.hfm-archive.is-list li.product.product-card:hover { transform: none; box-shadow: none; background: var(--hfm-bg-1); }
.hfm-archive.is-list li.product.product-card > a.woocommerce-LoopProduct-link { flex: none; width: 88px; }
.hfm-archive.is-list .hfm-card__media { border: 1px solid var(--hfm-line); border-radius: var(--hfm-r-2); }
.hfm-archive.is-list .hfm-card__tag { display: none; }
.hfm-archive.is-list .hfm-card__body { flex-direction: row; align-items: center; gap: 24px; padding: 0 8px 0 0; }
.hfm-archive.is-list .hfm-card__info { flex: 1; min-width: 0; }
.hfm-archive.is-list .hfm-card__title { -webkit-line-clamp: 1; min-height: 0; }
.hfm-archive.is-list .hfm-card__meta {
	display: grid;
	gap: 2px;
	width: 180px;
	font-size: 12px;
	color: var(--hfm-ink-2);
}
.hfm-archive.is-list .hfm-card__sku { font-family: var(--hfm-f-mono); font-size: 11px; }
.hfm-archive.is-list .hfm-card__foot { width: 260px; margin: 0; padding: 0; justify-content: flex-end; gap: 16px; }
.hfm-archive.is-list .hfm-card__foot .hfm-card__price { order: 2; flex-wrap: nowrap; white-space: nowrap; }
.hfm-archive.is-list .hfm-card__pricenote { display: none; }

/* Pagination */
.hfm-archive .woocommerce-pagination { margin-top: 40px; }

/* ── Long-form guide ─────────────────────────────────────────────── */
.hfm-seo {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 32px 64px;
	padding-block: 56px 88px;
	border-top: 1px solid var(--hfm-line);
}
.hfm-seo.has-toc { grid-template-columns: var(--side) minmax(0, 72ch); }
.hfm-seo__toc {
	position: sticky;
	top: calc(var(--stick) + 24px);
	align-self: start;
}
.hfm-seo__toc-title {
	margin: 0 0 10px;
	font-size: 13px;
	font-weight: 800;
	color: var(--hfm-ink);
}
.hfm-seo__toc ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; border-left: 1px solid var(--hfm-line); }
.hfm-seo__toc a {
	display: block;
	margin-left: -1px;
	padding: 6px 0 6px 14px;
	border-left: 2px solid transparent;
	font-size: 13.5px;
	line-height: 1.35;
	color: var(--hfm-ink-2);
	text-decoration: none;
	transition: color var(--t-fast) var(--ease), border-color var(--t) var(--ease);
}
.hfm-seo__toc a:hover { color: var(--hfm-ink); }
.hfm-seo__toc a.is-active { color: var(--hfm-accent); border-left-color: var(--hfm-accent); font-weight: 700; }
.hfm-seo__main { min-width: 0; max-width: 72ch; }
.hfm-seo__label {
	margin: 0 0 12px;
	font-size: 13px;
	font-weight: 800;
	color: var(--hfm-accent);
}
.hfm-seo__body {
	position: relative;
	font-size: 16px;
	line-height: 1.7;
	color: var(--hfm-ink-1);
	text-wrap: pretty;
}
.hfm-seo__body > :first-child { margin-top: 0; }
.hfm-seo__body :is(h2, h3, h4) { color: var(--hfm-ink); text-wrap: balance; scroll-margin-top: calc(var(--stick) + 24px); }
.hfm-seo__body h2 { margin: 2.2em 0 0.6em; font-size: 1.6rem; line-height: 1.2; letter-spacing: -0.02em; font-weight: 800; }
.hfm-seo__body h3 { margin: 1.8em 0 0.5em; font-size: 1.2rem; line-height: 1.3; font-weight: 700; }
.hfm-seo__body h4 { margin: 1.6em 0 0.4em; font-size: 1rem; font-weight: 700; }
.hfm-seo__body p { margin: 0 0 1.1em; }
.hfm-seo__body :is(ul, ol) { margin: 0 0 1.2em; padding-left: 1.3em; }
.hfm-seo__body ul { list-style: disc; }
.hfm-seo__body ol { list-style: decimal; }
.hfm-seo__body li { margin-bottom: 0.4em; }
.hfm-seo__body li::marker { color: var(--hfm-ink-2); }
.hfm-seo__body a { color: var(--hfm-accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.hfm-seo__body a:hover { text-decoration-thickness: 2px; }
.hfm-seo__body strong { color: var(--hfm-ink); font-weight: 700; }
.hfm-seo__body img { max-width: 100%; height: auto; border-radius: var(--hfm-r-3); }
.hfm-seo__body figure { margin: 1.6em 0; }
.hfm-seo__body figcaption { margin-top: 8px; font-size: 13px; color: var(--hfm-ink-2); }
.hfm-seo__body blockquote {
	margin: 1.6em 0;
	padding: 16px 20px;
	border-radius: var(--hfm-r-3);
	background: var(--hfm-bg-1);
	color: var(--hfm-ink);
}
.hfm-seo__body blockquote p:last-child { margin-bottom: 0; }
.hfm-seo__body hr { margin: 2.4em 0; border: 0; border-top: 1px solid var(--hfm-line); }
.hfm-seo__body :is(code, kbd) { font-family: var(--hfm-f-mono); font-size: 0.88em; }
/* Collapsed until "Read the full guide" (JS adds .is-collapsed only when it's long) */
.hfm-seo__body.is-collapsed {
	max-height: 560px;
	overflow: hidden;
	mask-image: linear-gradient(#000 calc(100% - 160px), transparent);
}
.hfm-seo__more {
	margin-top: 8px;
	height: 44px;
	padding: 0 18px;
	border: 1px solid var(--hfm-line-2);
	border-radius: var(--hfm-r-3);
	background: var(--hfm-bg);
	font-size: 14px;
	font-weight: 700;
	color: var(--hfm-ink);
	cursor: pointer;
	transition: border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.hfm-seo__more:hover { border-color: var(--hfm-accent); color: var(--hfm-accent); }
@media (max-width: 1023px) {
	.hfm-seo.has-toc { grid-template-columns: minmax(0, 1fr); }
	.hfm-seo__toc { position: static; }
}

/* ── Phone / tablet: sidebar becomes a bottom sheet ──────────────── */
.hfm-filter-sheet { --drawer-z: 10000; }
.hfm-filter-sheet .c-drawer {
	--drawer-bg: var(--hfm-bg, #fcfcfc);
	--drawer-radius: 12px;
	--drawer-inset: 0px;
	--drawer-max-height: 88dvh;
	--drawer-body-padding: 0 20px;
	--drawer-handle-color: var(--hfm-line-2, #d4d4d4);
	--drawer-overlay-color: color-mix(in srgb, #0a0a0a 55%, transparent);
}
.hfm-filter-sheet .hfm-f__head {
	position: sticky;
	top: 0;
	z-index: 2;
	margin-inline: -20px;
	padding: 4px 20px 12px;
	background: var(--hfm-bg);
	border-bottom: 1px solid var(--hfm-line);
}
.hfm-filter-sheet .hfm-f__group:first-of-type { border-top: 0; }
.hfm-filter-sheet .hfm-f__opt,
.hfm-filter-sheet .hfm-f__switch { min-height: 44px; font-size: 15px; }
.hfm-filter-sheet__foot {
	position: sticky;
	bottom: 0;
	z-index: 2;
	margin-inline: -20px;
	padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
	background: var(--hfm-bg);
	border-top: 1px solid var(--hfm-line);
}
.hfm-filter-sheet__foot .hfm-btn { width: 100%; height: 48px; font-size: 15px; }

@media (max-width: 1023px) {
	.hfm-archive__shop.has-filters { grid-template-columns: minmax(0, 1fr); padding-top: 12px; }
	.hfm-archive__side { display: none; }
	.hfm-archive__filters-btn { display: inline-flex; }
	.hfm-archive__veh-btn { display: inline-flex; }
}
@media (max-width: 767px) {
	.hfm-archive { --gap: 8px; }
	.hfm-archive ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.hfm-archive__bar { gap: 8px; }
	.hfm-archive__veh-btn { order: 0; flex: 1 1 100%; height: 44px; font-size: 14px; }
	.hfm-archive__filters-btn { order: 1; }
	.hfm-archive__count { order: 5; flex-basis: 100%; font-size: 13px; }
	.hfm-archive__sort { flex: 1; }
	.hfm-archive__sort select { width: 100%; }
	.hfm-shop .hfm-card__body { padding: 10px 12px 12px; }
	.hfm-shop .hfm-card__title { font-size: 14px; }
	.hfm-shop .hfm-card__rating { display: none; }
	.hfm-archive.is-list li.product.product-card { gap: 12px; }
	.hfm-archive.is-list li.product.product-card > a.woocommerce-LoopProduct-link { width: 64px; }
	.hfm-archive.is-list .hfm-card__body { flex-direction: column; align-items: stretch; gap: 4px; }
	.hfm-archive.is-list .hfm-card__meta { display: none; }
	.hfm-archive.is-list .hfm-card__foot { width: auto; justify-content: flex-start; }
	.hfm-archive.is-list .hfm-card__foot .hfm-card__price { order: 0; }
	.hfm-archive.is-list .hfm-card__price .amount { font-size: 16px; }
}

/* ── View transitions: cards glide to their new slots on filter / sort ─ */
::view-transition-old(root),
::view-transition-new(root) { animation: none; }
::view-transition-group(.hfm-card) { animation-duration: 400ms; animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1); }
::view-transition-new(.hfm-card):only-child { animation: hfm-card-in 400ms cubic-bezier(0.22, 1, 0.36, 1) both; }
::view-transition-old(.hfm-card):only-child { animation: hfm-card-out 180ms ease-in both; }
::view-transition-group(hfm-results-bar) { z-index: 1; animation: none; }
@keyframes hfm-card-in { from { opacity: 0; transform: scale(0.94); filter: blur(4px); } }
@keyframes hfm-card-out { to { opacity: 0; transform: scale(0.94); } }

@media (prefers-reduced-motion: reduce) {
	.hfm-archive *,
	.hfm-archive *::before,
	.hfm-archive *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; animation-iteration-count: 1 !important; }
}

/* Search results: matching cars + articles above the grid (Sift). */
.sift-extras { display: grid; gap: 12px; margin-bottom: 20px; }
.sift-extras__group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.sift-extras__label { font-family: var(--hfm-f-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--hfm-ink-2); min-width: 9ch; }
.sift-extras__links { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.sift-extras__link {
	display: inline-flex; align-items: center; gap: 10px; min-height: 44px; max-width: 100%;
	padding: 5px 14px; border: 1px solid var(--hfm-line); border-radius: 999px;
	background: var(--hfm-bg); color: var(--hfm-ink); font-size: 13.5px; font-weight: 700; text-decoration: none;
	transition: border-color var(--t-fast) var(--ease);
}
.sift-extras__link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sift-extras__link:hover { border-color: var(--hfm-accent); color: var(--hfm-ink); }
.sift-extras__link:has(img) { padding-left: 5px; }
.sift-extras__link img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: #fff; border: 1px solid var(--hfm-line); }

/* Shop by vehicle cards (search results) */
.sift-extras__group:has(.sift-vehicle) { display: grid; gap: 8px; } /* Not flex-column: Chrome then sizes the card rows as if the columns were tiny. */
.sift-extras__links:has(.sift-vehicle) { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 10px; }
.sift-vehicle {
	display: flex; align-items: center; gap: 14px; min-width: 0;
	padding: 10px 14px 10px 10px; border: 1px solid var(--hfm-line); border-radius: 12px;
	background: var(--hfm-bg); color: var(--hfm-ink); text-decoration: none;
	transition: border-color var(--t-fast) var(--ease);
}
.sift-vehicle:hover { border-color: var(--hfm-accent); color: var(--hfm-ink); }
.sift-vehicle__img { flex: none; width: 88px; height: 60px; border-radius: 8px; background: #fff; overflow: hidden; display: grid; place-items: center; }
.sift-vehicle__img img { width: 88px; height: 60px; object-fit: contain; } /* Fixed, not %: grid row sizing otherwise uses the photo's natural height. */
.sift-vehicle__body { display: grid; gap: 2px; min-width: 0; }
.sift-vehicle__name { font-size: 14px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sift-vehicle__details { font-size: 12px; color: var(--hfm-ink-2); }
.sift-vehicle__cta { margin-top: 4px; font-size: 12.5px; font-weight: 700; color: var(--hfm-accent); }

/* ── Category FAQs ──────────────────────────────────────────────────── */
.hfm-cat-faqs { margin-top: 48px; }
.hfm-cat-faqs h2 { font-size: 1.5rem; font-weight: 800; margin-bottom: 20px; }
.hfm-faq { border: 1px solid var(--hfm-line); border-radius: 8px; margin-bottom: 12px; }
.hfm-faq summary {
	padding: 16px 20px; font-size: 15px; font-weight: 700; cursor: pointer;
	list-style: none; user-select: none;
	transition: background-color var(--t-fast) var(--ease);
}
.hfm-faq summary::-webkit-details-marker { display: none; }
.hfm-faq summary::marker { content: ""; }
.hfm-faq summary:hover { background-color: var(--hfm-line); }
.hfm-faq[open] summary { border-bottom: 1px solid var(--hfm-line); }
.hfm-faq div {
	padding: 16px 20px; font-size: 14px; line-height: 1.6;
	color: var(--hfm-ink-2);
}
.hfm-faq a { color: var(--hfm-accent); text-decoration: underline; }
.hfm-faq a:hover { text-decoration: none; }
.hfm-faq p { margin-bottom: 12px; }
.hfm-faq p:last-child { margin-bottom: 0; }
.hfm-faq ul,
.hfm-faq ol { margin: 12px 0; padding-left: 24px; }
.hfm-faq li { margin-bottom: 6px; }
.hfm-faq strong { font-weight: 700; color: var(--hfm-ink); }
