/* ==========================================================================
   Dynamic Auto - Design System (Sprint 0)
   Mobile-first. Breakpoints: 768px (tablet), 1024px (desktop).
   ========================================================================== */

/* 1. Tokens
   ========================================================================== */
:root {
	/* Brand */
	--color-navy: #0F1B2D;        /* header, footer, dark sections */
	--color-navy-2: #16263D;      /* cards on dark backgrounds, trust bar */
	--color-navy-dark: #0B1422;   /* footer */
	--color-on-dark-muted: #CBD5E1; /* muted text on navy: 11:1+ */
	--color-call: #EA580C;        /* ONLY for Call buttons */
	--color-call-hover: #C2410C;
	--color-wa: #128C7E;          /* WhatsApp buttons */
	--color-wa-hover: #0E6F64;

	/* Neutrals */
	--color-bg: #F5F7FA;
	--color-white: #FFFFFF;
	--color-text: #1F2937;
	--color-muted: #4B5563;
	--color-border: #E5E7EB;
	--color-star: #F5B301;        /* rating stars */

	/* Focus ring (switches to white on dark surfaces) */
	--color-focus: var(--color-navy);

	/* Type */
	--font-heading: 'Barlow', system-ui, sans-serif;
	--font-body: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
	--fs-body: 1.0625rem;         /* 17px */
	--fs-small: 0.9375rem;        /* 15px */
	--fs-h1: clamp(2rem, 1.55rem + 2.2vw, 3.25rem);
	--fs-h2: clamp(1.625rem, 1.35rem + 1.4vw, 2.375rem);
	--fs-h3: clamp(1.3125rem, 1.18rem + 0.7vw, 1.75rem);
	--fs-h4: clamp(1.125rem, 1.07rem + 0.3vw, 1.3125rem);
	--lh-body: 1.6;
	--lh-heading: 1.15;

	/* Spacing scale */
	--space-1: 4px;
	--space-2: 8px;
	--space-3: 12px;
	--space-4: 16px;
	--space-5: 24px;
	--space-6: 32px;
	--space-7: 48px;
	--space-8: 64px;
	--space-9: 96px;

	/* Shape */
	--radius-sm: 8px;
	--radius-md: 12px;
	--shadow: 0 4px 16px rgba(15, 27, 45, 0.08), 0 1px 3px rgba(15, 27, 45, 0.06);

	/* Layout */
	--container-max: 1200px;
	--container-pad: var(--space-4);
	--tap-min: 48px;
	--btn-min: 52px;
	--header-h: 80px;             /* sticky header height, 768px+ */
	--sticky-cta-h: 76px;         /* mobile bottom bar: 60px button + 2 x 8px padding */

	--transition: 150ms ease;
}

@media (min-width: 768px) {
	:root {
		--container-pad: var(--space-5);
	}
}

/* 2. Reset
   ========================================================================== */
*,
*::before,
*::after {
	box-sizing: border-box;
}

* {
	margin: 0;
}

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}

body {
	min-height: 100vh;
	font-family: var(--font-body);
	font-size: var(--fs-body);
	line-height: var(--lh-body);
	color: var(--color-text);
	background-color: var(--color-bg);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

img,
picture,
video,
canvas,
svg {
	display: block;
	max-width: 100%;
}

img {
	height: auto;
}

input,
button,
textarea,
select {
	font: inherit;
	color: inherit;
}

button {
	cursor: pointer;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
	overflow-wrap: break-word;
}

ul[class],
ol[class] {
	list-style: none;
	padding: 0;
}

address {
	font-style: normal;
}

/* 3. Typography
   ========================================================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--font-heading);
	font-weight: 700;
	line-height: var(--lh-heading);
	color: inherit;
	text-wrap: balance;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); font-weight: 600; }

p {
	text-wrap: pretty;
}

/* Vertical rhythm inside flowing content */
.flow > * + * {
	margin-top: var(--space-4);
}

.flow > * + :is(h2, h3, h4) {
	margin-top: var(--space-6);
}

a {
	color: var(--color-navy);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.15em;
}

a:hover {
	text-decoration-thickness: 2px;
}

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

.text-small {
	font-size: var(--fs-small);
}

/* 4. Focus (visible, high-contrast)
   ========================================================================== */
:focus-visible {
	outline: 3px solid var(--color-focus);
	outline-offset: 3px;
	border-radius: 2px;
}

:focus:not(:focus-visible) {
	outline: none;
}

/* 5. Layout
   ========================================================================== */
.container {
	width: 100%;
	max-width: var(--container-max);
	margin-inline: auto;
	/* max() keeps content clear of the notch in landscape (viewport-fit=cover) */
	padding-left: max(var(--container-pad), env(safe-area-inset-left, 0px));
	padding-right: max(var(--container-pad), env(safe-area-inset-right, 0px));
}

.section {
	padding-block: var(--space-7);
}

@media (min-width: 768px) {
	.section {
		padding-block: var(--space-8);
	}
}

@media (min-width: 1024px) {
	.section {
		padding-block: var(--space-9);
	}
}

.section--light {
	background-color: var(--color-bg);
}

.section--white {
	background-color: var(--color-white);
}

/* Dark surfaces: navy bg, white text, white focus ring */
.section--dark,
.trust-bar,
.site-header,
.site-footer,
.sticky-cta {
	--color-focus: var(--color-white);
	background-color: var(--color-navy);
	color: var(--color-white);
}

.section--dark a:not(.btn),
.site-header a:not(.btn),
.site-footer a:not(.btn) {
	color: var(--color-white);
}

.section--dark .text-muted,
.site-footer .text-muted {
	color: var(--color-on-dark-muted);
}

.card {
	background-color: var(--color-white);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	box-shadow: var(--shadow);
	padding: var(--space-5);
}

.section--dark .card {
	background-color: var(--color-navy-2);
	border-color: rgba(255, 255, 255, 0.08);
	box-shadow: none;
}

/* 6. Buttons
   Text is bold and 19px so it counts as WCAG "large text":
   white on #EA580C = 3.6:1, white on #128C7E = 4.1:1 (AA large needs 3:1).
   ========================================================================== */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-2);
	min-height: var(--btn-min);
	padding: var(--space-3) var(--space-5);
	border: 2px solid transparent;
	border-radius: var(--radius-sm);
	font-family: var(--font-body);
	font-size: 1.1875rem; /* 19px */
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	transition: background-color var(--transition), border-color var(--transition), color var(--transition), transform var(--transition);
}

