/*
Theme Name:   Amara Urns
Theme URI:    https://amaraurns.com/
Description:  Amara Urns storefront theme. Child of Ollie (block theme) - see DECISIONS.md ADR-003.
              Lives in src/themes/topurns-child and is junctioned into
              wp/wp-content/themes by scripts/setup-local.ps1 - edit it here,
              never inside wp/.
Author:       Amara Urns
Template:     ollie
Version:      0.11.3
Requires at least: 6.7
Tested up to: 7.1
Requires PHP: 8.1
Text Domain:  topurns
*/

/* ==========================================================================
   Amara Urns child theme styles.

   Ollie is a block theme, so nearly all design decisions live in theme.json.
   This file carries ONLY what theme.json cannot express:
     - focus and skip-link behaviour
     - language-specific typography (Greek needs different treatment)
     - reduced-motion handling
     - a few component details with no block equivalent

   Never hard-code a colour or size here. Use the tokens theme.json generates.
   Reference: docs/design-system.md
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Focus
   Verified >= 3:1 against every surface in the palette (minimum 5.30:1).
   The soft tones were measured and rejected: stone-deep is 1.56:1 on ivory and
   clay-soft is 2.84:1 - a focus ring in either would be effectively invisible.
   -------------------------------------------------------------------------- */

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: var(--wp--custom--focus--width, 2px) solid var(--wp--preset--color--clay-deep);
	outline-offset: var(--wp--custom--focus--offset, 2px);
	border-radius: 2px;
}

/* Only remove the default ring where we have already drawn our own. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus:not(:focus-visible) {
	outline: none;
}

/* --------------------------------------------------------------------------
   2. Skip link
   First focusable element on the page; invisible until focused.
   -------------------------------------------------------------------------- */

.topurns-skip-link {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 100000;
	padding: 0.75rem 1.25rem;
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--white);
	font-family: var(--wp--preset--font-family--inter);
	font-size: var(--wp--preset--font-size--small);
	text-decoration: none;
	transform: translateY(-120%);
}

.topurns-skip-link:focus {
	transform: translateY(0);
	clip: auto !important;
	clip-path: none;
	width: auto;
	height: auto;
}

/* --------------------------------------------------------------------------
   3. Language-specific typography

   Greek lowercase already has an open rhythm; letter-spacing makes it look
   broken. Greek copy also runs 15-25% longer than English, so headings get a
   fractionally tighter size step to stop them wrapping awkwardly.
   -------------------------------------------------------------------------- */

:lang(el),
.lang-el {
	letter-spacing: normal;
}

:lang(el) h1, :lang(el) h2, :lang(el) h3,
.lang-el h1, .lang-el h2, .lang-el h3 {
	letter-spacing: normal;
	line-height: 1.25;
}

/* Greek has no small-caps tradition and no widely-supported synthesis;
   forcing uppercase on Greek also strips accents, which changes meaning. */
:lang(el) .is-style-label,
.lang-el .is-style-label {
	text-transform: none;
	letter-spacing: 0.02em;
}

/* --------------------------------------------------------------------------
   4. Typographic detail
   -------------------------------------------------------------------------- */

/* Prices, specs and cart totals line up column-wise. */
.woocommerce-Price-amount,
.wc-block-formatted-money-amount,
.wp-block-woocommerce-product-price,
.topurns-spec__value,
td[class*="product-total"],
td[class*="product-subtotal"] {
	font-variant-numeric: tabular-nums;
	font-feature-settings: "tnum" 1;
}

/* Long-form reading measure: set by each template's constrained layout
   (contentSize 720-760px). A per-element max-width in ch used to live here;
   ch scales with font size, so headings ended up wider than the paragraphs
   under them and visibly out of line. */

/* Small all-caps labels - Latin only, see the :lang(el) override above. */
.is-style-label {
	font-family: var(--wp--preset--font-family--inter);
	font-size: var(--wp--preset--font-size--micro);
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--wp--preset--color--ink-muted);
}

/* --------------------------------------------------------------------------
   5. Specification list

   The workhorse of the product page. Approximate values are rendered as
   approximate because the source states them that way, and a spec the source
   does not state is omitted rather than estimated.
   -------------------------------------------------------------------------- */

.topurns-spec {
	display: grid;
	grid-template-columns: minmax(8rem, auto) 1fr;
	gap: var(--wp--preset--spacing--30) var(--wp--preset--spacing--50);
	margin: var(--wp--preset--spacing--60) 0;
	padding: var(--wp--preset--spacing--50);
	background: var(--wp--preset--color--cream);
	border-radius: var(--wp--custom--radius--base, 4px);
	font-size: var(--wp--preset--font-size--small);
}

.topurns-spec__label {
	color: var(--wp--preset--color--ink-muted);
	margin: 0;
}

.topurns-spec__value {
	color: var(--wp--preset--color--ink);
	margin: 0;
	font-weight: 500;
}

@media (max-width: 480px) {
	.topurns-spec {
		grid-template-columns: 1fr;
		gap: var(--wp--preset--spacing--20);
	}
	.topurns-spec__value {
		margin-bottom: var(--wp--preset--spacing--30);
	}
}

/* --------------------------------------------------------------------------
   6. Touch targets
   -------------------------------------------------------------------------- */

.wp-block-navigation a,
.wp-block-button__link,
.woocommerce a.button,
.woocommerce button.button {
	min-height: var(--wp--custom--tap-target, 44px);
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

/* --------------------------------------------------------------------------
   7. Images
   Explicit ratios so nothing shifts while loading - CLS budget is 0.05.
   -------------------------------------------------------------------------- */

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

.topurns-media--square img {
	aspect-ratio: 1 / 1;
	object-fit: cover;
	width: 100%;
}

/* M10: product cards show the whole photo, square, on the cream card
   colour. Studio photos are 3:2 and the older ones square, on white or
   cut out; "cover" cut the sides off the studio ones. */
.wc-block-components-product-image img {
	aspect-ratio: 1 / 1;
	object-fit: contain;
	width: 100%;
	background-color: var(--wp--preset--color--cream);
}

.topurns-media--portrait img {
	aspect-ratio: 4 / 5;
	object-fit: cover;
	width: 100%;
}

/* --------------------------------------------------------------------------
   8. Overflow guard
   No horizontal scrolling at any width. Tables and wide media get their own
   scroll container instead of pushing the page sideways.
   -------------------------------------------------------------------------- */

html,
body {
	overflow-x: clip;
}

.wp-block-table,
.topurns-scroll-x {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

/* --------------------------------------------------------------------------
   9. Motion
   Opacity and small translations only. No parallax, no carousels.
   -------------------------------------------------------------------------- */

@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;
	}
}

/* --------------------------------------------------------------------------
   10. Product grids

   The design system commits to 1 column below 600px, 2 up to 900px, 3 above.
   WooCommerce's Product Collection block uses a flex layout with
   shrinkColumns, which at 375px wrapped a three-product row as 2 + 1 - uneven,
   and it crops the photography just where this brand can least afford it.
   These rules enforce the documented grid instead.
   -------------------------------------------------------------------------- */

.wp-block-woocommerce-product-collection .wc-block-product-template,
.wp-block-woocommerce-product-collection .wp-block-post-template {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--wp--preset--spacing--50);
}

