/*
 * HFM.Parts — product card + archive (CollectionA-style)
 *
 * Tokens are scoped to .hfm-shop and resolve from theme.json palette via
 * --wp--preset--color--*. Every variable uses light-dark() at the palette
 * level so light/dark just works.
 *
 * Variables:
 *   --hfm-bg / --hfm-bg-1..3   surfaces
 *   --hfm-line / --hfm-line-2  hairlines
 *   --hfm-ink / --hfm-ink-1..4 text ramp
 *   --hfm-accent / --hfm-accent-2 / --hfm-accent-ink   purple brand
 *   --hfm-ok / --hfm-bad / --hfm-warn                  green / red / orange
 *   --hfm-r-1..4               radius scale
 *   --hfm-f-sans / --hfm-f-mono fonts (inherit theme sans, system mono)
 */

.hfm-shop {
	color-scheme: light dark;

	/* Surfaces */
	--hfm-bg:    var(--wp--preset--color--base, light-dark(#fcfcfc, #0a0a0a));
	--hfm-bg-1:  var(--wp--preset--color--base-2, light-dark(#f7f7f7, #171717));
	--hfm-bg-2:  var(--wp--preset--color--neutral-100, light-dark(#f5f5f5, #171717));
	--hfm-bg-3:  var(--wp--preset--color--grey-200, light-dark(#e5e5e5, #262626));

	/* Hairlines */
	--hfm-line:   var(--wp--preset--color--grey-200, light-dark(#e5e5e5, #262626));
	--hfm-line-2: var(--wp--preset--color--grey-300, light-dark(#d4d4d4, #404040));

	/* Ink ramp — text 1 = headlines, 4 = subtle */
	--hfm-ink:    var(--wp--preset--color--contrast, light-dark(#191919, #f5f5f5));
	--hfm-ink-1:  var(--wp--preset--color--grey-800, light-dark(#262626, #e5e5e5));
	--hfm-ink-2:  var(--wp--preset--color--grey-600, light-dark(#525252, #a3a3a3));
	--hfm-ink-2:  var(--wp--preset--color--grey-500, light-dark(#a3a3a3, #525252));
	--hfm-ink-4:  var(--wp--preset--color--grey-400, light-dark(#a3a3a3, #525252));

	/* Brand purple (accent) */
	--hfm-accent:     var(--wp--preset--color--purple-500, light-dark(#874da2, #d05aff));
	--hfm-accent-2:   var(--wp--preset--color--purple-600, light-dark(#75448c, #d87aff));
	--hfm-accent-ink: light-dark(#ffffff, #0e0420);
	--hfm-accent-faint: var(--wp--preset--color--purple-100, light-dark(#f3e8f7, #41284a));
	--hfm-accent-soft:  var(--wp--preset--color--purple-200, light-dark(#e7d1ef, #523160));

	/* Status: ok (green), bad (red), warn (orange) */
	--hfm-ok:    var(--wp--preset--color--green-500, light-dark(#16a34a, #4ade80));
	--hfm-ok-faint: var(--wp--preset--color--green-100, light-dark(#dcfce7, #052e16));
	--hfm-bad:   var(--wp--preset--color--red-500, light-dark(#c43a30, #ff6b5a));
	--hfm-bad-faint: var(--wp--preset--color--red-100, light-dark(#fde9e7, #541a16));
	--hfm-warn:  var(--wp--preset--color--orange-500, light-dark(#ea580c, #fb923c));
	--hfm-warn-faint: var(--wp--preset--color--orange-100, light-dark(#ffedd5, #431407));

	/* Radius */
	--hfm-r-1: 2px;
	--hfm-r-2: 4px;
	--hfm-r-3: 8px;
	--hfm-r-4: 12px;

	/* Fonts — keep theme sans, fall back to a system mono */
	--hfm-f-sans: inherit;
	--hfm-f-mono: inherit;

	font-family: var(--hfm-f-sans);
	color: var(--hfm-ink);
}

.hfm-shop * { box-sizing: border-box; }

/* Utility primitives */
.hfm-shop .hfm-mono {
	font-family: var(--hfm-f-mono);
	font-feature-settings: "zero", "ss01";
}
.hfm-shop .hfm-eyebrow {
	font-family: var(--hfm-f-mono);
	font-size: 11px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--hfm-ink-2);
	font-weight: 500;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}
.hfm-shop .hfm-eyebrow--accent { color: var(--hfm-accent); }
.hfm-shop .hfm-eyebrow--accent::before {
	content: "●";
	color: var(--hfm-accent);
	font-size: 8px;
}
.hfm-shop .hfm-card {
	background: var(--hfm-bg-1);
	border: 1px solid var(--hfm-line);
	border-radius: var(--hfm-r-3);
}
.hfm-shop .hfm-tag {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-family: var(--hfm-f-mono);
	font-size: 10px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--hfm-ink-2);
	background: color-mix(in srgb, var(--hfm-bg-2), transparent 30%);
	border: 1px solid var(--hfm-line);
	border-radius: var(--hfm-r-2);
	padding: 3px 7px;
	font-weight: 600;
}
.hfm-shop .hfm-tag--accent {
	color: var(--hfm-accent);
	border-color: color-mix(in srgb, var(--hfm-accent) 40%, transparent);
	background: color-mix(in srgb, var(--hfm-accent) 8%, transparent);
}
.hfm-shop .hfm-tag--sale {
	color: var(--hfm-bad);
	border-color: color-mix(in srgb, var(--hfm-bad) 40%, transparent);
	background: color-mix(in srgb, var(--hfm-bad) 10%, transparent);
}

/* Buttons */
.hfm-shop .hfm-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-family: var(--hfm-f-sans);
	font-weight: 500;
	font-size: 14px;
	letter-spacing: -0.005em;
	border: 1px solid transparent;
	border-radius: var(--hfm-r-2);
	padding: 12px 18px;
	cursor: pointer;
	transition: background 0.12s, border-color 0.12s, color 0.12s, transform 0.06s;
	text-decoration: none;
	white-space: nowrap;
	background: transparent;
	line-height: 1;
}
.hfm-shop .hfm-btn:active { transform: translateY(1px); }
.hfm-shop .hfm-btn--primary {
	background: var(--hfm-accent);
	color: var(--hfm-accent-ink);
	font-weight: 600;
}
.hfm-shop .hfm-btn--primary:hover { background: var(--hfm-accent-2); color: var(--hfm-accent-ink); }
.hfm-shop .hfm-btn--ghost {
	color: var(--hfm-ink);
	border-color: var(--hfm-line-2);
	background: transparent;
}
.hfm-shop .hfm-btn--ghost:hover {
	border-color: var(--hfm-ink-2);
	background: color-mix(in srgb, var(--hfm-ink) 4%, transparent);
}
.hfm-shop .hfm-btn--sm { padding: 7px 12px; font-size: 12.5px; }
.hfm-shop .hfm-btn[disabled],
.hfm-shop .hfm-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* ─────────────────────────────────────────────────────────────────
   Product card — UltimateCard
   ───────────────────────────────────────────────────────────────── */

.hfm-shop ul.products {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 14px;
}
@media (max-width: 1200px) {
	.hfm-shop ul.products { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
	.hfm-shop ul.products { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}
@media (max-width: 540px) {
	.hfm-shop ul.products { grid-template-columns: 1fr; gap: 8px; }
}

.hfm-shop li.product.product-card {
	background: var(--hfm-bg-1);
	border: 1px solid var(--hfm-line);
	border-radius: var(--hfm-r-3);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	position: relative;
	margin: 0;
	padding: 0;
	transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.hfm-shop li.product.product-card:hover {
	border-color: var(--hfm-line-2);
	box-shadow: 0 6px 24px -12px color-mix(in srgb, var(--hfm-ink) 25%, transparent);
}

/* Reset all links inside the card — WordPress global styles inject
   a { color: …; text-decoration: underline } which leaks in otherwise. */
.hfm-shop li.product.product-card a {
	color: inherit;
	text-decoration: none;
}

/* The outer media link needs display:block so the image area fills correctly */
.hfm-shop li.product.product-card > a.woocommerce-LoopProduct-link,
.hfm-shop li.product.product-card > a.woocommerce-loop-product__link,
.hfm-shop li.product.product-card > a {
	display: block;
}

/* Image area */
.hfm-shop .hfm-card__media {
	position: relative;
	aspect-ratio: 4 / 3;
	background: var(--hfm-bg-2);
	overflow: hidden;
	border-radius: var(--hfm-r-3) var(--hfm-r-3) 0 0;
}
.hfm-shop .hfm-card__media::before {
	/* hairline grid overlay */
	content: "";
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(to right, color-mix(in srgb, var(--hfm-ink) 4%, transparent) 1px, transparent 1px),
		linear-gradient(to bottom, color-mix(in srgb, var(--hfm-ink) 4%, transparent) 1px, transparent 1px);
	background-size: 16px 16px;
	opacity: 0.4;
	pointer-events: none;
}
.hfm-shop .hfm-card__media img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%; /* overrides WordPress global img{height:auto} via higher specificity */
	max-width: none;
	/* !important required because style.css has an unscoped
	   `.size-woocommerce_thumbnail { object-fit: contain !important }`
	   that would otherwise win regardless of our specificity. Wins via
	   specificity tiebreak since both carry !important. */
	object-fit: cover !important;
	object-position: center !important;
	display: block;
	margin: 0; /* overrides .woocommerce ul.products li.product a img{margin-bottom:12px} */
	border-radius: 0; /* clipping handled by the container */
}
/* Second image — simple opacity fade on card hover */
.hfm-shop .hfm-card__media-hover {
	opacity: 0;
	transition: opacity 0.35s ease;
	z-index: 1;
}
.hfm-shop li.product.product-card:hover .hfm-card__media-hover {
	opacity: 1;
}

/* Top-left tag */
.hfm-shop .hfm-card__tag {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 2;
	background: color-mix(in srgb, var(--hfm-bg) 80%, transparent);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}

/* SKU pill bottom-right — frosted glass: works on any image tone. */
.hfm-shop .hfm-card__sku {
	position: absolute;
	bottom: 10px;
	right: 10px;
	z-index: 2;
	font-family: var(--hfm-f-mono);
	font-size: 9px;
	color: #fff;
	background: rgba(0, 0, 0, 0.32);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	padding: 2px 6px;
	border-radius: 3px;
	letter-spacing: 0.04em;
}

/* Fitment chip bottom-left — frosted dark pill, same treatment as SKU. */
.hfm-shop .hfm-card__fitment {
	position: absolute;
	bottom: 10px;
	left: 10px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 3px 8px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.32);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	border: 1px solid rgba(255, 255, 255, 0.12);
}
.hfm-shop .hfm-card__fitment .dot {
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: #4ade80; /* green — consistent regardless of theme mode */
	flex-shrink: 0;
}
.hfm-shop .hfm-card__fitment .label {
	font-family: var(--hfm-f-mono);
	font-size: 10px;
	letter-spacing: 0.06em;
	color: #fff;
	font-weight: 600;
	text-transform: uppercase;
}
.hfm-shop .hfm-card__fitment--yes {
	border-color: color-mix(in srgb, var(--hfm-ok) 55%, transparent);
}
.hfm-shop .hfm-card__fitment--yes .dot { background: var(--hfm-ok); }
.hfm-shop .hfm-card__fitment--no {
	border-color: color-mix(in srgb, var(--hfm-bad) 55%, transparent);
}
.hfm-shop .hfm-card__fitment--no .dot { background: var(--hfm-bad); }

/* Sale flash — replaces Woo's <span class="onsale"> */
.hfm-shop li.product.product-card .onsale {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-family: var(--hfm-f-mono);
	font-size: 10px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--hfm-bad);
	background: color-mix(in srgb, var(--hfm-bg) 70%, transparent);
	border: 1px solid color-mix(in srgb, var(--hfm-bad) 40%, transparent);
	border-radius: var(--hfm-r-2);
	padding: 3px 7px;
	font-weight: 600;
	margin: 0;
	min-height: 0;
	min-width: 0;
	height: auto;
	width: auto;
	line-height: 1;
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}

/* Body */
.hfm-shop .hfm-card__body {
	padding: 14px 16px 16px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	flex: 1;
}
.hfm-shop .hfm-card__topline {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 8px;
}
.hfm-shop .hfm-card__category {
	font-family: var(--hfm-f-mono);
	font-size: 9.5px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--hfm-ink-2);
	font-weight: 500;
}
.hfm-shop .hfm-card__rating {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 11px;
	color: var(--hfm-ink-2);
}
.hfm-shop .hfm-card__rating .star  { color: var(--hfm-accent); }
.hfm-shop .hfm-card__rating .value { font-family: var(--hfm-f-mono); color: var(--hfm-ink-1); font-weight: 600; }
.hfm-shop .hfm-card__rating .count { font-family: var(--hfm-f-mono); color: var(--hfm-ink-2); }
.hfm-shop .hfm-card__rating--low {
	font-family: var(--hfm-f-mono);
	font-size: 9.5px;
	letter-spacing: 0.06em;
	color: var(--hfm-ink-2);
	text-transform: uppercase;
}
.hfm-shop .hfm-card__rating--store { opacity: 0.6; }

.hfm-shop .hfm-card__title {
	font-family: var(--hfm-f-sans);
	font-weight: 800;
	font-size: 15.5px;
	letter-spacing: -0.01em;
	line-height: 1.25;
	color: var(--hfm-ink);
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.hfm-shop .hfm-card__sub {
	color: var(--hfm-ink-2);
	font-size: 12.5px;
	margin-top: 3px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Stock + dispatch line */
.hfm-shop .hfm-card__signal-row {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 14px;
}
.hfm-shop .hfm-card__signal {
	display: flex;
	align-items: center;
	gap: 10px;
	font-family: var(--hfm-f-mono);
	font-size: 10px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}
.hfm-shop .hfm-card__signal--ok      { color: var(--hfm-ok); }
.hfm-shop .hfm-card__signal--warn    { color: var(--hfm-warn); }
.hfm-shop .hfm-card__signal--mute    { color: var(--hfm-ink-2); }
.hfm-shop .hfm-card__signal--special { color: var(--wp--preset--color--purple-600, #7c3aed); }
.hfm-shop .hfm-card__signal::before {
	content: "●";
	font-size: 8px;
	margin-right: 2px;
}

/* Price + CTA row */
.hfm-shop .hfm-card__commerce {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 10px;
	margin-top: auto;
	padding-top: 4px;
}
.hfm-shop .hfm-card__price {
	display: flex;
	align-items: baseline;
	gap: 6px;
	flex-wrap: wrap;
	color: var(--hfm-ink);
	line-height: 1;
}
/* Regular price amount + role ins amount — 22px bold */
.hfm-shop .hfm-card__price .price:not(.urlar-rbp-price) .amount,
.hfm-shop .hfm-card__price .urlar-rbp-price ins .amount {
	font-size: 22px;
	font-weight: 600;
	letter-spacing: -0.02em;
	text-decoration: none;
	background: none;
	color: var(--hfm-ink);
}
/* Hide RRP strikethrough on archive cards — role price shown directly */
.hfm-shop .hfm-card__price del {
	display: none;
}
.hfm-shop .hfm-card__price .price,
.hfm-shop .hfm-card__price > .price {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 2px 6px;
	margin: 0;
	padding: 0;
	color: inherit;
	background: transparent;
}
/* Currency symbol — same size as the price number, no shrink */
.hfm-shop .hfm-card__price .woocommerce-Price-currencySymbol {
	font-size: inherit;
	font-weight: inherit;
}
/* Suffix "Inc. GST" — breaks to its own line under the price */
.hfm-shop .hfm-card__price .woocommerce-price-suffix {
	flex-basis: 100%;
	font-size: 11px;
	font-weight: 400;
	color: var(--hfm-ink-2);
	line-height: 1.4;
}
/* Free shipping callout — appended inline after the suffix, cards only */
.hfm-shop .hfm-card__price .woocommerce-price-suffix::after {
	content: " · Free AU Ship $250+";
}

.hfm-shop .hfm-card__pricenote {
	font-family: var(--hfm-f-mono);
	font-size: 9.5px;
	color: var(--hfm-ink-2);
	letter-spacing: 0.04em;
	margin-top: 4px;
	text-transform: uppercase;
}

/* Add-to-cart spinner */
@keyframes hfm-spin { to { transform: rotate(360deg); } }
.hfm-btn-spin {
	display: inline-block;
	width: 12px;
	height: 12px;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: hfm-spin 0.6s linear infinite;
	vertical-align: middle;
	flex-shrink: 0;
	margin-left: 6px;
}

/* CTA — overrides Woo defaults inside the card */
.hfm-shop li.product.product-card .button.add_to_cart_button,
.hfm-shop li.product.product-card .button.product_type_simple,
.hfm-shop li.product.product-card .button.product_type_variable,
.hfm-shop li.product.product-card .button.product_type_grouped,
.hfm-shop li.product.product-card .button.product_type_external,
.hfm-shop li.product.product-card a.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	background: var(--hfm-accent);
	color: var(--hfm-accent-ink);
	font-weight: 600;
	font-size: 12.5px;
	border: 1px solid transparent;
	border-radius: var(--hfm-r-2);
	padding: 5px 10px;
	cursor: pointer;
	text-decoration: none;
	font-family: var(--hfm-f-sans);
	letter-spacing: -0.005em;
	margin: 0;
	min-height: 0;
	line-height: 1;
	transition: background 0.12s;
	text-transform: none;
}
.hfm-shop li.product.product-card .button.add_to_cart_button:hover,
.hfm-shop li.product.product-card a.button:hover {
	background: var(--hfm-accent-2);
	color: var(--hfm-accent-ink);
}
.hfm-shop li.product.product-card .button.add_to_cart_button.loading::after {
	content: '';
	display: inline-block;
	width: 10px;
	height: 10px;
	border: 2px solid var(--hfm-accent-ink);
	border-right-color: transparent;
	border-radius: 50%;
	animation: hfm-spin 0.6s linear infinite;
	vertical-align: middle;
	margin-left: 5px;
}
.hfm-shop li.product.product-card .button.add_to_cart_button.added {
	pointer-events: none;
}
.hfm-shop li.product.product-card .added_to_cart {
	display: none;
}

/* ─────────────────────────────────────────────────────────────────
   Archive — CollectionA hero + fitment band + toolbar
   ───────────────────────────────────────────────────────────────── */

.hfm-shop {
	background: var(--hfm-bg);
	color: var(--hfm-ink);
}

.hfm-shop__breadcrumb {
	font-size: 12px;
	color: var(--hfm-ink-2);
	margin-bottom: 16px;
}
.hfm-shop__breadcrumb a {
	color: var(--hfm-ink-2);
	text-decoration: none;
}
.hfm-shop__breadcrumb a:hover { color: var(--hfm-ink-1); }
.hfm-shop__breadcrumb .delim { margin: 0 6px; color: var(--hfm-ink-4); }
.hfm-shop__breadcrumb .current { color: var(--hfm-ink-1); }

.hfm-shop__hero {
	padding: 32px 28px 22px;
	border-bottom: 1px solid var(--hfm-line);
	display: grid;
	grid-template-columns: 1.3fr 1fr;
	gap: 56px;
	align-items: end;
}
@media (max-width: 1024px) {
	.hfm-shop__hero { grid-template-columns: 1fr; gap: 28px; }
}
.hfm-shop__hero-eyebrow { margin-bottom: 12px; }
.hfm-shop__hero-copy { min-width: 0; }
.hfm-shop__hero-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.hfm-shop__hero-title {
	font-family: var(--hfm-f-sans);
	font-weight: 900;
	font-size: clamp(40px, 6vw, 76px);
	line-height: 1.0;
	letter-spacing: -0.03em;
	margin: 0 0 14px;
	color: var(--hfm-ink);
}
.hfm-shop__hero-sub {
	color: var(--hfm-ink-1);
	font-size: 17px;
	line-height: 1.5;
	max-width: 540px;
	margin: 0;
	text-wrap: pretty;
}

.hfm-shop__stats {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1px;
	background: var(--hfm-line);
	border: 1px solid var(--hfm-line);
	border-radius: 6px;
	overflow: hidden;
}
.hfm-shop__stat {
	background: var(--hfm-bg);
	padding: 14px;
}
.hfm-shop__stat-v {
	font-family: var(--hfm-f-sans);
	font-size: 22px;
	font-weight: 600;
	letter-spacing: -0.02em;
	color: var(--hfm-ink);
}
.hfm-shop__stat-k {
	font-family: var(--hfm-f-mono);
	font-size: 10px;
	color: var(--hfm-ink-2);
	margin-top: 2px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}
.hfm-shop__stat-strip-foot {
	font-size: 12px;
	color: var(--hfm-ink-2);
	display: flex;
	gap: 14px;
	padding: 8px 2px 0;
	flex-wrap: wrap;
}
.hfm-shop__stat-strip-foot .ok::before    { content: "● "; color: var(--hfm-ok); }
.hfm-shop__stat-strip-foot .accent::before{ content: "● "; color: var(--hfm-accent); }

/* Fitment band — compact toggle (Show all default, optional server filter) */
/* Mobile-only "Set your car" trigger — shown on product archives when no
   garage car and no URL filter. Reuses [data-hfm-change-car] click delegation
   in js/garage.js to open the same panel as the header badge. Hidden on
   desktop because the header badge is the primary trigger there. */
.hfm-shop__mobile-car-trigger {
	display: none;
}
@media (max-width: 640px) {
	.hfm-shop__mobile-car-trigger {
		display: flex;
		align-items: center;
		gap: 10px;
		width: calc(100% - 32px);
		margin: 12px 16px 4px;
		padding: 12px 14px;
		font-family: inherit;
		font-size: 14px;
		font-weight: 600;
		color: var(--hfm-ink) !important;
		background: var(--hfm-bg);
		border: 1px solid var(--hfm-line-2);
		border-radius: 12px;
		cursor: pointer;
		text-align: left;
		box-shadow: 0 1px 2px rgba(0,0,0,.04);
		transition: border-color .15s, background .15s, transform .08s;
		-webkit-tap-highlight-color: transparent;
	}
	.hfm-shop__mobile-car-trigger:active {
		transform: scale(.99);
		background: color-mix(in srgb, var(--hfm-ink) 4%, var(--hfm-bg));
	}
	.hfm-shop__mobile-car-trigger-icon {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 32px;
		height: 32px;
		border-radius: 8px;
		background: color-mix(in srgb, var(--hfm-accent) 12%, transparent);
		color: var(--hfm-accent);
		flex-shrink: 0;
	}
	.hfm-shop__mobile-car-trigger-text {
		flex: 1;
		min-width: 0;
	}
	.hfm-shop__mobile-car-trigger-chev {
		color: var(--hfm-ink-2);
		font-size: 22px;
		line-height: 1;
		flex-shrink: 0;
	}
}

.hfm-shop__fitband {
	border-bottom: 1px solid var(--hfm-line);
	background: color-mix(in srgb, var(--hfm-ink) 2%, var(--hfm-bg));
	padding: 10px 28px;
}
.hfm-shop__fitband-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px 20px;
	flex-wrap: wrap;
}
.hfm-shop__fitband-car {
	margin: 0;
	font-size: 13px;
	line-height: 1.35;
	color: var(--hfm-ink-1);
	min-width: 0;
}
.hfm-shop__fitband-car-k {
	color: var(--hfm-ink-2);
	font-weight: 500;
	margin-right: 6px;
}
.hfm-shop__fitband-car-v {
	color: var(--hfm-ink);
	font-weight: 600;
}

/* Segmented control: flat track + sliding thumb (neutral ink — no green accent). */
.hfm-shop__fit-toggle-track {
	position: relative;
	display: inline-flex;
	align-items: stretch;
	width: fit-content;
	max-width: 100%;
	border-radius: 999px;
	padding: 2px;
	background: color-mix(in srgb, var(--hfm-ink) 4%, var(--hfm-bg));
	border: 1px solid var(--hfm-line);
	box-shadow: none;
	isolation: isolate;
}
.hfm-shop__fit-toggle-track::before {
	content: "";
	position: absolute;
	top: 2px;
	bottom: 2px;
	left: 2px;
	width: calc(50% - 2px);
	border-radius: 999px;
	background: var(--hfm-bg);
	border: 1px solid color-mix(in srgb, var(--hfm-ink) 10%, var(--hfm-line));
	box-shadow: none;
	transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	transform: translateX(0);
	z-index: 0;
	pointer-events: none;
	will-change: transform;
}
.hfm-shop__fit-toggle-track:has(.hfm-shop__fitband-filter.is-active)::before {
	transform: translateX(calc(100% + 2px));
}
@media (prefers-reduced-motion: reduce) {
	.hfm-shop__fit-toggle-track::before {
		transition-duration: 0.01ms;
	}
	.hfm-shop__fit-toggle-opt {
		transition-duration: 0.01ms;
	}
}
.hfm-shop__fit-toggle-opt {
	position: relative;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 1 1 0;
	min-width: 0;
	text-decoration: none;
	color: var(--hfm-ink-2);
	font-size: 13px;
	font-weight: 500;
	padding: 7px 16px;
	border-radius: 999px;
	white-space: nowrap;
	transition:
		color 0.25s cubic-bezier(0.4, 0, 0.2, 1),
		font-weight 0.25s cubic-bezier(0.4, 0, 0.2, 1);
	cursor: pointer;
	font-family: inherit;
	background: transparent;
	border: none;
	box-shadow: none;
}
.hfm-shop__fit-toggle-opt:hover {
	color: var(--hfm-ink);
}
.hfm-shop__fit-toggle-opt.is-active {
	color: var(--hfm-ink);
	font-weight: 600;
	background: transparent;
	box-shadow: none;
}
.hfm-shop__fit-toggle-opt:not(.is-active):hover {
	color: color-mix(in srgb, var(--hfm-ink) 78%, var(--hfm-ink-2));
}

.hfm-shop__fitband-change {
	flex-shrink: 0;
	font-size: 12px;
	color: var(--hfm-accent);
	text-decoration: underline;
	padding: 4px 0;
	background: transparent;
	border: none;
	font-family: inherit;
	cursor: pointer;
}
.hfm-shop__fitband-change:hover {
	color: color-mix(in srgb, var(--hfm-accent) 88%, var(--hfm-ink));
}

/* Fitband — no garage / URL-only filter (always visible bar) */
.hfm-shop__fitband--filtered-only .hfm-shop__fitband-inner,
.hfm-shop__fitband--no-car .hfm-shop__fitband-inner {
	flex-direction: column;
	align-items: stretch;
	gap: 10px;
}
.hfm-shop__fitband-hint {
	margin: 0;
	font-size: 12px;
	color: var(--hfm-ink-2);
	line-height: 1.45;
	max-width: 42em;
}
.hfm-shop__fitband-actions-row {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
}
.hfm-shop__fitband-wide-clear {
	display: inline-flex;
	align-items: center;
	padding: 8px 16px;
	font-size: 13px;
	font-weight: 600;
	font-family: inherit;
	border-radius: 999px;
	text-decoration: none;
	background: var(--hfm-bg);
	color: var(--hfm-ink) !important;
	border: 1px solid var(--hfm-line-2);
	transition: border-color 0.15s, background 0.15s;
}
.hfm-shop__fitband-wide-clear:hover {
	border-color: var(--hfm-ink-2);
	background: color-mix(in srgb, var(--hfm-ink) 4%, var(--hfm-bg));
	color: var(--hfm-ink) !important;
}
.hfm-shop__fitband-set-car {
	display: inline-flex;
	align-items: center;
	padding: 8px 16px;
	font-size: 13px;
	font-weight: 600;
	font-family: inherit;
	border-radius: 999px;
	cursor: pointer;
	border: 1px solid transparent;
	background: var(--hfm-accent);
	color: #fff !important;
	-webkit-font-smoothing: antialiased;
	transition: filter 0.15s;
}
.hfm-shop__fitband-set-car:hover {
	filter: brightness(1.08);
	color: #fff !important;
}
.hfm-shop__fitband-set-car--solo {
	margin-left: 0;
}
.hfm-shop__fitband-car--prompt {
	font-weight: 500;
	color: var(--hfm-ink-1);
	max-width: 28em;
}

/* Fetch-swap loading: dim only the product block so the fitband toggle can animate */
.hfm-shop__main.hfm-shop-loading {
	opacity: 0.55;
	pointer-events: none;
	transition: opacity 0.2s ease;
}
.hfm-shop__main {
	transition: opacity 0.2s ease;
}

/* Toolbar — sub-category pills + sort */
.hfm-shop__toolbar {
	padding: 14px 28px;
	border-bottom: 1px solid var(--hfm-line);
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	background: var(--hfm-bg-1);
	flex-wrap: wrap;
}
.hfm-shop__pills { display: flex; gap: 8px; flex-wrap: wrap; }
.hfm-shop__pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 12px;
	border-radius: 999px;
	border: 1px solid var(--hfm-line-2);
	background: var(--hfm-bg-2);
	color: var(--hfm-ink-1);
	font-size: 12px;
	font-family: inherit;
	cursor: pointer;
	font-weight: 500;
	text-decoration: none;
	transition: border-color 0.12s, background 0.12s, color 0.12s;
}
.hfm-shop__pill:hover { border-color: var(--hfm-ink-2); color: var(--hfm-ink); }
.hfm-shop__pill .count {
	font-family: var(--hfm-f-mono);
	font-size: 10px;
	color: var(--hfm-ink-2);
	letter-spacing: 0.04em;
}
.hfm-shop__pill.is-active {
	border-color: var(--hfm-accent);
	background: color-mix(in srgb, var(--hfm-accent) 10%, transparent);
	color: var(--hfm-accent);
}
.hfm-shop__pill.is-active .count { color: var(--hfm-accent); }

.hfm-shop__sort {
	display: flex;
	align-items: center;
	gap: 10px;
}
.hfm-shop__sort-label {
	font-family: var(--hfm-f-mono);
	font-size: 10px;
	color: var(--hfm-ink-2);
	letter-spacing: 0.08em;
	text-transform: uppercase;
}
.hfm-shop__sort select {
	padding: 7px 10px;
	min-width: 160px;
	background: var(--hfm-bg-2);
	border: 1px solid var(--hfm-line-2);
	border-radius: var(--hfm-r-2);
	color: var(--hfm-ink-1);
	font-family: inherit;
	font-size: 12.5px;
	cursor: pointer;
}

/* Result count — Woo default */
.hfm-shop .woocommerce-result-count {
	font-family: var(--hfm-f-mono);
	font-size: 11px;
	color: var(--hfm-ink-2);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	margin: 0;
}

/* Main grid container */
.hfm-shop__main {
	padding: 28px 28px 60px;
}
.hfm-shop__main-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	margin-bottom: 14px;
	flex-wrap: wrap;
	gap: 8px;
}
.hfm-shop__main-head h2 {
	font-size: 14px;
	font-weight: 600;
	margin: 0;
	color: var(--hfm-ink);
}
.hfm-shop__main-head .muted {
	color: var(--hfm-ink-2);
	font-weight: 400;
}

/* Pagination */
.hfm-shop .woocommerce-pagination {
	margin-top: 28px;
	display: flex;
	justify-content: center;
}
.hfm-shop .woocommerce-pagination ul.page-numbers {
	display: inline-flex;
	gap: 4px;
	border: 0;
	margin: 0;
	padding: 0;
}
.hfm-shop .woocommerce-pagination ul.page-numbers li {
	border: 0;
	margin: 0;
}
.hfm-shop .woocommerce-pagination ul.page-numbers a,
.hfm-shop .woocommerce-pagination ul.page-numbers span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding: 0 12px;
	border: 1px solid var(--hfm-line-2);
	border-radius: var(--hfm-r-2);
	background: var(--hfm-bg-2);
	color: var(--hfm-ink-1);
	font-size: 13px;
	font-family: inherit;
	text-decoration: none;
	transition: border-color 0.12s, background 0.12s, color 0.12s;
}
.hfm-shop .woocommerce-pagination ul.page-numbers a:hover {
	border-color: var(--hfm-ink-2);
	color: var(--hfm-ink);
}
.hfm-shop .woocommerce-pagination ul.page-numbers .current {
	background: var(--hfm-accent);
	border-color: var(--hfm-accent);
	color: var(--hfm-accent-ink);
}

/* No products — guided empty state */
.hfm-shop .woocommerce-no-products-found.hfm-shop__empty-state {
	background: color-mix(in srgb, var(--hfm-ink) 3%, var(--hfm-bg));
	border: 1px dashed color-mix(in srgb, var(--hfm-line) 70%, transparent);
	border-radius: var(--hfm-r-3);
	padding: clamp(28px, 5vw, 40px) clamp(24px, 4vw, 36px);
	margin: 24px 0 32px;
	max-width: 520px;
}
.hfm-shop__empty-title {
	margin: 0 0 10px;
	font-size: clamp(18px, 2.5vw, 21px);
	font-weight: 700;
	color: var(--hfm-ink);
	line-height: 1.25;
}
.hfm-shop__empty-text {
	margin: 0 0 20px;
	font-size: 14px;
	line-height: 1.55;
	color: var(--hfm-ink-1);
}
.hfm-shop__empty-text strong {
	color: var(--hfm-ink);
	font-weight: 600;
}
.hfm-shop__empty-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
}
.hfm-shop__empty-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 18px;
	font-size: 14px;
	font-weight: 600;
	font-family: inherit;
	border-radius: 999px;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.15s, color 0.15s, border-color 0.15s;
	border: 1px solid transparent;
}
.hfm-shop .hfm-shop__empty-btn--primary {
	background-color: var(--hfm-accent);
	color: #fff !important;
	-webkit-font-smoothing: antialiased;
}
.hfm-shop .hfm-shop__empty-btn--primary:hover,
.hfm-shop .hfm-shop__empty-btn--primary:focus {
	filter: brightness(1.08);
	color: #fff !important;
}
.hfm-shop .hfm-shop__empty-btn--ghost {
	background: transparent;
	border: 1px solid var(--hfm-line-2);
	color: var(--hfm-ink) !important;
}
.hfm-shop .hfm-shop__empty-btn--ghost:hover {
	border-color: var(--hfm-ink-2);
	background: color-mix(in srgb, var(--hfm-ink) 5%, transparent);
	color: var(--hfm-ink) !important;
}

/* Legacy WC notice fallback if plugin still injects .woocommerce-info here */
.hfm-shop .woocommerce-info,
.hfm-shop .woocommerce-no-products-found:not(.hfm-shop__empty-state) {
	background: var(--hfm-bg-2);
	border: 1px solid var(--hfm-line);
	border-radius: var(--hfm-r-3);
	color: var(--hfm-ink-1);
	padding: 24px;
	margin: 28px;
	font-size: 14px;
}

/* Client-side vehicle filtering — hide non-fitting cards when filter is active */
ul.products.hfm-filtered li.product-loop-card.hfm-nofit {
	display: none;
}

/* Subcategories list — inherit pill style */
.hfm-shop ul.products li.product-category {
	background: var(--hfm-bg-1);
	border: 1px solid var(--hfm-line);
	border-radius: var(--hfm-r-3);
	overflow: hidden;
	transition: border-color 0.15s, transform 0.15s;
}
.hfm-shop ul.products li.product-category:hover { border-color: var(--hfm-line-2); }
.hfm-shop ul.products li.product-category > a { color: inherit; text-decoration: none; }
.hfm-shop ul.products li.product-category h2 {
	font-family: var(--hfm-f-sans);
	font-weight: 600;
	font-size: 15.5px;
	color: var(--hfm-ink);
	padding: 14px 16px;
	margin: 0;
}