.btn:hover {
	text-decoration: none;
}

.btn:active {
	transform: translateY(1px);
}

.btn .icon {
	flex-shrink: 0;
	width: 1.25em;
	height: 1.25em;
}

.btn--call {
	background-color: var(--color-call);
	color: var(--color-white);
}

.btn--call:hover,
.btn--call:focus-visible {
	background-color: var(--color-call-hover);
	color: var(--color-white);
}

.btn--whatsapp {
	background-color: var(--color-wa);
	color: var(--color-white);
}

.btn--whatsapp:hover,
.btn--whatsapp:focus-visible {
	background-color: var(--color-wa-hover);
	color: var(--color-white);
}

.btn--outline {
	background-color: transparent;
	border-color: currentColor;
	color: var(--color-navy);
}

.btn--outline:hover,
.btn--outline:focus-visible {
	background-color: var(--color-navy);
	border-color: var(--color-navy);
	color: var(--color-white);
}

.section--dark .btn--outline,
.site-header .btn--outline,
.site-footer .btn--outline {
	color: var(--color-white);
}

.section--dark .btn--outline:hover,
.section--dark .btn--outline:focus-visible,
.site-header .btn--outline:hover,
.site-header .btn--outline:focus-visible,
.site-footer .btn--outline:hover,
.site-footer .btn--outline:focus-visible {
	background-color: var(--color-white);
	border-color: var(--color-white);
	color: var(--color-navy);
}

.btn--lg {
	min-height: 60px;
	padding: var(--space-4) var(--space-6);
	font-size: 1.25rem;
}

.btn--block {
	display: flex;
	width: 100%;
}

.btn-group {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-3);
}

/* 7. Badge
   ========================================================================== */
.badge {
	display: inline-flex;
	align-items: center;
	gap: var(--space-1);
	padding: var(--space-1) var(--space-3);
	border-radius: 999px;
	background-color: var(--color-navy);
	color: var(--color-white);
	font-size: 0.875rem;
	font-weight: 700;
	line-height: 1.5;
	letter-spacing: 0.01em;
	white-space: nowrap;
}

.section--dark .badge {
	background-color: var(--color-white);
	color: var(--color-navy);
}

/* 8. Image placeholder (AI images go here later)
   ========================================================================== */
.img-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	aspect-ratio: var(--ph-ratio, 16 / 9); /* set inline by dap_img_placeholder() */
	padding: var(--space-4);
	border: 2px dashed #9CA3AF;
	border-radius: var(--radius-md);
	background-color: #EEF1F5;
	color: var(--color-muted);
	text-align: center;
}

/* Real images from dap_image(): same ratio and corners as the placeholder.
   width/height attributes reserve the space (no layout shift); aspect-ratio
   and object-fit keep the exact crop even if a file is slightly off. */
.dap-img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: var(--ph-ratio, auto);
	object-fit: cover;
	border-radius: var(--radius-md);
	background-color: var(--color-bg); /* shown while the image loads */
}

.img-placeholder__label {
	max-width: 32ch;
	font-size: var(--fs-small);
	font-weight: 600;
	line-height: 1.4;
}

/* 9. Utilities
   ========================================================================== */