@media (max-width: 900px) {
	.wp-block-woocommerce-product-collection .wc-block-product-template,
	.wp-block-woocommerce-product-collection .wp-block-post-template {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 600px) {
	.wp-block-woocommerce-product-collection .wc-block-product-template,
	.wp-block-woocommerce-product-collection .wp-block-post-template {
		grid-template-columns: minmax(0, 1fr);
		gap: var(--wp--preset--spacing--60);
	}
}

/* The whole card is one link; keep its parts from inheriting link colour. */
.wc-block-product-template li .wp-block-post-title a {
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}

.wc-block-product-template li .wp-block-post-title a:hover {
	color: var(--wp--preset--color--clay-deep);
	text-decoration: underline;
}

/* ==========================================================================
   11. Header

   Problems this fixes, all visible in qa/header-*.png before the change:
     - The nav sat jammed against the cart icon with no separation, leaving a
       dead gap mid-header at wide widths and nothing but squeeze at 768px.
     - The bar was 77px tall with a 24px wordmark: thin, and not the feeling a
       premium handmade brand wants at first contact.
     - The nav only collapsed below 600px, so 600-1000px was cramped.
     - The account icon was filled clay; the cart a thin outline. Mismatched.
   ========================================================================== */

.topurns-header {
	position: relative;
	z-index: 100;
}

.topurns-header__bar {
	gap: var(--wp--preset--spacing--70);
}

/* Nav and utilities ------------------------------------------------------- */

.topurns-header__end {
	flex: 1 1 auto;
	gap: var(--wp--preset--spacing--70);
}

.topurns-header__utils {
	flex: 0 0 auto;
	gap: var(--wp--preset--spacing--50);
	padding-left: var(--wp--preset--spacing--50);
	border-left: 1px solid var(--wp--preset--color--stone);
}

.topurns-nav .wp-block-navigation__container {
	gap: clamp(1rem, 0.4rem + 1.4vw, 2rem);
}

.topurns-nav .wp-block-navigation-item__content {
	color: var(--wp--preset--color--ink);
	text-decoration: none;
	padding-block: 0.35rem;
	border-bottom: 1px solid transparent;
	transition: border-color var(--wp--custom--transition, 150ms ease-out),
		color var(--wp--custom--transition, 150ms ease-out);
}

.topurns-nav .wp-block-navigation-item__content:hover,
.topurns-nav .current-menu-item > .wp-block-navigation-item__content {
	color: var(--wp--preset--color--clay-deep);
	border-bottom-color: var(--wp--preset--color--clay);
	text-decoration: none;
}

/* Match the two utility icons to each other.
   The account icon is a FILLED silhouette and the cart is a STROKED outline -
   that is how WooCommerce draws them, and forcing one into the other's model
   distorts the glyph. What was actually wrong was the colour: the account icon
   inherited the clay link colour while the cart rendered ink, so they read as
   two different systems. Setting the colour once and letting each icon use
   currentColor in its own way fixes the mismatch without redrawing anything. */
.topurns-header__utils {
	color: var(--wp--preset--color--ink);
}

.topurns-header__utils a,
.topurns-header__utils button {
	color: inherit;
	display: inline-flex;
	align-items: center;
	transition: color var(--wp--custom--transition, 150ms ease-out);
}

.topurns-header__utils a:hover,
.topurns-header__utils button:hover {
	color: var(--wp--preset--color--clay-deep);
}

.topurns-header__utils svg {
	width: 22px;
	height: 22px;
	display: block;
}

/* Optical alignment: Woo's cart glyph sits on a slightly lower baseline than
   the account glyph, so they look misaligned side by side. */
.topurns-header__utils .wp-block-woocommerce-mini-cart svg {
	transform: translateY(-1px);
}

/* Collapse to the overlay menu at 1000px, not WordPress's 600px.
   Six top-level items plus two icons do not fit comfortably below that. */
@media (max-width: 999.98px) {
	.topurns-nav .wp-block-navigation__responsive-container:not(.is-menu-open) {
		display: none;
	}
	.topurns-nav .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: flex;
	}
}

@media (min-width: 1000px) {
	.topurns-nav .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: none;
	}
}

/* Overlay menu ------------------------------------------------------------ */

.topurns-nav .wp-block-navigation__responsive-container.is-menu-open {
	padding: var(--wp--preset--spacing--70) var(--wp--custom--gutter);
}

.topurns-nav .wp-block-navigation__responsive-container.is-menu-open
	.wp-block-navigation-item__content {
	font-size: var(--wp--preset--font-size--body-lg);
	padding-block: 0.5rem;
}

/* ==========================================================================
   12. Sticky header

   Condenses on scroll rather than appearing and disappearing. The shop is
   browsed by scrolling through products, and losing the cart at the top of a
   long category page is a real annoyance.

   Purely CSS-driven from one class the script toggles - no layout is measured
   or written from JS, so there is no scroll jank.
   ========================================================================== */

body.topurns-has-sticky-header .topurns-header {
	position: sticky;
	top: 0;
	backdrop-filter: saturate(140%) blur(6px);
	background-color: color-mix(in srgb, var(--wp--preset--color--ivory) 88%, transparent);
	transition: padding var(--wp--custom--transition, 150ms ease-out),
		box-shadow var(--wp--custom--transition, 150ms ease-out);
}

body.topurns-header-condensed .topurns-header {
	padding-block: var(--wp--preset--spacing--30);
	box-shadow: 0 1px 0 var(--wp--preset--color--stone),
		0 4px 20px rgb(42 37 33 / 6%);
}

/* No sticky behaviour where the viewer has asked for less motion, or where
   vertical space is scarce enough that a fixed bar costs more than it gives. */
@media (prefers-reduced-motion: reduce), (max-height: 560px) {
	body.topurns-has-sticky-header .topurns-header {
		position: relative;
		backdrop-filter: none;
	}
}

/* ==========================================================================
   13. Product cards - restrained hover

   A 2px lift and a slight image scale. Enough to signal "this is one link",
   not enough to feel like a consumer app. The whole card is the target.
   ========================================================================== */

.wc-block-product-template li,
.wp-block-post-template li {
	transition: transform var(--wp--custom--transition, 150ms ease-out);
}

.wc-block-product-template li .wc-block-components-product-image,
.wc-block-product-template li .wp-block-woocommerce-product-image {
	overflow: hidden;
	border-radius: var(--wp--custom--radius--base, 4px);
	background: var(--wp--preset--color--cream);
}

.wc-block-product-template li img {
	transition: transform 300ms ease-out;
}

@media (hover: hover) {
	.wc-block-product-template li:hover {
		transform: translateY(-2px);
	}
	.wc-block-product-template li:hover img {
		transform: scale(1.03);
	}
}

/* ==========================================================================
   14. Scroll reveal

   Sections fade up 12px as they enter view, once. Deliberately small: the
   brand is calm, and a memorial site that animates at the reader is wrong.

   Everything starts VISIBLE. The script adds the hiding class itself, so a
   visitor with JS disabled, or one who reaches a section before the observer
   attaches, never sees a blank page.
   ========================================================================== */

.topurns-reveal {
	opacity: 0;
	transform: translateY(12px);
	transition: opacity 500ms ease-out, transform 500ms ease-out;
	will-change: opacity, transform;
}

.topurns-reveal.is-revealed {
	opacity: 1;
	transform: none;
	will-change: auto;
}

