/*
Theme Name: French Bulldog Home
Theme URI: https://frenchbulldogshome.com
Description: Child theme for French Bulldog Home. Warm editorial breeder site with a Puppy custom post type.
Author: Hermes Agent
Template: twentytwentyfive
Version: 3.0.0
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 8.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: frenchbulldogshome
*/

/* ===================================================================
   1. Base
   =================================================================== */

/* One gutter, everywhere. Measured against the reference site, whose typical
   mobile text gutter is 38px and whose minimum is 16px; this sits between the
   two and is deliberately roomier than the 16-20px mobile default, because a
   cramped gutter is the single fastest way to look amateur on a phone. */
:root { --fbh-gutter: 1.25rem; }
@media (min-width: 700px) { :root { --fbh-gutter: 2rem; } }

* { box-sizing: border-box; }

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

body {
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--ink);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

::selection { background: var(--wp--preset--color--primary-soft); color: var(--wp--preset--color--ink); }

:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary-dark);
	outline-offset: 2px;
	border-radius: 4px;
}

img { max-width: 100%; height: auto; }

/* ===================================================================
   2. Header
   =================================================================== */

.fbh-header {
	position: sticky;
	top: 0;
	z-index: 90;
	background: rgba(250, 249, 246, .88);
	backdrop-filter: saturate(1.6) blur(12px);
	-webkit-backdrop-filter: saturate(1.6) blur(12px);
	border-bottom: 1px solid var(--wp--preset--color--border);
}

.fbh-header .wp-block-group { min-height: 66px; }

.fbh-header .wp-block-site-logo img { max-height: 42px; width: auto; }

.fbh-nav a {
	text-decoration: none;
	color: var(--wp--preset--color--ink-soft);
	padding: .35rem 0;
}
.fbh-nav a:hover,
.fbh-nav .current-menu-item > a { color: var(--wp--preset--color--primary); }

/* Mobile: collapse the nav behind a button, hidden until toggled */
@media (max-width: 899px) {
	.fbh-nav { display: none; }
	.fbh-header-cta { display: none; }
}

/* ===================================================================
   3. Hero
   =================================================================== */

.fbh-hero {
	position: relative;
	background: linear-gradient(180deg, var(--wp--preset--color--surface-alt) 0%, var(--wp--preset--color--surface) 100%);
	overflow: hidden;
}

.fbh-hero-inner { padding: clamp(3rem, 8vw, 6rem) var(--fbh-gutter); }

.fbh-hero h1 { margin: 0 0 1rem; text-wrap: balance; }

.fbh-hero p.fbh-lede {
	font-size: clamp(1.05rem, .95rem + .5vw, 1.3rem);
	color: var(--wp--preset--color--ink-soft);
	max-width: 34rem;
	line-height: 1.65;
}

.fbh-hero-media img {
	display: block;
	width: 100%;
	border-radius: var(--wp--custom--radius--lg);
	box-shadow: var(--wp--preset--shadow--lift);
	aspect-ratio: 4 / 3;
	object-fit: cover;
	background: var(--wp--preset--color--surface-alt);
}

.fbh-eyebrow {
	display: inline-block;
	font-size: .8rem;
	font-weight: 600;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--wp--preset--color--primary-dark);
	background: var(--wp--preset--color--primary-soft);
	border-radius: var(--wp--custom--radius--pill);
	padding: .4rem .9rem;
	margin-bottom: 1.25rem;
}

/* ===================================================================
   4. Sections
   =================================================================== */

/* Full-width sections carry their OWN horizontal gutter.
   `alignfull` children escape the layout container's padding, so without this
   every heading, paragraph and button on a `alignfull` section sat flush
   against the viewport edge: the "content touching the walls" look. WordPress's
   root-padding-aware alignments did not apply here, so this does not rely on it. */
.fbh-section { padding: clamp(3rem, 7vw, 5.5rem) var(--fbh-gutter); }

.fbh-section-head { max-width: 40rem; margin-bottom: clamp(1.75rem, 4vw, 2.75rem); }
.fbh-section-head p { color: var(--wp--preset--color--muted); font-size: 1.075rem; margin: .6rem 0 0; }