.visually-hidden {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

.skip-link {
	position: absolute;
	top: var(--space-2);
	left: var(--space-2);
	z-index: 1000;
	display: inline-flex;
	align-items: center;
	min-height: var(--tap-min);
	padding: var(--space-2) var(--space-4);
	border-radius: var(--radius-sm);
	background-color: var(--color-white);
	color: var(--color-navy);
	font-weight: 700;
	transform: translateY(-200%);
}

.skip-link:focus {
	transform: none;
}

/* 10. Trust bar (768px+ only)
   ========================================================================== */
.trust-bar {
	display: none;
	background-color: var(--color-navy-2);
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
	font-size: 0.875rem;
	line-height: 1.4;
}

@media (min-width: 768px) {
	.trust-bar {
		display: block;
	}
}

.trust-bar__list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 2px var(--space-2);
	padding-block: var(--space-2);
	text-align: center;
}

.trust-bar__list li + li::before {
	content: "\00B7";
	content: "\00B7" / "";
	margin-right: var(--space-2);
	color: var(--color-on-dark-muted);
}

/* 11. Header
   No nav on purpose. Sticky on 768px+ only; on mobile the bottom bar is sticky.
   ========================================================================== */
.site-header {
	position: relative;
	z-index: 100;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

@media (min-width: 768px) {
	.site-header {
		position: sticky;
		top: 0;
	}

	/* Logged-in users: sit below the WP admin bar (46px tall until 782px). */
	.admin-bar .site-header {
		top: 46px;
	}

	/* Skip link / anchor targets land below the sticky header. */
	#main {
		scroll-margin-top: var(--header-h);
	}
}

@media (min-width: 783px) {
	.admin-bar .site-header {
		top: 32px;
	}
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-3);
	min-height: 64px;
	padding-block: var(--space-2);
}

@media (min-width: 768px) {
	.site-header__inner {
		gap: var(--space-4);
		min-height: var(--header-h);
	}
}

/* Text logo (also used in the footer) */
.site-logo {
	display: inline-flex;
	flex-direction: column;
	justify-content: center;
	min-width: 0;
	min-height: var(--tap-min);
	text-decoration: none;
}

.site-logo:hover {
	text-decoration: none;
}

.site-logo__name {
	font-family: var(--font-heading);
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

.site-logo__tagline {
	margin-top: 2px;
	font-size: 0.8125rem;
	line-height: 1.3;
	color: var(--color-on-dark-muted);
}

@media (min-width: 768px) {
	.site-logo__name {
		font-size: 1.375rem;
	}

	.site-logo__tagline {
		font-size: 0.875rem;
	}
}

@media (min-width: 1024px) {
	.site-logo__name {
		font-size: 1.5rem;
	}
}

.site-header__actions {
	display: flex;
	flex-shrink: 0;
	align-items: center;
	gap: var(--space-3);
}

.site-header .btn {
	min-height: var(--tap-min);
	padding-inline: var(--space-4);
}

/* Hours + big phone number (desktop only) */
.site-header__contact {
	display: none;
	flex-direction: column;
	align-items: flex-end;
	margin-right: var(--space-2);
	line-height: 1.2;
}

.site-header__hours {
	font-size: 0.875rem;
	color: var(--color-on-dark-muted);
}

.site-header .site-header__phone {
	display: inline-flex;
	align-items: center;
	min-height: var(--tap-min);
	font-family: var(--font-heading);
	font-size: 1.625rem;
	font-weight: 700;
	letter-spacing: 0.01em;
	white-space: nowrap;
	text-decoration: none;
}

.site-header .site-header__phone:hover {
	text-decoration: underline;
	text-decoration-thickness: 2px;
}

/* Per-breakpoint visibility */
.site-header .site-header__btn {
	display: none;
}

.site-header .site-header__btn-mobile {
	padding-inline: var(--space-3);
}

@media (min-width: 768px) {
	.site-header .site-header__btn {
		display: inline-flex;
	}

	.site-header .site-header__btn-mobile {
		display: none;
	}
}

@media (min-width: 1024px) {
	.site-header__contact {
		display: flex;
	}
}

.site-main {
	display: block;
}

/* 12. Pre-footer CTA
   ========================================================================== */
.prefooter-cta__inner {
	text-align: center;
}

.prefooter-cta__text {
	max-width: 52ch;
	margin: var(--space-4) auto 0;
	color: var(--color-on-dark-muted);
	font-size: 1.125rem;
}

.prefooter-cta__buttons {
	display: flex;
	flex-direction: column;
	gap: var(--space-3);
	max-width: 420px;
	margin: var(--space-6) auto 0;
}

@media (min-width: 768px) {
	.prefooter-cta__buttons {
		flex-direction: row;
		justify-content: center;
		max-width: none;
	}
}

.prefooter-cta__hours {
	margin-top: var(--space-4);
	font-size: var(--fs-small);
}

/* 13. Footer
   ========================================================================== */
.site-footer {
	padding-top: var(--space-7);
	background-color: var(--color-navy-dark);
	font-size: var(--fs-small);
}

.site-footer__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--space-6);
}