@media (prefers-reduced-motion: reduce) {
	.topurns-reveal,
	.topurns-reveal.is-revealed {
		opacity: 1;
		transform: none;
		transition: none;
	}
}

/* --------------------------------------------------------------------------
   15. Product archive

   Ollie's archive header puts the title and the term description in two
   bottom-aligned columns on a `tertiary` background - a colour that does not
   exist in our palette, so the band vanished and the description appeared to
   float in the top-right corner. Replaced with a stacked header in
   templates/archive-product.html: breadcrumb, then H1, then description at a
   readable measure.
   -------------------------------------------------------------------------- */

.topurns-archive-head .wp-block-query-title {
	margin-block: var(--wp--preset--spacing--30) 0;
}

.topurns-archive-head .wp-block-term-description {
	max-width: 62ch;
}

/* Woo renders the results count and the sort control as plain text and a bare
   select; give them the same quiet weight as the rest of the chrome. */
.topurns-results-bar {
	padding-bottom: var(--wp--preset--spacing--40);
	border-bottom: 1px solid var(--wp--preset--color--stone);
	gap: var(--wp--preset--spacing--40);
}

.topurns-results-bar .wp-block-woocommerce-product-results-count {
	margin: 0;
	color: var(--wp--preset--color--ink-muted);
}

.topurns-results-bar select,
.topurns-results-bar .wp-block-woocommerce-catalog-sorting select {
	font-family: var(--wp--preset--font-family--inter);
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--ink);
	background-color: transparent;
	border: 1px solid var(--wp--preset--color--stone-deep);
	border-radius: var(--wp--custom--radius--base, 4px);
	padding: 0.5rem 2rem 0.5rem 0.75rem;
}

/* Card title should not inherit the clay link colour - the price and capacity
   carry enough emphasis already. */
.topurns-card .wp-block-post-title a {
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}

.topurns-card .wp-block-post-title a:hover {
	color: var(--wp--preset--color--clay-deep);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.topurns-card .wp-block-post-excerpt__excerpt {
	margin: 0;
}

.topurns-card .wp-block-post-excerpt__more-text {
	display: none;
}

/* --------------------------------------------------------------------------
   17. Single product
   -------------------------------------------------------------------------- */

.topurns-product .wp-block-column {
	min-width: 0;
}

.topurns-product .woocommerce-product-gallery__image img,
.topurns-product .wp-block-woocommerce-product-image-gallery img {
	border-radius: var(--wp--custom--radius--base, 4px);
	background: var(--wp--preset--color--cream);
}

/* Variation swatches read as a row of choices rather than a form control. */
.topurns-product .variations select,
.topurns-product .wc-block-add-to-cart-form select {
	font-family: var(--wp--preset--font-family--inter);
	font-size: var(--wp--preset--font-size--medium);
	padding: 0.7rem 2rem 0.7rem 0.85rem;
	border: 1px solid var(--wp--preset--color--stone-deep);
	border-radius: var(--wp--custom--radius--base, 4px);
	background-color: var(--wp--preset--color--white);
	color: var(--wp--preset--color--ink);
	min-height: var(--wp--custom--tap-target, 44px);
}

.topurns-product .variations th,
.topurns-product .variations label {
	font-family: var(--wp--preset--font-family--inter);
	font-size: var(--wp--preset--font-size--micro);
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--wp--preset--color--ink-muted);
}

:lang(el) .topurns-product .variations th,
.lang-el .topurns-product .variations th {
	text-transform: none;
	letter-spacing: 0.02em;
}

/* The specification note explains an ABSENT value. It has to look like a
   deliberate statement rather than an error, or it undermines trust in every
   other number on the page. */
.topurns-spec__note {
	margin-top: calc(var(--wp--preset--spacing--40) * -1 + 0.25rem);
	margin-bottom: var(--wp--preset--spacing--60);
	padding: var(--wp--preset--spacing--40);
	border-left: 2px solid var(--wp--preset--color--sage);
	background: var(--wp--preset--color--ivory);
	color: var(--wp--preset--color--ink-soft);
	font-size: var(--wp--preset--font-size--small);
	border-radius: 0 var(--wp--custom--radius--base, 4px)
		var(--wp--custom--radius--base, 4px) 0;
}

/* ==========================================================================
   18. Brand lockup (header + footer)

   The supplied logo artwork reads "Ancient Urns"; the brand is now Amara
   Urns. Until the new lockup is drawn (brand/README.md), the olive-wreath
   mark - which has no lettering - sits beside the name set as live text.
   Live text is sharper at every size than a raster wordmark, and search
   engines read it. Gold is #86621A: 5.25:1 on ivory, 4.90:1 on cream - AA for
   normal text on both. (#8C6A1E was tried first: 4.41:1 on the cream footer
   failed AA at 20px, caught by Lighthouse.)
   ========================================================================== */

.topurns-brand {
	flex: 0 0 auto;
	margin: 0;
}

.topurns-brand .topurns-brand__mark {
	flex: 0 0 auto;
	margin: 0;
}

.topurns-brand .topurns-brand__mark img {
	display: block;
	width: 58px;
	height: auto;
	transition: width var(--wp--custom--transition, 150ms ease-out);
}

.topurns-brand__text {
	gap: 0;
	line-height: 1;
}

.topurns-brand__name {
	margin: 0;
	font-size: clamp(1.375rem, 1.1rem + 0.9vw, 1.75rem);
	font-weight: 500;
	letter-spacing: 0.01em;
	line-height: 1.05;
	white-space: nowrap;
}

.topurns-brand__name a {
	color: inherit;
	text-decoration: none;
}

.topurns-brand__name a:hover {
	color: var(--wp--preset--color--clay-deep);
}

.topurns-brand__tag {
	margin: 0.3rem 0 0;
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	line-height: 1;
	text-transform: uppercase;
	white-space: nowrap;
}

.lang-el .topurns-brand__tag {
	letter-spacing: 0.02em;
	text-transform: none;
}

body.topurns-header-condensed .topurns-brand .topurns-brand__mark img {
	width: 44px;
}

@media (max-width: 420px) {
	.topurns-brand .topurns-brand__mark img {
		width: 44px;
	}
	.topurns-brand__tag {
		display: none;
	}
}

.topurns-brand--footer .topurns-brand__mark img {
	width: 64px;
}

/* ==========================================================================
   19. Homepage photography
   ========================================================================== */

.topurns-hero__image {
	margin: 0;
}

.topurns-hero__image img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	object-position: 50% 60%;
	border-radius: var(--wp--custom--radius--large, 8px);
	box-shadow: var(--wp--preset--shadow--lifted);
}

@media (max-width: 781px) {
	.topurns-hero__image img {
		aspect-ratio: 1 / 1;
	}
}

/* Three commissions: one tall, two stacked. */
.topurns-mosaic {
	display: grid;
	grid-template-columns: 3fr 2fr;
	grid-template-rows: 1fr 1fr;
	gap: var(--wp--preset--spacing--40);
}

.topurns-mosaic > .wp-block-image {
	margin: 0;
	min-height: 0;
}

.topurns-mosaic > .wp-block-image:first-child {
	grid-row: 1 / span 2;
}

.topurns-mosaic img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: var(--wp--custom--radius--large, 8px);
}

.topurns-mosaic > .wp-block-image:first-child img {
	aspect-ratio: 3 / 4;
}