.fbh-tint { background: var(--wp--preset--color--surface-alt); }

/* ===================================================================
   5. Puppy cards
   =================================================================== */

/* The grid is the main event on the puppies pages, so it breaks out of the
   page's narrow content column and uses the full readable width. Without this
   each card was squeezed to 211px on a 1440px screen, which made the
   photographs look soft and the cards feel cramped. */
.fbh-grid {
	display: grid;
	gap: clamp(1.25rem, 2.2vw, 1.9rem);
	grid-template-columns: 1fr;
	width: 100%;
}
@media (min-width: 640px)  { .fbh-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) {
	.fbh-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		/* Break out of the narrow content column on desktop only. WordPress caps
		   any child of a constrained layout at contentSize via max-width, so the
		   cap has to be lifted as well as the width set. */
		width: min(1240px, calc(100vw - 2rem));
		margin-left: calc(50% - min(620px, 50vw - 1rem));
		max-width: none;
	}
}

/* ===================================================================
   5. Puppy cards

   Designed as a mounted print: a bordered card with the photograph inset
   inside its own frame, so the border reads as deliberate structure rather
   than a drop-shadow smear. Everything sits on a 1.5px hairline grid, so the
   card has edges you can actually see.
   =================================================================== */

.fbh-card {
	position: relative;
	display: flex;
	flex-direction: column;
	background: var(--wp--preset--color--base);
	border: 1.5px solid rgba(28, 25, 23, .16);
	border-radius: 16px;
	padding: 9px;
	box-shadow: 0 1px 2px rgba(28, 25, 23, .05);
	transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
	height: 100%;
	isolation: isolate;
}
.fbh-card:hover {
	border-color: var(--wp--preset--color--primary);
	box-shadow: 0 16px 34px -18px rgba(28, 25, 23, .30);
	transform: translateY(-3px);
}
.fbh-card:focus-within {
	border-color: var(--wp--preset--color--primary);
	box-shadow: 0 0 0 2px var(--wp--preset--color--primary-soft);
}

/* The photograph, inset in its own frame. */
.fbh-card-media {
	position: relative;
	border: 1px solid rgba(28, 25, 23, .12);
	border-radius: 10px;
	overflow: hidden;
	background: var(--wp--preset--color--surface-alt);
}
.fbh-card-media img {
	display: block;
	width: 100%;
	/* Portrait, because the photographs are portrait. A landscape box sliced
	   the dog's head off and left a band of background across the card. */
	aspect-ratio: 4 / 5;
	object-fit: cover;
	object-position: center 32%;
	transition: transform .5s cubic-bezier(.2, .7, .3, 1);
}
.fbh-card:hover .fbh-card-media img { transform: scale(1.05); }

@media (prefers-reduced-motion: reduce) {
	.fbh-card, .fbh-card-media img { transition: none; }
	.fbh-card:hover { transform: none; }
	.fbh-card:hover .fbh-card-media img { transform: none; }
}

.fbh-card-body {
	padding: 12px 5px 3px;
	display: flex;
	flex-direction: column;
	flex: 1;
	gap: 6px;
}

.fbh-card-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
}

.fbh-card-name {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.42rem;
	font-weight: 600;
	line-height: 1.15;
	letter-spacing: -.015em;
	margin: 0;
}
.fbh-card-name a { color: inherit; text-decoration: none; }
.fbh-card-name a:focus-visible { outline: none; }

/* Arrow chip, outlined to match the card's hairline language. */
.fbh-card-go {
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	flex: none;
	margin-top: 1px;
	border: 1.5px solid rgba(28, 25, 23, .16);
	border-radius: 50%;
	color: var(--wp--preset--color--primary-dark);
	background: transparent;
	transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.fbh-card-go svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fbh-card:hover .fbh-card-go {
	background: var(--wp--preset--color--primary);
	border-color: var(--wp--preset--color--primary);
	color: #fff;
}

/* Sex and colour as one quiet line, with a swatch for the coat. */
.fbh-card-meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 7px;
	margin: 0;
	font-size: .84rem;
	color: var(--wp--preset--color--muted);
}
.fbh-meta-item { display: inline-flex; align-items: center; gap: 5px; }
.fbh-meta-dot { opacity: .55; }
.fbh-swatch {
	width: 11px;
	height: 11px;
	border-radius: 50%;
	flex: none;
	box-shadow: inset 0 0 0 1px rgba(28, 25, 23, .3);
}

