/*
 * Bruksmann theme stylesheet - THE stylesheet.
 * Registered as front-end style (inc/enqueue.php) AND editor style
 * (inc/setup.php). Tokens live in theme.json; this file holds only what
 * theme.json cannot express (font-synthesis, :has(), media queries,
 * focus rings on non-element selectors, core-block overrides).
 *
 * Load order (measured on /about/, WP 7.1.5): core block CSS for blocks in
 * the template and the global-styles inline CSS print BEFORE this file;
 * only styles enqueued late (wc-blocks-style, footer-printed block CSS)
 * print after it. So on a specificity tie this file wins by order - which
 * is exactly how an earlier display:inline-flex here silently beat core's
 * @media (min-width:600px) rule that hides the menu toggle. Rules:
 * - never override a property core toggles in a media query unless the
 *   override IS the point (see the navigation breakpoint section);
 * - where we must beat core, carry one class more than core's selector
 *   (.bruksmann-header / .bruksmann-footer / .wp-block-search), so the
 *   result does not depend on load order either way;
 * - base rules that refine browser defaults use :where() for 0,0,0.
 *
 * No global box-sizing reset (codehouse-wp-gotchas 4.3).
 */

/* -------------------------------------------------------------------------
 * Base - type rendering.
 * font-synthesis: none - Belleza has one weight and no italic; the browser
 * must never fake a bold or italic Belleza. Instrument Sans ships real
 * 400-700 upright + italic, so it loses nothing.
 * ---------------------------------------------------------------------- */

body {
	font-synthesis: none;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

:where(h1, h2, h3, h4, h5, h6) {
	text-wrap: balance;
}

/* Long catalogue titles and designer names: break only when a word would
 * overflow (never hyphens: auto on headings - gotchas 4.y). */
:where(h1, h2, .wp-block-post-title) {
	overflow-wrap: break-word;
}

:where(p, li, blockquote) {
	text-wrap: pretty;
}

/* Emphasis inside Belleza - house answer: it stays regular, by design.
 * Belleza has no bold and no italic, and font-synthesis: none (above)
 * forbids faking them, so a <strong>/<em> inside a Belleza heading would
 * compute to 700/italic while rendering regular. We make the computed
 * value match what renders (weight and style inherit), so nothing claims an
 * emphasis that is not drawn. Headings carry hierarchy by size, not weight;
 * emphasis belongs in body text or h4-h6 (Instrument Sans, real 600/700
 * and italics). Swapping to Instrument Sans inside a Belleza line was
 * rejected: two faces in one heading reads as a fault. 0,0,0 so any block
 * or editor choice still wins. */
:where(h1, h2, h3, .wp-block-post-title, .wp-block-site-title, .wp-block-quote, .has-belleza-font-family) :where(strong, b, em, i) {
	font-weight: inherit;
	font-style: inherit;
}

/* Content images never overflow their column (classic content puts
 * 600px images inside paragraphs; /pop-up-vol-1/ overflowed at 390px).
 * 0,0,0, so every core block rule (cover background images at 100%
 * height, gallery crops, site logo sizes) still wins. Width/height HTML
 * attributes are presentational hints below any author rule, so
 * height: auto keeps the aspect ratio. */
:where(.wp-site-blocks img, .wp-site-blocks video) {
	max-width: 100%;
	height: auto;
}

/* -------------------------------------------------------------------------
 * Base - links.
 * Underline colour/offset only; colours and hover come from theme.json.
 * ---------------------------------------------------------------------- */

:where(a:not(.wp-element-button)) {
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

:where(a, .wp-element-button, .wp-block-button__link) {
	transition:
		color var(--wp--custom--transition--default),
		background-color var(--wp--custom--transition--default),
		border-color var(--wp--custom--transition--default);
}

/* -------------------------------------------------------------------------
 * Base - visible focus everywhere.
 * 2px ring, 2px offset. The offset keeps the ring on the PAGE colour, so
 * its contrast is ring-vs-ground: contrast #111 = 18.88:1 on base, 16.91:1
 * on surface; the 2px gap shows the ground, so the ring never sits on the
 * button's own fill.
 * Buttons (.wp-element-button / .wp-block-button__link): ring colour is
 *   contrast, from theme.json elements.button :focus-visible
 *   (:root :where(...:focus-visible) = 0,1,0). NOT currentColor: the
 *   primary button's text is white, which made a white ring on white.
 * Links: currentColor ring from theme.json elements.link (0,1,0).
 * Everything else (inputs, nav toggles, summary, tabindex targets): this
 *   rule. The :focus-visible sits INSIDE :where(), so it is 0,0,0 and can
 *   never override the theme.json rings - the previous
 *   :where(...):focus-visible was 0,1,0, tied with global styles and won
 *   by load order.
 * ---------------------------------------------------------------------- */

:where(a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, [tabindex]:not([tabindex="-1"]):focus-visible) {
	outline: var(--wp--custom--focus--width) solid currentColor;
	outline-offset: var(--wp--custom--focus--offset);
}

/* Buttons that are not .wp-element-button (e.g. third-party <button>s with
 * light text on a dark fill) would get a currentColor ring that vanishes;
 * filled buttons on our grounds use contrast. Same 0,0,0. */
:where(.wp-element-button:focus-visible, .wp-block-button__link:focus-visible, input[type="submit"]:focus-visible, button[type="submit"]:focus-visible) {
	outline-color: var(--wp--preset--color--contrast);
}

/* -------------------------------------------------------------------------
 * Page frame.
 * Templates zero the main group's top margin inline; the footer part gets
 * the same so the root blockGap does not paint a white strip above the
 * surface-coloured footer.
 * ---------------------------------------------------------------------- */

.wp-site-blocks > footer.wp-block-template-part {
	margin-block-start: 0;
}

/* -------------------------------------------------------------------------
 * Header - parts/header.html.
 * Compact (~68px: 20px padding + 28px line), logo left, menu right.
 * Sticky on the TEMPLATE-PART WRAPPER, not the inner group: the wrapper is
 * exactly as tall as the group, so a sticky group has no room to stick
 * (gotchas 4.6). Offset = admin bar height when logged in; the admin bar
 * scrolls away at <=600px, so the offset drops to 0 there.
 *
 * Stacking: a sticky element with a z-index is a stacking context, and the
 * menu overlay (position: fixed, core z-index 100000) is INSIDE it, so the
 * overlay can never rise above the wrapper's own z-index. Two states:
 * - closed: z-index 10 - above page content (badges, sticky summaries),
 *   below every dialog/banner layer (cookie banner 9999, WP/Woo modals);
 * - menu open: the wrapper takes core's overlay value, 100000, so the
 *   open overlay covers third-party layers (it sits at the admin bar's
 *   99999 + 1, like core's own overlay). Keyed on the overlay's own
 *   is-menu-open class via :has(), so it follows core's state exactly.
 * ---------------------------------------------------------------------- */

.wp-site-blocks > .wp-block-template-part:has(> .bruksmann-header) {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 10;
}

.wp-site-blocks > .wp-block-template-part:has(> .bruksmann-header):has(.wp-block-navigation__responsive-container.is-menu-open) {
	z-index: 100000;
}

@media (max-width: 600px) {

	.wp-site-blocks > .wp-block-template-part:has(> .bruksmann-header) {
		top: 0;
	}
}

.bruksmann-header {
	background-color: var(--wp--preset--color--base);
	border-bottom: var(--wp--custom--keyline);
}

.bruksmann-header__title {
	flex-shrink: 0;
	white-space: nowrap;
}

/* Enquiry list slot: holds the Mini-Cart block (see "Header - enquiry list
 * link" below). Takes no space if the block is ever removed. */
.bruksmann-header__enquiry:empty {
	display: none;
}

/* Navigation - top level (parts/header.html; the menu itself is the
 * wp_navigation post from bin/migrate-content.php, see inc/navigation.php).
 * Top items are ch/mega-menu toggles: <button
 * class="wp-block-navigation-item__content ch-mega-menu__toggle"> with
 * the label and core's chevron span, plus a
 * hidden no-JS link (.bruksmann-menu-fallback). Items marked
 * .bruksmann-nav-mobile (search field, All available, New arrivals,
 * Enquiry list) exist only in the mobile overlay.
 * Mixed case (theme.json core/navigation: small, 500, 0.01em), as in the
 * approved sketch: the five labels in capitals did not fit one row at any
 * laptop width (see the breakpoint note). */
.bruksmann-header .wp-block-navigation .wp-block-navigation-item__content {
	text-underline-offset: 0.35em;
}

/* Top-level items - toggles and links share one box: flex, centred, no
 * block padding (the <button> keeps the UA's 1px otherwise), >=24px tall
 * (WCAG 2.5.8). 0,4,0 vs core's .wp-block-navigation
 * .wp-block-navigation-item__content (0,2,0, display:block). */
.bruksmann-header .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content {
	display: flex;
	gap: 0.35em;
	align-items: center;
	min-height: 24px;
	padding-block: 0;
}

/* Underlines: 1px = open (or hovered) toggle and the current page's link;
 * 2px = the section the current page belongs to (.bruksmann-nav-current,
 * inc/navigation.php), kept while its panel is open. Hover only where the
 * device hovers: on touch a tap leaves :hover stuck after the panel
 * closes. */
.bruksmann-header .wp-block-navigation [aria-current="page"],
.bruksmann-header .ch-mega-menu-item.is-open > .ch-mega-menu__toggle .wp-block-navigation-item__label {
	text-decoration: underline;
	text-decoration-thickness: 1px;
}

@media (hover: hover) {

	.bruksmann-header .ch-mega-menu__toggle:hover .wp-block-navigation-item__label {
		text-decoration: underline;
		text-decoration-thickness: 1px;
	}
}

/* 0,5,0 after the open rule (0,5,0): the 2px stays while the panel is open. */
.bruksmann-header .ch-mega-menu-item.bruksmann-nav-current > .wp-block-navigation-item__content .wp-block-navigation-item__label {
	text-decoration: underline;
	text-decoration-thickness: 2px;
}

/* Chevron: core's 0.6em icon without its 0.25em margin (the flex gap above
 * spaces it). Core: .wp-block-navigation .wp-block-navigation__submenu-icon
 * 0,2,0; this is 0,3,0. ch-blocks rotates the svg while the item is open. */
.bruksmann-header .ch-mega-menu__toggle .wp-block-navigation__submenu-icon {
	display: inline-flex;
	width: 0.6em;
	height: 0.6em;
	margin: 0;
}

/* No-JS link in each toggle's <li> (inc/navigation.php): hidden while
 * JavaScript runs; "Navigation without JavaScript" below shows it instead
 * of the toggle. 0,5,0 beats the 0,4,0 top-level rule above. */
.bruksmann-header .wp-block-navigation__container > .ch-mega-menu-item > .wp-block-navigation-item__content.bruksmann-menu-fallback {
	display: none;
}

/* Mobile-only items: hidden in the desktop row. */
.bruksmann-header .wp-block-navigation__responsive-container:not(.is-menu-open) .bruksmann-nav-mobile {
	display: none;
}

/* Header search (core/search, icon button, product search): a 32px button
 * in the row; the field opens to the LEFT over the menu as an absolute box,
 * so expanding it never moves the row. Core's button-only CSS animates the
 * wrapper width; here the expanded width is fixed. */
.bruksmann-header .bruksmann-header__search {
	position: relative;
	z-index: 2; /* above the menu items it covers (core navigation stacks its items) */
	flex-shrink: 0;
	width: 32px;
	height: 32px;
}

.bruksmann-header .bruksmann-header__search .wp-block-search__inside-wrapper {
	position: absolute;
	top: 50%;
	right: 0;
	transform: translateY(-50%);
	background-color: var(--wp--preset--color--base);
}

.bruksmann-header .bruksmann-header__search:not(.wp-block-search__searchfield-hidden) .wp-block-search__inside-wrapper {
	width: min(24rem, 60vw);
	max-width: none;
}

.bruksmann-header .bruksmann-header__search .wp-block-search__button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	min-width: 32px;
	margin: 0;
	padding: 0;
	color: var(--wp--preset--color--contrast);
	background: none;
	border: 0;
}

.bruksmann-header .bruksmann-header__search:not(.wp-block-search__searchfield-hidden) .wp-block-search__button {
	width: var(--wp--custom--tap-target);
	height: var(--wp--custom--tap-target);
}

.bruksmann-header .bruksmann-header__search .wp-block-search__button svg {
	width: 24px;
	height: 24px;
	fill: currentColor;
}

/* Overlay toggles: 44px tap targets around core's 24px icons. No
 * `display` here: core shows/hides the open button per viewport (and so
 * does the breakpoint block below); core already makes it display:flex. */
.bruksmann-header .wp-block-navigation__responsive-container-open,
.bruksmann-header .wp-block-navigation__responsive-container-close {
	align-items: center;
	justify-content: center;
	min-width: var(--wp--custom--tap-target);
	min-height: var(--wp--custom--tap-target);
}

/* Navigation breakpoint: overlay below 1024px instead of core's 600px.
 * codehouse-wp-gotchas 7.5: own the header-menu breakpoint in theme CSS,
 * measured. Mega menu row (2026-12-03, headless Chrome, shipped fonts, no
 * scrollbar; mixed case 14px/500/0.01em): toggles Inventory 76.1,
 * Designers & Artists 141.5, Style Guide 89.6, Exhibitions 87.7,
 * About & Visit 101.5 (label + 0.35em gap + 0.6em chevron) + 4 x 20px
 * gaps = 576.4px menu; search button 32; enquiry "Enquiry list" + badge
 * 102.2 ("Enquiry" 79.5); 2 x 20px nav gaps; title 156.9-169.6 (fluid);
 * header gap 30; inset 2 x 31-40px.
 * Row needed: 999.5px at 960 (-39.5; -16.8 with the short label), so it
 * cannot fit there; 1003.6px at 1024 with the full label (20px spare, 5
 * with a classic scrollbar), so 1024-1099px use the short label: 980.9px,
 * 43px spare; 1008.4px at 1100 (92px spare). Re-measure when the menu
 * changes (fit script: same width sum, nav group at max-content).
 * Between 600 and 1023px we re-apply core's own <600px state:
 * - open button shown: 0,3,0 beats core's
 *   .wp-block-navigation__responsive-container-open:not(.always-shown)
 *   {display:none} (0,2,0, @media min-width:600px);
 * - inline menu hidden while closed: 0,4,0 beats core's
 *   .wp-block-navigation__responsive-container:not(.hidden-by-default)
 *   :not(.is-menu-open) {display:block} (0,3,0, same media query).
 * The open overlay (.is-menu-open) is untouched and uses core's
 * fixed full-screen styles. Wins by specificity, independent of order.
 * The header search moves into the overlay (.bruksmann-nav-search), and
 * the mega menu plate is never shown (panels open as drill-down panes). */
@media (min-width: 600px) and (max-width: 1023px) {

	.bruksmann-header .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: flex;
	}

	.bruksmann-header .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
		display: none;
	}
}