/* Four detail crops under "Our craft". */
.topurns-strip {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: var(--wp--preset--spacing--40);
}

.topurns-strip > .wp-block-image {
	margin: 0;
}

.topurns-strip img {
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	border-radius: var(--wp--custom--radius--large, 8px);
}

@media (max-width: 781px) {
	.topurns-strip {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* ==========================================================================
   20. Content pages and guides (templates/page.html, single.html, home.html)
   ========================================================================== */

.topurns-page__head .wp-block-post-title,
.topurns-page__head h1 {
	margin: 0;
}

.topurns-page__head .is-style-label {
	margin: 0;
}

.topurns-page__head .is-style-label a {
	color: var(--wp--preset--color--clay-deep);
	text-decoration: none;
}

.topurns-guide__lede p {
	margin: 0;
	max-width: 60ch;
}

.topurns-guide__lede .wp-block-post-excerpt__more-text {
	display: none;
}

.topurns-guide__image img {
	border-radius: var(--wp--custom--radius--large, 8px);
}

.topurns-prose {
	font-size: var(--wp--preset--font-size--body-lg);
	line-height: 1.75;
}

.topurns-prose h2 {
	margin-top: var(--wp--preset--spacing--70);
}

.topurns-prose h3 {
	margin-top: var(--wp--preset--spacing--60);
}

.topurns-prose h2 + *,
.topurns-prose h3 + * {
	margin-top: var(--wp--preset--spacing--30);
}

.topurns-prose li + li {
	margin-top: 0.4em;
}

.topurns-prose .wp-block-image img,
.topurns-prose .wp-block-gallery img {
	border-radius: var(--wp--custom--radius--large, 8px);
}

.topurns-prose .wp-block-gallery,
.topurns-prose .wp-block-image.alignwide {
	margin-block: var(--wp--preset--spacing--60);
}

/* Lede: the opening paragraph of a page. */
.is-style-lede {
	font-family: var(--wp--preset--font-family--literata);
	font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
	line-height: 1.5;
	color: var(--wp--preset--color--ink);
}

/* Numbered steps: large serif numerals in the margin. */
ol.is-style-steps {
	counter-reset: topurns-step;
	list-style: none;
	padding-left: 0;
}

ol.is-style-steps > li {
	counter-increment: topurns-step;
	position: relative;
	padding: var(--wp--preset--spacing--40) 0 var(--wp--preset--spacing--40) 3.5rem;
	border-top: 1px solid var(--wp--preset--color--stone);
}

.topurns-prose ol.is-style-steps > li + li {
	margin-top: 0;
}

ol.is-style-steps > li::before {
	content: counter(topurns-step);
	position: absolute;
	top: var(--wp--preset--spacing--40);
	left: 0;
	font-family: var(--wp--preset--font-family--literata);
	font-size: 2rem;
	line-height: 1;
	color: var(--wp--preset--color--clay);
}

ul.is-style-plain {
	list-style: none;
	padding-left: 0;
}

/* Guide cards */
.topurns-guides .wp-block-post-template {
	gap: var(--wp--preset--spacing--60);
}

.topurns-guide-card .wp-block-post-featured-image {
	margin: 0 0 var(--wp--preset--spacing--40);
}

.topurns-guide-card .wp-block-post-featured-image img {
	border-radius: var(--wp--custom--radius--large, 8px);
}

.topurns-guide-card .wp-block-post-title {
	margin: 0;
	line-height: 1.3;
}

.topurns-guide-card .wp-block-post-title a {
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}

.topurns-guide-card .wp-block-post-title a:hover {
	color: var(--wp--preset--color--clay-deep);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.topurns-guide-card .wp-block-post-excerpt__more-text {
	display: none;
}

@media (max-width: 781px) {
	.topurns-guides .wp-block-post-template.is-layout-grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* ==========================================================================
   21. Forms (contact, withdrawal)
   ========================================================================== */

.amara-form {
	margin-block: var(--wp--preset--spacing--60);
	padding: clamp(1.25rem, 4vw, 2.5rem);
	background: var(--wp--preset--color--cream);
	border-radius: var(--wp--custom--radius--large, 8px);
	font-size: var(--wp--preset--font-size--medium);
	line-height: 1.5;
}

.amara-form form {
	display: grid;
	gap: var(--wp--preset--spacing--50);
}

.amara-form__row {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--wp--preset--spacing--50);
}

@media (max-width: 600px) {
	.amara-form__row {
		grid-template-columns: minmax(0, 1fr);
	}
}

.amara-form__field label {
	display: block;
	margin-bottom: 0.375rem;
	font-weight: 600;
	font-size: var(--wp--preset--font-size--small);
}

.amara-form__optional {
	font-weight: 400;
	color: var(--wp--preset--color--ink-muted);
}

.amara-form input[type="text"],
.amara-form input[type="email"],
.amara-form input[type="tel"],
.amara-form select,
.amara-form textarea {
	box-sizing: border-box;
	width: 100%;
	min-height: var(--wp--custom--tap-target, 44px);
	padding: 0.65rem 0.85rem;
	font: inherit;
	color: var(--wp--preset--color--ink);
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--ink-muted);
	border-radius: var(--wp--custom--radius--base, 4px);
}

.amara-form textarea {
	resize: vertical;
}

/* M12: the subject select had lost its arrow (the background shorthand
   above clears the theme's arrow image). A chevron drawn in the text colour,
   on a wrapper so it needs no image. */
.amara-form__select {
	position: relative;
	display: block;
}

.amara-form__select select {
	appearance: none;
	padding-right: 2.75rem;
	cursor: pointer;
}

.amara-form__select::after {
	content: "";
	position: absolute;
	top: 50%;
	right: 1.1rem;
	width: 0.5rem;
	height: 0.5rem;
	border-right: 2px solid var(--wp--preset--color--ink);
	border-bottom: 2px solid var(--wp--preset--color--ink);
	transform: translateY(-70%) rotate(45deg);
	pointer-events: none;
}

.amara-form__help {
	margin: 0 0 0.5rem;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--ink-soft);
}

/* The file field's natural width (~330px) set the form's single grid
   column and pushed every field past the screen at 320px: the column may
   shrink, and so may the field. */
.amara-form form {
	grid-template-columns: minmax(0, 1fr);
}

.amara-form input[type="file"] {
	width: 100%;
	min-width: 0;
	max-width: 100%;
	font-size: var(--wp--preset--font-size--small);
}

.amara-form .has-error input[type="file"] {
	outline: 2px solid #9b2c1f;
	outline-offset: 2px;
}

.amara-form__reply {
	margin: 0;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--ink-soft);
}

.amara-form .has-error input,
.amara-form .has-error textarea {
	border-color: #9b2c1f;
	border-width: 2px;
}

.amara-form__error {
	margin: 0.375rem 0 0;
	color: #9b2c1f;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
}

.amara-form__notice {
	margin-bottom: var(--wp--preset--spacing--50);
	padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--50);
	border-radius: var(--wp--custom--radius--base, 4px);
}

.amara-form__notice p {
	margin: 0;
}

.amara-form__notice.is-success {
	background: #e9efe4;
	border-left: 3px solid var(--wp--preset--color--sage);
}

.amara-form__notice.is-error {
	background: #f7e6e1;
	border-left: 3px solid #9b2c1f;
}