@media (min-width: 768px) {
	.site-footer {
		padding-top: var(--space-8);
	}

	.site-footer__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: var(--space-7) var(--space-6);
	}
}

@media (min-width: 1024px) {
	.site-footer__grid {
		grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 1fr));
	}
}

.site-logo--footer {
	margin-bottom: var(--space-3);
}

.site-footer__col--brand p {
	max-width: 40ch;
}

.site-footer__heading {
	margin-bottom: var(--space-3);
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

/* All footer links (address, phone, WhatsApp, quick links) share one look in
   every state: white, no underline; underline on hover and keyboard focus. */
.footer-links a {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2);
	min-height: var(--tap-min);
	padding-block: var(--space-1);
}

.site-footer .footer-links a,
.site-footer .footer-links a:link,
.site-footer .footer-links a:visited,
.site-footer .footer-links a > span {
	color: var(--color-white);
	text-decoration: none;
}

.site-footer .footer-links a:hover,
.site-footer .footer-links a:focus-visible,
.site-footer .footer-links a:hover > span,
.site-footer .footer-links a:focus-visible > span {
	color: var(--color-white);
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 0.2em;
}

.footer-links .icon {
	flex-shrink: 0;
	width: 20px;
	height: 20px;
	color: var(--color-on-dark-muted);
}

/* Hours list (reusable via dap_hours_list()) */
.hours-list {
	display: grid;
	gap: var(--space-1);
	max-width: 300px;
}

.hours-list__row {
	display: flex;
	justify-content: space-between;
	gap: var(--space-4);
}

.hours-list dt {
	font-weight: 600;
}

.hours-list dd {
	margin: 0;
	color: var(--color-muted);
	white-space: nowrap;
}

.section--dark .hours-list dd,
.site-footer .hours-list dd {
	color: var(--color-on-dark-muted);
}

.site-footer__bottom {
	margin-top: var(--space-7);
	padding-block: var(--space-5);
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	color: var(--color-on-dark-muted);
	font-size: 0.875rem;
}

/* 14. Sticky mobile bar (below 768px only)
   ========================================================================== */
.sticky-cta {
	position: fixed;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 900;
	display: flex;
	gap: var(--space-2);
	padding: var(--space-2);
	padding-right: max(var(--space-2), env(safe-area-inset-right, 0px));
	padding-bottom: calc(var(--space-2) + env(safe-area-inset-bottom, 0px));
	padding-left: max(var(--space-2), env(safe-area-inset-left, 0px));
	box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.2);
}

.sticky-cta .btn {
	flex: 1 1 0;
	min-width: 0;
	min-height: 60px;
	padding-inline: var(--space-3);
}

/* Reserve room so the bar never covers the footer. */
body {
	padding-bottom: calc(var(--sticky-cta-h) + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 768px) {
	.sticky-cta {
		display: none;
	}

	body {
		padding-bottom: 0;
	}
}

/* Home
   ========================================================================== */

/* --- Shared home building blocks --- */
.section--divided {
	border-top: 1px solid var(--color-border);
}

.section-head {
	max-width: 720px;
}

.section-head > * + * {
	margin-top: var(--space-3);
}

.section-head--center {
	margin-inline: auto;
	text-align: center;
}

.lead {
	font-size: 1.125rem;
}

/* Button pair: stacked full-width on mobile, side by side from 768px. */
.cta-group {
	display: flex;
	flex-direction: column;
	gap: var(--space-3);
}

@media (min-width: 768px) {
	.cta-group {
		flex-direction: row;
		flex-wrap: wrap;
	}

	.cta-group--center {
		justify-content: center;
	}
}

.flow > .cta-group {
	margin-top: var(--space-5);
}

.text-link {
	font-weight: 700;
	color: var(--color-navy);
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 0.2em;
}

.text-link:hover {
	text-decoration-thickness: 3px;
}

.check-list {
	display: grid;
	gap: var(--space-2);
}

.check-list li {
	display: flex;
	align-items: flex-start;
	gap: var(--space-3);
	font-weight: 600;
}

.check-list .icon {
	flex-shrink: 0;
	width: 22px;
	height: 22px;
	margin-top: 3px;
	color: var(--color-wa-hover); /* 6:1 on white */
	stroke-width: 3;
}

/* Two-column text + image block */
.split {
	display: grid;
	gap: var(--space-6);
	align-items: center;
}

@media (min-width: 1024px) {
	.split {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: var(--space-8);
	}

	.split--media-first .split__media {
		order: -1; /* image left on desktop; text stays first in the DOM/mobile */
	}
}

.section-cta {
	display: flex;
	justify-content: center;
	margin-top: var(--space-6);
}

.section-note {
	margin-top: var(--space-4);
	font-size: var(--fs-small);
	text-align: center;
}

/* --- Hero --- */
.hero {
	padding-block: var(--space-5) var(--space-7);
}

@media (min-width: 768px) {
	.hero {
		padding-block: var(--space-7) var(--space-8);
	}
}

.hero__inner {
	display: grid;
	gap: var(--space-6);
}

@media (min-width: 1024px) {
	.hero__inner {
		grid-template-columns: minmax(0, 55fr) minmax(0, 45fr);
		align-items: center;
		gap: var(--space-7);
	}
}

.hero__eyebrow {
	font-size: 0.875rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--color-muted);
}

