/* =========================================================================
   Spare parts: the hub and its range archives
   (woocommerce/taxonomy-product_cat-spare-parts.php).
   Scoped to .pa, mobile first, min-width queries at 640 / 768 / 900 / 1200.
   House recipe from docs/superpowers/specs/2026-09-18-support-and-content-
   pages-design.md; the finder's chips and search follow .pr-chip and
   .pr-search on the product range page, the cards follow .sn-resource.
   ========================================================================= */

.pa {
	--pa-navy: #181d46;      /* Billi Blue */
	--pa-lightblue: #90cdeb; /* primary button on dark, accents */
	--pa-grey: #eaeaea;      /* borders, rules */
	--pa-band-grey: #f5f5f5;
	--pa-band-tint: #f1f5f5; /* Green Grey */
	--pa-text: #000;
	--pa-muted: #75757b;
	--pa-gutter: 20px;
	/* Clears the fixed header on in-page jumps (#pa-finder). */
	--pa-jump: calc(var(--header-chrome-h, 74px) + var(--trust-bar-h, 46px) + 16px);

	font-family: var(--font-din);
	color: var(--pa-text);
	line-height: 1.5;
}

@media (min-width: 900px) {
	.pa { --pa-gutter: 40px; }
}

.pa *,
.pa *::before,
.pa *::after { box-sizing: border-box; }

/* framework.css sets a global img { width: 100% }: width must be reset, not
   just max-width. */
.pa img { max-width: 100%; width: auto; height: auto; display: block; }

/* Rows and cards set their own display, which would otherwise beat the
   browser's [hidden] rule and leave filtered-out parts on screen. */
.pa [hidden] { display: none !important; }

.pa-container {
	width: 100%;
	max-width: 1436px;
	margin: 0 auto;
	padding-left: var(--pa-gutter);
	padding-right: var(--pa-gutter);
}

.pa-visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.pa :is(ul, ol) { list-style: none; margin: 0; padding: 0; }


/* ---- Sections: white, grey or tint bands; navy only mid-page ------------- */

.pa-section { padding: 48px 0; }
@media (min-width: 900px) { .pa-section { padding: 80px 0; } }