.amara-form__privacy {
	margin: 0;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--ink-soft);
}

.amara-form__trap {
	position: absolute !important;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.amara-form .wp-block-button__link {
	border: 0;
	cursor: pointer;
	font: inherit;
	font-weight: 600;
}

/* ==========================================================================
   22. "To be confirmed" marker (topurns-core [amara_tbc], and empty
   [amara_business] fields). Deliberately conspicuous: it must be impossible
   to launch without noticing one.
   ========================================================================== */

mark.amara-tbc {
	padding: 0.05em 0.3em;
	color: var(--wp--preset--color--ink);
	background: #fbe7a1;
	border-bottom: 2px dotted #8c6a1e;
	border-radius: 2px;
	box-decoration-break: clone;
	-webkit-box-decoration-break: clone;
}

.amara-tbc__label {
	font-family: var(--wp--preset--font-family--inter);
	font-size: 0.75em;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #6b4f12;
}

/* ==========================================================================
   23. Footer
   ========================================================================== */

.topurns-footer__list {
	padding-left: 0;
	list-style: none;
	line-height: 2;
}

.topurns-footer__list a {
	color: var(--wp--preset--color--ink-soft);
	text-decoration: none;
}

.topurns-footer__list a:hover {
	color: var(--wp--preset--color--clay-deep);
	text-decoration: underline;
}

.topurns-footer__base p {
	margin: 0;
}

/* Even rows in content galleries: WordPress lets each row's height follow its
   photos, so a mix of portrait and landscape shots gives ragged rows. */
.topurns-prose .wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image) img {
	height: auto;
	aspect-ratio: 4 / 5;
}

/* Narrow screens: the brand, the menu button and two icons must all fit in
   320px. Without this the mini-cart sat 67px past the right edge at 390px -
   invisible, because overflow-x is clipped, so nothing looked broken. */
@media (max-width: 600px) {
	.topurns-header__bar,
	.topurns-header__end {
		gap: var(--wp--preset--spacing--30);
	}
	.topurns-header__utils {
		gap: 0.25rem;
		padding-left: var(--wp--preset--spacing--20);
	}
	.topurns-brand .topurns-brand__mark img {
		width: 40px;
	}
	.topurns-brand__name {
		font-size: 1.25rem;
	}
}

@media (max-width: 360px) {
	.topurns-brand .topurns-brand__mark img {
		width: 32px;
	}
	.topurns-brand__name {
		font-size: 1.125rem;
	}
	.topurns-header__utils {
		border-left: 0;
		padding-left: 0;
	}
}

/* ==========================================================================
   24. Product gallery
   ========================================================================== */

/* WooCommerce caps the gallery block at 512px, which left the photo far
   smaller than its column. These are the product's best feature. */
.topurns-product .wp-block-woocommerce-product-image-gallery {
	max-width: none;
}

.topurns-product .woocommerce-product-gallery__image img {
	aspect-ratio: 1 / 1;
	object-fit: cover;
	width: 100%;
}

/* Thumbnails: one tidy scrolling row rather than a wall of 13 tiles. */
.topurns-product .flex-control-thumbs {
	display: flex;
	gap: 8px;
	margin: 8px 0 0 !important;
	padding: 0 0 6px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: thin;
}

.topurns-product .flex-control-thumbs li {
	flex: 0 0 calc((100% - 40px) / 6);
	width: auto !important;
	margin: 0 !important;
	scroll-snap-align: start;
	list-style: none;
}

.topurns-product .flex-control-thumbs img {
	aspect-ratio: 1 / 1;
	object-fit: cover;
	border-radius: var(--wp--custom--radius--base, 4px);
	opacity: 0.72;
	border: 2px solid transparent;
	transition: opacity var(--wp--custom--transition, 150ms ease-out);
}

.topurns-product .flex-control-thumbs img:hover,
.topurns-product .flex-control-thumbs img.flex-active {
	opacity: 1;
}

/* M25: the active thumbnail keeps the common photo frame and gains an
   outline (below), so every photo has the same border. */

@media (max-width: 600px) {
	.topurns-product .flex-control-thumbs li {
		flex-basis: calc((100% - 24px) / 4);
	}
}

/* One reduction badge everywhere: cards, product page, cart (H9). Text is
   "Reduced" (topurns-core/inc/strings.php), never "Sale!". */
.wc-block-components-product-sale-badge,
.wc-block-components-sale-badge,
.woocommerce span.onsale,
.topurns-product .onsale {
	min-width: 0;
	min-height: 0;
	padding: 0.3em 0.75em;
	font-family: var(--wp--preset--font-family--inter);
	font-size: var(--wp--preset--font-size--micro);
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: 0.04em;
	text-transform: none;
	color: var(--wp--preset--color--white);
	background: var(--wp--preset--color--clay);
	border: 0;
	border-radius: 999px;
}

/* On the product page the badge sat half outside the photo's left edge. */
.topurns-product .wp-block-woocommerce-product-image-gallery {
	position: relative;
}

/* WooCommerce's own rule (left: -1rem) is more specific than a plain
   .topurns-product selector, so this one names the gallery block too. */
.topurns-product .wp-block-woocommerce-product-image-gallery > span.onsale {
	position: absolute;
	top: 12px;
	left: 12px;
	right: auto;
	z-index: 9;
	margin: 0;
}

.amara-lowest-price {
	display: block;
	margin-top: 0.25rem;
	font-size: var(--wp--preset--font-size--micro);
	font-weight: 400;
	color: var(--wp--preset--color--ink-muted);
}

/* ==========================================================================
   25. Cart and checkout blocks

   Two things came out of the parent theme's resets that a checkout cannot
   do without: the steps had no space between them (each heading sat on the
   last line of the step above), and the fields had no border at all - white
   boxes on an ivory page, which reads as decoration rather than as somewhere
   to type. Field edges use ink-muted: about 6:1 on white, over the 3:1 that
   WCAG asks of form controls.
   ========================================================================== */

.wc-block-checkout .wc-block-components-checkout-step {
	margin-bottom: var(--wp--preset--spacing--60);
}

.wc-block-checkout .wc-block-components-checkout-step__heading {
	margin-bottom: var(--wp--preset--spacing--30);
}

.wc-block-checkout__guest-checkout-notice {
	margin-top: var(--wp--preset--spacing--20);
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--ink-muted);
}

.wc-block-components-text-input input,
.wc-blocks-components-select .wc-blocks-components-select__select,
.wc-block-components-textarea,
.wc-block-components-combobox .components-form-token-field__input-container {
	border: 1px solid var(--wp--preset--color--ink-muted) !important;
	border-radius: var(--wp--custom--radius--base, 4px) !important;
	background-color: var(--wp--preset--color--white);
}

.wc-block-components-text-input input:focus,
.wc-blocks-components-select .wc-blocks-components-select__select:focus,
.wc-block-components-textarea:focus {
	border-color: var(--wp--preset--color--clay-deep) !important;
	box-shadow: 0 0 0 1px var(--wp--preset--color--clay-deep);
}

.wc-block-checkout__terms {
	margin-block: var(--wp--preset--spacing--50);
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--ink-soft);
}

.wc-block-checkout__add-note {
	margin-top: var(--wp--preset--spacing--40);
}