.hero__title {
	margin-top: var(--space-2);
	font-size: clamp(1.875rem, 1.35rem + 2.4vw, 3.25rem);
	line-height: 1.08;
}

.hero__sub {
	margin-top: var(--space-3);
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.45;
}

.hero__text {
	margin-top: var(--space-2);
	font-size: 1rem;
	line-height: 1.5;
	color: var(--color-muted);
}

@media (min-width: 768px) {
	.hero__sub {
		margin-top: var(--space-4);
		font-size: 1.125rem;
	}

	.hero__text {
		margin-top: var(--space-3);
		font-size: var(--fs-body);
	}
}

.hero__ctas {
	margin-top: var(--space-4);
}

@media (min-width: 768px) {
	.hero__ctas {
		margin-top: var(--space-5);
	}
}

/* Rating: navy pill so the yellow stars have strong contrast (about 9:1). */
.rating {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-1) var(--space-2);
	margin-top: var(--space-4);
	padding: var(--space-2) var(--space-3);
	border-radius: 999px;
	background-color: var(--color-navy);
	color: var(--color-white);
	font-size: var(--fs-small);
	font-weight: 600;
	line-height: 1.3;
}

.stars {
	display: inline-flex;
	gap: 2px;
	color: var(--color-star);
}

.stars svg {
	width: 18px;
	height: 18px;
}

.trust-row {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--space-3) var(--space-4);
	margin-top: var(--space-5);
}

@media (min-width: 768px) and (max-width: 1023.98px) {
	.trust-row {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

.trust-row__item {
	display: flex;
	align-items: center;
	gap: var(--space-2);
	font-size: var(--fs-small);
	font-weight: 600;
	line-height: 1.3;
}

.trust-row__item .icon {
	flex-shrink: 0;
	width: 24px;
	height: 24px;
	color: var(--color-navy);
}

.hero__note {
	margin-top: var(--space-3);
	font-size: 0.8125rem;
	line-height: 1.45;
	color: var(--color-muted);
}

/* --- Part picker --- */
.part-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--space-3);
	margin-top: var(--space-6);
}

/* 5th card spans the full row on mobile so the grid has no gap. */
.part-grid > li:last-child {
	grid-column: 1 / -1;
}

@media (min-width: 768px) {
	.part-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: var(--space-4);
	}

	.part-grid > li:last-child {
		grid-column: auto;
	}
}

@media (min-width: 1024px) {
	.part-grid {
		grid-template-columns: repeat(5, minmax(0, 1fr));
	}
}

/* Equal-height cards: the li stretches to the row height and the card fills it. */
.part-grid > li {
	display: flex;
}

/* 3 rows: icon (top) | label (takes the spare height, centered) | WhatsApp hint
   (bottom). The hint lines up across a row even when a label wraps. */
.part-card {
	display: grid;
	flex: 1 1 auto;
	grid-template-rows: auto 1fr auto;
	align-items: center;
	justify-items: center;
	gap: var(--space-2);
	min-height: 140px;
	padding: var(--space-4) var(--space-3);
	border: 2px solid var(--color-border);
	border-radius: var(--radius-md);
	background-color: var(--color-white);
	box-shadow: var(--shadow);
	color: var(--color-text);
	text-align: center;
	text-decoration: none;
	transition: border-color var(--transition), transform var(--transition);
}

.part-card:hover,
.part-card:focus-visible {
	border-color: var(--color-wa);
	text-decoration: none;
}

.part-card:hover {
	transform: translateY(-2px);
}

.part-card__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background-color: var(--color-bg);
	color: var(--color-navy);
}

.part-card__icon .icon {
	width: 30px;
	height: 30px;
}

.part-card__label {
	font-family: var(--font-heading);
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1.2;
}

.part-card__hint {
	display: inline-flex;
	align-items: center;
	gap: var(--space-1);
	font-size: 0.8125rem;
	font-weight: 700;
	color: var(--color-wa-hover); /* 6:1 on white */
}

.part-card__hint .icon {
	width: 16px;
	height: 16px;
}

