/*
 * Britpart Premium — component styles (design system v0.2, see DESIGN-SYSTEM.md).
 * Tokens come from theme.json as --wp--preset--* variables; aliases below keep this file readable.
 */

:root {
	--bp-charcoal: var(--wp--preset--color--charcoal);
	--bp-shade-rgb: 22, 24, 28; /* the dark tone as r, g, b, for photo shading: rgba(var(--bp-shade-rgb), 0.9) */
	--bp-graphite: var(--wp--preset--color--graphite);
	--bp-blue: var(--wp--preset--color--brand-blue);
	--bp-silver: var(--wp--preset--color--silver);             /* marks on light: rules, bullets, hover bars */
	--bp-silver-light: var(--wp--preset--color--silver-light); /* marks and filled buttons on charcoal */
	/* Brushed metal, for the two thin accent rules only (hero search panel, All parts menu). Never on text, never moving. */
	--bp-metal: linear-gradient(90deg, #6b707a, #c4c8cf 40%, #7d828c 68%, #aeb3bb);
	/* Brushed silver fill for buttons on charcoal: lighter at the top like polished metal. Charcoal text stays 8.4:1 or better. */
	--bp-silver-fill: linear-gradient(180deg, #f1f2f4 0%, #c4c8cf 60%, #aeb3bb 100%);
	--bp-silver-fill-hover: linear-gradient(180deg, #ffffff 0%, #dfe1e5 60%, #c4c8cf 100%);
	--bp-action: var(--wp--preset--color--action);
	--bp-action-hover: var(--wp--preset--color--action-hover);
	--bp-red: var(--wp--preset--color--brand-red);
	--bp-ink: var(--wp--preset--color--ink);
	--bp-muted: var(--wp--preset--color--ink-muted);
	--bp-on-dark-muted: var(--wp--preset--color--on-dark-muted);
	--bp-paper: var(--wp--preset--color--paper);
	--bp-hairline: var(--wp--preset--color--hairline);
	--bp-control: var(--wp--preset--color--control-line);
	--bp-mono: var(--wp--preset--font-family--mono);
	/* Motion: four durations only (see DESIGN-SYSTEM.md "Motion"). */
	--bp-ease: cubic-bezier(0.2, 0.7, 0.2, 1);      /* ease-out: arrive fast, settle */
	--bp-ease-exit: cubic-bezier(0.4, 0, 1, 1);     /* ease-in: leave quickly */
	--bp-dur-feedback: 120ms;
	--bp-dur: 200ms;
	--bp-dur-panel: 320ms;
	--bp-dur-moment: 900ms;
	--bp-gutter: clamp(1rem, 4vw, 2.5rem);
}

/* ---------- Base ---------- */

body {
	font-optical-sizing: auto;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

:where(.wp-site-blocks) > * { margin-block-start: 0; }

::selection { background: var(--bp-blue); color: #fff; }

:focus-visible {
	outline: 2px solid var(--bp-blue);
	outline-offset: 3px;
}
:where(.bp-header, .bp-hero__content, .bp-footer, .bp-cta, .bp-workshop__panel, .bp-mockup-notice) :focus-visible {
	outline-color: var(--bp-silver-light);
}

.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; margin: -1px; overflow: hidden; padding: 0;
	position: absolute; width: 1px; word-wrap: normal !important;
}

a { text-underline-offset: 0.18em; text-decoration-thickness: 1px; }

.is-style-lead,
.bp-lead,
.bp-lead p {
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.5;
	color: var(--bp-muted);
}
/* A reading measure only where the column is wide and nothing else constrains it.
   On content pages the column's own width applies, so the lead lines up with its heading. */
.bp-catalogue .bp-lead, .bp-part__info .bp-lead { max-width: 44rem; }

.bp-muted { color: var(--bp-muted); }

.bp-code {
	font-family: var(--bp-mono);
	font-size: 0.8125rem;
	letter-spacing: 0.02em;
	color: var(--bp-muted);
}
.bp-code--large { font-size: 1rem; color: var(--bp-ink); }

/* ---------- The Coachline ---------- */

.bp-coachline {
	height: 6px;
	background: linear-gradient(to bottom, var(--bp-red) 0 2px, transparent 2px 4px, var(--bp-blue) 4px 6px);
}
.bp-coachline--full { width: 100%; margin: 0 !important; max-width: none !important; }

.bp-eyebrow {
	display: flex;
	align-items: center;
	gap: 0.875rem;
	margin: 0 0 1rem;
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--bp-muted);
}
.bp-eyebrow::before {
	content: "";
	flex: none;
	width: 32px;
	height: 6px;
	background: linear-gradient(to bottom, var(--bp-red) 0 2px, transparent 2px 4px, var(--bp-blue) 4px 6px);
}
.bp-eyebrow--on-dark { color: var(--bp-on-dark-muted); }
.bp-eyebrow--on-dark::before {
	background: linear-gradient(to bottom, var(--bp-red) 0 2px, transparent 2px 4px, #fff 4px 6px);
}
.bp-eyebrow a { color: inherit; text-decoration: none; }

/* ---------- Mockup notice ---------- */

.bp-mockup-notice {
	margin: 0;
	padding: 0.4rem var(--bp-gutter);
	background: var(--bp-graphite);
	color: var(--bp-on-dark-muted);
	font-size: 0.8125rem;
	text-align: center;
}

/* ---------- Header ---------- */

/* The header (with its category menu) must sit above the page: the page-transition setting
   gives it its own layer, so without this the content below paints over the open menu. */
.bp-site-header { position: relative; z-index: 100; }
.bp-header { padding-block: 1.125rem; }
.bp-header__inner { gap: 2rem; }
.bp-brand { display: block; line-height: 0; }
.bp-brand img { width: 128px; height: auto; outline: 1px solid rgba(255, 255, 255, 0.85); } /* keyline: the badge's blue field would merge into the charcoal header */
.bp-header__nav { gap: 2rem; }
.bp-nav a { color: #fff; text-decoration: none; padding-block: 0.5rem; background-image: linear-gradient(var(--bp-silver-light), var(--bp-silver-light)); background-size: 0 2px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size var(--bp-dur) var(--bp-ease); }
.bp-nav a:hover, .bp-nav a[aria-current="page"] { background-size: 100% 2px; color: #fff; }
.bp-nav .wp-block-navigation__container { gap: 1.75rem; }
.bp-header__cta .wp-block-button__link {
	background: var(--bp-silver-fill);
	border: 1px solid #aeb3bb;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
	color: var(--bp-charcoal);
	padding: 0.7rem 1.1rem;
	font-size: var(--wp--preset--font-size--small);
}
.bp-header__cta .wp-block-button__link:hover { background: var(--bp-silver-fill-hover); color: var(--bp-charcoal); border-color: #c4c8cf; }
.bp-header .wp-block-navigation__responsive-container-open { color: #fff; }
.bp-header .wp-block-navigation__responsive-container.is-menu-open {
	padding: 1.5rem var(--bp-gutter);
}
.bp-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { gap: 1.25rem; font-size: 1.5rem; }

.bp-nav a { white-space: nowrap; }
@media (max-width: 1180px) {
	.bp-nav .wp-block-navigation__container { gap: 1.25rem; }
}
@media (max-width: 479px) {
	.bp-header__cta { display: none !important; }
}
/* Core switches to the "Menu" button below 600px; switch earlier so the links never wrap. */
@media (min-width: 600px) and (max-width: 899px) {
	.bp-nav .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex !important; }
	.bp-nav .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none !important; }
}
@media (max-width: 781px) {
	.bp-brand img { width: 104px; }
}

/* ---------- Buttons ---------- */

.wp-element-button,
.bp-button {
	transition: background-color var(--bp-dur) var(--bp-ease), color var(--bp-dur) var(--bp-ease), border-color var(--bp-dur) var(--bp-ease);
}
.bp-button {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0.875rem 1.5rem;
	border: 1px solid transparent;
	border-radius: 0;
	font: inherit;
	font-weight: 500;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
}
.bp-button--action { background: var(--bp-action); color: #fff; }
.bp-button--action:hover { background: var(--bp-action-hover); color: #fff; }
.bp-button--secondary { background: transparent; color: var(--bp-ink); border-color: var(--bp-ink); }
.bp-button--secondary:hover { background: var(--bp-ink); color: #fff; }

.wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent;
	color: var(--bp-ink);
	border: 1px solid var(--bp-ink);
	padding: calc(1rem - 1px) calc(1.5rem - 1px);
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--bp-ink); color: #fff; }
.wp-block-button.bp-button-on-dark > .wp-block-button__link { color: #fff; border-color: rgba(255, 255, 255, 0.6); }
.wp-block-button.bp-button-on-dark > .wp-block-button__link:hover { background: #fff; color: var(--bp-charcoal); }
/* On charcoal and graphite the logo-blue button would almost disappear (1.8 : 1), so filled buttons there are brushed silver. */
:where(.has-charcoal-background-color, .has-graphite-background-color, .bp-workshop, .bp-hero__content, .bp-slide__content) .wp-block-button:not(.is-style-outline):not(.bp-button-on-dark) > .wp-block-button__link,
:where(.has-charcoal-background-color, .has-graphite-background-color, .bp-workshop, .bp-hero__content, .bp-slide__content) .bp-button--action { background: var(--bp-silver-fill); border: 1px solid #aeb3bb; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8); color: var(--bp-charcoal); }
:where(.has-charcoal-background-color, .has-graphite-background-color, .bp-workshop, .bp-hero__content, .bp-slide__content) .wp-block-button:not(.is-style-outline):not(.bp-button-on-dark) > .wp-block-button__link:hover,
:where(.has-charcoal-background-color, .has-graphite-background-color, .bp-workshop, .bp-hero__content, .bp-slide__content) .bp-button--action:hover { background: var(--bp-silver-fill-hover); color: var(--bp-charcoal); }

.bp-arrow-link { margin: 0; }
.bp-arrow-link a { font-weight: 500; color: var(--bp-ink); text-decoration: none; white-space: nowrap; }
.bp-arrow-link a::after { content: "→"; display: inline-block; margin-left: 0.5rem; transition: transform var(--bp-dur) var(--bp-ease); }
.bp-arrow-link a:hover { text-decoration: underline; }
.bp-arrow-link a:hover::after { transform: translateX(4px); }

/* ---------- Form fields ---------- */

.bp-field { display: flex; flex-direction: column; gap: 0.375rem; min-width: 0; }
.bp-field label { font-size: 0.875rem; font-weight: 600; color: var(--bp-ink); }
.bp-field input,
.bp-field select,
.bp-field textarea {
	box-sizing: border-box;
	width: 100%;
	min-height: 48px;
	padding: 0.75rem 0.875rem;
	border: 1px solid var(--bp-control);
	border-radius: 0;
	background: #fff;
	color: var(--bp-ink);
	font: inherit;
	font-size: 1rem;
}
.bp-field select {
	appearance: none;
	padding-right: 2.5rem;
	background-image: linear-gradient(45deg, transparent 50%, var(--bp-ink) 50%), linear-gradient(135deg, var(--bp-ink) 50%, transparent 50%);
	background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%;
	background-size: 5px 5px;
	background-repeat: no-repeat;
}
.bp-field textarea { min-height: 8rem; resize: vertical; }
.bp-field input:focus-visible,
.bp-field select:focus-visible,
.bp-field textarea:focus-visible { outline: 2px solid var(--bp-blue); outline-offset: 0; border-color: var(--bp-blue); }
.bp-hint { margin: 0; font-size: 0.875rem; color: var(--bp-muted); }
.bp-required, .bp-optional { font-weight: 400; color: var(--bp-muted); }
.bp-field--error input, .bp-field--error textarea, .bp-field--error select { border-color: var(--wp--preset--color--error); border-width: 2px; }
.bp-field__error { margin: 0; font-size: 0.875rem; font-weight: 600; color: var(--wp--preset--color--error); }
.bp-field__error::before { content: "! "; }
.bp-honeypot { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Hero ---------- */

.bp-hero {
	position: relative;
	isolation: isolate;
	margin-top: 0 !important;
	padding: clamp(3.5rem, 8vw, 6.5rem) var(--bp-gutter) 0;
	background: var(--bp-charcoal);
	color: #fff;
}
.bp-hero__media {
	position: absolute;
	inset: 0;
	z-index: -1;
	overflow: hidden;
}
.bp-hero__media picture { display: contents; }
.bp-hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; display: block; }
/* Larger screens: the owner's workshop photo fills the right side and fades in from the headline
   side, so the cars and lifts sit beside the text instead of under the shading. */
@media (min-width: 782px) {
	.bp-hero__media img { width: 64%; margin-left: auto; object-position: 40% 45%; -webkit-mask-image: linear-gradient(90deg, transparent, #000 28%); mask-image: linear-gradient(90deg, transparent, #000 28%); }
}
.bp-hero__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(90deg, rgba(22, 24, 28, 0.94) 0%, rgba(22, 24, 28, 0.78) 40%, rgba(22, 24, 28, 0.18) 74%, rgba(22, 24, 28, 0.05) 100%),
		linear-gradient(0deg, rgba(22, 24, 28, 0.55) 0%, rgba(22, 24, 28, 0) 40%);
}
/* The banner's navy-and-red diagonal cut, in the photo's top corner. */
.bp-hero__cut {
	position: absolute;
	top: -2rem;
	right: -4rem;
	width: clamp(9rem, 24vw, 22rem);
	height: clamp(4rem, 9vw, 8rem);
	background: var(--bp-graphite);
	transform: skewX(-24deg);
	z-index: 1;
}
.bp-hero__cut::before { content: ""; position: absolute; inset: 0 100% 0 auto; width: 1.25rem; background: var(--bp-red); }
.bp-hero__content,
.bp-hero__search,
.bp-hero__services { max-width: 1280px; margin-inline: auto !important; }
.bp-hero__content > * { max-width: 40rem; }
.bp-hero__years { display: flex; align-items: center; gap: 0.875rem; margin: 0 0 1.5rem; }
.bp-hero__years strong { font-size: clamp(2.25rem, 4vw, 3rem); font-weight: 800; line-height: 1; letter-spacing: -0.04em; color: #fff; }
.bp-hero__years i { font-style: normal; color: var(--bp-red); }
.bp-hero__years span { max-width: 8.5rem; padding-left: 0.875rem; border-left: 2px solid var(--bp-red); font-family: var(--bp-mono); font-size: 0.75rem; font-weight: 500; line-height: 1.5; letter-spacing: 0.14em; text-transform: uppercase; color: var(--bp-on-dark-muted); }
.bp-hero__title {
	margin: 0;
	max-width: 50rem !important; /* the longer headline sits on two lines on desktop */
	color: #fff;
	font-size: clamp(2.375rem, 5vw, 4.5rem);
	font-weight: 500;
	line-height: 1.02;
	letter-spacing: -0.025em;
}
.bp-hero__lead { margin-top: 1.5rem; font-size: var(--wp--preset--font-size--large); line-height: 1.5; color: rgba(255, 255, 255, 0.86); max-width: 34rem; }
.bp-hero__contact { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 2rem 0 0; }
.bp-hero__contact .bp-button svg { width: 1.125rem; height: 1.125rem; flex: none; margin-right: 0.5rem; }
.bp-button--on-dark { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.6); }
.bp-button--on-dark:hover { background: #fff; color: var(--bp-charcoal); border-color: #fff; }
/* Search and services: the search overlaps the photo by 3rem, then a white band takes over. */
.bp-hero__below {
	margin: clamp(2.5rem, 5vw, 4rem) calc(-1 * var(--bp-gutter)) 0;
	padding: 0 var(--bp-gutter);
	background: linear-gradient(to bottom, transparent 3rem, #fff 3rem);
	color: var(--bp-ink);
}
.bp-hero__search {
	position: relative;
	padding: clamp(1.25rem, 3vw, 2rem);
	background: #fff;
	color: var(--bp-ink);
	border-top: 3px solid var(--bp-silver);
	border-image: var(--bp-metal) 1;
	box-shadow: 0 24px 48px -24px rgba(22, 24, 28, 0.35);
}
.bp-hero__services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem 2rem; margin-top: 1.5rem !important; padding: 0; list-style: none; }
.bp-hero__services a { display: flex; align-items: center; gap: 0.875rem; min-height: 48px; color: var(--bp-graphite); font-weight: 600; line-height: 1.25; text-decoration: none; }
.bp-hero__services a:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.bp-hero__icon { flex: none; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 50%; background: var(--bp-red); color: #fff; }
.bp-hero__icon svg { width: 1.375rem; height: 1.375rem; }

@media (max-width: 781px) {
	.bp-hero__media::after { background: linear-gradient(0deg, rgba(22, 24, 28, 0.96) 18%, rgba(22, 24, 28, 0.84) 60%, rgba(22, 24, 28, 0.72) 100%); }
	.bp-hero__contact .bp-button { flex: 1 1 auto; padding-inline: 1rem; }
	.bp-hero__services { grid-template-columns: 1fr; gap: 0.25rem; }
}

/* Part search (hero + 404) */
.bp-search {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr) minmax(0, 1.4fr) auto;
	gap: 1rem;
	align-items: end;
}
@media (max-width: 960px) { .bp-search { grid-template-columns: 1fr 1fr; } .bp-search__keyword { grid-column: 1 / -1; } .bp-search .bp-button { grid-column: 1 / -1; } }
@media (max-width: 600px) { .bp-search { grid-template-columns: 1fr; } .bp-search .bp-button { width: 100%; } }

.bp-vehicle-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--bp-hairline); }
.bp-vehicle-links__label { font-size: 0.875rem; color: var(--bp-muted); margin-right: 0.25rem; }
.bp-vehicle-links ul { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }

/* ---------- Chips ---------- */

.bp-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.bp-chip {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0.375rem 0.875rem;
	border: 1px solid var(--bp-hairline);
	color: var(--bp-ink);
	font-size: 0.875rem;
	text-decoration: none;
	transition: border-color var(--bp-dur) var(--bp-ease), background-color var(--bp-dur) var(--bp-ease);
}
.bp-chip:hover { border-color: var(--bp-ink); color: var(--bp-ink); }

/* ---------- Proof strip ---------- */

.bp-proof {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	margin: 0 auto var(--wp--preset--spacing--90) !important;
	padding-top: clamp(1.5rem, 3vw, 2rem) !important;
	border-top: 1px solid var(--bp-hairline);
	padding: 0;
	list-style: none;
}
.bp-proof li { display: flex; flex-direction: column; gap: 0.375rem; padding: 0.25rem 1.5rem; border-left: 1px solid var(--bp-hairline); }
.bp-proof li:first-child { border-left: 0; padding-left: 0; }
.bp-proof strong { font-weight: 600; font-size: 1rem; }
.bp-proof span { color: var(--bp-muted); font-size: 0.9375rem; line-height: 1.45; }
@media (max-width: 960px) {
	.bp-proof { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 1.75rem; }
	.bp-proof li:nth-child(3) { border-left: 0; padding-left: 0; }
}
@media (max-width: 520px) {
	.bp-proof { grid-template-columns: 1fr; }
	.bp-proof li { border-left: 0; padding: 0 0 1.25rem; border-bottom: 1px solid var(--bp-hairline); }
}

/* ---------- Sections ---------- */

.bp-section { padding-block: var(--wp--preset--spacing--90); margin-top: 0 !important; }
.bp-section--paper { padding-inline: var(--bp-gutter); }
.bp-section__head { margin-bottom: clamp(2rem, 4vw, 3rem); gap: 1.5rem; }
.bp-section__head h2 { margin: 0; }

/* ---------- Category tiles (after britpart.com "Popular ranges") ---------- */

.bp-categories--tiles {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: clamp(1rem, 2vw, 1.5rem);
	margin: 0;
	padding: 0;
	list-style: none;
}
.bp-categories--tiles .bp-category { display: block; height: 100%; color: var(--bp-ink); text-decoration: none; }
.bp-category__media { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #fff; border: 1px solid var(--bp-hairline); }
.bp-category__media img { width: 100%; height: 100%; object-fit: contain; display: block; transition: transform var(--bp-dur-panel) var(--bp-ease); }
.bp-category__media::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--bp-silver); transform: scaleX(0); transform-origin: left; transition: transform var(--bp-dur) var(--bp-ease); }
.bp-category:hover .bp-category__media::after, .bp-category:focus-visible .bp-category__media::after { transform: scaleX(1); }
.bp-category:hover .bp-category__media img { transform: scale(1.02); }
.bp-category__body { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; padding-top: 0.875rem; }
.bp-category__name { font-size: 1.125rem; font-weight: 500; letter-spacing: -0.005em; line-height: 1.3; }
.bp-category:hover .bp-category__name { text-decoration: underline; text-underline-offset: 0.2em; }
.bp-category__count { font-family: var(--bp-mono); font-size: 0.8125rem; color: var(--bp-muted); white-space: nowrap; }
.bp-category__count::after { content: " →"; font-family: var(--wp--preset--font-family--archivo); }
@media (max-width: 960px) { .bp-categories--tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .bp-categories--tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .bp-category__name { font-size: 1rem; } .bp-category__body { flex-direction: column; gap: 0.125rem; } }

/* ---------- Part cards ---------- */

.bp-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr));
	gap: clamp(2rem, 3vw, 2.5rem) clamp(1rem, 2vw, 1.5rem);
	margin: 0;
	padding: 0;
	list-style: none;
}
.bp-card__link { display: block; color: var(--bp-ink); text-decoration: none; height: 100%; }
.bp-card__media {
	position: relative;
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: #fff;
	border: 1px solid var(--bp-hairline);
}
.bp-card__media img { width: 100%; height: 100%; object-fit: contain; display: block; transition: transform var(--bp-dur-panel) var(--bp-ease); }
.bp-card__media::after {
	content: "";
	position: absolute;
	left: 0; right: 0; bottom: 0;
	height: 3px;
	background: var(--bp-silver);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform var(--bp-dur) var(--bp-ease);
}
.bp-card__link:hover .bp-card__media::after,
.bp-card__link:focus-visible .bp-card__media::after { transform: scaleX(1); }
.bp-card__link:hover .bp-card__media img { transform: scale(1.02); }
.bp-card__noimage { display: grid; place-items: center; height: 100%; color: var(--bp-muted); font-size: 0.875rem; }
.bp-card__body { display: flex; flex-direction: column; gap: 0.25rem; padding-top: 1rem; }
.bp-card__title { font-size: 1.125rem; font-weight: 500; line-height: 1.3; letter-spacing: -0.005em; }
.bp-card__link:hover .bp-card__title { text-decoration: underline; text-underline-offset: 0.2em; }
.bp-card__meta { font-size: 0.875rem; color: var(--bp-muted); }
.bp-card__fits { font-size: 0.875rem; color: var(--bp-muted); line-height: 1.45; }
.bp-card__fits-label { font-weight: 600; color: var(--bp-ink); }
.bp-section--paper .bp-card__media { border-color: transparent; }

/* Card list control: under the card link (never inside it), a quiet outline button, never orange.
   The card is the anchor the visitor returns to after adding or removing. */
.bp-card { display: flex; flex-direction: column; height: 100%; scroll-margin-top: 1.5rem; }
.bp-card .bp-card__link { flex: 1 0 auto; height: auto; }
.bp-card__list { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1rem; margin-top: 0.875rem; }
.bp-card__list .bp-notice { box-sizing: border-box; width: 100%; margin: 0 0 0.5rem; padding: 0.75rem 0.875rem; font-size: 0.875rem; }
.bp-card__list .bp-button { min-height: 44px; padding: 0.5rem 1rem; font-size: 0.9375rem; }
.bp-card__listed { display: inline-flex; align-items: center; min-height: 44px; color: var(--bp-ink); font-size: 0.9375rem; font-weight: 500; text-decoration: none; }
.bp-card__listed:hover { text-decoration: underline; }
.bp-card__listed span[aria-hidden] { color: var(--wp--preset--color--success); font-weight: 700; }
@media (max-width: 600px) {
	.bp-card__list { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 0; margin-top: 0.625rem; }
	.bp-card__list .bp-button { width: 100%; padding-inline: 0.5rem; font-size: 0.875rem; }
	.bp-card__listed { font-size: 0.875rem; }
}

/* ---------- Catalogue ---------- */

.bp-catalogue, .bp-part, .bp-page { padding-top: clamp(1.5rem, 3vw, 2.5rem); }
.bp-page-title { font-size: var(--wp--preset--font-size--xx-large) !important; margin-block: 0.5rem 1rem; }
.bp-breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; padding: 0; list-style: none; font-size: 0.875rem; color: var(--bp-muted); }
.bp-breadcrumbs li + li::before { content: "/"; margin-right: 0.5rem; color: var(--bp-hairline); }
.bp-breadcrumbs a { color: var(--bp-muted); }
.bp-breadcrumbs a:hover { color: var(--bp-ink); }
.bp-breadcrumbs [aria-current] { color: var(--bp-ink); }

.bp-filters {
	margin-block: 2rem 2.5rem;
	padding: clamp(1rem, 3vw, 1.75rem);
	background: var(--bp-paper);
}
.bp-filters__form {
	display: grid;
	grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(0, 1.5fr) minmax(0, 0.9fr) auto;
	gap: 1rem;
	align-items: end;
}
.bp-filters__status { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; align-items: baseline; margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--bp-hairline); }
.bp-filters__count { margin: 0; font-weight: 500; }
.bp-filters__clear { font-size: 0.9375rem; }
@media (max-width: 960px) { .bp-filters__form { grid-template-columns: 1fr 1fr; } .bp-filters__keyword, .bp-filters__submit { grid-column: 1 / -1; } }
@media (max-width: 600px) {
	.bp-filters__form { grid-template-columns: 1fr; }
	.bp-filters__form .bp-button { width: 100%; }
	/* Keyword first on phones: it is the one field people type into. */
	.bp-filters__keyword { order: -1; }
	.bp-filters { margin-block: 1rem 1.5rem; }
}
.bp-field[hidden] { display: none !important; }

.bp-pagination { margin-top: 3rem; }
/* WordPress gives the list itself the class "page-numbers" too, so style the list and its items separately. */
.bp-pagination ul.page-numbers { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0; padding: 0; list-style: none; border: 0; }
.bp-pagination li > .page-numbers { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: 0.25rem; white-space: nowrap; min-width: 44px; min-height: 44px; padding: 0 0.875rem; border: 1px solid var(--bp-hairline); color: var(--bp-ink); text-decoration: none; transition: border-color var(--bp-dur) var(--bp-ease), background-color var(--bp-dur) var(--bp-ease); }
.bp-pagination li > .page-numbers.dots { border-color: transparent; min-width: 24px; padding: 0; color: var(--bp-muted); }
.bp-pagination li > .page-numbers.current { background: var(--bp-charcoal); border-color: var(--bp-charcoal); color: #fff; }
.bp-pagination li > a.page-numbers:hover { border-color: var(--bp-ink); }

.bp-empty { padding: clamp(2rem, 5vw, 4rem); background: var(--bp-paper); }
.bp-empty__title { font-size: var(--wp--preset--font-size--x-large); margin-top: 0; }
.bp-empty__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 0; }

/* ---------- Part page ---------- */

.bp-part__top { gap: clamp(2rem, 5vw, 5rem) !important; margin-top: 1.5rem !important; }
.bp-part__image { border: 1px solid var(--bp-hairline); background: #fff; }
.bp-part__image img { object-fit: contain !important; }
.bp-part__title { font-size: clamp(2rem, 4vw, 3.25rem) !important; line-height: 1.05; letter-spacing: -0.02em; margin: 0; }
.bp-part__info .bp-lead { margin-top: 1rem; }
.bp-part__actions { margin-top: 2rem !important; gap: 0.75rem; }
.bp-part__note { font-size: 0.875rem; margin-top: 1rem !important; }

.bp-summary { margin-top: 2rem; }
.bp-summary__facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0 0 1.75rem; border-top: 1px solid var(--bp-hairline); }
.bp-summary__facts > div { padding: 1rem 0; border-bottom: 1px solid var(--bp-hairline); }
.bp-summary__facts dt { font-size: var(--wp--preset--font-size--x-small); font-weight: 600; text-transform: uppercase; letter-spacing: 0.16em; color: var(--bp-muted); margin-bottom: 0.25rem; }
.bp-summary__facts dd { margin: 0; }
.bp-summary__heading { font-size: var(--wp--preset--font-size--x-small) !important; font-weight: 600; text-transform: uppercase; letter-spacing: 0.16em; color: var(--bp-muted); margin: 0 0 0.75rem; }
.bp-summary__note { margin: 1rem 0 0; padding-left: 1rem; border-left: 2px solid var(--bp-silver); font-size: 0.9375rem; }

.bp-part__details { gap: clamp(2rem, 5vw, 5rem) !important; margin-top: clamp(3rem, 7vw, 6rem) !important; }
.bp-specs h2, .bp-part__description h2, .bp-related h2 { font-size: var(--wp--preset--font-size--x-large); margin: 0 0 1.25rem; }
.bp-specs dl { margin: 0; border-top: 1px solid var(--bp-ink); }
.bp-specs dl > div { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 1rem; padding: 0.875rem 0; border-bottom: 1px solid var(--bp-hairline); }
.bp-specs dt { color: var(--bp-muted); }
.bp-specs dd { margin: 0; font-family: var(--bp-mono); font-size: 0.9375rem; }
.bp-part__description { margin-top: 2.5rem !important; }
.bp-related { margin-top: var(--wp--preset--spacing--90); padding-top: 3rem; border-top: 1px solid var(--bp-hairline); }

/* ---------- Enquiry ---------- */

.bp-enquiry { padding: clamp(1.25rem, 4vw, 2.5rem); background: var(--bp-paper); scroll-margin-top: 1rem; }
.bp-enquiry:focus { outline: none; }
.bp-enquiry h2 { font-size: var(--wp--preset--font-size--x-large); margin: 0 0 1rem; }
.bp-enquiry__part { margin: 0 0 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--bp-hairline); }
.bp-enquiry__part .bp-code { margin-left: 0.5rem; }
.bp-form { display: grid; gap: 1.25rem; }
.bp-enquiry { container-type: inline-size; }
.bp-form__row { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@container (min-width: 36rem) { .bp-form__row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.bp-form__privacy { margin: 0; font-size: 0.875rem; color: var(--bp-muted); }
.bp-form .bp-button { justify-self: start; }

.bp-notice { margin: 0 0 1.5rem; padding: 1rem 1.25rem; border-left: 4px solid; }
.bp-notice p { margin: 0.25rem 0; }
.bp-notice ul { margin: 0.5rem 0 0; padding-left: 1.25rem; }
.bp-notice__title { font-weight: 600; }
.bp-notice--success { background: var(--wp--preset--color--success-bg); border-color: var(--wp--preset--color--success); color: var(--wp--preset--color--success); }
.bp-notice--success .bp-notice__title::before { content: "✓ "; }
.bp-notice--error { background: var(--wp--preset--color--error-bg); border-color: var(--wp--preset--color--error); color: var(--wp--preset--color--error); }
.bp-notice--error a { color: inherit; }

/* ---------- Enquiry list ---------- */

/* Part page: an outline button under the main actions, so the page keeps its one orange action. */
.bp-listtoggle { margin-top: 0.75rem; }
.bp-listtoggle .bp-notice { margin-bottom: 0.75rem; }
.bp-listtoggle__status { margin: 0 0 0.75rem; }
.bp-listform { margin: 0; }
@media (max-width: 600px) { .bp-listtoggle .bp-button { width: 100%; } }
/* Header: "Enquiry list (N)" joins the menu while the list has parts. On narrow desktops it takes
   the outline "Send an enquiry" slot (Contact is still in the menu), so the links never wrap. */
@media (min-width: 900px) and (max-width: 1024px) {
	.bp-header__nav:has(.bp-nav__list) .bp-header__cta { display: none; }
}

/* List page: photo, code and name, Remove; the enquiry form follows. */
.bp-list { margin: 0 0 clamp(2rem, 5vw, 3rem); padding: 0; list-style: none; border-top: 1px solid var(--bp-ink); }
.bp-list__item { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 0.75rem 1.25rem; align-items: center; padding: 1rem 0; border-bottom: 1px solid var(--bp-hairline); }
.bp-list__media { display: grid; place-items: center; width: 96px; height: 96px; border: 1px solid var(--bp-hairline); background: #fff; color: var(--bp-muted); font-size: 0.75rem; text-align: center; text-decoration: none; }
.bp-list__media img { display: block; width: 100%; height: 100%; object-fit: contain; }
.bp-list__body { display: grid; gap: 0.25rem; min-width: 0; }
.bp-list__title { color: var(--bp-ink); font-weight: 500; text-decoration: none; overflow-wrap: anywhere; }
.bp-list__title:hover { text-decoration: underline; }
@media (max-width: 600px) {
	.bp-list__item { grid-template-columns: 72px minmax(0, 1fr); }
	.bp-list__media { width: 72px; height: 72px; }
	.bp-list__item .bp-listform { grid-column: 2; }
}

/* ---------- Workshop band ---------- */

.bp-workshop {
	display: grid;
	grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
	margin-top: 0 !important;
	background: var(--bp-charcoal);
	color: #fff;
}
.bp-workshop__media { min-height: 100%; }
.bp-workshop__media img { width: 100%; height: 100%; min-height: 22rem; object-fit: cover; display: block; }
.bp-workshop__panel { padding: clamp(2.5rem, 6vw, 5.5rem) clamp(1.5rem, 5vw, 5rem); align-self: center; }
.bp-workshop__panel h2 { color: #fff; margin: 0 0 2rem; }
@media (max-width: 781px) { .bp-workshop { grid-template-columns: 1fr; } }

.bp-service-list { margin: 0 0 2rem; padding: 0; list-style: none; }
.bp-service-list li { display: flex; flex-direction: column; gap: 0.125rem; padding: 1rem 0; border-top: 1px solid rgba(255, 255, 255, 0.18); }
.bp-service-list li:last-child { border-bottom: 1px solid rgba(255, 255, 255, 0.18); }
.bp-service-list strong { font-weight: 500; font-size: 1.125rem; }
.bp-service-list span { color: var(--bp-on-dark-muted); font-size: 0.9375rem; }

/* ---------- Articles ---------- */

.bp-articles { gap: clamp(2rem, 3vw, 2.5rem) clamp(1rem, 2vw, 1.5rem) !important; }
.bp-article__image { margin-bottom: 1rem; background: #fff; border: 1px solid var(--bp-hairline); }
.bp-article__image img { object-fit: contain !important; }
.bp-article__date { font-size: var(--wp--preset--font-size--x-small); font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--bp-muted); }
.bp-article__title { margin: 0.25rem 0 0.5rem !important; font-size: 1.375rem !important; line-height: 1.25; }
.bp-article__title a { color: var(--bp-ink); text-decoration: none; }
.bp-article__title a:hover { text-decoration: underline; }
.wp-block-post-excerpt__excerpt { color: var(--bp-muted); }
.bp-article { padding-top: clamp(2rem, 5vw, 4rem); }
.bp-article h1 { font-size: var(--wp--preset--font-size--xx-large); }
.bp-article__hero { background: #fff; border: 1px solid var(--bp-hairline); margin-block: 2rem !important; }
.bp-article__cta { margin-top: 3rem !important; padding: 1.25rem 1.5rem; border-left: 3px solid var(--bp-silver); }

/* ---------- CTA band ---------- */

.bp-cta { padding-block: clamp(4rem, 9vw, 7rem); margin-top: 0 !important; }
.bp-cta__inner { gap: 2rem; }
.bp-cta h2 { margin: 0 0 1rem; }
.bp-cta__text { margin: 0; max-width: 34rem; color: var(--bp-on-dark-muted); font-size: var(--wp--preset--font-size--large); }

/* ---------- Footer ---------- */

.bp-footer { font-size: 0.9375rem; color: var(--bp-on-dark-muted); }
.bp-footer a { color: #fff; text-decoration: none; }
.bp-footer a:hover { text-decoration: underline; text-decoration-color: var(--bp-silver-light); }
.bp-footer__brand { color: #fff; font-size: 1.25rem; font-weight: 500; letter-spacing: -0.01em; }
.bp-footer__heading { font-size: var(--wp--preset--font-size--x-small) !important; font-weight: 600; text-transform: uppercase; letter-spacing: 0.16em; color: var(--bp-on-dark-muted) !important; margin: 0 0 1rem; }
.bp-footer__links { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.5rem; }
.bp-footer__base { margin-top: clamp(3rem, 6vw, 4.5rem) !important; padding-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, 0.15); font-size: 0.8125rem; }
.bp-footer__base p { margin: 0; }
.bp-coachline--footer { margin-top: var(--wp--preset--spacing--90) !important; }
.bp-home + .wp-block-template-part .bp-coachline--footer,
.bp-home ~ .bp-coachline--footer { margin-top: 0 !important; }

/* ---------- Content pages ---------- */

.bp-ticks { padding: 0; list-style: none; border-top: 1px solid var(--bp-hairline); }
.bp-ticks li { padding: 1rem 0 1rem 2rem; border-bottom: 1px solid var(--bp-hairline); position: relative; }
.bp-ticks li::before { content: ""; position: absolute; left: 0; top: 1.55rem; width: 14px; height: 6px; background: linear-gradient(to bottom, var(--bp-red) 0 2px, transparent 2px 4px, var(--bp-blue) 4px 6px); }
.bp-services { gap: 0 !important; border-top: 1px solid var(--bp-hairline); }
.bp-service { padding: 1.5rem 1.5rem 1.5rem 0; border-bottom: 1px solid var(--bp-hairline); }
.bp-service h3 { margin-top: 0; }
.bp-dealer { padding: 1.5rem; background: var(--bp-paper); border-left: 3px solid var(--bp-blue); }
.bp-dealer h3 { margin-top: 0; }
.bp-contact { gap: clamp(2rem, 5vw, 5rem) !important; margin-top: 2rem !important; }
.bp-contact :is(h2, h3) { font-size: var(--wp--preset--font-size--x-small) !important; font-weight: 600; text-transform: uppercase; letter-spacing: 0.16em; color: var(--bp-muted); margin-top: 2rem; }
.bp-contact :is(h2, h3):first-child { margin-top: 0; }
.bp-contact .bp-enquiry h2 { font-size: var(--wp--preset--font-size--x-large) !important; font-weight: 500; text-transform: none; letter-spacing: -0.015em; color: var(--bp-ink); margin-top: 0; }

/* Style guide swatches */
.bp-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: 1.5rem; padding: 0; list-style: none; }
.bp-swatches li { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.875rem; }
.bp-swatches code { font-family: var(--bp-mono); color: var(--bp-muted); }
.bp-swatches span:last-child { color: var(--bp-muted); }
.bp-swatch { display: block; height: 72px; border: 1px solid var(--bp-hairline); margin-bottom: 0.5rem; }



/* Phones: the Vehicle dropdown already covers these shortcuts; keep the hero short. */
@media (max-width: 600px) {
	.bp-hero .bp-vehicle-links { display: none; }
}
@media (max-width: 600px) {
	.bp-part__actions .wp-block-button,
	.bp-part__actions .wp-block-button__link { width: 100%; }
}
.bp-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content,
.bp-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { align-items: flex-start !important; }

/* Real-catalogue additions: gallery, plain spec lines, universal fitment. */
.bp-gallery { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.75rem 0 0; padding: 0; list-style: none; }
.bp-gallery a { display: block; width: 72px; height: 72px; border: 1px solid var(--bp-hairline); background: #fff; }
.bp-gallery a:hover { border-color: var(--bp-ink); }
.bp-gallery img { width: 100%; height: 100%; object-fit: contain; display: block; }
.bp-specs__list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--bp-ink); }
.bp-specs dl + .bp-specs__list { border-top: 0; }
.bp-specs__list li { padding: 0.75rem 0 0.75rem 1.5rem; border-bottom: 1px solid var(--bp-hairline); position: relative; }
.bp-specs__list li::before { content: ""; position: absolute; left: 0; top: 1.4rem; width: 10px; height: 2px; background: var(--bp-silver); }
.bp-summary__all { margin: 0; font-weight: 500; }
.bp-summary__note-label { font-weight: 600; }

/* ---------- Britpart UK patterns: category bar, codes, reassurance, icons ---------- */

.bp-icon { width: 1.25rem; height: 1.25rem; flex: none; }

.bp-catbar { background: var(--bp-graphite); color: #fff; margin-top: 0 !important; }
.bp-catbar__inner { display: flex; align-items: stretch; gap: 0; max-width: 1280px; margin: 0 auto; padding-inline: var(--bp-gutter); min-height: 48px; }
.bp-catbar__all { position: relative; }
.bp-catbar__all > summary {
	display: flex; align-items: center; gap: 0.5rem; height: 100%; min-height: 48px; padding: 0 1.25rem;
	background: var(--bp-blue); font-size: 0.875rem; font-weight: 600; letter-spacing: 0.04em; cursor: pointer; list-style: none;
}
.bp-catbar__all > summary::-webkit-details-marker { display: none; }
.bp-catbar__all[open] > summary .bp-icon { transform: rotate(180deg); }
.bp-catbar__all > summary .bp-icon { width: 1rem; height: 1rem; transition: transform var(--bp-dur) var(--bp-ease); }
.bp-catbar__menu {
	position: absolute; left: 0; top: 100%; z-index: 50; width: min(46rem, 90vw); padding: 1.5rem;
	background: #fff; color: var(--bp-ink); border-top: 3px solid var(--bp-silver); border-image: var(--bp-metal) 1; box-shadow: 0 24px 48px -24px rgba(22, 24, 28, 0.45);
}
.bp-catbar__menu ul { columns: 3; column-gap: 1.5rem; margin: 0; padding: 0; list-style: none; }
.bp-catbar__menu li { break-inside: avoid; }
.bp-catbar__menu a { display: flex; justify-content: space-between; gap: 0.75rem; padding: 0.55rem 0; border-bottom: 1px solid var(--bp-hairline); color: var(--bp-ink); text-decoration: none; font-size: 0.9375rem; }
.bp-catbar__menu a:hover { color: var(--bp-blue); }
.bp-catbar__menu a span { font-family: var(--bp-mono); font-size: 0.8125rem; color: var(--bp-muted); }
.bp-catbar__menu .bp-catbar__viewall { display: inline-block; border: 0; margin-top: 1rem; font-weight: 600; color: var(--bp-blue); text-decoration: underline; }
.bp-catbar__links { display: flex; flex: 1; min-width: 0; margin: 0; padding: 0; list-style: none; overflow: hidden; }
.bp-catbar__links a {
	display: flex; align-items: center; height: 100%; padding: 0 1rem; white-space: nowrap; color: #fff; text-decoration: none; font-size: 0.875rem; font-weight: 500;
	background-image: linear-gradient(var(--bp-silver-light), var(--bp-silver-light)); background-size: 0 2px; background-repeat: no-repeat; background-position: 1rem calc(100% - 10px); transition: background-size var(--bp-dur) var(--bp-ease);
}
.bp-catbar__links a:hover, .bp-catbar__links a[aria-current] { background-size: calc(100% - 2rem) 2px; color: #fff; }
.bp-catbar__search { display: flex; align-items: center; margin-left: auto; padding: 0.375rem 0; }
.bp-catbar__search input { width: 15rem; height: 36px; padding: 0 0.75rem; border: 1px solid rgba(255, 255, 255, 0.35); border-right: 0; border-radius: 0; background: rgba(255, 255, 255, 0.08); color: #fff; font: inherit; font-size: 0.875rem; }
.bp-catbar__search input::placeholder { color: var(--bp-on-dark-muted); }
.bp-catbar__search button { display: grid; place-items: center; width: 44px; height: 36px; border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 0; background: transparent; color: #fff; cursor: pointer; }
.bp-catbar__search button:hover { background: #fff; color: var(--bp-charcoal); }
.bp-catbar :focus-visible { outline-color: var(--bp-silver-light); }
.bp-catbar__links li:nth-child(n+7) { display: none; } /* the rest live in "All parts" */
@media (max-width: 1279px) { .bp-catbar__links li:nth-child(n+5) { display: none; } }
@media (max-width: 1100px) { .bp-catbar__links li:nth-child(n+4) { display: none; } .bp-catbar__search input { width: 11rem; } }
/* Phones and tablets: the bar keeps "All parts" and the search box (its category links live in
   "All parts"), so a part code can be searched from every page, not only the homepage. */
@media (max-width: 899px) {
	.bp-catbar__links { display: none; }
	.bp-catbar__all > summary { padding: 0 1rem; }
	.bp-catbar__search { flex: 1; min-width: 0; margin-left: 0.75rem; }
	.bp-catbar__search input { flex: 1; width: auto; min-width: 0; height: 40px; font-size: 1rem; } /* 16px: phones do not zoom in on focus */
	.bp-catbar__search button { height: 40px; }
	/* The menu spans the bar (inside the page gutters) rather than hanging off "All parts". */
	.bp-catbar__inner { position: relative; }
	.bp-catbar__all { position: static; }
	.bp-catbar__menu { left: var(--bp-gutter); right: var(--bp-gutter); width: auto; padding: 1rem 1.25rem; }
	.bp-catbar__menu ul { columns: 2; }
	.bp-catbar__menu a { min-height: 44px; align-items: center; padding-block: 0.25rem; }
}
@media (max-width: 600px) { .bp-catbar__menu ul { columns: 1; } }

.bp-card__code { font-size: 0.8125rem; color: var(--bp-muted); }
.bp-code--brand { color: var(--bp-blue); }

.bp-assurance { display: grid; gap: 0.625rem; margin: 1.5rem 0 0; padding: 1.25rem 0 0; border-top: 1px solid var(--bp-hairline); list-style: none; font-size: 0.9375rem; color: var(--bp-muted); }
.bp-assurance li { display: flex; gap: 0.625rem; align-items: flex-start; }
.bp-assurance .bp-icon { color: var(--bp-blue); margin-top: 0.1rem; }

.bp-proof li { position: relative; }
.bp-proof .bp-icon { width: 1.5rem; height: 1.5rem; color: var(--bp-blue); margin-bottom: 0.5rem; }

/* ---------- Motion (Britpart Premium, v0.3) ----------
 * Every movement here has a reason a customer would recognise. Things that repeat
 * all day stay near-instant; the homepage arrival is the one authored moment.
 * Only opacity and transform are animated (cheap for older phones).
 * prefers-reduced-motion removes everything that travels. */

/* 1. Press feedback: the button gives slightly under the finger (confirms the tap). */
.wp-element-button:active, .bp-button:active, .bp-catbar__search button:active { transform: translateY(1px); transition-duration: var(--bp-dur-feedback); }
.bp-button[aria-busy="true"] { opacity: 0.75; cursor: progress; }

@media (prefers-reduced-motion: no-preference) {

	/* 2. Homepage arrival: one moment of character, once per visit. The photo settles,
	   then eyebrow → headline → lead → search rise into place, and the Coachline draws on. */
	@keyframes bp-settle { from { transform: scale(1.04); } to { transform: none; } } /* no fade: the photo is the page's largest paint */
	@keyframes bp-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
	.bp-hero__media img { animation: bp-settle var(--bp-dur-moment) var(--bp-ease) both; }
	.bp-hero__content > * { animation: bp-rise 560ms var(--bp-ease) both; }
	.bp-hero__content > :nth-child(1) { animation-delay: 120ms; }
	.bp-hero__content > :nth-child(2) { animation-delay: 200ms; }
	.bp-hero__content > :nth-child(3) { animation-delay: 300ms; }
	.bp-hero__content > :nth-child(4) { animation-delay: 380ms; }
	.bp-hero__search { animation: bp-rise 560ms var(--bp-ease) 440ms both; }
	.bp-hero__cut { animation: bp-cut-in 700ms var(--bp-ease) 150ms both; }
	@keyframes bp-cut-in { from { translate: 120% 0; } }

	/* 3. Page to page: a short cross-fade so the site feels like one piece; the header
	   and category bar stay still while the content changes. */
	/* The opt-in, @view-transition { navigation: auto; }, sits inline in the <head> (functions.php). */
	.bp-site-header { view-transition-name: bp-header; }
	::view-transition-old(root) { animation: 120ms var(--bp-ease-exit) both bp-fade-out; }
	::view-transition-new(root) { animation: var(--bp-dur) var(--bp-ease) both bp-fade-in; }
	::view-transition-group(bp-header) { animation-duration: 0s; }
	@keyframes bp-fade-out { to { opacity: 0; } }
	@keyframes bp-fade-in { from { opacity: 0; } }

	/* 4. "All parts" opens from the bar it belongs to (closing is instant: nobody waits to see a menu leave). */
	.bp-catbar__all[open] .bp-catbar__menu { animation: bp-drop var(--bp-dur) var(--bp-ease) both; }
	@keyframes bp-drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

	/* 5. Phone filters and enquiry results ease in instead of popping (softens the change). */
	.bp-filters__form .bp-field:not([hidden]) { animation: bp-fade-in var(--bp-dur) var(--bp-ease) both; }
	.bp-notice { animation: bp-rise var(--bp-dur-panel) var(--bp-ease) both; }

	/* 6. Gallery: the main photo cross-fades when a thumbnail is chosen (shows what changed). */
	.bp-part__image img { transition: opacity var(--bp-dur) var(--bp-ease); }
	.bp-part__image.is-swapping img { opacity: 0; transition-duration: 120ms; transition-timing-function: var(--bp-ease-exit); }

	/* 7. In-page jumps ("Ask about this part" → form) glide, so you see where you went. */
	html { scroll-behavior: smooth; }
}

/* Gallery state: the photo being shown */
.bp-gallery a[aria-current="true"] { border-color: var(--bp-ink); box-shadow: inset 0 -3px 0 var(--bp-silver); }

@media (prefers-reduced-motion: reduce) {
	/* Gentler and fewer, not broken: colour/opacity feedback stays, nothing travels. */
	*, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
	.bp-card__link:hover .bp-card__media img, .bp-category:hover .bp-category__media img { transform: none; }
	.wp-element-button:active, .bp-button:active { transform: none; }
}

/* Phones: keep page numbers on one line; buttons stay 44 px square for thumbs. */
@media (max-width: 600px) {
	.bp-pagination ul.page-numbers { gap: 0.375rem; }
	.bp-pagination li > .page-numbers { padding: 0 0.5rem; }
	.bp-pg__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

/* ---------- Review 3 fixes ---------- */

/* Phones: two cards per row so shoppers can compare without endless scrolling. */
@media (max-width: 600px) {
	.bp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 0.75rem; }
	.bp-card__body { padding-top: 0.625rem; }
	.bp-card__title { font-size: 0.9375rem; }
	.bp-card__meta, .bp-card__fits, .bp-card__code { font-size: 0.75rem; }
}



/* Service and dealer titles are now H2 (correct outline) but keep their card size. */
.bp-service h2, .bp-dealer h2 { font-size: var(--wp--preset--font-size--x-large) !important; margin-top: 0; }

/* Footer links: comfortable thumb targets on phones. */
@media (max-width: 600px) {
	.bp-footer__links { gap: 0; }
	.bp-footer__links a { display: flex; align-items: center; min-height: 44px; }
}

/* Article cards without a picture: a quiet paper panel with the Coachline. */
.bp-article__image--placeholder a { display: flex; flex-direction: column; justify-content: flex-end; gap: 0.75rem; height: 100%; padding: 1.25rem; background: var(--bp-paper); color: var(--bp-muted); text-decoration: none; font-size: var(--wp--preset--font-size--x-small); font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; }
.bp-article__image--placeholder .bp-coachline { width: 32px; }
.bp-news-list { margin-top: 2.5rem; }

/* ---------- UX audit additions (15 October 2026) ---------- */

/* Catalogue: one removable chip per active filter, beside "Clear filters". */
.bp-filters__chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.bp-chip--remove { gap: 0.5rem; background: #fff; color: var(--bp-ink); text-decoration: none; }
.bp-chip--remove span[aria-hidden] { font-size: 1.125rem; line-height: 1; color: var(--bp-muted); }
.bp-chip--remove:hover span[aria-hidden] { color: var(--bp-ink); }
.bp-filters__dropped { margin: 1rem 0 0; padding-left: 1rem; border-left: 2px solid var(--bp-silver); font-size: 0.9375rem; }

/* Part page: quiet text buttons for "Copy part code" and "Share this part". */
.bp-part__tools { display: flex; flex-wrap: wrap; gap: 0 1.5rem; margin-top: 0.5rem; }
.bp-textbutton {
	display: inline-flex; align-items: center; min-height: 44px; padding: 0; border: 0; background: none;
	color: var(--bp-blue); font: inherit; font-size: 0.9375rem; font-weight: 500; text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer;
}
.bp-textbutton:hover { color: var(--bp-ink); }

/* Phones: the part's two actions stay in reach once their own buttons scroll away (britpart-ux.js). */
.bp-actionbar {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
	display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 0.5rem;
	padding: 0.625rem var(--bp-gutter) calc(0.625rem + env(safe-area-inset-bottom));
	background: #fff; border-top: 1px solid var(--bp-hairline);
	transform: translateY(100%); visibility: hidden;
	transition: transform var(--bp-dur) var(--bp-ease-exit), visibility 0s linear var(--bp-dur);
}
.bp-actionbar.is-visible { transform: none; visibility: visible; transition: transform var(--bp-dur-panel) var(--bp-ease), visibility 0s; }
.bp-actionbar .bp-button { justify-content: center; width: 100%; min-height: 48px; padding-inline: 0.75rem; text-align: center; }
@media (max-width: 781px) { .has-actionbar .bp-footer { padding-bottom: calc(var(--wp--preset--spacing--50) + 72px) !important; } }
@media (min-width: 782px) { .bp-actionbar { display: none; } }

/* Critic, 18 Oct 2026: the corner block was made for the old full-width photo and now covers the
   owner's photo (the Coachline under the category bar carries the stripe), and red service
   discs right under the one action pulled the eye from it. */
.bp-hero__cut { display: none; }
.bp-hero__icon { background: var(--bp-graphite); }

/* "Add to list" while the page waits for the answer (britpart-ux.js sets aria-busy). */
.bp-listform button[aria-busy="true"] { opacity: 0.6; cursor: progress; }