/* WooCommerce fixes the select at 3.125em tall with a floating label above
   the value; the theme's 1.7 body line-height pushed the value below the
   box, so "Greece" was cut in half. */
.wc-blocks-components-select .wc-blocks-components-select__select {
	line-height: 1.25;
}

/* M8: line-height alone was not enough on phones. The parent theme fixes the
   height at 3.4em with 24px above the value, which leaves less room than one
   line of text, so Safari cut the bottom of "Greece" and "Attica". Let the
   box grow to fit the label and the whole value. */
.wc-blocks-components-select .wc-blocks-components-select__select {
	height: auto;
	min-height: 3.5em;
	padding-top: 24px;
	padding-bottom: 0.5em;
	line-height: 1.4;
}

/* ==========================================================================
   26. Size chips and the capacity line on cards (H2)

   Capacity decides the purchase, so it replaces the excerpt on every card,
   and the four homepage size bands become filters above the pet grid.
   ========================================================================== */

.topurns-chips ul {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--20);
	margin: 0 0 var(--wp--preset--spacing--50);
	padding: 0;
	list-style: none;
}

.topurns-chips a {
	display: inline-flex;
	align-items: baseline;
	gap: 0.4em;
	min-height: var(--wp--custom--tap-target, 44px);
	box-sizing: border-box;
	padding: 0.6rem 1rem;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--ink);
	text-decoration: none;
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--stone-deep);
	border-radius: 999px;
}

.topurns-chips a:hover {
	border-color: var(--wp--preset--color--ink);
}

.topurns-chips a[aria-current="page"] {
	color: var(--wp--preset--color--ivory);
	background: var(--wp--preset--color--ink);
	border-color: var(--wp--preset--color--ink);
}

.topurns-chips__note {
	font-size: var(--wp--preset--font-size--micro);
	color: var(--wp--preset--color--ink-muted);
}

.topurns-chips a[aria-current="page"] .topurns-chips__note {
	color: var(--wp--preset--color--stone);
}

.topurns-card__capacity {
	margin: var(--wp--preset--spacing--20) 0 0;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--ink-soft);
}

/* Delivery line on the homepage (amara/delivery block, H4). */
.amara-delivery {
	margin-top: var(--wp--preset--spacing--30);
}

/* ==========================================================================
   27. Personalisation notes on product pages, cart and checkout (H5)
   Moved from the checkout-only stylesheet: product pages need them too.
   ========================================================================== */