@media (max-width: 1023px) {

	.bruksmann-header .bruksmann-header__search,
	.ch-mega-menu__plate {
		display: none;
	}
}

/* Navigation without JavaScript: the toggles, the header search button
 * and core's overlay button do nothing. Toggles and search are hidden and
 * each section's fallback link (its main page or archive) is shown; below
 * the menu breakpoint the menu is a wrapped row under the site title
 * instead of the overlay button. The mobile-only items stay hidden (the
 * catalogue is reachable through Inventory). (scripting: none) is decided
 * at parse time, like the catalogue's no-JS block further down. */
@media (scripting: none) {

	.bruksmann-header .wp-block-navigation__container > .ch-mega-menu-item > .wp-block-navigation-item__content.ch-mega-menu__toggle,
	.bruksmann-header .bruksmann-nav-mobile,
	.bruksmann-header .bruksmann-header__search {
		display: none;
	}

	.bruksmann-header .wp-block-navigation__container > .ch-mega-menu-item > .wp-block-navigation-item__content.bruksmann-menu-fallback {
		display: flex;
	}
}

@media (scripting: none) and (max-width: 1023px) {

	.bruksmann-header .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: none;
	}

	.bruksmann-header .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
		position: static;
		display: block;
		background: none;
	}

	.bruksmann-header .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__responsive-container-close {
		display: none;
	}

	.bruksmann-header > .wp-block-group.alignwide,
	.bruksmann-header .bruksmann-header__nav,
	.bruksmann-header .wp-block-navigation__container {
		flex-wrap: wrap;
	}

	.bruksmann-header .bruksmann-header__nav,
	.bruksmann-header .bruksmann-header__menu {
		flex-basis: 100%;
	}

	.bruksmann-header .bruksmann-header__nav,
	.bruksmann-header .bruksmann-header__menu,
	.bruksmann-header .wp-block-navigation__container {
		justify-content: flex-start;
	}
}

/* -------------------------------------------------------------------------
 * Mobile overlay - core's overlay with the menu as a list of 44px rows.
 * Top: product search field, then a row of shortcut chips (All available,
 * New arrivals, Enquiry list), then the five sections. A section toggle
 * opens its panel as a ch-blocks drill-down pane over the list (back
 * button + title), so any category is three taps away: menu, section,
 * category. Panels in a pane: columns stacked, small uppercase column
 * headings, two-column type lists, no images except the style thumbnails.
 * Left-aligned (the header menu is right-justified on desktop; the
 * overlay overrides core's justification variable).
 * Selectors carry .bruksmann-header + core's 0,4,0 overlay selectors.
 * ---------------------------------------------------------------------- */

.bruksmann-header .wp-block-navigation__responsive-container.is-menu-open {
	--navigation-layout-justification-setting: stretch;
	--ch-drilldown-bg: var(--wp--preset--color--base);
	--ch-drilldown-padding: 0;
}

/* min-height: the content box is the drill-down host, and a pane is as
 * tall as its host; this makes it reach the bottom of the screen (the
 * overlay's own padding is 1rem top and bottom, core clamp()). */
.bruksmann-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	gap: var(--wp--preset--spacing--30);
	box-sizing: border-box;
	min-height: calc(100dvh - 2rem);
}

/* The overlay's own list: chips wrap in a row, sections take full rows.
 * Child combinator: the links panels in a pane are lists of the same class. */
.bruksmann-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content > .wp-block-navigation__container {
	flex-direction: row;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--20);
	width: 100%;
}

.bruksmann-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content > .wp-block-navigation__container > .ch-mega-menu-item {
	flex-basis: 100%;
}

.bruksmann-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content > .wp-block-navigation__container > .ch-mega-menu-item:first-of-type,
.bruksmann-header .wp-block-navigation__responsive-container.is-menu-open .bruksmann-nav-shortcut + .ch-mega-menu-item {
	margin-top: var(--wp--preset--spacing--20);
	border-top: var(--wp--custom--keyline);
}

.bruksmann-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	display: flex;
	align-items: center;
	min-height: var(--wp--custom--tap-target);
}

.bruksmann-header .wp-block-navigation__responsive-container.is-menu-open .ch-mega-menu__toggle {
	justify-content: space-between;
	width: 100%;
	font-size: var(--wp--preset--font-size--medium);
	text-align: start;
	border-bottom: var(--wp--custom--keyline);
}

/* Drill indicator: core hides chevrons in the overlay (0,4,0); shown here
 * pointing right (0,6,0). */
.bruksmann-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .ch-mega-menu__toggle .wp-block-navigation__submenu-icon {
	display: inline-flex;
	width: 12px;
	height: 12px;
	transform: rotate(-90deg);
}

/* Shortcut chips. */
.bruksmann-header .wp-block-navigation__responsive-container.is-menu-open .bruksmann-nav-shortcut > .wp-block-navigation-item__content {
	padding: 0 var(--wp--preset--spacing--30);
	border: var(--wp--custom--keyline);
}

/* Search field at the top: full width, button beside it. */
.bruksmann-header .wp-block-navigation__responsive-container.is-menu-open .bruksmann-nav-search {
	width: 100%;
}

.bruksmann-header .wp-block-navigation__responsive-container.is-menu-open .bruksmann-nav-search .wp-block-search__button {
	min-height: var(--wp--custom--tap-target);
	margin-inline-start: var(--wp--preset--spacing--20);
}

/* Drill-down pane (ch-blocks lib/drilldown.js): back button and title. */
.bruksmann-header .ch-drilldown__back {
	min-height: var(--wp--custom--tap-target);
	padding: 0;
	font-size: var(--wp--preset--font-size--small);
}

.bruksmann-header .ch-drilldown__title {
	margin: 0 0 var(--wp--preset--spacing--30);
	font-family: var(--wp--preset--font-family--belleza);
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 400;
	letter-spacing: 0;
}

/* While a pane is open the content box is exactly the overlay's inner
 * height, so the pane (inset 0 in it, ch-blocks) ends inside the screen. On a
 * short screen (e.g. 720x450) the covered menu list is taller than the
 * screen; without this, Tab to the pane's last links scrolled the whole
 * overlay and pushed the close button and its focus ring off the top.
 * The admin bar pushes the dialog down by its own height, so that is
 * subtracted too; min-height 0 lets the smaller height take effect. Only the
 * vertical axis is clipped, so the pane still slides in from the screen
 * edge. */
.bruksmann-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content.ch-drilldown-open {
	height: calc(100dvh - 2rem - var(--wp-admin--admin-bar--height, 0px));
	min-height: 0;
	overflow: visible;
	overflow-y: clip;
}