.pa-section--grey { background: var(--pa-band-grey); }
.pa-section--tint { background: var(--pa-band-tint); }
.pa-section--navy { background: var(--pa-navy); color: #fff; }

.pa .pa-section-heading {
	margin: 0 0 12px;
	font-size: 26px;
	font-weight: 600;
	line-height: 1.18;
	color: var(--pa-navy);
	text-transform: none;
	letter-spacing: normal;
}

.pa-section--navy .pa-section-heading { color: #fff; }

.pa-section-intro {
	margin: 0;
	max-width: 66ch;
	font-size: 17px;
	line-height: 1.55;
	color: var(--pa-muted);
}

.pa-section-head { margin-bottom: 28px; }
.pa-section-head > :last-child { margin-bottom: 0; }

@media (min-width: 900px) {
	.pa .pa-section-heading { font-size: 34px; }
	.pa-section-head { margin-bottom: 40px; }
}


/* ---- Buttons. desktop.css fades every link to .7 on hover: each opts out. */

/* 16px on a 1.5 line with 12px padding: 48px tall, the size the homepage,
   Why Billi, Specify Billi and the sector pages use. */
.pa .pa-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 48px;
	padding: 12px 28px;
	border: 0;
	border-radius: 2px;
	font-family: inherit;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.5;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .2s ease, color .2s ease, box-shadow .2s ease;
}

.pa .pa-btn:hover,
.pa .pa-btn:focus-visible { opacity: 1; }

.pa .pa-btn--navy { background: var(--pa-navy); color: #fff; }
.pa .pa-btn--navy:hover,
.pa .pa-btn--navy:focus-visible { background: #fff; color: var(--pa-navy); box-shadow: inset 0 0 0 1px var(--pa-navy); }

.pa .pa-btn--light { background: var(--pa-lightblue); color: var(--pa-navy); }
.pa .pa-btn--light:hover,
.pa .pa-btn--light:focus-visible { background: #fff; color: var(--pa-navy); }

.pa .pa-btn--ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .6); }
.pa .pa-btn--ghost:hover,
.pa .pa-btn--ghost:focus-visible { background: #fff; color: var(--pa-navy); box-shadow: none; }

.pa .pa-btn--outline { background: transparent; color: var(--pa-navy); box-shadow: inset 0 0 0 1px var(--pa-navy); }
.pa .pa-btn--outline:hover,
.pa .pa-btn--outline:focus-visible { background: var(--pa-navy); color: #fff; }

/* framework.css removes focus outlines sitewide. Navy on light grounds,
   white on navy. */
.pa :is(a, button, summary, input, select, textarea):focus-visible {
	outline: 2px solid var(--pa-navy);
	outline-offset: 3px;
}

.pa :is(.pa-hero, .pa-section--navy) :is(a, button, summary):focus-visible { outline-color: #fff; }


/* ---- Hero: flat Billi Blue. The parts have no photography worth a banner
   (the legacy one was a 1400x253 strip), and the finder is the point. ------ */

.pa-hero {
	position: relative;
	display: flex;
	align-items: center;
	background: var(--pa-navy);
	color: #fff;
}

.pa-hero__inner { width: 100%; padding-top: 48px; padding-bottom: 48px; }

.pa-hero__content { max-width: 720px; }

.pa-hero__eyebrow {
	margin: 0 0 12px;
	color: var(--pa-lightblue);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
}

.pa .pa-hero__eyebrow a { color: inherit; font-weight: inherit; text-decoration: none; }
.pa .pa-hero__eyebrow a:hover { color: #fff; opacity: 1; }

/* The title is an <h1>: typography.css gives it DM Serif Display at 400.
   Never set its weight or family here. */
.pa .pa-hero__title { margin: 0; color: #fff; font-size: 34px; line-height: 1.12; }

.pa-hero__intro {
	margin: 16px 0 0;
	max-width: 62ch;
	color: rgba(255, 255, 255, .9);
	font-size: 17px;
	line-height: 1.5;
}

.pa-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

@media (min-width: 900px) {
	.pa-hero__inner { padding-top: 56px; padding-bottom: 56px; }
	.pa .pa-hero__title { font-size: 52px; }
	.pa-hero__intro { font-size: 18px; }
}


/* ---- Part finder ------------------------------------------------------------ */

.pa-finder { scroll-margin-top: var(--pa-jump); }

.pa-finder__controls {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.pa-search {
	position: relative;
	display: flex;
	align-items: center;
	width: 100%;
	max-width: 640px;
}

.pa .pa-search__icon {
	position: absolute;
	left: 16px;
	width: 20px;
	height: 20px;
	color: var(--pa-muted);
	pointer-events: none;
}

.pa .pa-search__input {
	width: 100%;
	min-height: 52px;
	margin: 0;
	padding: 12px 48px;
	font-family: inherit;
	font-size: 16px; /* 16px stops iOS zooming the page on focus */
	line-height: 1.4;
	color: var(--pa-text);
	background: var(--pa-band-grey);
	border: 1px solid transparent;
	border-radius: 2px;
	box-shadow: none;
	appearance: none;
}

.pa .pa-search__input::placeholder { color: var(--pa-muted); opacity: 1; }

.pa .pa-search__input:focus { background: #fff; border-color: var(--pa-navy); }

/* Drawn inside the field so it reads on any band. */
.pa .pa-search__input:focus-visible { outline: 2px solid var(--pa-navy); outline-offset: -4px; }

/* The native clear button is unstyleable and missing in Firefox. */
.pa .pa-search__input::-webkit-search-cancel-button { display: none; }

.pa .pa-search__clear {
	position: absolute;
	right: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	color: var(--pa-navy);
	background: transparent;
	border: 0;
	border-radius: 2px;
	cursor: pointer;
}

.pa .pa-search__clear svg { width: 18px; height: 18px; }
.pa .pa-search__clear:hover { background: var(--pa-grey); }

/* Chips follow .pr-chip on the product range page. */
.pa-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.pa .pa-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 40px;
	padding: 8px 16px;
	font-family: inherit;
	font-size: 15px;
	font-weight: 400;
	line-height: 1.2;
	color: var(--pa-navy);
	text-decoration: none;
	background: #fff;
	border: 1px solid var(--pa-navy);
	border-radius: 2px;
	cursor: pointer;
	transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.pa .pa-chip:hover { opacity: 1; background: var(--pa-lightblue); border-color: var(--pa-lightblue); color: var(--pa-navy); }

.pa .pa-chip.is-active,
.pa .pa-chip.is-active:hover { background: var(--pa-navy); border-color: var(--pa-navy); color: #fff; }

.pa .pa-chip:disabled,
.pa .pa-chip:disabled:hover {
	background: #fff;
	border-color: var(--pa-grey);
	color: var(--pa-muted);
	cursor: default;
}

.pa-chip__count { font-size: 13px; opacity: .7; }

.pa-finder__status {
	margin: 20px 0 16px;
	font-size: 15px;
	color: var(--pa-muted);
}

/* Rows: thumbnail, name, product code, ranges; the name is the link and it
   stretches over the whole row, so the row is one tab stop. */
.pa-parts {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 10px;
}

@media (min-width: 768px) {
	.pa-parts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}

@media (min-width: 1200px) {
	.pa-parts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.pa-part {
	position: relative;
	display: flex;
	align-items: center;
	gap: 14px;
	min-width: 0;
	padding: 10px 44px 10px 10px;
	background: #fff;
	border: 1px solid var(--pa-grey);
	border-radius: 4px;
	transition: border-color .2s ease, background-color .2s ease;
}

.pa-part:hover { border-color: var(--pa-navy); background: var(--pa-band-tint); }

.pa-part__media {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 64px;
	height: 64px;
	overflow: hidden;
	background: var(--pa-band-grey);
	border-radius: 4px;
}

/* Studio cut-outs on white sit on the grey panel; multiply drops their
   white ground. Namespaced: .pa img would otherwise win. */
.pa .pa-part__img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	mix-blend-mode: multiply;
}

.pa-part__icon { display: flex; color: var(--pa-muted); }
.pa .pa-part__icon svg { width: 28px; height: 28px; }

.pa-part__body {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}

/* desktop.css sets a { font-weight: 600 } and fades links on hover. */
.pa .pa-part__link {
	color: var(--pa-navy);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
	overflow-wrap: anywhere;
}

.pa .pa-part__link:hover { opacity: 1; text-decoration: underline; text-underline-offset: 2px; }
.pa .pa-part__link::after { content: ''; position: absolute; inset: 0; border-radius: 4px; }

/* The ring goes round the whole row, not just the name. */
.pa .pa-part__link:focus-visible { outline: none; }
.pa .pa-part__link:focus-visible::after { outline: 2px solid var(--pa-navy); outline-offset: 2px; }

.pa-part__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 2px 12px;
	font-size: 14px;
	line-height: 1.4;
	color: var(--pa-muted);
}

.pa-part__code { color: var(--pa-text); font-variant-numeric: tabular-nums; }

.pa .pa-chevron {
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	color: var(--pa-navy);
	transition: transform .2s ease;
}

.pa-part .pa-chevron { position: absolute; right: 16px; top: 50%; margin-top: -8px; }
.pa-part:hover .pa-chevron { transform: translateX(3px); }

/* Empty state. */
.pa-empty {
	max-width: 640px;
	padding: 32px 24px;
	background: var(--pa-band-tint);
	border-radius: 4px;
}

.pa-empty__title {
	margin: 0 0 8px;
	color: var(--pa-navy);
	font-size: 20px;
	font-weight: 600;
	line-height: 1.25;
	overflow-wrap: anywhere;
}

.pa-empty__text { margin: 0 0 20px; font-size: 16px; line-height: 1.5; }

.pa .pa-empty__text a { color: var(--pa-navy); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.pa .pa-empty__text a:hover { opacity: 1; }


/* ---- Range cards (hub) and resource cards: .sn-resource's anatomy ------- */

.pa-range-grid,
.pa-resource-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 12px;
}

@media (min-width: 640px) {
	.pa-range-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 768px) {
	.pa-resource-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
	.pa-range-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
	.pa-resource-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
}

.pa-range,
.pa-resource {
	position: relative;
	display: flex;
	align-items: center;
	gap: 16px;
	min-width: 0;
	padding: 18px 20px;
	background: #fff;
	border: 1px solid var(--pa-grey);
	border-radius: 4px;
	transition: border-color .2s ease, background-color .2s ease;
}

.pa-range { flex-wrap: wrap; align-content: center; padding-right: 48px; }

.pa-range:hover,
.pa-resource:hover { border-color: var(--pa-navy); background: var(--pa-band-tint); }

.pa-range .pa-chevron { position: absolute; right: 20px; top: 50%; margin-top: -8px; }

.pa-range:hover .pa-chevron,
.pa-resource:hover .pa-chevron { transform: translateX(3px); }

.pa .pa-range__title,
.pa .pa-resource__title {
	flex: 1 1 100%;
	margin: 0;
	color: var(--pa-navy);
	font-size: 17px;
	font-weight: 600;
	line-height: 1.25;
	text-transform: none;
	letter-spacing: normal;
}

.pa .pa-range__link,
.pa .pa-resource__link {
	color: inherit;
	font-weight: inherit;
	text-decoration: none;
}

.pa .pa-range__link:hover,
.pa .pa-resource__link:hover { opacity: 1; }

.pa .pa-range__link::after,
.pa .pa-resource__link::after { content: ''; position: absolute; inset: 0; border-radius: 4px; }

.pa .pa-range__link:focus-visible,
.pa .pa-resource__link:focus-visible { outline: none; }

.pa .pa-range__link:focus-visible::after,
.pa .pa-resource__link:focus-visible::after { outline: 2px solid var(--pa-navy); outline-offset: 2px; }

.pa-range__count {
	margin: 4px 0 0;
	font-size: 15px;
	line-height: 1.4;
	color: var(--pa-muted);
}

.pa-resource__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 44px;
	height: 44px;
	border-radius: 2px;
	background: var(--pa-band-tint);
	color: var(--pa-navy);
}

.pa-resource:hover .pa-resource__icon { background: #fff; }

.pa .pa-resource__icon svg { width: 24px; height: 24px; }

.pa-resource__body {
	display: flex;
	flex-direction: column;
	gap: 2px;
	flex: 1 1 auto;
	min-width: 0;
}

.pa-resource__text {
	font-size: 15px;
	font-weight: 400;
	line-height: 1.4;
	color: var(--pa-muted);
}


/* ---- How to order: numbered steps on navy (.sg-steps) -------------------- */

.pa-steps {
	counter-reset: pa-step;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 24px;
}

@media (min-width: 900px) {
	.pa-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
}

.pa-step {
	counter-increment: pa-step;
	position: relative;
	min-width: 0;
	padding-left: 52px;
}

.pa-step::before {
	content: counter(pa-step);
	position: absolute;
	left: 0;
	top: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--pa-lightblue);
	color: var(--pa-navy);
	font-size: 16px;
	font-weight: 600;
	line-height: 1;
}

.pa .pa-step__title {
	margin: 6px 0 6px;
	color: #fff;
	font-size: 19px;
	font-weight: 600;
	line-height: 1.25;
	text-transform: none;
	letter-spacing: normal;
}

.pa-step__text {
	margin: 0;
	font-size: 16px;
	line-height: 1.5;
	color: rgba(255, 255, 255, .82);
}


/* ---- Help band: Green Grey, never navy above the navy footer ------------- */

.pa-help__inner {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.pa .pa-help .pa-section-heading { margin-bottom: 8px; }

.pa-help__text { margin: 0; max-width: 60ch; font-size: 17px; line-height: 1.5; }

.pa-help__actions { display: flex; flex-wrap: wrap; gap: 12px; }

@media (min-width: 900px) {
	.pa-help__inner { flex-direction: row; align-items: center; justify-content: space-between; gap: 48px; }
	.pa-help__actions { flex: 0 0 auto; }
}


/* ---- Motion ------------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
	.pa *,
	.pa *::before,
	.pa *::after { transition: none !important; }
}