/* Pointer shown under the cart and on personalisable product pages. */
.amara-portrait-pointer {
	margin: 1.5rem 0 0;
	padding: 1rem 1.25rem;
	font-size: 0.9375rem;
	color: var(--wp--preset--color--ink-soft, #5c534a);
	background: var(--wp--preset--color--cream, #f5f0e8);
	border-left: 3px solid var(--wp--preset--color--clay, #994e33);
	border-radius: 0 6px 6px 0;
}

.amara-portrait-pointer p {
	margin: 0;
}

.amara-portrait-pointer--product {
	margin-top: 1rem;
}

/* Personalised urns: no return for a change of mind (H5). */
.amara-return-notice {
	margin: 0.75rem 0 0;
	padding: 0.75rem 1rem;
	font-size: 0.9375rem;
	line-height: 1.5;
	color: var(--wp--preset--color--ink, #2a2521);
	background: var(--wp--preset--color--ivory, #fbf8f3);
	border: 1px solid var(--wp--preset--color--stone-deep, #d3c8b8);
	border-radius: 6px;
}

.amara-return-notice a {
	color: var(--wp--preset--color--clay-deep, #8c4529);
	white-space: nowrap;
}

/* Hero caption (H6): names the commission, in the voice of the gallery. */
.topurns-hero__image .wp-element-caption {
	margin: var(--wp--preset--spacing--30) 0 0;
	font-family: var(--wp--preset--font-family--literata);
	font-size: var(--wp--preset--font-size--small);
	font-style: italic;
	color: var(--wp--preset--color--ink-soft);
	text-align: center;
}

/* Commission caption under the product gallery (H7). */
.topurns-gallery-caption {
	margin: var(--wp--preset--spacing--30) 0 0;
	font-family: var(--wp--preset--font-family--literata);
	font-size: var(--wp--preset--font-size--small);
	font-style: italic;
	color: var(--wp--preset--color--ink-soft);
}

/* Empty cart (H8): a calm line and three ways on. */
.wp-block-woocommerce-empty-cart-block .wc-block-cart__empty-cart__title {
	margin-top: var(--wp--preset--spacing--40);
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 500;
}

.topurns-empty-cart__links {
	font-size: var(--wp--preset--font-size--body-lg);
}

/* Checkout on desktop (H10): a real gutter between the form and the order
   summary. The parent theme's reset removed WooCommerce's own padding, so
   "Log in" ended 1px from "Order summary". 32px + 24px = 56px. */
.wc-block-components-sidebar-layout.is-large .wc-block-components-main {
	padding-right: 32px;
}

.wc-block-components-sidebar-layout.is-large .wc-block-components-sidebar {
	padding-left: 24px;
}

/* Thank-you page (H11). */
.topurns-confirmation__status h1 {
	margin: 0;
	font-size: var(--wp--preset--font-size--xx-large);
}

.topurns-confirmation__status p:empty {
	display: none;
}

.topurns-confirmation .amara-portrait-received,
.topurns-confirmation .amara-next {
	margin: var(--wp--preset--spacing--50) 0 0;
	padding: var(--wp--preset--spacing--50);
	background: var(--wp--preset--color--ivory);
	border: 1px solid var(--wp--preset--color--stone);
	border-radius: var(--wp--custom--radius--large, 8px);
}

.topurns-confirmation .amara-portrait-received h2,
.topurns-confirmation .amara-next h2 {
	margin: 0 0 var(--wp--preset--spacing--30);
	font-size: var(--wp--preset--font-size--large);
}

.topurns-confirmation .amara-portrait-received p {
	margin: 0;
}

.topurns-confirmation .amara-next ol {
	margin: 0;
}

.amara-next__timing {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--ink-soft);
}

.topurns-confirmation__back {
	margin-top: var(--wp--preset--spacing--60);
}

/* "Our promises" near Add to cart (H12). */
.amara-promises {
	margin: var(--wp--preset--spacing--50) 0 0;
	padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--50);
	background: var(--wp--preset--color--clay-tint); /* M25 */
	border-radius: var(--wp--custom--radius--large, 8px);
}

.amara-promises__title {
	margin: 0 0 var(--wp--preset--spacing--20);
	font-size: var(--wp--preset--font-size--micro);
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--wp--preset--color--ink-soft);
}

.lang-el .amara-promises__title {
	letter-spacing: 0.02em;
	text-transform: none;
}

.amara-promises ul {
	display: grid;
	gap: 0.35rem;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: var(--wp--preset--font-size--small);
}

.amara-promises li::before {
	content: "✓";
	margin-right: 0.5em;
	color: var(--wp--preset--color--sage);
	font-weight: 700;
}

.amara-promises a {
	color: var(--wp--preset--color--ink);
	text-decoration-color: var(--wp--preset--color--stone-deep);
	text-underline-offset: 0.2em;
}

.amara-promises a:hover {
	color: var(--wp--preset--color--clay-deep);
}

/* Lists in content (H14). The parent theme zeroes list padding, so bullets
   and numbers were drawn in the page gutter and clipped on phones. Lists
   that draw no markers (steps, plain, footer) are left alone. */
.wp-block-list:not(.is-style-steps):not(.is-style-plain):not(.topurns-footer__list) {
	padding-inline-start: 1.5em;
}

/* Two-digit numbers need more room. */
ol.wp-block-list:not(.is-style-steps):has(> li:nth-child(10)) {
	padding-inline-start: 2.25em;
}

/* Category chips on the shop page (M2). */
.topurns-chips--categories ul {
	margin-bottom: var(--wp--preset--spacing--30);
}

/* Two columns on phones when a grid has more than six urns (M2), so the
   shop is not a 15-screen scroll. Card text steps down to fit 320px. */
@media (max-width: 600px) {
	.wp-block-woocommerce-product-collection .wc-block-product-template:has(> li:nth-child(7)) {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: var(--wp--preset--spacing--50) var(--wp--preset--spacing--40);
	}
	/* !important: WordPress's .has-large-font-size preset uses it too. */
	.wc-block-product-template:has(> li:nth-child(7)) .wp-block-post-title {
		font-size: 1.0625rem !important;
		line-height: 1.3;
		overflow-wrap: anywhere;
		hyphens: auto;
	}
	.wc-block-product-template:has(> li:nth-child(7)) .topurns-card__capacity,
	.wc-block-product-template:has(> li:nth-child(7)) .wp-block-woocommerce-product-price {
		font-size: var(--wp--preset--font-size--small) !important;
	}
}

/* Small archives (M3): no results count, no sort menu, so no bar. */
.amara-small-archive .topurns-results-bar {
	display: none;
}

/* Category intro (M4): the lead above the grid, the rest below. */
.amara-term-intro--lead {
	max-width: 62ch;
	margin-top: var(--wp--preset--spacing--40);
}

.amara-term-intro--lead p {
	margin: 0;
}

.amara-term-intro--rest {
	max-width: 68ch;
	margin-top: var(--wp--preset--spacing--80);
	padding-top: var(--wp--preset--spacing--60);
	border-top: 1px solid var(--wp--preset--color--stone);
	color: var(--wp--preset--color--ink-soft);
}

.amara-term-intro--rest h2 {
	margin: 0 0 var(--wp--preset--spacing--30);
	font-size: var(--wp--preset--font-size--large);
	color: var(--wp--preset--color--ink);
}

/* ==========================================================================
   M9. Colour choice: a dot before each colour's name, and the hint under
   the button until a colour is chosen.

   The dot colour comes from the colour term (inc/colours.php), as
   --amara-swatch on the chip. The ring keeps a white or gold dot visible on
   the ivory page.
   ========================================================================== */

.wc-block-product-filter-chips__item[id^="attribute_pa_colour-"] {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
}

.wc-block-product-filter-chips__item[id^="attribute_pa_colour-"]::before {
	content: "";
	flex: none;
	width: 1em;
	height: 1em;
	border-radius: 50%;
	background: var(--amara-swatch, transparent);
	box-shadow: 0 0 0 1px var(--wp--preset--color--ink-muted);
}

/* On the checked (dark) chip, a light ring keeps a dark dot visible. */
.wc-block-product-filter-chips__item[id^="attribute_pa_colour-"][aria-checked="true"]::before {
	box-shadow: 0 0 0 1.5px var(--wp--preset--color--ivory);
}

.amara-choose-hint {
	margin: var(--wp--preset--spacing--20) 0 0;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--ink-soft);
}

.amara-choose-hint.is-empty {
	margin: 0;
}

/* ==========================================================================
   M14. Gallery captions under the photo, not over it.

   WordPress lays white captions over the bottom of each photo on a dark
   gradient; on the white urns that is hard to read. Under the photo, in the
   ink colour, they read the same on every photo.
   ========================================================================== */

.wp-block-gallery.has-nested-images figure.wp-block-image:has(figcaption) {
	flex-direction: column;
	justify-content: flex-start;
}

.wp-block-gallery.has-nested-images figure.wp-block-image:has(figcaption)::before {
	content: none;
}

.wp-block-gallery.has-nested-images figure.wp-block-image figcaption.wp-element-caption {
	position: static;
	flex: none;
	max-height: none;
	overflow: visible;
	margin: 0;
	padding: 0.5rem 0 0;
	background: none;
	color: var(--wp--preset--color--ink-soft);
	text-shadow: none;
	text-align: left;
	font-family: var(--wp--preset--font-family--literata);
	font-style: italic;
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.4;
}

/* ==========================================================================
   M19. Guide endings: the next step, and the urns-by-capacity table.
   ========================================================================== */

.topurns-next-step {
	margin-top: var(--wp--preset--spacing--60);
	padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--50);
	background: var(--wp--preset--color--cream);
	border-left: 3px solid var(--wp--preset--color--clay);
	border-radius: var(--wp--custom--radius--base, 4px);
}

.topurns-next-step p {
	margin: 0;
}

.amara-capacity-table table {
	width: 100%;
	border-collapse: collapse;
	font-size: var(--wp--preset--font-size--small);
}

.amara-capacity-table th,
.amara-capacity-table td {
	padding: 0.6rem 0.75rem;
	text-align: left;
	border-bottom: 1px solid var(--wp--preset--color--stone);
	vertical-align: top;
}

.amara-capacity-table thead th {
	font-weight: 600;
	border-bottom: 2px solid var(--wp--preset--color--stone-deep);
}

.amara-capacity-table tbody th {
	font-weight: 500;
}

.amara-capacity-table td:nth-child(2) {
	white-space: nowrap;
}

.wp-block-table.amara-capacity-table .wp-element-caption {
	margin-top: 0.5rem;
	text-align: left;
	font-size: var(--wp--preset--font-size--micro);
	color: var(--wp--preset--color--ink-muted);
}

/* ==========================================================================
   M25. Visual details.

   Photo frames: every product and gallery photo gets the same corner radius
   and a 1px stone border, so the cool studio backgrounds and the warm older
   photos sit in the same frame. One token: --wp--custom--photo--*.
   ========================================================================== */

.wc-block-components-product-image,
.topurns-product .woocommerce-product-gallery__image img,
.topurns-product .flex-control-thumbs img,
.wp-block-gallery.has-nested-images figure.wp-block-image img,
.topurns-mosaic img,
.topurns-strip img,
.topurns-hero__image img,
.topurns-portrait-row img {
	border: var(--wp--custom--photo--border, 1px solid #E7DFD3);
	border-radius: var(--wp--custom--photo--radius, 8px) !important;
}

/* The card frame holds both photos; the images inside need no frame. */
.wc-block-components-product-image {
	position: relative;
	overflow: hidden;
	background-color: var(--wp--preset--color--cream);
}

.wc-block-components-product-image img {
	border-radius: 0 !important;
}

/* Thumbnails: at least 64px on every width (M25), still a scrolling row. */
.topurns-product .flex-control-thumbs li {
	flex-basis: max(64px, calc((100% - 40px) / 6));
}

@media (max-width: 600px) {
	.topurns-product .flex-control-thumbs li {
		flex-basis: max(64px, calc((100% - 24px) / 4));
	}
}

.topurns-product .flex-control-thumbs img.flex-active {
	outline: 2px solid var(--wp--preset--color--clay);
	outline-offset: 1px;
}

/* Card hover: cross-fade to the second photo. Desktop pointers only, and
   never with reduced motion; otherwise the image is not displayed, so it is
   not downloaded either. */
.topurns-card__alt {
	display: none;
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
	.wc-block-components-product-image a {
		position: relative;
		display: block;
	}

	.wc-block-components-product-image .topurns-card__alt {
		display: block;
		position: absolute;
		inset: 0;
		width: 100%;
		height: 100%;
		object-fit: contain;
		background-color: var(--wp--preset--color--cream);
		opacity: 0;
		transition: opacity 300ms ease;
	}

	.wc-block-components-product-image:hover .topurns-card__alt,
	.wc-block-components-product-image a:focus-visible .topurns-card__alt {
		opacity: 1;
	}
}

/* Bands: sage tint behind the personalised steps and the guides (theme.json
   colours; contrast of every text colour on them is in the review report). */

/* "Portraits we have painted": four photos with short captions. */
.topurns-portrait-row h3 {
	margin: 0 0 var(--wp--preset--spacing--40);
	font-size: var(--wp--preset--font-size--large);
}

.topurns-portrait-row__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--wp--preset--spacing--40);
}

@media (min-width: 782px) {
	.topurns-portrait-row__grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

.topurns-portrait-row__grid > .wp-block-image {
	margin: 0;
}

.topurns-portrait-row img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 5;
	object-fit: cover;
}

.topurns-portrait-row figcaption.wp-element-caption {
	margin: 0.5rem 0 0;
	text-align: left;
	font-family: var(--wp--preset--font-family--literata);
	font-style: italic;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--ink-soft);
}