/* The pane starts below the overlay's close button (core: content
 * padding-top calc(2rem + 24px)), so the button stays visible. */
.bruksmann-header .wp-block-navigation__responsive-container.is-menu-open .ch-drilldown__pane {
	top: calc(2rem + 24px);
}

/* Panels in a pane: everything stacked. */
.bruksmann-header .ch-drilldown__pane .bruksmann-mega__grid,
.bruksmann-header .ch-drilldown__pane .bruksmann-mega__tiles {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--30);
}

.bruksmann-header .ch-drilldown__pane .bruksmann-mega__foot {
	margin-top: var(--wp--preset--spacing--30);
	border-top: var(--wp--custom--keyline);
}

/* Column headings: one size whether linked (the category) or not ("More
 * furniture"); a linked heading keeps the 44px row of the links below. */
.bruksmann-header .ch-drilldown__pane .bruksmann-menu-term-list__heading {
	display: flex;
	align-items: center;
	min-height: var(--wp--custom--tap-target);
	margin: 0;
	font-family: inherit;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
}

.bruksmann-header .ch-drilldown__pane .bruksmann-menu-term-list__list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: var(--wp--preset--spacing--30);
}

.bruksmann-header .ch-drilldown__pane .bruksmann-menu-term-list__all {
	grid-column: 1 / -1;
}

.bruksmann-header .ch-drilldown__pane .bruksmann-mega a,
.bruksmann-header .ch-drilldown__pane .ch-mega-menu__links .wp-block-navigation-item__content {
	display: flex;
	gap: 0.5em;
	align-items: center;
	min-height: var(--wp--custom--tap-target);
	font-size: var(--wp--preset--font-size--medium);
}

.bruksmann-header .ch-drilldown__pane .bruksmann-mega .bruksmann-menu-term-list__heading a {
	font-size: inherit;
}

/* Category rows: name and count in one line box, so a name that wraps
 * (360px) keeps its count right after its last word instead of at the far
 * edge of a flex row. Padding centres one line in the 44px row (1lh = the
 * row's line height). */
.bruksmann-header .ch-drilldown__pane .bruksmann-menu-term-list__list a {
	display: block;
	box-sizing: border-box;
	padding-block: max(0px, calc((var(--wp--custom--tap-target) - 1lh) / 2));
}

.bruksmann-header .ch-drilldown__pane .bruksmann-menu-term-list__list .bruksmann-menu-count {
	margin-inline-start: 0.5em;
	white-space: nowrap;
}

/* Wider overlays (tablets, 700-1023px): the columns side by side, two
 * across, and a capped measure instead of 2 x 450px link columns. */
@media (min-width: 700px) {

	.bruksmann-header .ch-drilldown__pane .ch-drilldown__content {
		max-width: 52rem;
	}

	.bruksmann-header .ch-drilldown__pane .bruksmann-mega__grid,
	.bruksmann-header .ch-drilldown__pane .bruksmann-mega--styles .bruksmann-mega__tiles {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: var(--wp--preset--spacing--40) var(--wp--preset--spacing--50);
		align-items: start;
	}

	.bruksmann-header .ch-drilldown__pane .bruksmann-mega__grid > .bruksmann-mega__portraits {
		grid-column: 1 / -1;
	}
}

.bruksmann-header .ch-drilldown__pane .bruksmann-mega__feature,
.bruksmann-header .ch-drilldown__pane .bruksmann-mega__portraits .bruksmann-mega-tile__image {
	display: none;
}

.bruksmann-header .ch-drilldown__pane .bruksmann-mega__portraits .bruksmann-mega-tile__tag::after {
	content: ":";
}

/* Style tiles: 96px 3:2 thumbnail beside name, line and link. */
.bruksmann-header .ch-drilldown__pane .bruksmann-mega--styles .bruksmann-mega-tile {
	display: grid;
	grid-template-columns: 96px minmax(0, 1fr);
	column-gap: var(--wp--preset--spacing--30);
	align-items: start;
}

.bruksmann-header .ch-drilldown__pane .bruksmann-mega--styles .bruksmann-mega-tile__image {
	grid-row: 1 / span 3;
	margin-top: 10px;
}

.bruksmann-header .ch-drilldown__pane .bruksmann-mega-tile__text {
	display: none;
}

/* -------------------------------------------------------------------------
 * Mega menu panels (desktop plate) - parts/menu-inventory.html,
 * menu-designers.html, menu-style-guide.html and the Exhibitions / About &
 * Visit link lists, printed by ch-blocks in .ch-mega-menu__plate at the end
 * of <body> and anchored to the header's bottom edge
 * (data-ch-mega-menu-anchor, inc/navigation.php). Grids as in the
 * approved sketch: Inventory 1.05/1/1/1/1/1.25, Designers 1/1/2.6, Style
 * Guide three tiles; link lists one 320px column at the right edge (under
 * the last items). Shared type (both plate and drill-down pane): column
 * headings 19-20px Belleza over a keyline, rows 14px, counts muted 13px
 * tabular figures (muted on base 6.06:1), "All ..." rows 600.
 * ---------------------------------------------------------------------- */

/* z-index: above the cookie banner (CookieYes, z-index 9999), which
 * otherwise hides the last links of a tall panel on a short screen; the
 * plate only shows after a click on a toggle. Below the admin bar (99999). */
.ch-mega-menu__plate {
	--ch-mega-menu-panel-z: 10000;
	--ch-mega-menu-panel-bg: var(--wp--preset--color--base);
	--ch-mega-menu-panel-color: var(--wp--preset--color--contrast);
	--ch-mega-menu-panel-shadow: 0 24px 32px -24px rgb(17 17 17 / 0.18);
}

.ch-mega-menu__plate.is-open {
	border-bottom: var(--wp--custom--keyline);
}

.bruksmann-mega a,
.ch-mega-menu__links a {
	color: inherit;
	text-decoration: none;
	text-underline-offset: 0.3em;
}

.bruksmann-mega a:hover,
.ch-mega-menu__links a:hover,
.bruksmann-mega a[aria-current="page"],
.ch-mega-menu__links a[aria-current="page"] {
	text-decoration: underline;
	text-decoration-thickness: 1px;
}

.bruksmann-mega .bruksmann-menu-count,
.bruksmann-mega .bruksmann-menu-count-link__number {
	font-variant-numeric: tabular-nums;
}

.bruksmann-mega .bruksmann-menu-count {
	font-size: 0.8125rem;
	color: var(--wp--preset--color--muted);
}

.bruksmann-mega .bruksmann-menu-term-list__all {
	font-weight: 600;
}

.bruksmann-mega-tile__tag,
.bruksmann-menu-featured-piece__label {
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
}

.bruksmann-mega .wp-block-image {
	margin: 0;
}

.bruksmann-mega .wp-block-image img {
	width: 100%;
}

.bruksmann-mega p {
	margin: 0;
}

/* Spacing inside panels comes from the grids and gaps below, not from the
 * groups' flow-layout block gap (core :root :where(.is-layout-flow) > *,
 * 0,1,0). */
.bruksmann-mega .wp-block-group > * {
	margin-block: 0;
}

.bruksmann-mega__foot a::after {
	content: " \2192";
}

@media (min-width: 1024px) {

	/* border-box: ch-blocks gives the panel width: 100%. */
	.ch-mega-menu__plate .bruksmann-mega,
	.ch-mega-menu__plate .ch-mega-menu__panel--links {
		box-sizing: border-box;
		padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--inset) var(--wp--preset--spacing--50);
		font-size: var(--wp--preset--font-size--small);
		line-height: 1.45;
	}

	.ch-mega-menu__plate .bruksmann-mega__grid,
	.ch-mega-menu__plate .bruksmann-mega__foot,
	.ch-mega-menu__plate .ch-mega-menu__links {
		box-sizing: border-box;
		max-width: var(--wp--style--global--wide-size, 1300px);
		margin-inline: auto;
	}

	.ch-mega-menu__plate .bruksmann-mega__grid {
		display: grid;
		gap: var(--wp--preset--spacing--40);
		align-items: start;
	}

	.ch-mega-menu__plate .bruksmann-mega--inventory .bruksmann-mega__grid {
		grid-template-columns: 1.05fr 1fr 1fr 1fr 1fr 1.25fr;
	}

	.ch-mega-menu__plate .bruksmann-mega--designers .bruksmann-mega__grid {
		grid-template-columns: 1fr 1fr 2.6fr;
	}

	.ch-mega-menu__plate .bruksmann-mega__tiles {
		display: grid;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: var(--wp--preset--spacing--30);
	}

	.ch-mega-menu__plate .bruksmann-mega--styles .bruksmann-mega__tiles {
		gap: var(--wp--preset--spacing--40);
	}

	/* Column heading: Belleza over a keyline. theme.json h2 element styles
	 * (size, margins) are 0,0,1; this is 0,2,0. */
	.ch-mega-menu__plate .bruksmann-menu-term-list__heading {
		margin: 0 0 var(--wp--preset--spacing--20);
		padding-bottom: var(--wp--preset--spacing--20);
		font-family: var(--wp--preset--font-family--belleza);
		font-size: var(--wp--preset--font-size--large);
		font-weight: 400;
		line-height: 1.2;
		letter-spacing: 0;
		border-bottom: var(--wp--custom--keyline);
	}

	.ch-mega-menu__plate .bruksmann-menu-term-list__list a {
		padding-block: 0.2rem;
	}

	.ch-mega-menu__plate .bruksmann-menu-term-list__all {
		margin-top: var(--wp--preset--spacing--10);
	}

	/* Inventory shortcuts: Belleza, larger, stacked. */
	.ch-mega-menu__plate .bruksmann-mega__shortcuts {
		display: flex;
		flex-direction: column;
		gap: var(--wp--preset--spacing--20);
		font-family: var(--wp--preset--font-family--belleza);
		font-size: var(--wp--preset--font-size--large);
		line-height: 1.25;
	}

	.ch-mega-menu__plate .bruksmann-mega__shortcuts .bruksmann-menu-count {
		font-family: var(--wp--preset--font-family--instrument-sans);
	}

	.ch-mega-menu__plate .bruksmann-menu-featured-piece__title {
		line-height: 1.4;
	}

	.ch-mega-menu__plate .bruksmann-mega-tile {
		display: flex;
		flex-direction: column;
		gap: var(--wp--preset--spacing--10);
	}

	.ch-mega-menu__plate .bruksmann-mega-tile__image {
		margin-bottom: var(--wp--preset--spacing--10);
	}

	.ch-mega-menu__plate .bruksmann-mega-tile__read a {
		display: flex;
		flex-direction: column;
		gap: 0.25rem;
		font-family: var(--wp--preset--font-family--belleza);
		font-size: var(--wp--preset--font-size--large);
		line-height: 1.2;
	}

	.ch-mega-menu__plate .bruksmann-mega-tile__tag {
		font-family: var(--wp--preset--font-family--instrument-sans);
	}

	.ch-mega-menu__plate .bruksmann-mega-tile__name {
		font-family: var(--wp--preset--font-family--belleza);
		font-size: var(--wp--preset--font-size--x-large);
		line-height: 1.2;
	}

	.ch-mega-menu__plate .bruksmann-mega-tile__text {
		color: var(--wp--preset--color--muted);
	}

	.ch-mega-menu__plate .bruksmann-mega-tile__more {
		margin-top: var(--wp--preset--spacing--10);
	}

	.ch-mega-menu__plate .bruksmann-mega-tile__more a {
		text-decoration: underline;
		text-decoration-thickness: 1px;
	}

	.ch-mega-menu__plate .bruksmann-mega__foot {
		margin-top: var(--wp--preset--spacing--40);
		padding-top: var(--wp--preset--spacing--30);
		border-top: var(--wp--custom--keyline);
	}

	/* Exhibitions, About & Visit: one 320px column at the right edge. */
	.ch-mega-menu__plate .ch-mega-menu__links {
		display: grid;
		grid-template-columns: minmax(0, 320px);
		justify-content: end;
		margin-block: 0;
		padding: 0;
		list-style: none;
	}

	.ch-mega-menu__plate .ch-mega-menu__links a {
		display: block;
		padding-block: 0.4rem;
		font-size: var(--wp--preset--font-size--medium);
	}

	.ch-mega-menu__plate .bruksmann-nav-all {
		margin-top: var(--wp--preset--spacing--10);
		padding-top: var(--wp--preset--spacing--10);
		font-weight: 600;
		border-top: var(--wp--custom--keyline);
	}
}