.part-picker__call {
	margin-top: var(--space-5);
	text-align: center;
}

.part-picker__call .text-link {
	display: inline-flex;
	align-items: center;
	min-height: var(--tap-min);
}

/* --- Drivetrain cards --- */
.card-grid {
	display: grid;
	gap: var(--space-5);
	margin-top: var(--space-6);
}

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

.product-card {
	display: flex;
	flex-direction: column;
	gap: var(--space-3);
}

.product-card__cta {
	margin-top: auto;
	padding-top: var(--space-2);
}

/* --- Installation features --- */
.feature-grid {
	display: grid;
	gap: var(--space-4);
	margin-top: var(--space-6);
}

@media (min-width: 768px) {
	.feature-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: var(--space-5);
	}
}

.feature {
	display: flex;
	align-items: flex-start;
	gap: var(--space-4);
}

.feature__icon {
	display: inline-flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: var(--radius-sm);
	background-color: var(--color-navy);
	color: var(--color-star);
}

.feature__title {
	font-size: var(--fs-h4);
}

.feature__title + p {
	margin-top: var(--space-1);
}

#installation .cta-group {
	margin-top: var(--space-6);
}

/* Separate two adjacent navy bands (last dark home section + pre-footer CTA). */
.site-main:has(> .section--dark:last-child) + .prefooter-cta {
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Home - Sprint 3
   ========================================================================== */

/* Shared: CTA row under a section's content */
.section-ctas {
	margin-top: var(--space-6);
}

/* --- Reviews (template-parts/reviews.php) --- */

/* Navy panel so the yellow stars have strong contrast (about 9:1). */
.rating-summary {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: var(--space-2) var(--space-4);
	width: fit-content;
	max-width: 100%;
	margin: var(--space-5) auto 0;
	padding: var(--space-4) var(--space-5);
	border-radius: var(--radius-md);
	background-color: var(--color-navy);
	color: var(--color-white);
}

.rating-summary__score {
	font-family: var(--font-heading);
	font-size: 3rem;
	font-weight: 700;
	line-height: 1;
}

.rating-summary__meta {
	display: flex;
	flex-direction: column;
	gap: var(--space-1);
}

.rating-summary .stars svg {
	width: 24px;
	height: 24px;
}

.rating-summary__text {
	font-size: var(--fs-small);
	font-weight: 600;
	color: var(--color-on-dark-muted);
}

/*
 * Mobile: one row with CSS scroll-snap. The scroller bleeds to the screen
 * edges (negative margin = container padding), so it is exactly as wide as
 * the container and never causes page-level horizontal scroll.
 */
.reviews__scroller {
	/* Positioned so absolutely-positioned children (.visually-hidden) are
	   clipped by the scroller instead of widening the page. */
	position: relative;
	margin-top: var(--space-6);
	margin-inline: calc(-1 * var(--container-pad));
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scroll-padding-inline: var(--container-pad);
	scrollbar-width: thin;
}

.reviews__scroller:focus-visible {
	outline-offset: -3px;
}

/* .reviews__scroller prefix beats the reset's ul[class] { padding: 0 }. */
.reviews__scroller .review-list {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: min(85vw, 420px);
	gap: var(--space-4);
	width: max-content;
	padding: var(--space-1) var(--container-pad) var(--space-4);
}

.review-list > li {
	scroll-snap-align: start;
}

@media (min-width: 768px) {
	.reviews__scroller {
		margin-inline: 0;
		overflow: visible;
	}

	.reviews__scroller .review-list {
		grid-auto-flow: row;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: var(--space-5);
		width: auto;
		padding: 0;
	}
}

.review-card {
	display: flex;
	flex-direction: column;
	gap: var(--space-4);
	height: 100%;
}

/* Stars sit on a small navy pill for contrast on the white card. */
.review-card__stars {
	display: inline-flex;
	align-self: flex-start;
	padding: var(--space-1) var(--space-2);
	border-radius: 999px;
	background-color: var(--color-navy);
}

.review-card__stars .stars svg {
	width: 18px;
	height: 18px;
}

.review-card__text {
	flex-grow: 1;
	font-size: var(--fs-body);
	line-height: var(--lh-body);
}

.review-card__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-1) var(--space-3);
	padding-top: var(--space-3);
	border-top: 1px solid var(--color-border);
}

.review-card__name {
	font-weight: 700;
}

.review-card__source {
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--color-muted);
}

.reviews__more {
	margin-top: var(--space-5);
	text-align: center;
}

.reviews__more .text-link,
.makes__more .text-link {
	display: inline-flex;
	align-items: center;
	min-height: var(--tap-min);
}

/* --- How it works --- */
.steps {
	display: grid;
	gap: var(--space-5);
	margin-top: var(--space-6);
}

@media (min-width: 768px) {
	.steps {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: var(--space-6);
	}
}