/* Price stands on its own hairline so the number has a base. */
.fbh-card-foot {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 10px;
	margin-top: auto;
	padding-top: 10px;
	border-top: 1.5px solid rgba(28, 25, 23, .12);
}

.fbh-card-label {
	font-size: .68rem;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
}

.fbh-card-price {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.55rem;
	font-weight: 700;
	letter-spacing: -.02em;
	line-height: 1;
	color: var(--wp--preset--color--ink);
}
.fbh-card-price--ask { font-size: 1rem; font-weight: 600; color: var(--wp--preset--color--muted); }

/* The whole card is the link target; this overlay keeps a tap anywhere
   working while the anchor carries the accessible name. */
.fbh-card-link { position: absolute; inset: 0; z-index: 3; border-radius: inherit; }

/* Status badge */
/* The badge is an ordinary inline chip by default. It is only positioned
   absolutely where it overlays a card thumbnail: on the single-puppy page it
   sits in a text row, and absolute positioning there put it on top of the
   "Male · Blue" summary and hid it. */
.fbh-badge {
	position: static;
	display: inline-block;
	font-size: .74rem;
	font-weight: 700;
	letter-spacing: .07em;
	text-transform: uppercase;
	padding: .38rem .78rem;
	border-radius: var(--wp--custom--radius--pill);
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--ink);
	box-shadow: 0 1px 3px rgba(28,25,23,.16);
}
.fbh-badge--available { background: var(--wp--preset--color--success); color: #fff; }
.fbh-badge--reserved  { background: var(--wp--preset--color--primary); color: #fff; }
.fbh-badge--sold      { background: var(--wp--preset--color--neutral); color: #fff; }
.fbh-badge--waitlist  { background: var(--wp--preset--color--surface-alt); color: var(--wp--preset--color--ink-soft); }

/* Only inside a card thumbnail does the badge float over the photo. */
.fbh-card-media .fbh-badge {
	position: absolute;
	top: .8rem;
	left: .8rem;
	z-index: 2;
}

.fbh-card--sold .fbh-card-media img { filter: saturate(.55) brightness(1.02); }

/* ===================================================================
   6. Trust bar / features
   =================================================================== */

.fbh-trust { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 700px) { .fbh-trust { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.fbh-trust-item {
	display: flex;
	gap: .85rem;
	align-items: flex-start;
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--md);
	padding: 1.15rem 1.25rem;
}
.fbh-trust-item h3 { font-size: 1.05rem; margin: 0 0 .3rem; font-family: var(--wp--preset--font-family--body); font-weight: 700; }
.fbh-trust-item p { margin: 0; color: var(--wp--preset--color--muted); font-size: .92rem; line-height: 1.55; }
.fbh-trust-icon { font-size: 1.4rem; line-height: 1; flex: none; }

/* ===================================================================
   7. Steps (application process)
   =================================================================== */

.fbh-steps { counter-reset: step; display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 800px) { .fbh-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.fbh-step { position: relative; padding-top: 2.9rem; }
.fbh-step::before {
	counter-increment: step;
	content: counter(step);
	position: absolute;
	top: 0; left: 0;
	width: 2.2rem; height: 2.2rem;
	display: grid; place-items: center;
	border-radius: var(--wp--custom--radius--pill);
	background: var(--wp--preset--color--primary);
	color: #fff;
	font-weight: 700;
	font-family: var(--wp--preset--font-family--body);
}
.fbh-step h3 { font-size: 1.05rem; margin: 0 0 .35rem; font-family: var(--wp--preset--font-family--body); font-weight: 700; }
.fbh-step p { margin: 0; color: var(--wp--preset--color--muted); font-size: .92rem; line-height: 1.6; }

/* ===================================================================
   8. FAQ
   =================================================================== */

.fbh-faq { border-top: 1px solid var(--wp--preset--color--border); }
.fbh-faq details {
	border-bottom: 1px solid var(--wp--preset--color--border);
	padding: 1.1rem 0;
}
.fbh-faq summary {
	cursor: pointer;
	font-weight: 600;
	font-size: 1.05rem;
	list-style: none;
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	align-items: center;
}
.fbh-faq summary::-webkit-details-marker { display: none; }
.fbh-faq summary::after {
	content: "+";
	font-family: var(--wp--preset--font-family--body);
	font-size: 1.4rem;
	line-height: 1;
	color: var(--wp--preset--color--primary);
	flex: none;
}
.fbh-faq details[open] summary::after { content: "\2013"; }
.fbh-faq details p { margin: .8rem 0 0; color: var(--wp--preset--color--ink-soft); line-height: 1.7; }

/* ===================================================================
   9. Forms
   =================================================================== */

.fbh-form { display: grid; gap: 1rem; }
@media (min-width: 700px) { .fbh-form--two { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.fbh-field { display: flex; flex-direction: column; gap: .35rem; }
.fbh-field label { font-weight: 600; font-size: .9rem; }
.fbh-field input,
.fbh-field select,
.fbh-field textarea {
	font: inherit;
	color: var(--wp--preset--color--ink);
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--sm);
	padding: .7rem .85rem;
	width: 100%;
}
.fbh-field input:focus,
.fbh-field select:focus,
.fbh-field textarea:focus {
	border-color: var(--wp--preset--color--primary);
	outline: 2px solid var(--wp--preset--color--primary-soft);
	outline-offset: 0;
}

/* ===================================================================
   10. Footer
   =================================================================== */

.fbh-footer {
	background: var(--wp--preset--color--ink);
	color: #E7E1D8;
	/* The horizontal value matters: without it every footer line ran flush
	   against the viewport edge with no gutter. */
	padding: clamp(2.5rem, 6vw, 4rem) var(--fbh-gutter) 1.75rem;
}
.fbh-footer a { color: #E7E1D8; text-decoration: none; }
.fbh-footer a:hover { color: #fff; text-decoration: underline; }
.fbh-footer h1, .fbh-footer h2, .fbh-footer h3 { color: #fff; font-size: 1rem; font-family: var(--wp--preset--font-family--body); font-weight: 700; }
.fbh-footer p { color: #A8A29E; font-size: .92rem; }

.fbh-footer-cols { display: grid; gap: 2rem; grid-template-columns: 1fr; }

/* Footer contact lines: small inline SVG beside the text. */
.fbh-foot-contact {
	display: flex;
	align-items: center;
	gap: .5rem;
	margin: .35rem 0;
	font-size: .92rem;
	color: #A8A29E;
}
.fbh-foot-contact svg { flex: none; color: var(--wp--preset--color--primary); }
@media (min-width: 700px) { .fbh-footer-cols { grid-template-columns: 2fr 1fr 1fr; } }

.fbh-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.fbh-footer ul li { font-size: .92rem; }

.fbh-footer-bottom {
	border-top: 1px solid rgba(231,225,216,.18);
	margin-top: 2.5rem;
	padding-top: 1.35rem;
	display: flex;
	flex-wrap: wrap;
	gap: .75rem;
	justify-content: space-between;
	font-size: .85rem;
	color: #A8A29E;
}

/* ===================================================================
   11. Single puppy
   =================================================================== */

.fbh-single-hero { background: var(--wp--preset--color--surface-alt); }

.fbh-gallery { display: grid; gap: .75rem; grid-template-columns: 1fr; }
.fbh-gallery--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fbh-gallery--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 700px) { .fbh-gallery--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.fbh-gallery-item { display: block; border-radius: var(--wp--custom--radius--md); overflow: hidden; background: var(--wp--preset--color--surface-alt); }
.fbh-gallery-item img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; transition: transform .2s ease; }
.fbh-gallery-item:hover img { transform: scale(1.04); }
.fbh-gallery img { border-radius: var(--wp--custom--radius--md); display: block; width: 100%; object-fit: cover; }

.fbh-facts { display: grid; gap: .1rem; border: 1px solid var(--wp--preset--color--border); border-radius: var(--wp--custom--radius--md); overflow: hidden; background: var(--wp--preset--color--base); }
.fbh-fact { display: flex; justify-content: space-between; gap: 1rem; padding: .8rem 1rem; border-bottom: 1px solid var(--wp--preset--color--border); font-size: .95rem; }
.fbh-fact:last-child { border-bottom: 0; }
/* Keep the label on one line: "Registration" was breaking as "Registra/tion"
   when the value beside it was long. */
.fbh-fact dt { color: var(--wp--preset--color--muted); margin: 0; white-space: nowrap; }
.fbh-fact dd { margin: 0; font-weight: 600; text-align: right; }

.fbh-price-tag { font-family: var(--wp--preset--font-family--heading); font-size: 1.75rem; font-weight: 700; }

/* ===================================================================
   12. Utilities
   =================================================================== */

.fbh-sr-only {
	position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.fbh-center { text-align: center; }
.fbh-stack-sm > * + * { margin-top: .75rem; }
.fbh-muted { color: var(--wp--preset--color--muted); }

.fbh-videos { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 700px) { .fbh-videos { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* A single clip (or an odd last one) would otherwise stretch a portrait video
   across half the row and leave the rest empty. Centre it at a sensible width. */
.fbh-videos:has(> .fbh-video:only-child) { grid-template-columns: minmax(0, 24rem); }
.fbh-video { margin: 0; }
.fbh-video video {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--wp--custom--radius--md);
	background: var(--wp--preset--color--surface-alt);
	box-shadow: var(--wp--preset--shadow--card);
}

/* Placeholder stand-in for photography that has not been supplied yet.
   It carries the same aspect ratio an image would, so the surrounding layout
   does not collapse or leave gaps while the real photos are missing. */
.fbh-placeholder {
	background:
		repeating-linear-gradient(45deg, var(--wp--preset--color--surface-alt) 0 12px, var(--wp--preset--color--border) 12px 24px);
	color: var(--wp--preset--color--muted);
	display: grid;
	place-items: center;
	text-align: center;
	padding: 1rem;
	font-size: .85rem;
	width: 100%;
	aspect-ratio: 4 / 3;
	border-radius: var(--wp--custom--radius--md);
}

/* Inside a hero or feature figure the placeholder should fill the frame. */
.fbh-hero-media .fbh-placeholder,
.wp-block-image .fbh-placeholder { aspect-ratio: 4 / 3; border-radius: inherit; }

/* Card placeholders sit in the same 4/3 box as a real thumbnail. */
.fbh-card-media .fbh-placeholder { border-radius: var(--wp--custom--radius--lg) var(--wp--custom--radius--lg) 0 0; }

/* Trust icons: inline SVG rather than emoji, which depend on a system font and
   render as empty boxes where one is missing. */
.fbh-trust-icon {
	flex: none;
	width: 2.4rem;
	height: 2.4rem;
	border-radius: var(--wp--custom--radius--sm);
	background: var(--wp--preset--color--primary-soft);
	display: grid;
	place-items: center;
	margin: 0;
}
.fbh-trust-icon svg { width: 1.25rem; height: 1.25rem; display: block; stroke: var(--wp--preset--color--primary-dark); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ===================================================================
   13. Responsive

   WordPress prints its own block CSS (.wp-container-N, .has-*-font-size)
   in an inline <style> in the head, AFTER this stylesheet. Those rules
   carry the same specificity as a single class, so anything set here on
   one class loses. The overrides below therefore need !important: this
   is the one place in the sheet where that is justified and it is
   deliberate, not laziness.
   =================================================================== */

/* ---- Tablet and below: the desktop nav is replaced by the overlay ---- */
@media (max-width: 899px) {
	.fbh-header .fbh-header-cta { display: none !important; }
	/* Keep the wrapper (the hamburger button lives inside it) but hide the
	   inline list, so a phone gets a proper collapsed menu rather than seven
	   links crammed into the header. */
	.fbh-header .fbh-nav { display: flex !important; flex: 1; justify-content: flex-end; }
	.fbh-header .fbh-nav .wp-block-navigation__container { display: none; }
}

/* ---- Phones ---- */
@media (max-width: 699px) {

	/* WP ships a fluid body size that lands at 14px on a phone. */
	body { font-size: 1rem !important; }

	/* The display clamps bottom out around 34px, which is a seven-line
	   headline on a 375px screen. Step the whole scale down one notch. */
	h1, .fbh-hero h1, .wp-block-heading.is-style-display {
		font-size: clamp(1.75rem, 1.4rem + 2.4vw, 2.15rem) !important;
		line-height: 1.2 !important;
	}
	h2 { font-size: clamp(1.35rem, 1.2rem + 1.2vw, 1.6rem) !important; }
	h3 { font-size: 1.15rem !important; }

	/* Long headings on a narrow column need a little breathing room. */
	.fbh-hero h1 { text-wrap: pretty; }

	.fbh-hero-inner { padding: clamp(2rem, 7vw, 3rem) var(--fbh-gutter); }
	.fbh-hero p.fbh-lede { font-size: 1.02rem; line-height: 1.6; }
	.fbh-hero-media img { aspect-ratio: 3 / 2; }

	.fbh-section { padding: clamp(2.25rem, 6vw, 3rem) var(--fbh-gutter); }
	.fbh-section-head { margin-bottom: 1.5rem; }
	.fbh-section-head p { font-size: 1rem; }

	/* One card per row on a phone, centred and deliberately narrower than the
	   column, so it reads as a considered tile rather than a stretched panel.
	   Two-up made each card too thin: 134px wide against 300px tall is a
	   letterbox, so the shape was as much the problem as the size.

	   WIDTH is the one number to change here, and it is a percentage of the
	   grid column, not of the screen: the column is already inset 1rem each
	   side. 90% of the column measures out at roughly 82% of the viewport,
	   which matches the target proportion. Lower it for a smaller card. */
	:root { --fbh-card-w: 90%; }

	.fbh-grid { grid-template-columns: 1fr !important; justify-items: center; }

	.fbh-card { width: var(--fbh-card-w); max-width: 100%; padding: 8px; border-radius: 15px; }
	.fbh-card-media { border-radius: 9px; }
	/* Square, so the card lands near the 0.8 proportion of the target outline
	   rather than stretching into a portrait letterbox. */
	.fbh-card-media img { aspect-ratio: 1 / 1; object-position: center 30%; }
	.fbh-card-body { padding: 11px 3px 2px; gap: 6px; }
	.fbh-card-name { font-size: 1.26rem; }
	.fbh-card-go { width: 30px; height: 30px; }
	.fbh-card-go svg { width: 14px; height: 14px; }
	/* Wide enough again for sex and colour on one line, so the separator comes
	   back and the card loses a row of height. */
	.fbh-card-meta { font-size: .84rem; gap: 6px; }
	.fbh-meta-dot { display: inline; }
	.fbh-swatch { width: 10px; height: 10px; }
	.fbh-card-foot { padding-top: 9px; gap: 6px; }
	.fbh-card-price { font-size: 1.3rem; }
	.fbh-card-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
	.fbh-card-price { font-size: 1.1rem; }
	.fbh-card-body { padding: 1rem 1.1rem 1.2rem; }

	/* Three-up galleries become two-up; a 3-across thumb is unreadable. */
	.fbh-gallery--3 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }

	.fbh-footer-cols { gap: 1.75rem; }
	.fbh-footer-bottom { flex-direction: column; gap: .5rem; }
	.fbh-price-tag { font-size: 1.5rem; }

	/* Facts table: label and value stack instead of fighting for width. */
	.fbh-fact { flex-direction: column; gap: .15rem; padding: .7rem .9rem; }
	.fbh-fact dd { text-align: left; }
}

/* ---- Single puppy: photos lead on desktop, details must lead on mobile ----

   The page is two columns: photography on the left, title, price and the
   enquiry button on the right. WP stacks those columns under 782px, which
   puts every photo *before* the h1: on a phone the title landed 1511px down
   the page and the price and CTA were below the fold entirely. Reversing the
   stack brings the name, price and call to action directly under the summary.

   `order` cannot fix this: once the columns wrap onto separate flex lines,
   order only sorts within a line. column-reverse is what actually works. */
@media (max-width: 781px) {
	.fbh-single-cols {
		flex-direction: column-reverse !important;
	}
	.fbh-single-cols > .wp-block-column {
		flex-basis: 100% !important;
	}
}

/* ---- Narrow phones: the header must still fit on one row ---- */
@media (max-width: 480px) {
	.fbh-header .wp-block-site-title { font-size: .95rem !important; white-space: nowrap; }
	.fbh-header .wp-block-site-title a { white-space: nowrap; }
	.fbh-header .wp-block-group { gap: .5rem; }
}

@media (max-width: 380px) {
	.fbh-header .wp-block-site-title { font-size: .82rem !important; }
	.fbh-header .wp-block-site-logo img { max-height: 34px; }
}

@media print {
	.fbh-header, .fbh-footer, .fbh-nav { display: none; }
}

/* ===================================================================
   15. Enquiry form

   Same field flow as the reference site, stored in WordPress rather than
   posted to a third-party form service.
   =================================================================== */

.fbh-form-wrap { max-width: 40rem; }

.fbh-form-heading { font-family: var(--wp--preset--font-family--heading); font-size: 1.2rem; font-weight: 600; margin: 0 0 1rem; }

/* Honeypot: off-screen rather than display:none, because some bots skip
   hidden inputs but happily fill anything positioned out of view. */
.fbh-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.fbh-req { color: var(--wp--preset--color--primary); margin-left: .15rem; }

.fbh-field textarea { resize: vertical; min-height: 7rem; font: inherit; line-height: 1.6; }

.fbh-form-submit { display: flex; flex-direction: column; gap: .6rem; margin-top: .35rem; }
.fbh-form-submit .wp-block-button__link { width: 100%; text-align: center; cursor: pointer; border: 0; }
.fbh-form-small { margin: 0; font-size: .86rem; color: var(--wp--preset--color--muted); }

/* Confirmation and error states. */
.fbh-form-note {
	border: 1.5px solid rgba(28, 25, 23, .16);
	border-radius: 12px;
	padding: 1rem 1.15rem;
	margin-bottom: 1.5rem;
}
.fbh-form-note strong { display: block; margin-bottom: .25rem; }
.fbh-form-note p { margin: 0; font-size: .92rem; line-height: 1.55; }
.fbh-form-note--ok { border-color: rgba(21, 128, 61, .35); background: rgba(21, 128, 61, .06); }
.fbh-form-note--ok strong { color: #15803d; }
.fbh-form-note--bad { border-color: rgba(179, 45, 46, .35); background: rgba(179, 45, 46, .06); }
.fbh-form-note--bad strong { color: #b32d2e; }

/* Admin: the enquiry list reads better with a little breathing room. */
.post-type-fbh_enquiry .column-fbh_email,
.post-type-fbh_enquiry .column-fbh_puppy { width: 22%; }

/* Coat colours, read from the taxonomy. */
.fbh-colour-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem 1.25rem; }
.fbh-colour-list li { display: flex; align-items: center; gap: .55rem; font-size: .95rem; color: var(--wp--preset--color--ink-soft); }
.fbh-colour-list .fbh-swatch { width: 14px; height: 14px; }

/* Four steps, not three, so the grid needs its own breakpoint. */
@media (min-width: 800px) { .fbh-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ===================================================================
   16. Single puppy photo slider

   Five frames, moved by the visitor only. No autoplay: a photograph of a dog
   someone is about to spend thousands on is something to study, not to have
   slid past. The thumbnail strip doubles as the position indicator.
   =================================================================== */

.fbh-gallery-slider { display: grid; gap: .85rem; }

.fbh-gs-stage {
	position: relative;
	border-radius: 18px;
	overflow: hidden;
	border: 1.5px solid rgba(28, 25, 23, .14);
	background: var(--wp--preset--color--surface-alt);
}

.fbh-gs-frame { margin: 0; }
.fbh-gs-frame .fbh-gs-img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	object-position: center 30%;
	transition: transform .6s cubic-bezier(.2, .7, .3, 1);
}
.fbh-gs-stage:hover .fbh-gs-frame.is-active .fbh-gs-img { transform: scale(1.03); }

/* Without JavaScript every frame is visible and stacked. */
.fbh-gallery-slider:not(.fbh-gs-ready) .fbh-gs-frame { display: block; }
.fbh-gallery-slider:not(.fbh-gs-ready) .fbh-gs-frame + .fbh-gs-frame { margin-top: .85rem; }

.fbh-gs-ready .fbh-gs-frame { display: none; }
.fbh-gs-ready .fbh-gs-frame.is-active { display: block; animation: fbh-gs-in .35s ease both; }

@keyframes fbh-gs-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
	.fbh-gs-ready .fbh-gs-frame.is-active { animation: none; }
	.fbh-gs-frame .fbh-gs-img, .fbh-gs-stage:hover .fbh-gs-frame.is-active .fbh-gs-img { transition: none; transform: none; }
}

/* Arrows: frosted circles over the photograph. */
.fbh-gs-arrow {
	position: absolute;
	top: 50%;
	translate: 0 -50%;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1.5px solid rgba(255, 255, 255, .45);
	border-radius: 50%;
	background: rgba(28, 25, 23, .34);
	-webkit-backdrop-filter: blur(10px) saturate(1.4);
	backdrop-filter: blur(10px) saturate(1.4);
	color: #fff;
	cursor: pointer;
	transition: background .18s ease, border-color .18s ease, scale .18s ease;
}
.fbh-gs-arrow:hover { background: rgba(28, 25, 23, .55); border-color: rgba(255, 255, 255, .7); scale: 1.06; }
.fbh-gs-arrow svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fbh-gs-arrow--prev { left: .7rem; }
.fbh-gs-arrow--next { right: .7rem; }
.fbh-gs-arrow:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Counter, bottom right. */
.fbh-gs-counter {
	position: absolute;
	right: .7rem;
	bottom: .7rem;
	margin: 0;
	display: inline-flex;
	align-items: center;
	gap: .3rem;
	font-size: .78rem;
	font-weight: 600;
	letter-spacing: .02em;
	color: #fff;
	background: rgba(28, 25, 23, .42);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	border-radius: var(--wp--custom--radius--pill);
	padding: .3rem .7rem;
}
.fbh-gs-slash { opacity: .55; }

/* Thumbnail strip. */
.fbh-gs-thumbs {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: 1fr;
	gap: .5rem;
}
.fbh-gs-thumb {
	padding: 0;
	border: 1.5px solid rgba(28, 25, 23, .14);
	border-radius: 11px;
	overflow: hidden;
	background: var(--wp--preset--color--surface-alt);
	cursor: pointer;
	transition: border-color .18s ease, opacity .18s ease, scale .18s ease;
	opacity: .62;
}
.fbh-gs-thumb img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.fbh-gs-thumb:hover { opacity: .86; }
.fbh-gs-thumb.is-active {
	opacity: 1;
	border-color: var(--wp--preset--color--primary);
	box-shadow: 0 0 0 1.5px var(--wp--preset--color--primary);
}
.fbh-gs-thumb:focus-visible { outline: 2px solid var(--wp--preset--color--primary-dark); outline-offset: 2px; }

@media (max-width: 699px) {
	.fbh-gs-arrow { width: 38px; height: 38px; }
	.fbh-gs-arrow--prev { left: .5rem; }
	.fbh-gs-arrow--next { right: .5rem; }
	.fbh-gs-thumbs { gap: .4rem; }
}

/* WordPress's wpautop wraps shortcode output and leaves empty <p> elements
   behind. Inside the photo slider those added 94px of dead space under the
   image. An empty paragraph carries no meaning anywhere, so hide them all. */
p:empty { display: none; }

/* The slider's own paragraph (the counter) should not carry a text margin. */
.fbh-gs-stage > p { margin: 0; }