/* -------------------------------------------------------------------------
 * Forms - fields at >=3:1 against their ground (muted border = 6.06:1 on
 * base, 5.43:1 on surface). Search block: core's .wp-block-search__input
 * (#949494) is overridden one class up.
 * ---------------------------------------------------------------------- */

:where(input[type="text"], input[type="email"], input[type="search"], input[type="tel"], input[type="url"], input[type="number"], input[type="password"], textarea, select) {
	min-height: var(--wp--custom--tap-target);
	padding: 0.75rem 1rem;
	font: inherit;
	line-height: 1.2;
	color: var(--wp--preset--color--contrast);
	background-color: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--muted);
	border-radius: 0;
}

.wp-block-search .wp-block-search__input {
	padding: 0.75rem 1rem;
	line-height: 1.2;
	border: 1px solid var(--wp--preset--color--muted);
	border-radius: 0;
}

.bruksmann-search {
	max-width: 32rem;
}

/* -------------------------------------------------------------------------
 * Footer - patterns/footer.php.
 * Section labels are small UI labels -> Instrument Sans, not Belleza
 * (Belleza only at 18px and above). They are <p>, not headings, so the
 * footer adds nothing to any page's heading outline.
 * ---------------------------------------------------------------------- */

.bruksmann-footer .bruksmann-footer__heading {
	margin-block-end: var(--wp--preset--spacing--30);
	font-family: var(--wp--preset--font-family--instrument-sans);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	letter-spacing: 0.06em;
	line-height: 1.5;
	text-transform: uppercase;
}

.bruksmann-footer .bruksmann-footer__heading + * {
	margin-block-start: 0;
}

.bruksmann-footer .bruksmann-footer__links {
	padding-inline-start: 0;
	list-style: none;
}

.bruksmann-footer .bruksmann-footer__links li + li {
	margin-block-start: var(--wp--preset--spacing--20);
}

.bruksmann-footer .bruksmann-footer__legal {
	border-top: var(--wp--custom--keyline);
}

/* Touch: footer links grow to 44px targets (they are ~23px line boxes).
 * Only on narrow viewports or a coarse primary pointer, so the desktop
 * rhythm is unchanged; the list's 10px item gap is dropped there because
 * the targets now space the items themselves. */
@media (max-width: 781px), (pointer: coarse) {

	.bruksmann-footer a {
		display: inline-flex;
		align-items: center;
		min-height: var(--wp--custom--tap-target);
	}

	.bruksmann-footer .bruksmann-footer__links li + li {
		margin-block-start: 0;
	}
}

/* -------------------------------------------------------------------------
 * Header - enquiry list link: parts/header.html, woocommerce/mini-cart.
 * WooCommerce 11.3.1 offers only cart / bag / bag-alt icons
 * (MiniCartUtils::get_svg_icon), so the icon is hidden and the button gets
 * a CSS text label plus the count. The label is generated content: the
 * button's accessible name stays its aria-label, which bruksmann-blocks
 * rewords to "Pieces in your enquiry list: N" (contains the visible label,
 * WCAG 2.5.3). The "/ ''" alternative text keeps the generated word out of
 * browse-mode reading where supported; the first declaration is the
 * fallback for browsers without it. Count always shown (also 0) so the
 * row never changes width when a piece is added.
 * Widths: see the navigation breakpoint note above. Below 600px the label
 * shortens to "Enquiry" and the header gaps tighten: title 141 + 20 +
 * toggle 44 + 10 + ~99 = 314px, fits 360px (320px usable); below 360px
 * only the count shows.
 * Height: the header row is the title's 28px line + 2 x 20px padding
 * (~65px). On desktop the button keeps to that line (min 24px, the WCAG
 * 2.5.8 minimum, as the menu items); on touch widths and coarse pointers it
 * grows to the 44px tap target (the header is then ~85px, as it is below
 * 1024px with the 44px menu toggle anyway).
 * Woo's badge rules are 0,1,0 (absolute, over the icon); these are 0,2,0.
 * Badge colours: after hydration Woo's view script writes INLINE colours
 * read from the badge itself - background = the badge's computed `color`,
 * text = its computed `background-color` (mini-cart.js badgeBackgroundColor
 * / badgeTextColor) - so it inverts whatever the stylesheet says. Inline
 * styles beat any selector, so the two colours below are !important: the
 * only way to keep the pre-hydration, no-JS and hydrated states identical
 * (black square, white figure).
 * ---------------------------------------------------------------------- */

.bruksmann-header .wc-block-mini-cart__button {
	min-height: 24px;
	padding: 0;
	gap: 0.375rem;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	letter-spacing: 0.01em;
	line-height: 1;
	cursor: pointer;
}

.bruksmann-header .wc-block-mini-cart__button::before {
	content: "Enquiry list";
	content: "Enquiry list" / "";
	text-underline-offset: 0.35em;
}

.bruksmann-header .wc-block-mini-cart__button:hover::before {
	text-decoration: underline;
	text-decoration-thickness: 1px;
}

.bruksmann-header .wc-block-mini-cart__icon {
	display: none;
}

.bruksmann-header .wc-block-mini-cart__badge {
	position: static;
	min-width: 1.375rem;
	height: 1.375rem;
	margin: 0;
	padding: 0 0.25rem;
	transform: none;
	font-size: 0.75rem;
	font-variant-numeric: tabular-nums;
	letter-spacing: 0;
	color: var(--wp--preset--color--base) !important;
	background-color: var(--wp--preset--color--contrast) !important;
	border-radius: 0;
}

@media (max-width: 1023px), (pointer: coarse) {

	.bruksmann-header .wc-block-mini-cart__button {
		min-height: var(--wp--custom--tap-target);
	}
}

/* Short label from the overlay breakpoint to 1099px: the full row needs
 * 1003.6px at 1024, ~5px spare with a classic scrollbar (see the
 * navigation breakpoint note). */
@media (min-width: 1024px) and (max-width: 1099px) {

	.bruksmann-header .wc-block-mini-cart__button::before {
		content: "Enquiry";
		content: "Enquiry" / "";
	}
}

@media (max-width: 599px) {

	.bruksmann-header > .wp-block-group.alignwide {
		gap: var(--wp--preset--spacing--30);
	}

	.bruksmann-header .bruksmann-header__nav {
		gap: var(--wp--preset--spacing--20);
	}

	.bruksmann-header .wc-block-mini-cart__button::before {
		content: "Enquiry";
		content: "Enquiry" / "";
	}
}

@media (max-width: 359px) {

	.bruksmann-header .wc-block-mini-cart__button::before {
		content: none;
	}
}

/* -------------------------------------------------------------------------
 * Catalogue - templates/archive-product.html, taxonomy-product_cat.html,
 * taxonomy-product_attribute.html, product-search-results.html and
 * patterns/product-catalogue.php.
 * Woo's own block CSS (wc-blocks-style, per-block styles) prints AFTER this
 * file, so every override below carries one class more than the Woo rule it
 * names (header comment of this file).
 * ---------------------------------------------------------------------- */

/* Breadcrumbs (woocommerce/breadcrumbs -> classic WC_Breadcrumb). Quiet:
 * muted text, links without underline until hover. */
.bruksmann-archive .wp-block-woocommerce-breadcrumbs,
.bruksmann-single-product .wp-block-woocommerce-breadcrumbs {
	color: var(--wp--preset--color--muted);
}

.bruksmann-archive .wp-block-woocommerce-breadcrumbs a,
.bruksmann-single-product .wp-block-woocommerce-breadcrumbs a {
	color: inherit;
	text-decoration: none;
}

.bruksmann-archive .wp-block-woocommerce-breadcrumbs a:hover,
.bruksmann-single-product .wp-block-woocommerce-breadcrumbs a:hover {
	color: var(--wp--preset--color--contrast);
	text-decoration: underline;
}

.bruksmann-archive__head .wp-block-query-title {
	margin-block: 0;
}

/* Sub-category chips (core/terms-query, term-template style "Chips" from
 * styles/block/chips.json; the partial holds the chip look, this holds the
 * row). core/term-template prints a plain <ul>. */
.bruksmann-subcategories .wp-block-term-template.is-style-chips {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--wp--preset--spacing--20);
	margin: 0;
	padding: 0;
	list-style: none;
}

/* The term template is a flow-layout list, so core gives every <li> but
 * the first margin-block-start: var(--wp--style--block-gap)
 * (:root :where(.is-layout-flow) > *, 0,1,0) - the first chip sat ~28px
 * higher than the rest. The flex gap owns the spacing; 0,3,1 here. */
.bruksmann-subcategories .wp-block-term-template.is-style-chips > li {
	margin: 0;
}

/* Filter row: Product Filters drawer button, Available / Sold / All links,
 * active-filter chips. */
.bruksmann-catalogue {
	margin-block-start: var(--wp--preset--spacing--40);
}

.bruksmann-catalogue__filters {
	margin-block-end: var(--wp--preset--spacing--30);
}