.step {
	display: flex;
	align-items: flex-start;
	gap: var(--space-4);
}

@media (min-width: 768px) {
	.step {
		flex-direction: column;
	}
}

.step__num {
	display: inline-flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background-color: var(--color-navy);
	color: var(--color-white);
	font-family: var(--font-heading);
	font-size: 1.75rem;
	font-weight: 700;
	line-height: 1;
}

@media (min-width: 768px) {
	.step__num {
		width: 64px;
		height: 64px;
		font-size: 2rem;
	}
}

.step__title {
	font-size: var(--fs-h4);
}

.step__title + p {
	margin-top: var(--space-2);
}

/* --- Why us (reuses .card.feature from Installation) --- */
.why-grid {
	display: grid;
	gap: var(--space-4);
	margin-top: var(--space-6);
}

@media (min-width: 768px) {
	.why-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: var(--space-5);
	}
}

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

.makes {
	margin-top: var(--space-7);
	text-align: center;
}

.makes__title {
	font-size: var(--fs-h4);
}

.pill-list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--space-2);
	max-width: 880px;
	margin: var(--space-4) auto 0;
}

.pill {
	padding: var(--space-1) var(--space-3);
	border: 1px solid var(--color-border);
	border-radius: 999px;
	background-color: var(--color-white);
	font-size: var(--fs-small);
	font-weight: 600;
	line-height: 1.5;
}

.makes__more {
	margin-top: var(--space-4);
}

/* --- FAQ (native details/summary) --- */
.faq-list {
	display: grid;
	gap: var(--space-3);
	max-width: 820px;
	margin: var(--space-6) auto 0;
}

.faq-item {
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	background-color: var(--color-white);
	transition: border-color var(--transition), box-shadow var(--transition);
}

.faq-item[open] {
	border-color: var(--color-navy);
	box-shadow: var(--shadow);
}

.faq-item__q {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-4);
	min-height: var(--tap-min);
	padding: var(--space-4) var(--space-5);
	border-radius: var(--radius-md);
	font-family: var(--font-heading);
	font-size: 1.1875rem;
	font-weight: 700;
	line-height: 1.3;
	list-style: none;
	cursor: pointer;
}

.faq-item__q::-webkit-details-marker {
	display: none;
}

.faq-item__q:hover {
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 0.2em;
}

.faq-item__q:focus-visible {
	outline: 3px solid var(--color-focus);
	outline-offset: 2px;
}

/* +/− indicator: two bars; the vertical one turns flat when open. */
.faq-item__icon {
	position: relative;
	flex-shrink: 0;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background-color: var(--color-navy);
}

.faq-item__icon::before,
.faq-item__icon::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 14px;
	height: 2px;
	border-radius: 2px;
	background-color: var(--color-white);
	transform: translate(-50%, -50%);
	transition: transform var(--transition);
}

.faq-item__icon::after {
	transform: translate(-50%, -50%) rotate(90deg);
}

.faq-item[open] .faq-item__icon::after {
	transform: translate(-50%, -50%) rotate(0deg);
}

.faq-item__a {
	padding: 0 var(--space-5) var(--space-5);
}

.faq-item__a a {
	font-weight: 600;
}

.faq__cta {
	margin-top: var(--space-7);
	text-align: center;
}

.faq__cta-text {
	margin-bottom: var(--space-4);
	font-family: var(--font-heading);
	font-size: var(--fs-h4);
	font-weight: 700;
}

/* --- Location --- */
.location-grid {
	display: grid;
	gap: var(--space-6);
	margin-top: var(--space-6);
}

@media (min-width: 1024px) {
	.location-grid {
		grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
		align-items: start;
		gap: var(--space-7);
	}
}

.location__address {
	font-size: 1.125rem;
	line-height: 1.5;
}

.location__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-3) var(--space-5);
	margin-top: var(--space-4);
}

.location__phone {
	display: inline-flex;
	align-items: center;
	min-height: var(--tap-min);
}

.location__hours-title {
	margin-top: var(--space-6);
	margin-bottom: var(--space-3);
	font-size: var(--fs-h4);
}

.map-embed {
	overflow: hidden;
	border-radius: var(--radius-md);
}

.map-embed__placeholder {
	flex-direction: column;
	gap: var(--space-3);
	min-height: 360px;
	aspect-ratio: auto;
}

/* .btn sets display, so restate [hidden] (button shows only when JS runs). */
.map-embed [hidden] {
	display: none;
}

.map-embed__placeholder .icon {
	width: 40px;
	height: 40px;
	color: var(--color-navy);
}

.map-embed__frame {
	display: block;
	width: 100%;
	height: 360px;
	border: 0;
}

/* Used Parts page
   ========================================================================== */

/* 13-card picker: 2 / 3 / 4 columns. The last card ("Other Part") spans the
   full row at every size, so no row has a single orphan card. */