/* The one ornament: a thin Greek-key line above "Our craft". */
.topurns-meander {
	max-width: 1180px;
	margin: 0 auto var(--wp--preset--spacing--70);
	color: var(--wp--preset--color--stone-deep);
	line-height: 0;
}

.topurns-meander svg {
	display: block;
	width: 100%;
	height: 12px;
}

/* ==========================================================================
   L2. The header mark: smaller and lighter, so the name leads. Below 430px
   the wreath turns to a soft smudge beside the name, so it steps aside
   there (the footer keeps it).
   ========================================================================== */

.topurns-header .topurns-brand .topurns-brand__mark img {
	width: 46px;
	opacity: 0.82;
}

body.topurns-header-condensed .topurns-header .topurns-brand .topurns-brand__mark img {
	width: 38px;
}

@media (max-width: 781px) {
	.topurns-header .topurns-brand .topurns-brand__mark img {
		width: 36px;
	}
}

@media (max-width: 429px) {
	.topurns-header .topurns-brand .topurns-brand__mark {
		display: none;
	}
}

/* ==========================================================================
   L3. Hero buttons: on phones, one above the other at the same full width.
   ========================================================================== */

@media (max-width: 600px) {
	.topurns-hero .wp-block-buttons {
		flex-direction: column;
		align-items: stretch;
	}

	.topurns-hero .wp-block-buttons > .wp-block-button {
		width: 100%;
	}

	.topurns-hero .wp-block-buttons .wp-block-button__link {
		display: block;
		width: 100%;
		box-sizing: border-box;
		text-align: center;
	}
}

/* ==========================================================================
   L4. On phones the size cards stack, and the section's full bottom padding
   plus the next band's top padding left a large gap after "Large".
   ========================================================================== */

@media (max-width: 781px) {
	.topurns-size-section {
		padding-bottom: var(--wp--preset--spacing--60) !important;
	}
}

/* L5: the line above the home H1. */
.topurns-hero__eyebrow {
	margin: 0 0 var(--wp--preset--spacing--30);
}

/* L6: the business email and phone, under the Help links, once set. */
.topurns-footer__contact {
	margin-top: var(--wp--preset--spacing--40);
	padding-top: var(--wp--preset--spacing--30);
	border-top: 1px solid var(--wp--preset--color--stone);
}

/* L8: phones keep the cart in the header; the account link moves to the
   footer's Help column. */
@media (max-width: 781px) {
	.topurns-header .wp-block-woocommerce-customer-account {
		display: none;
	}
}

/* L9: the contents list under "In short" on the legal pages. */
.amara-contents {
	margin: var(--wp--preset--spacing--50) 0;
	padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--50);
	background: var(--wp--preset--color--cream);
	border-radius: var(--wp--custom--radius--base, 4px);
	font-size: var(--wp--preset--font-size--small);
}

.amara-contents__title {
	margin: 0 0 var(--wp--preset--spacing--20);
	font-weight: 600;
}

.amara-contents ol {
	margin: 0;
	padding-inline-start: 2em; /* room for two-digit numbers (H14 rule) */
}

.amara-contents li + li {
	margin-top: 0.25rem;
}

.topurns-prose h2[id] {
	scroll-margin-top: 6rem;
}

/* ==========================================================================
   L12. Desktop menu arrows: centred on the label, a small chevron in the
   text colour, turned over while the submenu is open.
   ========================================================================== */

@media (min-width: 782px) {
	/* Each top-level label is a 44px tap target with its text at the top;
	   centre the text in it, so the arrow (centred on the item) lines up
	   with the words, and every label sits on the same line. */
	.topurns-nav .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content {
		display: inline-flex;
		align-items: center;
	}

	.topurns-nav .wp-block-navigation-item.has-child {
		display: flex;
		align-items: center;
		gap: 5px;
	}

	.topurns-nav .wp-block-navigation-submenu__toggle {
		display: inline-flex;
		align-items: center;
		align-self: center;
		margin: 0;
		padding: 0;
		height: auto;
		line-height: 0;
	}

	.topurns-nav .wp-block-navigation__submenu-icon {
		display: inline-flex;
		align-items: center;
		width: 11px;
		height: 11px;
		margin: 0;
		padding: 0;
	}

	.topurns-nav .wp-block-navigation__submenu-icon svg {
		width: 11px;
		height: 11px;
		margin: 0;
		stroke: currentColor;
		transition: transform 150ms ease;
	}

	.topurns-nav .wp-block-navigation-submenu__toggle[aria-expanded="true"] .wp-block-navigation__submenu-icon svg,
	.topurns-nav .has-child:hover > .wp-block-navigation-submenu__toggle .wp-block-navigation__submenu-icon svg,
	.topurns-nav .has-child:focus-within > .wp-block-navigation-submenu__toggle .wp-block-navigation__submenu-icon svg {
		transform: rotate(180deg);
	}
}

@media (prefers-reduced-motion: reduce) {
	.topurns-nav .wp-block-navigation__submenu-icon svg {
		transition: none;
	}
}

/* SEO: the personalised category's commissions and photo-guide link. */
.amara-term-extras {
	margin-top: var(--wp--preset--spacing--70);
}

.amara-term-extras h2 {
	margin: 0 0 var(--wp--preset--spacing--40);
	font-family: var(--wp--preset--font-family--literata);
	font-size: var(--wp--preset--font-size--large);
}

.amara-term-extras figure {
	margin: 0;
}

.amara-term-extras__guide {
	margin-top: var(--wp--preset--spacing--50);
}

/* Coming-soon page (WooCommerce "Site visibility"): short lines. */
.topurns-coming-soon p {
	max-width: 34rem;
	margin-inline: auto;
}