.bruksmann-catalogue .wc-block-product-filters .wc-block-product-filters__open-overlay,
.bruksmann-availability .bruksmann-availability__list a {
	display: inline-flex;
	align-items: center;
	min-height: var(--wp--custom--tap-target);
	padding: 0 var(--wp--preset--spacing--30);
	color: var(--wp--preset--color--contrast);
	font-family: inherit;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	letter-spacing: 0.06em;
	line-height: 1;
	text-decoration: none;
	text-transform: uppercase;
	background-color: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--contrast);
	cursor: pointer;
}

.bruksmann-catalogue .wc-block-product-filters .wc-block-product-filters__open-overlay:hover,
.bruksmann-availability .bruksmann-availability__list a:hover {
	background-color: color-mix(in srgb, var(--wp--preset--color--contrast) 8%, var(--wp--preset--color--base));
}

/* Segmented control: borders collapse, the current view is filled. */
.bruksmann-availability .bruksmann-availability__list {
	display: flex;
	flex-wrap: wrap;
	margin: 0;
	padding: 0;
	list-style: none;
}

.bruksmann-availability .bruksmann-availability__list li + li {
	margin-inline-start: -1px;
}

.bruksmann-availability .bruksmann-availability__list a[aria-current="page"] {
	color: var(--wp--preset--color--base);
	background-color: var(--wp--preset--color--contrast);
}

/* Focus: the base link ring is currentColor, i.e. white on the filled
 * (current) item and invisible against the page. A contrast ring with the
 * 2px offset sits on the page ground for both states (18.88:1); raised so
 * the -1px overlap of the next item cannot cover it. theme.json's link
 * ring is :root :where(a...:focus-visible) = 0,1,0; this is 0,3,1. */
.bruksmann-availability .bruksmann-availability__list a:focus-visible {
	position: relative;
	z-index: 1;
	outline: var(--wp--custom--focus--width) solid var(--wp--preset--color--contrast);
	outline-offset: var(--wp--custom--focus--offset);
}

/* Drawer (overlayMode "always"; Woo's dialog has no focus trap and no
 * aria-modal in 11.3.1 - docs/research-woo-blocks.md B4). */
.bruksmann-catalogue .wc-block-product-filters.is-overlay-opened .wc-block-product-filters__overlay {
	z-index: 100000;
}

/* Stacking, as for the header overlay: Woo's open drawer is
 * position: fixed with z-index 9999, the cookie banner too, and the banner
 * comes later in the DOM, so it won the tie and covered "Apply" on phones.
 * No ancestor of the drawer is a stacking context (the catalogue groups are
 * not positioned), so its z-index competes at the root: while open it takes
 * 100000 (admin bar 99999 + 1, core's own overlay value) and covers
 * third-party layers. Woo's rule is :where(.wc-block-product-filters)
 * .wc-block-product-filters__overlay (0,1,0); this is 0,4,0. */

.bruksmann-filters-drawer .wc-block-product-filters__close-overlay {
	justify-content: center;
	min-width: var(--wp--custom--tap-target);
	min-height: var(--wp--custom--tap-target);
}

.bruksmann-filters-drawer .bruksmann-filters__heading,
.bruksmann-section-label {
	margin: 0;
	font-family: var(--wp--preset--font-family--instrument-sans);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	letter-spacing: 0.06em;
	line-height: 1.5;
	text-transform: uppercase;
}

.bruksmann-filters-drawer .wc-block-product-filter-checkbox-list__label {
	min-height: 2.25rem;
}

/* Filter checkboxes (WCAG 1.4.11). Woo draws them with appearance: none, a
 * transparent border and a 10%-currentColor square behind (~1.2:1). Here:
 * muted border on base (6.06:1), checked = contrast fill with a base
 * check mark, 2px contrast focus ring. Woo's rules are
 * input[type=checkbox].wc-block-product-filter-checkbox-list__input
 * (0,2,1; :focus 0,3,1), .wc-block-product-filter-checkbox-list__input-wrapper:before
 * (0,1,1) and svg.wc-block-product-filter-checkbox-list__mark (0,1,1);
 * each rule here is one class more. The 11.3.1 checkbox list only prints
 * checkboxes (no radios; ProductFilterCheckboxList.php). */
.bruksmann-catalogue .wc-block-product-filter-checkbox-list__input-wrapper::before {
	display: none;
}

.bruksmann-catalogue input[type="checkbox"].wc-block-product-filter-checkbox-list__input {
	background-color: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--muted);
	border-radius: 0;
}

.bruksmann-catalogue input[type="checkbox"].wc-block-product-filter-checkbox-list__input:checked {
	background-color: var(--wp--preset--color--contrast);
	border-color: var(--wp--preset--color--contrast);
}

.bruksmann-catalogue input[type="checkbox"].wc-block-product-filter-checkbox-list__input:focus-visible {
	outline: var(--wp--custom--focus--width) solid var(--wp--preset--color--contrast);
	outline-offset: var(--wp--custom--focus--offset);
}

.bruksmann-catalogue svg.wc-block-product-filter-checkbox-list__mark {
	color: var(--wp--preset--color--base);
}

/* Active filters (removable chips + clear button) sit inline in the row. */
.bruksmann-filters-inline .wp-block-woocommerce-product-filter-active {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--wp--preset--spacing--20);
}

.bruksmann-filters-inline .wp-block-woocommerce-product-filter-clear-button .wp-block-buttons {
	margin: 0;
}

.bruksmann-filters-inline .wc-block-product-filter-removable-chips__items .wc-block-product-filter-removable-chips__item {
	min-height: 2.25rem;
	border-color: var(--wp--preset--color--keyline);
	border-radius: 0;
}

/* Count + sort, inside the collection (so client state and the sort form's
 * hidden fields always match the list). */
.bruksmann-catalogue .bruksmann-catalogue__toolbar {
	margin-block-end: var(--wp--preset--spacing--40);
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
}

.bruksmann-catalogue .wc-block-catalog-sorting select.orderby {
	min-height: var(--wp--custom--tap-target);
	color: var(--wp--preset--color--contrast);
}

/* Grid: 2 columns on phones, 3 from 782px, 4 from 1200px. Woo's
 * responsive grid (.wc-block-product-template__responsive.columns-4,
 * 0,2,0) would keep 4 columns down to ~660px (150px minimum per column);
 * this is 0,3,0. */
.wp-block-woocommerce-product-collection .wc-block-product-template__responsive.bruksmann-cards {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--wp--preset--spacing--50) var(--wp--preset--spacing--30);
}