@media (min-width: 1024px) {
	.part-grid--4 {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

/* Double class beats the 768px "grid-column: auto" reset for .part-grid. */
.part-grid.part-grid--4 > li:last-child {
	grid-column: 1 / -1;
}

/* Engines/transmissions cross-promo band (navy). */
.promo-band .section-head p {
	font-size: 1.125rem;
}

/* Policy pages (page.php) and 404
   ========================================================================== */

/* [CONFIRM] notes for the business owner (also used in the block editor). */
.dap-confirm {
	padding: 0 var(--space-1);
	border-radius: 4px;
	background-color: #FEF3C7; /* the one extra highlight colour */
	color: var(--color-text);
	font-weight: 700;
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
}

.page-column {
	max-width: 760px;
	margin-inline: auto;
}

.page-hero {
	padding-block: var(--space-7) var(--space-6);
	border-bottom: 1px solid var(--color-border);
}

@media (min-width: 768px) {
	.page-hero {
		padding-block: var(--space-8) var(--space-7);
	}
}

.page-hero__meta {
	margin-top: var(--space-3);
	font-size: var(--fs-small);
	color: var(--color-muted);
}

.page-body {
	padding-block: var(--space-7) var(--space-8);
}

@media (min-width: 1024px) {
	.page-body {
		padding-block: var(--space-8) var(--space-9);
	}
}

/* Long-form text */
.prose {
	line-height: 1.7;
}

.prose > * + * {
	margin-top: var(--space-4);
}

.prose > h2 {
	margin-top: var(--space-7);
	font-size: var(--fs-h3);
}

.prose > h3 {
	margin-top: var(--space-6);
	font-size: var(--fs-h4);
}

.prose > :first-child {
	margin-top: 0;
}

.prose > h2 + *,
.prose > h3 + * {
	margin-top: var(--space-3);
}

/* Block lists carry class="wp-block-list", so beat the reset's ul[class]. */
.prose ul,
.prose ol,
.prose ul[class],
.prose ol[class] {
	padding-left: 1.4em;
	list-style: revert;
}

.prose li + li {
	margin-top: var(--space-2);
}

.prose li::marker {
	color: var(--color-muted);
}

.prose a {
	font-weight: 600;
	color: var(--color-navy);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
	overflow-wrap: anywhere; /* long URLs */
}

.prose a:hover {
	text-decoration-thickness: 2px;
}

/* Tables: scroll inside their own box on small screens. */
.prose .wp-block-table {
	overflow-x: auto;
}

.prose table {
	width: 100%;
	border-collapse: collapse;
	font-size: var(--fs-small);
	line-height: 1.5;
}

.prose th,
.prose td {
	padding: var(--space-2) var(--space-3);
	border: 1px solid var(--color-border);
	text-align: left;
	vertical-align: top;
}

.prose th,
.prose thead td {
	background-color: var(--color-bg);
	font-weight: 700;
}

/* 404 */
.error-404__inner {
	max-width: 640px;
	margin-inline: auto;
	text-align: center;
}

.error-404__inner > * + * {
	margin-top: var(--space-4);
}

.error-404__text {
	font-size: 1.125rem;
	color: var(--color-muted);
}

.error-404__inner .cta-group {
	margin-top: var(--space-5);
}

/* 15. Content (index/page)
   ========================================================================== */
.page-header {
	margin-bottom: var(--space-5);
}

.entry + .entry {
	margin-top: var(--space-7);
}

.entry-content > * + * {
	margin-top: var(--space-4);
}

/* 16. Style guide (dev only)
   ========================================================================== */
.sg-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: var(--space-4);
}

.sg-swatch {
	overflow: hidden;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	background-color: var(--color-white);
}

.sg-swatch__chip {
	height: 88px;
	border-bottom: 1px solid var(--color-border);
}

.sg-swatch__meta {
	padding: var(--space-3);
	font-size: 0.875rem;
	line-height: 1.4;
}

.sg-swatch__meta code {
	display: block;
	color: var(--color-muted);
}

.sg-block + .sg-block {
	margin-top: var(--space-7);
}

.sg-block > h2 {
	margin-bottom: var(--space-4);
	padding-bottom: var(--space-2);
	border-bottom: 1px solid var(--color-border);
}

.sg-stack > * + * {
	margin-top: var(--space-4);
}

.sg-two {
	display: grid;
	gap: var(--space-4);
}

@media (min-width: 768px) {
	.sg-two {
		grid-template-columns: 1fr 1fr;
	}
}

.sg-dl {
	display: grid;
	grid-template-columns: minmax(0, max-content) minmax(0, 1fr);
	gap: var(--space-1) var(--space-4);
	font-size: var(--fs-small);
}

.sg-dl dt {
	font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
	color: var(--color-muted);
}

/* 17. Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}