@media (min-width: 782px) {

	.wp-block-woocommerce-product-collection .wc-block-product-template__responsive.bruksmann-cards {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (min-width: 1200px) {

	.wp-block-woocommerce-product-collection .wc-block-product-template__responsive.bruksmann-cards {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

/* Card. One link target: the title link's ::after covers the whole card
 * (the image has showProductLink false), so image + title are one tab stop.
 * The secondary button sits above that layer. Woo's
 * :where(.wc-block-product-template .wc-block-product) > :not(:last-child)
 * margin (0,1,0) is replaced by the flex gap (0,2,0). */
.bruksmann-cards > .wc-block-product {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--30);
}

.bruksmann-cards > .wc-block-product > * {
	margin-block: 0;
}

/* 3:4 frame, scale "contain": 457 of 520 lead images are 3:4 and fill the
 * frame exactly; the 2:3 (44) and 3:2 (11) originals are shown whole on the
 * surface colour instead of being cropped, so the band reads as a mount,
 * not an accident (the img box is the 3:4 frame; its background shows
 * where "contain" leaves room). Status label (bruksmann/product-
 * status) in the image's inner container, top left. */
.bruksmann-cards .bruksmann-card__image img {
	background-color: var(--wp--preset--color--surface);
}

.bruksmann-cards .wc-block-components-product-image__inner-container {
	align-items: flex-start;
	padding: var(--wp--preset--spacing--20);
}

.bruksmann-cards .bruksmann-card__title {
	margin: 0;
	line-height: 1.3;
}

.bruksmann-cards .bruksmann-card__title a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

.bruksmann-cards .bruksmann-card__title a:focus-visible {
	outline: none;
}

.bruksmann-cards .bruksmann-card__title a:focus-visible::after {
	outline: var(--wp--custom--focus--width) solid var(--wp--preset--color--contrast);
	outline-offset: var(--wp--custom--focus--offset);
}

.bruksmann-cards > .wc-block-product:hover .bruksmann-card__title a {
	text-decoration: underline;
	text-decoration-thickness: 1px;
}

/* "Add to enquiry": outline, full width, fixed height, pushed to the card
 * foot so buttons line up across a row. Woo draws a 2px outline border
 * (.wp-block-button.wc-block-components-product-button.is-style-outline
 * .wp-block-button__link, 0,4,0); this is 0,5,0. */
.bruksmann-cards .bruksmann-card__action {
	position: relative;
	z-index: 2;
	margin-block-start: auto;
}

.bruksmann-cards .wp-block-button.wc-block-components-product-button.is-style-outline .wp-block-button__link {
	min-height: var(--wp--custom--tap-target);
	padding: 0.5rem 1rem;
	color: var(--wp--preset--color--contrast);
	white-space: nowrap;
	background-color: transparent;
	border: 1px solid var(--wp--preset--color--contrast);
}

/* Phones: a card is ~150px wide at 360px; uppercase "IN YOUR ENQUIRY
 * LIST" wrapped to two lines (64px). Sentence case, no tracking, tighter
 * padding keeps both labels on one line. */
@media (max-width: 599px) {

	.bruksmann-cards .wp-block-button.wc-block-components-product-button.is-style-outline .wp-block-button__link {
		padding-inline: 0.375rem;
		font-size: 0.8125rem;
		letter-spacing: 0;
		text-transform: none;
	}
}

.bruksmann-cards .wp-block-button.wc-block-components-product-button.is-style-outline .wp-block-button__link:hover {
	background-color: color-mix(in srgb, var(--wp--preset--color--contrast) 8%, var(--wp--preset--color--base));
}

/* After adding, Woo un-hides a "View cart" link under the button; the
 * header count and the button text ("In your enquiry list") already say it,
 * and the link would grow the card. */
.bruksmann-cards .wc-block-components-product-button > span:has(> .added_to_cart) {
	display: none;
}

/* Sold and on-hold pieces are not purchasable: the Product Button then
 * prints a "Read more" link to the page the card already links to. Only a
 * purchasable, in-stock piece gets .add_to_cart_button. */
.bruksmann-cards .wc-block-components-product-button:not(:has(.add_to_cart_button)) {
	display: none;
}

/* Pagination: 44px targets, current page filled. */
.bruksmann-catalogue .bruksmann-pagination {
	margin-block-start: var(--wp--preset--spacing--60);
	gap: var(--wp--preset--spacing--10);
}

.bruksmann-pagination .page-numbers,
.bruksmann-pagination .wp-block-query-pagination-previous,
.bruksmann-pagination .wp-block-query-pagination-next {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: var(--wp--custom--tap-target);
	min-height: var(--wp--custom--tap-target);
	padding: 0 0.5rem;
	text-decoration: none;
}

.bruksmann-pagination .page-numbers.current {
	color: var(--wp--preset--color--base);
	background-color: var(--wp--preset--color--contrast);
}

.bruksmann-pagination a:hover {
	text-decoration: underline;
}

.bruksmann-catalogue__empty {
	padding-block: var(--wp--preset--spacing--50);
}

.bruksmann-catalogue__empty .bruksmann-catalogue__empty-links {
	padding-inline-start: 1.1em;
}

/* Without JavaScript: the Product Filters, the sort select (11.3.1 sorts
 * through the Interactivity API) and the Add-to-enquiry buttons do nothing,
 * and the Cart and Checkout blocks cannot run. Hide them; browsing, the
 * Available / Sold / All links, pagination and every product link work.
 * (scripting: none) is evaluated at parse time, so nothing shifts when
 * scripts do run - unlike WooCommerce's woocommerce-no-js class, which is
 * swapped in the footer. */
@media (scripting: none) {

	.bruksmann-catalogue__filters .wc-block-product-filters,
	.bruksmann-catalogue .wp-block-woocommerce-catalog-sorting,
	.bruksmann-cards .wc-block-components-product-button,
	.bruksmann-product__action,
	.bruksmann-header .bruksmann-header__enquiry {
		display: none;
	}
}

/* -------------------------------------------------------------------------
 * Product page - templates/single-product.html.
 * DOM: .bruksmann-product (summary: head + intro; then the gallery), then
 * .bruksmann-product-info (Details, Description, categories) at reading
 * width below, then related pieces.
 * Desktop (>=782px): two columns, gallery left, summary right. The summary
 * is only the decision part (title, status, notes, "Add to enquiry", the
 * short intro: a few hundred pixels), so it fits the viewport and stays
 * sticky beside the gallery. The long facts are below the two columns: a
 * 1,700px sticky column would scroll its own title and button away.
 * The gallery takes the width left beside the summary and has no height
 * cap: on a low screen a capped gallery became artificially small (decided
 * 2026-12-04).
 * Mobile (<782px): the summary wrapper becomes display: contents and the
 * order is gallery -> head -> intro -> info, so the photographs come first,
 * as on a usual product page (decided 2026-12-04).
 * The compatibility layer wraps the template's blocks in a div; the grid is
 * on .bruksmann-product inside it, so that does not matter.
 * ---------------------------------------------------------------------- */

.bruksmann-product {
	--bruksmann-sticky-top: calc(var(--wp-admin--admin-bar--height, 0px) + 4.25rem + var(--wp--preset--spacing--30));
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--50);
}

.bruksmann-product.wp-block-group > *,
.bruksmann-product__summary.wp-block-group > *,
.bruksmann-product__head.wp-block-group > *,
.bruksmann-product-info.wp-block-group > * {
	margin-block: 0;
}

@media (max-width: 781px) {

	/* The photographs start right under the header on a phone: no
	   breadcrumbs, and one small gap instead of three stacked ones (the
	   compatibility wrapper's block gap, the template's top padding and the
	   block gap after the empty notices block). The padding is an inline
	   style in the template, hence !important (decided 2026-12-04). */
	.wp-site-blocks > .wp-block-group.woocommerce.product {
		margin-block-start: 0;
	}

	.bruksmann-single-product {
		padding-top: var(--wp--preset--spacing--30) !important;
	}

	.bruksmann-single-product .wp-block-woocommerce-breadcrumbs {
		display: none;
	}

	.bruksmann-single-product > .bruksmann-product {
		margin-block-start: 0;
	}

	.bruksmann-product__summary {
		display: contents;
	}

	.bruksmann-product__gallery {
		order: 1;
	}

	.bruksmann-product__head {
		order: 2;
	}

	/* The product-summary block puts its className on an inner element; the
	   flex item is its wrapper, so the wrapper needs the order too. */
	.wp-block-woocommerce-product-summary,
	.bruksmann-product__intro {
		order: 3;
	}
}

@media (min-width: 782px) {

	.bruksmann-product {
		display: grid;
		grid-template-columns: minmax(0, 1fr) minmax(18rem, 28rem);
		align-items: start;
		column-gap: var(--wp--preset--spacing--60);
	}

	.bruksmann-product .bruksmann-product__gallery {
		grid-row: 1;
		grid-column: 1;
		width: 100%;
	}

	.bruksmann-product .bruksmann-product__summary {
		grid-row: 1;
		grid-column: 2;
		position: sticky;
		top: var(--bruksmann-sticky-top);
		display: flex;
		flex-direction: column;
		gap: var(--wp--preset--spacing--40);
	}
}

.bruksmann-product__head {
	display: flex;
	flex-flow: row wrap;
	gap: var(--wp--preset--spacing--30);
}

/* One item per line, except: the status label keeps its own width, and
 * "Add to enquiry" and "Request Hold" share a line while each has room for
 * its label (they wrap to full width below that, and a lone one fills the
 * line). */
.bruksmann-product__head > * {
	flex: 0 0 100%;
	min-width: 0;
}

.bruksmann-product__head > .bruksmann-product-status {
	flex: 0 0 auto;
}

/* Add to Cart with Options prints its form inside a notices wrapper. */
.bruksmann-product__head > :has(> .bruksmann-product__action .wc-block-components-product-button),
.bruksmann-product__head > .bruksmann-product-request--hold {
	flex: 1 1 11rem;
}

.bruksmann-product .bruksmann-product__title {
	line-height: 1.15;
}

.bruksmann-product__price-note {
	color: var(--wp--preset--color--muted);
	letter-spacing: 0.02em;
}

.bruksmann-product__how,
.bruksmann-product__hold-note,
.bruksmann-product__contact,
.bruksmann-product__sold-note {
	color: var(--wp--preset--color--muted);
}

/* Large gallery image: same contained 3:4 frame as the cards, so
 * non-3:4 photographs sit on the surface colour. */
.bruksmann-product__gallery .wc-block-product-gallery-large-image img {
	background-color: var(--wp--preset--color--surface);
}

/* State lines.
 * Sold: body.outofstock (WooCommerce's product classes on the body of the
 * single-product block template) - no price note, no questions line, the
 * "find something similar" line instead.
 * On hold: the status block's --is-on-hold modifier (bruksmann-blocks
 * contract; Sold wins over On hold there, so a sold piece never shows it).
 * No button for sold or held pieces: Add to Cart with Options prints an
 * empty form for unpurchasable pieces, which is hidden, and the "how it
 * works" line goes with it. */
.bruksmann-product__sold-note,
.bruksmann-product__hold-note {
	display: none;
}

body.outofstock .bruksmann-product__sold-note,
.bruksmann-product__head:has(.bruksmann-product-status--is-on-hold) .bruksmann-product__hold-note {
	display: block;
}

body.outofstock .bruksmann-product__price-note,
body.outofstock .bruksmann-product__contact {
	display: none;
}

.bruksmann-product .bruksmann-product__action:not(:has(.wc-block-components-product-button)),
.bruksmann-product__head > :has(> .bruksmann-product__action):not(:has(.wc-block-components-product-button)),
.bruksmann-product__head:not(:has(.bruksmann-product__action .wc-block-components-product-button)) .bruksmann-product__how {
	display: none;
}

/* WooCommerce 11.3.1 server-renders the button with `hidden` (its
 * data-wp-bind--hidden reads state.allowsAddingToCart, a client-only
 * getter) and shows it on hydration. Reserving the height keeps the
 * content below from jumping when it appears. */
.bruksmann-product__action .wc-block-components-product-button {
	min-height: 3.25rem;
}

.bruksmann-product__action .wc-block-components-product-button__button {
	min-height: 3.25rem;
}

/* Details, Description, categories: below the two columns at reading width
 * (contentSize), plain sections in a fixed order with a keyline on top. A
 * section whose block printed nothing (no attributes / empty description)
 * disappears with its heading. */
.bruksmann-product-info {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--50);
	margin-block-start: var(--wp--preset--spacing--60);
}

.bruksmann-product__section {
	padding-block-start: var(--wp--preset--spacing--30);
	border-top: var(--wp--custom--keyline);
}

.bruksmann-product__facts:not(:has(.wp-block-woocommerce-product-specifications)),
.bruksmann-product__description:not(:has(.wc-block-product-description)) {
	display: none;
}

/* Details table: a quiet two-column list with keylines, not a boxed grid.
 * product-specifications prints figure.wp-block-table, and core's table
 * CSS (enqueued with it, printed AFTER theme.css) has
 * .wp-block-table td, .wp-block-table th { border: 1px solid; padding: .5em }
 * (0,1,1) and .wp-block-table thead { border-bottom: 3px solid } (0,1,1).
 * The rules below are .bruksmann-product-info .bruksmann-specs.wp-block-table
 * th|td|thead = 0,3,1, so they win whatever the order. */
.bruksmann-product-info .bruksmann-specs.wp-block-table {
	margin: 0;
}

.bruksmann-product-info .bruksmann-specs.wp-block-table table {
	width: 100%;
	border-collapse: collapse;
}

.bruksmann-product-info .bruksmann-specs.wp-block-table thead {
	border: 0;
}

.bruksmann-product-info .bruksmann-specs.wp-block-table th,
.bruksmann-product-info .bruksmann-specs.wp-block-table td {
	padding: var(--wp--preset--spacing--20) 0;
	text-align: start;
	vertical-align: top;
	border: 0;
	border-bottom: var(--wp--custom--keyline);
}

.bruksmann-product-info .bruksmann-specs.wp-block-table th {
	width: 7.5rem;
	padding-inline-end: var(--wp--preset--spacing--30);
	font-weight: 600;
}

.bruksmann-product__terms {
	color: var(--wp--preset--color--muted);
}

.bruksmann-product__terms a {
	color: inherit;
}

/* Related pieces: same card as the catalogue; the section goes when the
 * related collection is empty. */
.bruksmann-related:not(:has(.wc-block-product)) {
	display: none;
}

.bruksmann-related .bruksmann-related__title {
	margin-block: 0 var(--wp--preset--spacing--40);
}

/* -------------------------------------------------------------------------
 * Enquiry list, send request, confirmation - templates/page-cart.html,
 * page-checkout.html, order-confirmation.html, parts/checkout-header.html,
 * parts/mini-cart.html.
 * ---------------------------------------------------------------------- */

.bruksmann-enquiry .bruksmann-enquiry__title {
	margin-block-end: 0;
}

.bruksmann-enquiry__lede {
	max-width: 40rem;
	color: var(--wp--preset--color--muted);
}

.bruksmann-checkout-header {
	background-color: var(--wp--preset--color--base);
	border-bottom: var(--wp--custom--keyline);
}

/* Square, >=3:1 fields in Cart and Checkout (ported from Purple 1.0.3
 * style.css "Forms" and "Cart & Checkout"; theme-6 -> muted, which is
 * 6.06:1 on base). Woo's block components hardcode 4px radii. */
body {
	--wc-form-border-color: var(--wp--preset--color--muted);
	--wc-form-border-radius: 0;
}

.wp-block-woocommerce-cart .wc-block-components-text-input:not(.has-error) input,
.wp-block-woocommerce-cart .wc-block-components-textarea:not(.has-error),
.wp-block-woocommerce-cart .wc-blocks-components-select:not(.has-error) .wc-blocks-components-select__select,
.wp-block-woocommerce-cart .wc-blocks-components-select:not(.has-error) .wc-blocks-components-select__container,
.wp-block-woocommerce-cart .wc-block-components-checkbox__input[type="checkbox"],
.wp-block-woocommerce-checkout .wc-block-components-text-input:not(.has-error) input,
.wp-block-woocommerce-checkout .wc-block-components-textarea:not(.has-error),
.wp-block-woocommerce-checkout .wc-blocks-components-select:not(.has-error) .wc-blocks-components-select__select,
.wp-block-woocommerce-checkout .wc-blocks-components-select:not(.has-error) .wc-blocks-components-select__container,
.wp-block-woocommerce-checkout .wc-block-components-checkbox__input[type="checkbox"] {
	border-color: var(--wp--preset--color--muted);
	border-radius: 0;
}

.wp-block-woocommerce-cart .wc-block-components-text-input:not(.has-error) input:focus,
.wp-block-woocommerce-cart .wc-block-components-textarea:not(.has-error):focus,
.wp-block-woocommerce-checkout .wc-block-components-text-input:not(.has-error) input:focus,
.wp-block-woocommerce-checkout .wc-block-components-textarea:not(.has-error):focus,
.wp-block-woocommerce-checkout .wc-blocks-components-select:not(.has-error) .wc-blocks-components-select__select:focus {
	border-color: var(--wp--preset--color--contrast);
	box-shadow: 0 0 0 1px var(--wp--preset--color--contrast);
}

.wp-block-woocommerce-cart .wc-block-components-text-input.wc-block-components-text-input input,
.wp-block-woocommerce-checkout .wc-block-components-text-input.wc-block-components-text-input input,
.wp-block-woocommerce-checkout .wp-block-woocommerce-checkout-order-summary-block {
	border-radius: 0;
}

.wp-block-woocommerce-checkout .wc-block-components-title.wc-block-components-title {
	font-size: var(--wp--preset--font-size--large);
}

.wc-block-components-form .wc-block-components-checkout-step.wc-block-components-checkout-step {
	margin-block-end: var(--wp--preset--spacing--50);
}

/* Mini-Cart drawer "View enquiry list" (outlined component button: Woo
 * uses currentColor with a hardcoded #1e1e1e hover; doubled class as in
 * Purple). */
.wc-block-components-button.wc-block-components-button:not(.is-link).is-style-outline {
	color: var(--wp--preset--color--contrast);
	border-radius: 0;
}

.wc-block-components-button.wc-block-components-button:not(.is-link).is-style-outline:hover,
.wc-block-components-button.wc-block-components-button:not(.is-link).is-style-outline:focus {
	color: var(--wp--preset--color--contrast);
	background-color: color-mix(in srgb, var(--wp--preset--color--contrast) 8%, var(--wp--preset--color--base));
}

/* Zero totals: no prices anywhere in the enquiry flow.
 * No block setting hides these rows; Checkout re-inserts its locked summary
 * rows if they are removed from the page (docs/prototype-enquiry-cart.md,
 * surprise 1), so they are hidden here. No WooCommerce body class or data
 * attribute reflects a zero total, so the rules are scoped to the ABSENCE
 * of a class: body:not(.bruksmann-has-prices). Today nothing adds that
 * class and every rule applies. The day pieces get prices, bruksmann-blocks
 * adds "bruksmann-has-prices" to body_class when the cart total (or, on
 * order-received, the order total) is above zero, and the prices return
 * without a theme change. Without that class a priced cart would show no
 * prices at all - add it before the first price goes live.
 * Specificity: Woo's strongest rule on these elements is
 * table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__prices
 * (0,3,1); every selector here is 0,4,1 or more.
 * Checkout places the order summary in TWO places (11.3.1
 * checkout-frontend.js, CHECKOUT_ORDER_SUMMARY): at large widths in the
 * sidebar (.wp-block-woocommerce-checkout-totals-block >
 * ...-order-summary-block > __content), at narrow widths (the block's
 * "isLarge" container size; seen at 390 and 768px) in a Fill rendered into
 * a Slot inside
 * .wc-block-checkout__actions (div.wp-block-woocommerce-checkout-order-
 * summary-block.checkout-order-summary-block-fill-wrapper >
 * .checkout-order-summary-block-fill). In both cases the rows, the item
 * list and the totals footer are portaled into ONE element,
 * div.wc-block-components-checkout-order-summary__content-container
 * (display: contents), which the block moves between the two places. The
 * checkout rules are therefore anchored on that container, not on a
 * column; the collapsed mobile title's price is the only part outside it.
 * Known gap: Checkout's visually hidden "Total price for ... : EUR 0" text
 * in the order summary is still announced by screen readers. */
body:not(.bruksmann-has-prices) .wp-block-woocommerce-cart table.wc-block-cart-items .wc-block-cart-items__header-total,
body:not(.bruksmann-has-prices) .wp-block-woocommerce-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__total,
body:not(.bruksmann-has-prices) .wp-block-woocommerce-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__prices,
body:not(.bruksmann-has-prices) .wp-block-woocommerce-cart .wc-block-components-totals-wrapper .wc-block-components-totals-footer-item,
body:not(.bruksmann-has-prices) .wp-block-woocommerce-cart .wp-block-woocommerce-cart-totals-block .wc-block-components-totals-footer-item,
body:not(.bruksmann-has-prices) .wc-block-mini-cart__drawer table.wc-block-cart-items .wc-block-cart-items__header-total,
body:not(.bruksmann-has-prices) .wc-block-mini-cart__drawer table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__total,
body:not(.bruksmann-has-prices) .wc-block-mini-cart__drawer table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__prices,
body:not(.bruksmann-has-prices) .wc-block-mini-cart__drawer .wc-block-mini-cart__footer .wc-block-mini-cart__footer-subtotal,
body:not(.bruksmann-has-prices) .wp-block-woocommerce-checkout .wc-block-components-checkout-order-summary__content-container .wp-block-woocommerce-checkout-order-summary-subtotal-block,
body:not(.bruksmann-has-prices) .wp-block-woocommerce-checkout .wc-block-components-checkout-order-summary__content-container .wp-block-woocommerce-checkout-order-summary-fee-block,
body:not(.bruksmann-has-prices) .wp-block-woocommerce-checkout .wc-block-components-checkout-order-summary__content-container .wp-block-woocommerce-checkout-order-summary-discount-block,
body:not(.bruksmann-has-prices) .wp-block-woocommerce-checkout .wc-block-components-checkout-order-summary__content-container .wp-block-woocommerce-checkout-order-summary-shipping-block,
body:not(.bruksmann-has-prices) .wp-block-woocommerce-checkout .wc-block-components-checkout-order-summary__content-container .wp-block-woocommerce-checkout-order-summary-taxes-block,
body:not(.bruksmann-has-prices) .wp-block-woocommerce-checkout .wc-block-components-checkout-order-summary__content-container .wc-block-components-totals-footer-item,
body:not(.bruksmann-has-prices) .wp-block-woocommerce-checkout .wc-block-components-checkout-order-summary__content-container .wc-block-components-order-summary-item__individual-prices,
body:not(.bruksmann-has-prices) .wp-block-woocommerce-checkout .wc-block-components-checkout-order-summary__content-container .wc-block-components-order-summary-item__total-price,
body:not(.bruksmann-has-prices) .wp-block-woocommerce-checkout .wc-block-components-checkout-order-summary__content-container .wc-block-components-order-summary-item__quantity,
body:not(.bruksmann-has-prices) .wp-block-woocommerce-checkout .wc-block-components-checkout-order-summary__title .wc-block-components-checkout-order-summary__title-price,
body:not(.bruksmann-has-prices) .bruksmann-confirmation .wc-block-order-confirmation-summary-list .wc-block-order-confirmation-summary-list-item:has(.woocommerce-Price-amount),
body:not(.bruksmann-has-prices) .bruksmann-confirmation .wc-block-order-confirmation-totals__table .wc-block-order-confirmation-totals__total,
body:not(.bruksmann-has-prices) .bruksmann-confirmation .wc-block-order-confirmation-totals__table tfoot,
body:not(.bruksmann-has-prices) .bruksmann-confirmation .wc-block-order-confirmation-totals__table .product-quantity {
	display: none;
}

/* -------------------------------------------------------------------------
 * Page sections - patterns/intro-statement.php, new-arrivals.php,
 * browse-by-type.php, featured-designers.php, style-guide-index.php,
 * exhibitions-teaser.php, visit.php, newsletter.php, category-pieces.php.
 * Each section is a wide group (heading inside it, so it lines up with the
 * wide grid) with margin-top spacing-section set as a block attribute. The
 * product grids reuse the catalogue card ("Catalogue" section above): the
 * .bruksmann-cards rules are not scoped to the catalogue.
 * ---------------------------------------------------------------------- */

.bruksmann-section .bruksmann-section__title {
	margin-block-end: var(--wp--preset--spacing--40);
}

.bruksmann-section__more {
	margin-block-start: var(--wp--preset--spacing--40);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.bruksmann-section__more a {
	display: inline-flex;
	align-items: center;
	min-height: var(--wp--custom--tap-target);
	text-underline-offset: 0.35em;
}

.bruksmann-section__empty {
	padding-block: var(--wp--preset--spacing--40);
	color: var(--wp--preset--color--muted);
}

/* Tiles: 3:4 photograph + h3 link; the link's ::after covers the tile, so
 * the whole tile is one tab stop (same technique as the product card).
 * The column count comes from the block (layout grid, columnCount 3 or 4:
 * core's generated .wp-container-* rule, 0,1,0); phones get 2 columns
 * here (0,2,0). */
.bruksmann-tiles.is-layout-grid {
	gap: var(--wp--preset--spacing--50) var(--wp--preset--spacing--30);
}

@media (max-width: 781px) {

	.bruksmann-tiles.is-layout-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.bruksmann-tile {
	position: relative;
}

.bruksmann-tile.wp-block-group > * {
	margin-block: 0;
}

.bruksmann-tile.wp-block-group > * + * {
	margin-block-start: var(--wp--preset--spacing--30);
}

.bruksmann-tile .bruksmann-tile__image img {
	width: 100%;
	background-color: var(--wp--preset--color--surface);
}

.bruksmann-tile .bruksmann-tile__title {
	line-height: 1.3;
}

.bruksmann-tile .bruksmann-tile__title a {
	text-decoration: none;
}

.bruksmann-tile .bruksmann-tile__title a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.bruksmann-tile .bruksmann-tile__title a:focus-visible {
	outline: none;
}

.bruksmann-tile .bruksmann-tile__title a:focus-visible::after {
	outline: var(--wp--custom--focus--width) solid var(--wp--preset--color--contrast);
	outline-offset: var(--wp--custom--focus--offset);
}

.bruksmann-tile:hover .bruksmann-tile__title a {
	text-decoration: underline;
	text-decoration-thickness: 1px;
}

/* Front page intro (h1 statement + two next steps + photograph). On phones
 * the text column comes first (DOM order), so the statement and both
 * buttons are in the first screen. */
.bruksmann-intro .bruksmann-intro__title {
	margin-block: 0;
}

.bruksmann-intro .bruksmann-intro__text > * + * {
	margin-block-start: var(--wp--preset--spacing--40);
}

/* Phones (columns stack below 782px): a tighter intro so the top of the
 * photograph is in the first 844px of a 390px-wide screen. Computed at
 * 390 x 844: header 84 + main padding 30.3 + h1 3 lines x 30.9 (xx-large
 * 28.1px, line-height 1.1; fontkit line breaks at 349px) + 20 + lede 2 x
 * 29.7 + 20 + buttons 2 rows x 44.8 + 10 + row gap 20 = image top at
 * ~426px (was ~573px: h1 5 lines at 36.3px, 30px gaps). The cookie banner
 * is not counted. Specificity: the h1 size beats the element style
 * (0,0,1); the gaps beat core's generated .wp-container-* layout rules
 * (0,1,0) with 0,2,0 / 0,3,0. */
@media (max-width: 781px) {

	.bruksmann-intro.wp-block-columns {
		row-gap: var(--wp--preset--spacing--30);
	}

	.bruksmann-intro .bruksmann-intro__title {
		font-size: var(--wp--preset--font-size--xx-large);
	}

	.bruksmann-intro .wp-block-column.bruksmann-intro__text > * + * {
		margin-block-start: var(--wp--preset--spacing--30);
	}

	.bruksmann-intro .bruksmann-intro__actions.wp-block-buttons {
		gap: var(--wp--preset--spacing--20);
	}
}

/* Hyphenated compounds in headings (wabi-sabi, mid-century) stay on one
 * line: the copy wraps them in <span class="bruksmann-nowrap">. Belleza has
 * no non-breaking hyphen (U+2011), so the character itself would fall back
 * to another face. */
.bruksmann-nowrap {
	white-space: nowrap;
}

.bruksmann-intro .bruksmann-intro__image img,
.bruksmann-feature .wp-block-image img {
	width: 100%;
	background-color: var(--wp--preset--color--surface);
}

/* Exhibitions teaser, visit box, newsletter: first heading flush with its
 * box. */
.bruksmann-feature .bruksmann-feature__text > :first-child,
.bruksmann-visit > :first-child,
.bruksmann-newsletter > :first-child {
	margin-block-start: 0;
}

/* Newsletter (Contact Form 7 form 70; its template is written by
 * bin/migrate-content.php: visually hidden <label>, e-mail field, submit).
 * Field and button on one row from 360px up: at 360 the row is 320px, the
 * button ~135px ("SUBSCRIBE" 86.8px + 2 x 24px padding), the gap 10px, the
 * field ~175px. The button is the theme's primary button (CF7 prints an
 * input[type=submit] without .wp-element-button); the field uses the base
 * form rule (muted border, 6.06:1). CF7's spinner (inline-block 24px with
 * 24px side margins, .wpcf7-spinner 0,1,0) would take 72px of the row even
 * while hidden: it is taken out of the flow under the button (0,3,0).
 * Validation messages appear under the field (align-items: flex-start keeps
 * the button at its own height). */
.bruksmann-newsletter .wpcf7-form p {
	position: relative;
	display: flex;
	flex-wrap: nowrap;
	align-items: flex-start;
	gap: var(--wp--preset--spacing--20);
	margin: 0;
}

.bruksmann-newsletter .wpcf7-form .wpcf7-form-control-wrap {
	flex: 1 1 auto;
	min-width: 0;
}

.bruksmann-newsletter .wpcf7-form input[type="email"] {
	box-sizing: border-box;
	width: 100%;
}

.bruksmann-newsletter .wpcf7-form .wpcf7-spinner {
	position: absolute;
	top: 100%;
	right: 0;
	margin: var(--wp--preset--spacing--10) 0 0;
}

.bruksmann-newsletter .wpcf7-form input[type="submit"] {
	flex: none;
	min-height: var(--wp--custom--tap-target);
	padding: 0.875rem 1.5rem;
	font-family: inherit;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	letter-spacing: 0.06em;
	line-height: 1.2;
	text-transform: uppercase;
	color: var(--wp--preset--color--base);
	background-color: var(--wp--preset--color--contrast);
	border: 1px solid var(--wp--preset--color--contrast);
	border-radius: 0;
	cursor: pointer;
}

.bruksmann-newsletter .wpcf7-form input[type="submit"]:hover {
	background-color: color-mix(in srgb, var(--wp--preset--color--contrast) 80%, var(--wp--preset--color--base));
}

/* -------------------------------------------------------------------------
 * Article, artist, exhibition and overview pages -
 * templates/page-article.html, page-artist.html, page-exhibition.html,
 * page-overview.html. Text at contentSize (600px); images, columns,
 * galleries and product grids at wide (1300px).
 * ---------------------------------------------------------------------- */

/* Article: the content's centred h1 opens the page above a wide gallery.
 * Section headings are h2 (sub-headings h3) at a reading size. */
.bruksmann-article .wp-block-post-content > h1.wp-block-heading {
	margin-block: 0 var(--wp--preset--spacing--50);
}

.bruksmann-article .wp-block-post-content > h2.wp-block-heading,
.bruksmann-artist .wp-block-columns h2.wp-block-heading {
	font-size: var(--wp--preset--font-size--x-large);
}

.bruksmann-article .wp-block-post-content > h2.wp-block-heading {
	margin-block-start: var(--wp--preset--spacing--60);
}

.bruksmann-article .wp-block-post-content > h3.wp-block-heading {
	margin-block-start: var(--wp--preset--spacing--50);
	font-size: var(--wp--preset--font-size--large);
}

.bruksmann-article .wp-block-post-content > .wp-block-gallery.alignwide {
	margin-block: var(--wp--preset--spacing--50);
}

/* Artist, overview: the h1 (post title, align wide) above wide content. */
.bruksmann-artist .wp-block-post-title,
.bruksmann-overview .wp-block-post-title {
	margin-block-end: var(--wp--preset--spacing--50);
}

.bruksmann-artist .wp-block-post-content > .bruksmann-section:first-child,
.bruksmann-overview .wp-block-post-content > :first-child {
	margin-block-start: 0;
}

.bruksmann-artist .wp-block-post-content > .wp-block-columns.alignwide {
	margin-block-start: var(--wp--preset--spacing--section);
}

/* Two-column text (artist introduction / CV, About): each text column is
 * capped at 34rem (544px = ~72 characters of 17px Instrument Sans: 7.6 to
 * 7.8px per character measured with fontkit; it was 78-81 at 1440px). The
 * columns are pushed to the outer edges of the wide row, so the two caps
 * leave an even gap in the middle instead of a ragged right side. Below
 * 782px the columns stack and are narrower than the cap anyway. Core's
 * column rule is .wp-block-columns > .wp-block-column (flex-basis 0,
 * grow 1; 0,2,0): max-width is not set by core. */
.wp-block-column.bruksmann-measure {
	max-width: 34rem;
}

.wp-block-columns.alignwide:has(> .wp-block-column.bruksmann-measure) {
	justify-content: space-between;
}

/* Embeds (artist videos): core's responsive box
 * (.wp-embed-responsive .wp-has-aspect-ratio .wp-block-embed__wrapper::before,
 * padding-top 56.25% / 75%, 0,3,1) reserves the video height before the
 * iframe exists. Where oEmbed did not resolve (no iframe: WordPress prints
 * the URL as text), the box is dropped (0,4,1), so there is no empty
 * 300-450px block. With a resolved embed nothing changes. */
.wp-embed-responsive .wp-block-embed.wp-has-aspect-ratio .wp-block-embed__wrapper:not(:has(iframe))::before {
	content: none;
}

.bruksmann-artist .wp-block-post-content > .wp-block-embed {
	margin-block-start: var(--wp--preset--spacing--60);
}

/* Exhibition: consecutive galleries read as one photo set - the gap
 * between two galleries equals the gap inside one (core's gallery gap
 * variable, with core's 16px fallback). Core's flow margin is 0,1,0. */
.bruksmann-exhibition .wp-block-post-content > .wp-block-gallery {
	margin-block-start: var(--wp--preset--spacing--50);
}

.bruksmann-exhibition .wp-block-post-content > .wp-block-gallery + .wp-block-gallery {
	margin-block-start: var(--wp--style--unstable-gallery-gap, 16px);
}

/* Cover block style "Tile" (styles/block/cover-tile.json): the text sits
 * on a scrim, rgb(17 17 17 / 0.7), inside the cover's padding, on top of
 * the block's own dim. Worst case, a pure white photograph and dim 0:
 * 0.3 x 255 + 0.7 x 17 = sRGB 88 -> relative luminance 0.099 -> white text
 * 7.1:1 (AA needs 4.5:1). Assumes sRGB alpha compositing (what browsers do)
 * and text inside the scrim; the dim can only make it darker. The partial
 * holds the scrim (no core rule competes with it); colour and links here:
 * theme.json gives links the contrast colour (0,1,0), these are 0,3,0+. */
.wp-block-cover.is-style-tile .wp-block-cover__inner-container {
	color: var(--wp--preset--color--base);
}

.wp-block-cover.is-style-tile .wp-block-cover__inner-container a {
	color: inherit;
	text-decoration: none;
}

.wp-block-cover.is-style-tile .wp-block-cover__inner-container a:hover {
	text-decoration: underline;
}

.wp-block-cover.is-style-tile .wp-block-cover__inner-container > :first-child {
	margin-block-start: 0;
}

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

@media (prefers-reduced-motion: reduce) {

	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		scroll-behavior: auto !important;
	}
}
