/* =============================================================
   Shop catalog, the one-surface product archive.

   Loaded only on the shop landing (inc/shop-catalog.php guards the
   enqueue). Every value routes through tokens.css; a hardcoded brand
   hex in here would be a defect per DESIGN-SPEC.md section 11.

   Motion follows the house scale: 80ms press, 150ms micro, and the
   standard cubic-bezier. Nothing here animates layout, because the
   catalog's whole promise is that filtering is instant.
   ============================================================= */

.catalog {
	--catalog-pad-x: var(--layout-gutter);
	--catalog-gap: var(--space-2);
	--catalog-row-pad: var(--space-2) var(--space-4);
	--catalog-media: 72px;
	max-width: var(--layout-content-max-width);
	margin: 0 auto;
	/* Breathing room below the site header before the band cards start. */
	padding: var(--space-8) var(--catalog-pad-x) var(--space-11);
	/* The catalog is its own space: it sets its type once and everything
	 * inherits, so no element can fall through to the browser serif default
	 * the way the first build's column heads did. */
	font-family: var(--font-sans);
	color: var(--color-text-primary);
}

/* ---------- Merkliste button (lives in the filter rail) ---------- */
.catalog-tool {
	flex: none;
	display: inline-flex;
	align-items: center;
	gap: var(--space-2);
	border: 1px solid var(--color-border-hairline);
	border-radius: var(--radius-control);
	background: var(--color-bg-base);
	padding: var(--space-1) var(--space-3);
	cursor: pointer;
	font-family: inherit;
	font-size: var(--font-size-14);
	font-weight: 500;
	color: var(--color-text-primary);
	white-space: nowrap;
	transition: background-color var(--motion-duration-fast) var(--motion-ease-standard);
}

.catalog-tool:hover { background: var(--grey-50); }
.catalog-tool:active { background: var(--grey-100); transition-duration: var(--motion-duration-press); }

.catalog-tool__count {
	min-width: 1.25rem;
	height: 1.25rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: var(--radius-chip);
	background: var(--color-cta);
	color: var(--color-cta-ink);
	font-size: var(--font-size-12);
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	padding: 0 var(--space-1);
}

.catalog-tool__count.is-zero {
	background: var(--grey-100);
	color: var(--color-text-secondary);
}

/* ---------- band cards: the visual entry into the five areas ---------- */
.catalog-bandcards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
	gap: var(--space-3);
}

.catalog-bandcard {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
	border: 1px solid var(--grey-100);
	border-radius: var(--radius-lg);
	background: var(--color-bg-base);
	cursor: pointer;
	padding: var(--space-3);
	font-family: inherit;
	text-align: left;
	color: var(--color-text-primary);
	transition: border-color var(--motion-duration-fast) var(--motion-ease-standard),
		box-shadow var(--motion-duration-fast) var(--motion-ease-standard),
		background-color var(--motion-duration-fast) var(--motion-ease-standard);
}

.catalog-bandcard:hover {
	border-color: var(--color-border-hairline);
	box-shadow: 0 4px 14px color-mix(in srgb, var(--color-brand-deep) 8%, transparent);
}

.catalog-bandcard:active { background: var(--grey-50); transition-duration: var(--motion-duration-press); }

.catalog-bandcard[aria-pressed="true"] {
	border-color: var(--color-accent);
	box-shadow: inset 0 0 0 1px var(--color-accent);
}

.catalog-bandcard__media {
	width: 100%;
	aspect-ratio: 16 / 9;
	border-radius: var(--radius-md);
	background: var(--color-bg-elevated);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	margin-bottom: var(--space-2);
}

.catalog-bandcard__media img {
	max-width: 82%;
	max-height: 88%;
	width: auto;
	height: auto;
	object-fit: contain;
}

.catalog-bandcard__label {
	font-family: var(--font-display);
	font-size: var(--font-size-14);
	font-weight: 600;
	letter-spacing: var(--letter-spacing-tight);
}

.catalog-bandcard__n {
	font-size: var(--font-size-12);
	color: var(--color-text-muted);
	font-variant-numeric: tabular-nums;
}

/* ---------- view segment ---------- */
.catalog-seg {
	display: inline-flex;
	border: 1px solid var(--color-border-hairline);
	border-radius: var(--radius-control);
	padding: 2px;
	background: var(--color-bg-base);
}

.catalog-seg button {
	border: 0;
	background: none;
	cursor: pointer;
	font-family: inherit;
	font-size: var(--font-size-14);
	font-weight: 500;
	color: var(--color-text-secondary);
	border-radius: max(2px, calc(var(--radius-control) - 2px));  /* concentric inside the 2px track padding */
	padding: 2px var(--space-3);
	transition: background-color var(--motion-duration-fast) var(--motion-ease-standard),
		color var(--motion-duration-fast) var(--motion-ease-standard);
}

.catalog-seg button[aria-pressed="true"] {
	background: var(--color-brand-deep);
	color: var(--color-text-inverse);
}

.catalog-seg button:not([aria-pressed="true"]):hover { color: var(--color-text-primary); }
.catalog-seg button:active { opacity: 0.7; transition-duration: var(--motion-duration-press); }

/* ---------- notices (add-to-cart feedback on fallback page loads) ---------- */
.catalog-notices { margin-top: var(--space-5); }
.catalog-notices:empty { display: none; margin: 0; }

.catalog-notices .woocommerce-message,
.catalog-notices .woocommerce-info,
.catalog-notices .woocommerce-error {
	position: relative;
	border-radius: var(--radius-lg);
	margin: 0 0 var(--space-2);
	/* Room for the close control the script appends. */
	padding-right: 3.5rem;
}

.catalog-notice-close {
	position: absolute;
	top: 50%;
	right: var(--space-3);
	transform: translateY(-50%);
	width: 2.125rem;
	height: 2.125rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--color-border-hairline);
	border-radius: 50%;
	background: var(--color-bg-base);
	color: var(--color-text-secondary);
	cursor: pointer;
	transition: background-color var(--motion-duration-fast) var(--motion-ease-standard),
		color var(--motion-duration-fast) var(--motion-ease-standard);
}

.catalog-notice-close:hover { background: var(--grey-50); color: var(--color-text-primary); }
.catalog-notice-close:active { background: var(--grey-100); transition-duration: var(--motion-duration-press); }
.catalog-notice-close svg { width: 14px; height: 14px; }

/* ---------- filter bar ----------
 * Spec "Filter Bar Redesign" (owner, 2026-10-01). Replaces the lime rail
 * of 15.09.2026: the usability test showed the rail was overlooked, and
 * the redesign answers that with a mint block of three fixed rows, main
 * filters one click away and everything else under "Alle Filter".
 *
 * The bar's promise is that setting or clearing a filter moves nothing:
 *   - every main-filter slot has a fixed width (--cf-w, set per slot from
 *     category data) and truncates its text with an ellipsis;
 *   - badges and "Alle zuruecksetzen" are always in the DOM and hide with
 *     visibility, never display;
 *   - row 3 is always rendered and only grows when the visitor adds more
 *     chips than fit one line (a flat bar, three filters or fewer, has no
 *     row 3 and no "Alle Filter" at all, see .cf--flat below);
 *   - counts are tabular with a minimum width;
 *   - popovers are overlays. Only "Alle Filter" pushes the grid, because
 *     the visitor asked for it.
 *
 * Colours come from the --cf-* tokens in tokens.css. Desktop from 1024px,
 * below that the bar becomes the mobile toolbar plus bottom sheets. */
.cf {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-top: var(--space-5);
	padding: 14px;
	border-radius: var(--cf-radius-bar);
	background: var(--cf-tint);
	color: var(--cf-ink);
	font-size: var(--font-size-14);
}

.cf button { font-family: inherit; }

@media (max-width: 1023.98px) {
	.cf-show-desk { display: none !important; }
}

@media (min-width: 1024px) {
	.cf-show-mob { display: none !important; }
}

/* Row 1: search, count, view, Merkliste */
.cf__r1 {
	display: flex;
	align-items: center;
	gap: 10px;
}

.cf-search {
	flex: 1 1 auto;
	min-width: 0;
	height: 42px;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 0 12px;
	background: var(--color-bg-base);
	border: 1px solid var(--cf-control-border);
	border-radius: var(--cf-radius-control);
	color: var(--cf-muted);
	transition: border-color var(--motion-duration-fast) var(--motion-ease-standard),
		box-shadow var(--motion-duration-fast) var(--motion-ease-standard);
}

.cf-search:focus-within {
	border-color: var(--cf-brand);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--cf-brand) 18%, transparent);
}

.cf-search > svg { flex: none; }

.cf-search input {
	flex: 1 1 auto;
	min-width: 0;
	border: 0;
	background: none;
	outline: none;
	font-family: inherit;
	font-size: 15px;
	color: var(--cf-ink);
}

.cf-search input::placeholder { color: var(--cf-muted); opacity: 1; }
.cf-search input::-webkit-search-cancel-button { display: none; }

.catalog-search__clear {
	flex: none;
	border: 0;
	background: none;
	cursor: pointer;
	color: var(--cf-muted);
	font-size: var(--font-size-18);
	line-height: 1;
	padding: 0 var(--space-1);
}

.catalog-search__clear:hover { color: var(--cf-ink); }

.cf-count {
	flex: none;
	min-width: 150px;
	padding: 0 6px;
	box-sizing: border-box;
	text-align: right;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
	color: var(--cf-ink);
}

.cf-count b { font-weight: 700; }

/* The view toggle keeps ONE weight in both states (spec rule 8): a bolder
 * pressed label would widen the segment and nudge the Merkliste. */
.cf .cf-seg {
	flex: none;
	gap: 2px;
	padding: 3px;
	border-color: var(--cf-control-border);
	border-radius: var(--cf-radius-control);
}

.cf .cf-seg button {
	height: 34px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 0 12px;
	border-radius: var(--cf-radius-chip);
	font-weight: 500;
	color: var(--cf-ink);
}

.cf .cf-seg button[aria-pressed="true"] {
	background: var(--cf-navy);
	color: var(--color-text-inverse);
}

.cf .cf-seg button:not([aria-pressed="true"]):hover { background: var(--grey-50); }

.cf .catalog-tool {
	height: 42px;
	box-sizing: border-box;
	padding: 0 12px;
	border-color: var(--cf-control-border);
	border-radius: var(--cf-radius-control);
	font-weight: 600;
}

/* Row 2: "Alle Filter", divider, main filters */
.cf__r2 {
	display: flex;
	/* Top-aligned, not centred: once the slot row wraps, "Alle Filter"
	   stays level with the first line. */
	align-items: flex-start;
	/* Wraps: the slots keep their fixed widths, so between about 1180px
	   and the mobile layout the last slot or the ESD switch drops to a
	   second line instead of running past the bar (QM 2026-10-27). */
	flex-wrap: wrap;
	gap: 8px;
	min-height: 40px;
	padding-top: 12px;
	border-top: 1px solid color-mix(in srgb, var(--cf-navy) 12%, transparent);
}

.cf-all {
	flex: none;
	height: 40px;
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 0 12px;
	background: var(--color-bg-base);
	border: 1px solid var(--cf-control-border);
	border-radius: var(--cf-radius-control);
	cursor: pointer;
	font-size: var(--font-size-14);
	font-weight: 600;
	color: var(--cf-ink);
	white-space: nowrap;
}

.cf-all:hover { background: var(--grey-50); }

.cf-all[aria-expanded="true"] {
	background: var(--cf-navy);
	border-color: var(--cf-navy);
	color: var(--color-text-inverse);
}

.cf-chev {
	flex: none;
	transition: transform var(--motion-duration-fast) var(--motion-ease-standard);
}

[aria-expanded="true"] > .cf-chev { transform: rotate(180deg); }

.cf-badge {
	min-width: 20px;
	height: 20px;
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0 6px;
	border-radius: 999px;
	background: var(--cf-brand);
	color: var(--color-text-inverse);
	font-size: var(--font-size-12);
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

/* Reserved, never removed (spec rule 4). */
.cf-badge.is-zero { visibility: hidden; }

.cf-all[aria-expanded="true"] .cf-badge {
	background: var(--color-bg-base);
	color: var(--cf-navy);
}

.cf-divider {
	flex: none;
	width: 1px;
	height: 24px;
	margin: 0 4px;
	background: color-mix(in srgb, var(--cf-navy) 18%, transparent);
}

.cf-main {
	/* Takes the width left beside "Alle Filter" and wraps inside, so only
	   what does not fit (usually the ESD switch) drops to a second line,
	   not the whole slot row. */
	flex: 1 1 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	min-width: 0;
}

.cf-main[hidden] { display: none; }

.cf-slot {
	flex: none;
	position: relative;
	width: var(--cf-w);
	height: 40px;
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 0 10px 0 12px;
	background: var(--color-bg-base);
	border: 1px solid var(--cf-control-border);
	border-radius: var(--cf-radius-control);
	cursor: pointer;
	font-size: var(--font-size-14);
	font-weight: 500;
	color: var(--cf-ink);
	white-space: nowrap;
	text-align: left;
}

.cf-slot:hover { background: var(--grey-50); }

.cf-slot__text {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Weight may change here: the slot's width is fixed, so nothing moves. */
.cf-slot.is-active {
	background: var(--cf-brand);
	border-color: var(--cf-brand);
	color: var(--color-text-inverse);
	font-weight: 600;
}

.cf-slot[aria-expanded="true"] { border-color: var(--cf-navy); }
.cf-slot.is-active[aria-expanded="true"] { box-shadow: inset 0 0 0 1px var(--cf-navy); }

.cf-switch {
	flex: none;
	position: relative;
	height: 40px;
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 0 12px 0 8px;
	background: var(--color-bg-base);
	border: 1px solid var(--cf-control-border);
	border-radius: var(--cf-radius-control);
	cursor: pointer;
	font-size: var(--font-size-14);
	font-weight: 500;
	color: var(--cf-ink);
	white-space: nowrap;
}

.cf-switch:hover { background: var(--grey-50); }

.cf-switch__track {
	flex: none;
	position: relative;
	display: inline-block;
	width: 36px;
	height: 22px;
	border-radius: 999px;
	background: var(--cf-checkbox-off);
	transition: background-color var(--motion-duration-fast) var(--motion-ease-standard);
}

.cf-switch__knob {
	position: absolute;
	top: 3px;
	left: 3px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--color-bg-base);
	transition: transform var(--motion-duration-fast) var(--motion-ease-standard);
}

[aria-checked="true"] > .cf-switch__track { background: var(--cf-brand); }
[aria-checked="true"] > .cf-switch__track .cf-switch__knob { transform: translateX(14px); }

.cf-switch__n {
	min-width: 2ch;
	font-size: var(--font-size-12);
	font-weight: 600;
	color: var(--cf-muted);
	font-variant-numeric: tabular-nums;
}

/* Row 3: further active filters */
.cf__r3 {
	min-height: 30px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.cf__r3 .cf-chips { display: contents; }

.cf-r3__label {
	font-size: 13px;
	font-weight: 600;
	color: var(--cf-brand-dark);
}

.cf-hint {
	font-size: 13px;
	color: var(--cf-muted);
}

.cf-hint[hidden] { display: none; }

.cf-chip {
	flex: none;
	height: 30px;
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 0 6px 0 10px;
	background: var(--color-bg-base);
	border: 1px solid var(--cf-control-border);
	border-radius: var(--cf-radius-chip);
	cursor: pointer;
	font-size: 13px;
	font-weight: 600;
	color: var(--cf-brand-dark);
	white-space: nowrap;
}

.cf-chip:hover { border-color: var(--cf-brand-dark); }
.cf-chip svg { flex: none; }

.cf-reset {
	margin-left: auto;
	height: 30px;
	padding: 0 6px;
	border: 0;
	background: none;
	cursor: pointer;
	font-size: 13px;
	font-weight: 600;
	color: var(--cf-brand-dark);
	text-decoration: underline;
	text-underline-offset: 3px;
	white-space: nowrap;
}

/* Reserved, never removed (spec rule 5); visibility also takes it out of
 * the tab order and the accessibility tree. */
.cf-reset.is-idle { visibility: hidden; }

/* A flat bar: the band has three filters or fewer, so every one is a main
 * filter and nothing is left for "Alle Filter" (owner, 2026-10-02). The
 * button, its divider and row 3 go, on the bar and on the strip; a band
 * with no filter at all drops row 2 as well. The template sets the class
 * for the band shown first, the script on every band change. */
.cf--flat .cf-all,
.cf--flat .cf-divider,
.cf--flat .cf__r3 { display: none; }

.cf--empty .cf__r2 { display: none; }

/* "Alle Filter" panel, desktop: a white card inside the bar */
.cf-panel {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 20px;
	background: var(--color-bg-base);
	border-radius: var(--cf-radius-panel);
	outline: none;
}

.cf-panel[hidden] { display: none; }

.cf-panel > .cf-sheet-head { display: none; }

.cf-panel__band {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
	gap: 20px;
}

.cf-panel__band[hidden] { display: none; }

.cf-panel__empty {
	margin: 0;
	color: var(--cf-muted);
}

.cf-group {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.cf-group__title {
	margin: 0 0 6px;
	padding: 0 8px;
	font-family: inherit;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0;
	color: var(--cf-brand-dark);
}

.cf-group__toggle {
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	background: none;
	font: inherit;
	color: inherit;
	text-align: left;
}

.cf-group__toggle[disabled] { cursor: default; }
.cf-group__toggle .cf-group__sum,
.cf-group__toggle .cf-chev { display: none; }

.cf-opts {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.cf-opt {
	width: 100%;
	height: 38px;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 0 8px;
	background: transparent;
	border: 0;
	border-radius: var(--cf-radius-chip);
	cursor: pointer;
	font-size: var(--font-size-14);
	font-weight: 500;
	color: var(--cf-ink);
	text-align: left;
}

.cf-opt:hover { background: var(--grey-50); }

.cf-opt[aria-checked="true"] {
	background: var(--cf-tint);
	font-weight: 600;
}

.cf-box {
	flex: none;
	width: 18px;
	height: 18px;
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--color-bg-base);
	border: 1.5px solid var(--cf-checkbox-off);
	border-radius: var(--cf-radius-box);
}

.cf-opt[aria-checked="true"] .cf-box {
	background: var(--cf-brand);
	border-color: var(--cf-brand);
}

.cf-opt[aria-checked="true"] .cf-box::after {
	content: "";
	width: 4px;
	height: 8px;
	margin-top: -2px;
	border: solid var(--color-text-inverse);
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.cf-opt__label {
	flex: 1 1 auto;
	min-width: 0;
}

.cf-opt__n {
	flex: none;
	min-width: 2ch;
	text-align: right;
	font-size: var(--font-size-12);
	font-weight: 500;
	color: var(--cf-muted);
	font-variant-numeric: tabular-nums;
}

/* An option with no result under the current selection stays visible,
 * greyed, and cannot be picked (spec, Behaviour 5). */
.cf-opt[disabled] {
	cursor: default;
	color: var(--cf-muted);
	background: transparent;
}

.cf-opt[disabled] .cf-box { border-color: var(--grey-200); }

.cf-panel__foot {
	display: flex;
	align-items: center;
	gap: 8px;
	padding-top: 16px;
	border-top: 1px solid var(--cf-divider);
}

.cf-textbtn {
	padding: 0 4px;
	border: 0;
	background: none;
	cursor: pointer;
	font-size: var(--font-size-14);
	font-weight: 600;
	color: var(--cf-brand-dark);
	white-space: nowrap;
}

.cf-textbtn--u {
	height: 42px;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.cf-btn {
	height: 42px;
	box-sizing: border-box;
	padding: 0 16px;
	border-radius: var(--cf-radius-control);
	cursor: pointer;
	font-size: var(--font-size-14);
	font-weight: 600;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.cf-btn--ghost {
	margin-left: auto;
	background: var(--color-bg-base);
	border: 1px solid var(--color-border-hairline);
	color: var(--cf-ink);
}

.cf-btn--ghost:hover { background: var(--grey-50); }

.cf-btn--primary {
	padding: 0 20px;
	background: var(--cf-brand);
	border: 0;
	color: var(--color-text-inverse);
}

.cf-btn--primary:hover { background: var(--cf-brand-dark); }

.cf-btn--primary[disabled] {
	background: var(--grey-100);
	color: var(--color-text-secondary);
	cursor: default;
}

/* Single-filter popover: an overlay, it never pushes the grid */
.cf-pop {
	position: absolute;
	z-index: 80;
	width: 280px;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 14px;
	background: var(--color-bg-base);
	border: 1px solid var(--cf-divider);
	border-radius: var(--cf-radius-panel);
	box-shadow: var(--cf-shadow-pop);
	font-family: var(--font-sans);
	font-size: var(--font-size-14);
	color: var(--cf-ink);
	outline: none;
}

.cf-pop[hidden] { display: none; }
.cf-pop.is-fixed { position: fixed; }

.cf-pop .cf-sheet-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.cf-sheet-head__title {
	margin: 0;
	font-family: inherit;
	font-size: var(--font-size-14);
	font-weight: 700;
	letter-spacing: 0;
}

.cf-pop .cf-textbtn {
	padding: 4px 0;
	font-size: 13px;
}

.cf-pop__body {
	max-height: 20rem;
	overflow-y: auto;
}

.cf-pop__foot .cf-btn--primary { width: 100%; }

/* Compact strip, desktop only */
.cf-compact {
	position: fixed;
	top: var(--cf-compact-top, var(--nav-height, 48px));
	left: 0;
	right: 0;
	z-index: 60;
	background: var(--cf-tint);
	box-shadow: var(--cf-shadow-strip);
	font-family: var(--font-sans);
	font-size: var(--font-size-14);
	color: var(--cf-ink);
}

.cf-compact[hidden] { display: none; }

.cf-compact__inner {
	max-width: var(--layout-content-max-width);
	height: 60px;
	box-sizing: border-box;
	margin: 0 auto;
	padding: 10px var(--layout-gutter);
	display: flex;
	align-items: center;
	gap: 8px;
}

.cf-search--compact {
	flex: 0 0 180px;
	height: 40px;
}

.cf-search--compact input { font-size: var(--font-size-14); }

.cf-count--compact { margin-left: auto; flex: none; }

/* The strip is one 60px line. The bar's main group wraps on purpose (the
   ESD switch drops to a second line there); here a wrap pushed half the
   group above the strip and the switch below it (go-live 2026-11-09). So
   the group stays on one line, the slots give up width first (their text
   ends in an ellipsis), and whatever still does not fit is clipped at the
   strip's edge; every filter stays reachable through "Alle Filter". The
   popover hangs off <body>, so the clipping never cuts it. */
.cf-main--compact {
	flex-wrap: nowrap;
	overflow: hidden;
}

.cf-main--compact .cf-slot {
	flex: 0 1 var(--cf-w);
	width: auto;
	min-width: 96px;
}

.cf-compact__inner > .cf-all,
.cf-compact__inner > .cf-divider { flex: none; }

.cf-scrim {
	position: fixed;
	inset: 0;
	z-index: 90;
	background: var(--cf-scrim);
}

.cf-scrim[hidden] { display: none; }

.catalog-listtools {
	display: flex;
	justify-content: flex-end;
	margin-top: var(--space-3);
}

.catalog-listtools:has(> [hidden]) { display: none; }

/* ---------- filter bar, mobile (below 1024px) ----------
 * A mint toolbar, a white row of main-filter buttons that scrolls
 * sideways, and all filtering in bottom sheets. */
@media (max-width: 1023.98px) {
	.cf {
		gap: 8px;
		margin-left: calc(-1 * var(--catalog-pad-x));
		margin-right: calc(-1 * var(--catalog-pad-x));
		padding: 10px 16px 0;
		border-radius: 0;
	}

	.cf__r1 { flex-wrap: wrap; gap: 8px; }
	.cf-search { flex-basis: 100%; height: 40px; order: 1; }
	.cf__r1 .cf-all { order: 2; }
	.cf-count { order: 3; min-width: 120px; margin-left: auto; padding: 0; font-size: 13px; }
	/* Icon only, its count as a corner badge: the toolbar line has to
	 * hold "Alle Filter", the count and this on a 360px phone. */
	.cf .catalog-tool {
		order: 4;
		position: relative;
		width: 44px;
		height: 40px;
		padding: 0;
		gap: 0;
		justify-content: center;
	}

	.cf .catalog-tool__count {
		position: absolute;
		top: -6px;
		right: -6px;
	}

	.cf .catalog-tool__label {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
	}
	.cf .cf-seg { display: none; }

	.cf-compact { display: none !important; }

	.cf__r2 {
		height: auto;
		margin: 2px -16px 0;
		padding: 10px 16px;
		background: var(--color-bg-base);
		border-top: 0;
		border-bottom: 1px solid var(--cf-divider);
		overflow-x: auto;
		scrollbar-width: none;
	}

	.cf__r2::-webkit-scrollbar { display: none; }
	.cf__r2:not(:has(.cf-main:not([hidden]) > *)):not(:has(.cf-chip)) { display: none; }

	.cf__r2 .cf-main { flex: none; }
	.cf-main .cf-switch { order: -1; }

	/* Touch targets: 36px controls get a hit area of 44px. */
	.cf-slot::before,
	.cf-switch::before,
	.cf-chips--row .cf-chip::before {
		content: "";
		position: absolute;
		inset: -4px 0;
	}

	.cf-slot {
		width: var(--cf-mw);
		height: 36px;
		gap: 6px;
	}

	.cf-switch {
		height: 36px;
		gap: 8px;
		padding: 0 10px 0 6px;
		border-color: var(--color-border-hairline);
		font-weight: 600;
	}

	.cf-switch .cf-switch__track { width: 32px; height: 20px; }
	.cf-switch .cf-switch__knob { width: 14px; height: 14px; }
	.cf-switch[aria-checked="true"] .cf-switch__knob { transform: translateX(12px); }

	.cf-chips--row {
		display: flex;
		flex: none;
		gap: 8px;
	}

	.cf-chips--row .cf-chip {
		position: relative;
		height: 36px;
		padding: 0 8px 0 12px;
		background: var(--cf-tint);
		border: 0;
		border-radius: var(--cf-radius-control);
	}

	.cf__r3 { display: none; }

	/* Sheets */
	.cf-panel,
	.cf-pop {
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 95;
		width: auto;
		gap: 0;
		padding: 0;
		border: 0;
		border-radius: 12px 12px 0 0;
		box-shadow: none;
	}

	.cf-panel { top: 48px; }
	.cf-pop { top: auto !important; left: 0 !important; max-height: calc(100vh - 48px); }

	.cf-panel > .cf-sheet-head,
	.cf-pop .cf-sheet-head {
		flex: none;
		height: 56px;
		display: grid;
		grid-template-columns: 1fr auto 1fr;
		align-items: center;
		padding: 0 8px;
		border-bottom: 1px solid var(--cf-divider);
	}

	.cf-x {
		justify-self: start;
		width: 44px;
		height: 44px;
		display: flex;
		align-items: center;
		justify-content: center;
		padding: 0;
		border: 0;
		border-radius: var(--cf-radius-control);
		background: transparent;
		cursor: pointer;
		color: var(--cf-ink);
	}

	.cf-sheet-head__title { font-size: 17px; }

	.cf-sheet-head .cf-textbtn {
		justify-self: end;
		height: 44px;
		padding: 0 8px;
		font-size: var(--font-size-14);
	}

	.cf-panel__body {
		flex: 1 1 auto;
		overflow-y: auto;
	}

	.cf-panel__band { display: block; }

	.cf-group { gap: 0; }
	.cf-group__title { margin: 0; padding: 0; }

	.cf-group__toggle {
		height: 56px;
		display: flex;
		align-items: center;
		gap: 10px;
		padding: 0 16px;
		background: var(--color-bg-base);
		border-bottom: 1px solid var(--cf-divider);
		cursor: pointer;
		font-size: 15px;
		font-weight: 600;
		color: var(--cf-ink);
	}

	.cf-group__toggle .cf-group__sum,
	.cf-group__toggle .cf-chev { display: inline-block; }

	.cf-group__name { flex: 1 1 auto; }

	.cf-group__sum {
		font-size: 13px;
		font-weight: 500;
		color: var(--cf-muted);
	}

	.cf-group__sum.is-set {
		font-weight: 600;
		color: var(--cf-brand-dark);
	}

	.cf-group.is-collapsed .cf-opts { display: none; }

	.cf-group .cf-opts {
		gap: 0;
		padding: 4px 0;
		background: var(--cf-row-wash);
		border-bottom: 1px solid var(--cf-divider);
	}

	.cf-group .cf-opt,
	.cf-pop .cf-opt {
		gap: 12px;
		padding: 0 16px;
		border-radius: 0;
		font-size: 15px;
	}

	.cf-group .cf-opt { height: 44px; }
	.cf-group .cf-opt[aria-checked="true"],
	.cf-pop .cf-opt[aria-checked="true"] { background: transparent; }

	.cf-pop .cf-opt {
		height: 52px;
		gap: 14px;
		padding: 0 20px;
		border-bottom: 1px solid var(--grey-100);
		font-size: var(--font-size-16);
	}

	.cf-group .cf-box { width: 20px; height: 20px; }
	.cf-pop .cf-box { width: 22px; height: 22px; }

	.cf-pop__body {
		max-height: none;
		padding: 4px 0;
	}

	.cf-switchrow {
		width: 100%;
		min-height: 64px;
		box-sizing: border-box;
		display: flex;
		align-items: center;
		gap: 12px;
		padding: 10px 16px;
		background: var(--color-bg-base);
		border: 0;
		border-bottom: 1px solid var(--cf-divider);
		cursor: pointer;
		text-align: left;
		color: var(--cf-ink);
	}

	.cf-switchrow__text {
		flex: 1 1 auto;
		display: flex;
		flex-direction: column;
		gap: 2px;
	}

	.cf-switchrow__label { font-size: 15px; font-weight: 600; }

	.cf-switchrow__n {
		font-size: var(--font-size-12);
		color: var(--cf-muted);
		font-variant-numeric: tabular-nums;
	}

	.cf-switchrow .cf-switch__track { width: 40px; height: 24px; }
	.cf-switchrow .cf-switch__knob { width: 18px; height: 18px; }
	.cf-switchrow[aria-checked="true"] .cf-switch__knob { transform: translateX(16px); }

	.cf-panel__more {
		margin: 0;
		padding: 18px 16px 8px;
		border-bottom: 1px solid var(--cf-divider);
		font-size: var(--font-size-12);
		font-weight: 700;
		letter-spacing: 0.04em;
		text-transform: uppercase;
		color: var(--cf-muted);
	}

	.cf-panel__foot,
	.cf-pop__foot {
		flex: none;
		padding: 12px 16px 24px;
		border-top: 1px solid var(--cf-divider);
		background: var(--color-bg-base);
	}

	.cf-panel__foot .cf-btn--primary,
	.cf-pop__foot .cf-btn--primary {
		width: 100%;
		height: 48px;
		font-size: 15px;
	}
}

.catalog-link {
	border: 0;
	background: none;
	cursor: pointer;
	font-family: inherit;
	font-size: var(--font-size-14);
	font-weight: 500;
	color: var(--color-link);
	padding: 0;
	/* Same reason as .catalog-count: these wrapped to "Alle" over
	 * "ausklappen" and read as loose stacked words. */
	white-space: nowrap;
}

.catalog-link:hover { color: var(--color-link-hover); }
.catalog-link:active { opacity: 0.55; transition-duration: var(--motion-duration-press); }

/* ---------- list, aligned columns ---------- */
.catalog-band { padding-top: var(--space-5); }

.catalog-head,
.catalog-row,
.catalog-family {
	display: grid;
	grid-template-columns:
		var(--catalog-media)
		minmax(8rem, 1.05fr)
		2.9fr
		minmax(0, 0.8fr)
		7rem
		5.5rem;
	gap: var(--space-3);
	align-items: center;
}

.catalog-head {
	padding: 0 var(--space-4) var(--space-1);
	font-size: var(--font-size-12);
	font-weight: 600;
	letter-spacing: var(--letter-spacing-wide, 0.06em);
	text-transform: uppercase;
	color: var(--color-text-muted);
}

.catalog-head__specs,
.catalog-row__specs {
	display: grid;
	grid-template-columns: 1.05fr 0.85fr 0.85fr 0.7fr 0.9fr;
	gap: var(--space-3);
	align-items: center;
	min-width: 0;
}

.catalog-head__num { text-align: right; }

.catalog-list {
	display: flex;
	flex-direction: column;
	gap: var(--catalog-gap);
}

.catalog-row,
.catalog-family {
	position: relative;
	background: var(--color-bg-base);
	border: 1px solid var(--grey-100);
	/* One row, two shorter sides: a list row is about 75px tall, a card
	   is about 277px, so the rule wants different radii per mode. The
	   local carries whichever applies and the stretched focus overlay
	   reads it, so the ring can never trace a shape the row does not
	   have. Cards mode raises it below. */
	--catalog-row-radius: var(--radius-block);
	border-radius: var(--catalog-row-radius);
	padding: var(--catalog-row-pad);
	transition: border-color var(--motion-duration-fast) var(--motion-ease-standard),
		box-shadow var(--motion-duration-fast) var(--motion-ease-standard),
		background-color var(--motion-duration-fast) var(--motion-ease-standard);
}

.catalog-row:hover,
.catalog-family:hover {
	border-color: var(--color-border-hairline);
	box-shadow: 0 4px 14px color-mix(in srgb, var(--color-brand-deep) 8%, transparent);
}

.catalog-row:active,
.catalog-family:active {
	background: var(--grey-50);
	transition-duration: var(--motion-duration-press);
}

.catalog-family {
	width: 100%;
	text-align: left;
	background: var(--color-bg-elevated);
	cursor: pointer;
	font-family: inherit;
	color: inherit;
}

.catalog-family__code {
	display: flex;
	align-items: baseline;
	gap: var(--space-2);
	flex-wrap: wrap;
	font-family: var(--font-display);
	font-size: var(--font-size-18);
	font-weight: 600;
	letter-spacing: var(--letter-spacing-tight);
	color: var(--color-text-primary);
}

.catalog-family__n {
	font-family: var(--font-sans);
	font-size: var(--font-size-12);
	font-weight: 400;
	color: var(--color-text-muted);
	font-variant-numeric: tabular-nums;
}

.catalog-family__sub {
	grid-column: span 2;
	font-size: var(--font-size-14);
	color: var(--color-text-secondary);
}

.catalog-family__sub b { color: var(--color-brand-deep); font-weight: 600; }

.catalog-family__chev {
	grid-column: 6;
	justify-self: end;
	display: inline-flex;
	color: var(--color-text-muted);
}

.catalog-family__chev svg {
	transition: transform var(--motion-duration-fast) var(--motion-ease-standard);
}

.catalog-family[aria-expanded="true"] .catalog-family__chev svg { transform: rotate(90deg); }

.catalog-variants {
	display: flex;
	flex-direction: column;
	gap: var(--catalog-gap);
	position: relative;
	padding-left: var(--space-5);
	margin-top: var(--catalog-gap);
}

/* The hidden attribute must win over the author-level display declarations
 * above. Without these the whole client-side filter is inert: the script sets
 * [hidden], the UA rule that would act on it loses to our own display:grid,
 * and every row stays on screen while the counts change. */
.catalog-variants[hidden],
.catalog-row[hidden],
.catalog-family[hidden],
.catalog-list[hidden],
.catalog-head[hidden] { display: none; }

.catalog-variants::before {
	content: "";
	position: absolute;
	left: var(--space-2);
	top: 2px;
	bottom: 2px;
	width: 2px;
	border-radius: 2px;
	background: var(--color-brand-tint-mint);
}

.catalog-row__media {
	width: var(--catalog-media);
	height: 3.25rem;
	/* CONCENTRIC with the row, not its own tenth. A box inset by p inside
	   a parent of radius R keeps its corners parallel to the parent's at
	   R - p; giving this thumbnail an independent radius made it an oval
	   inside a barely rounded row (a card-band 20px on a 52px tall
	   thumbnail is 38 percent of its shorter side). The floor keeps the
	   corner from going fully square when the row is nearly square. */
	border-radius: max(2px, calc(var(--catalog-row-radius) - var(--space-2)));
	background: var(--color-bg-elevated);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.catalog-family .catalog-row__media { background: var(--color-bg-base); }

.catalog-row__img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	padding: var(--space-1);
}

.catalog-row__id { min-width: 0; }

.catalog-row__link {
	display: block;
	font-family: var(--font-display);
	font-size: var(--font-size-18);
	font-weight: 600;
	letter-spacing: var(--letter-spacing-tight);
	color: var(--color-text-primary);
	text-decoration: none;
	overflow-wrap: anywhere;
}

/* The title is the row's link, stretched across the whole row so the
   large target works, while the action buttons stay above it. */
.catalog-row__link::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
	/* Reads the row's own radius (set per mode on .catalog-row), so the
	   keyboard focus ring always traces the shape the row actually has. */
	border-radius: var(--catalog-row-radius);
}

.catalog-row__link:hover { color: var(--color-link); }

.catalog-row__link:focus-visible { outline: none; }

.catalog-row__link:focus-visible::after {
	outline: 2px solid var(--color-accent);
	outline-offset: 2px;
}

.catalog-row__sku {
	display: block;
	font-size: var(--font-size-12);
	color: var(--color-text-muted);
	font-variant-numeric: tabular-nums;
}

.catalog-cell {
	font-size: var(--font-size-14);
	color: var(--color-text-secondary);
	min-width: 0;
}

.catalog-row__specs--prose { display: block; }

.catalog-cell--prose {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.catalog-cell--vary { color: var(--color-text-primary); font-weight: 500; }

.catalog-cell__mark {
	display: inline-block;
	background: color-mix(in srgb, var(--color-brand-tint-mint) 55%, transparent);
	border-radius: var(--radius-md);
	padding: 2px var(--space-2);
}

.catalog-row__marks {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-1);
	min-width: 0;
}

.catalog-badge[title] { cursor: help; }

.catalog-badge {
	/* Above the row's stretched product link, or hover never reaches the
	 * badge and its title tooltip can never appear. */
	position: relative;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	border-radius: var(--radius-chip);
	padding: 2px var(--space-2);
	font-size: var(--font-size-12);
	font-weight: 600;
	white-space: nowrap;
}

.catalog-badge--esd {
	color: var(--color-accent);
	border: 1px solid color-mix(in srgb, var(--color-accent) 35%, transparent);
}

.catalog-badge--ip {
	color: var(--color-text-secondary);
	background: var(--grey-50);
}

/* The ground is an editor-chosen term colour (inc/product-certifications.php),
 * so the inverse ink can only be guaranteed against OUR fallback: ink on
 * --grey-500 was 3.62:1, under AA at this size, where --color-text-primary
 * is 12.6:1. An editor who picks a pale colour still owes the badge a
 * readable one; the default no longer starts out failing. */
.catalog-badge--cert {
	color: var(--color-text-inverse);
	background: var(--catalog-cert, var(--color-text-primary));
}

.catalog-row__price {
	text-align: right;
	font-size: var(--font-size-16);
	font-weight: 500;
	color: var(--color-text-primary);
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.catalog-row__price del { color: var(--color-text-muted); opacity: 0.7; margin-right: var(--space-2); }
.catalog-row__price ins { background: transparent; text-decoration: none; font-weight: 500; }
.catalog-poa { font-size: var(--font-size-14); font-weight: 400; color: var(--color-text-secondary); }

.catalog-stock {
	display: inline-block;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	margin-right: var(--space-1);
	vertical-align: 1px;
}

.catalog-stock--ok { background: var(--color-success); }
.catalog-stock--wait { background: var(--grey-500); }

.catalog-row__actions {
	display: flex;
	gap: var(--space-2);
	justify-content: flex-end;
	position: relative;
	z-index: 1;
}

.catalog-icon {
	width: 2.125rem;
	height: 2.125rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--color-border-hairline);
	border-radius: 50%;
	background: var(--color-bg-base);
	color: var(--color-text-secondary);
	cursor: pointer;
	text-decoration: none;
	transition: background-color var(--motion-duration-fast) var(--motion-ease-standard),
		color var(--motion-duration-fast) var(--motion-ease-standard),
		border-color var(--motion-duration-fast) var(--motion-ease-standard),
		transform var(--motion-duration-fast) var(--motion-ease-standard);
}

.catalog-icon svg { width: 16px; height: 16px; }
.catalog-icon:hover { background: var(--grey-50); color: var(--color-text-primary); }
.catalog-icon:active { transform: scale(0.92); background: var(--grey-100); transition-duration: var(--motion-duration-press); }

.catalog-icon--cart {
	background: var(--color-cta);
	border-color: var(--color-cta);
	color: var(--color-cta-ink);
}

.catalog-icon--cart:hover { background: var(--color-cta-hover); color: var(--color-cta-ink); }

.catalog-icon--merk[aria-pressed="true"] {
	color: var(--color-accent);
	border-color: var(--color-accent);
	background: color-mix(in srgb, var(--color-accent) 8%, transparent);
}

.catalog-icon--merk[aria-pressed="true"] svg { fill: currentColor; }

/* Count bubble on a cart button: how many of THIS product the cart holds.
   Mirrors the header cart bubble; WooCommerce's AJAX handler updates the
   header via fragments, our script updates this one on added_to_cart. */
.catalog-icon--cart { position: relative; }

.catalog-icon__count {
	position: absolute;
	top: -0.375rem;
	right: -0.375rem;
	min-width: 1.05rem;
	height: 1.05rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: var(--radius-chip);
	background: var(--color-brand-deep);
	color: var(--color-text-inverse);
	font-size: var(--font-size-12);
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	line-height: 1;
	padding: 0 0.2rem;
	border: 2px solid var(--color-bg-base);
	pointer-events: none;
}

.catalog-icon__count[hidden] { display: none; }

/* WooCommerce's AJAX handler appends a "view cart" link after the button;
   the row has no room for it and the header bubble already answers it. */
.catalog .added_to_cart,
.catalog-sheet .added_to_cart { display: none; }

.catalog-icon--mail { color: var(--color-accent); border-color: color-mix(in srgb, var(--color-accent) 40%, transparent); }
.catalog-icon--mail:hover { background: color-mix(in srgb, var(--color-accent) 8%, transparent); color: var(--color-accent-hover, var(--color-link-hover)); }

.catalog-empty {
	background: var(--color-bg-elevated);
	border-radius: var(--radius-lg);
	padding: var(--space-6);
	font-size: var(--font-size-16);
	color: var(--color-text-secondary);
}

/* ---------- card view ----------
 * Same DOM, different clothes: the seg toggles one class on the root and the
 * grid rows re-lay themselves as cards. Families flatten (the script hides
 * the family headers and shows every surviving variant), so the card wall is
 * one flat, comparable set. */
.catalog--cards .catalog-head { display: none; }

.catalog--cards .catalog-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
	gap: var(--space-4);
}

.catalog--cards .catalog-list[hidden] { display: none; }
.catalog--cards .catalog-variants { display: contents; }
.catalog--cards .catalog-variants[hidden] { display: none; }
.catalog--cards .catalog-variants::before { content: none; }

.catalog--cards .catalog-row {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: var(--space-2);
	padding: var(--space-3);
	/* A card is ~277px on its shorter side, a tenth of which is the
	   panel band; the list row above is ~75px and stays on block. */
	--catalog-row-radius: var(--radius-panel);
}

.catalog--cards .catalog-row[hidden] { display: none; }

.catalog--cards .catalog-row__media {
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	/* Same concentric relationship, against the card's larger radius and
	   its own --space-3 inset. */
	border-radius: max(2px, calc(var(--catalog-row-radius) - var(--space-3)));
}

.catalog--cards .catalog-row__img { max-height: 88%; padding: var(--space-2); }

.catalog--cards .catalog-row__specs {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-1) var(--space-3);
}

.catalog--cards .catalog-cell { font-size: var(--font-size-12); }
.catalog--cards .catalog-row__marks { display: flex; }

.catalog--cards .catalog-row__price {
	text-align: left;
	margin-top: auto;
	padding-right: 5.5rem;
}

.catalog--cards .catalog-row__actions {
	position: absolute;
	right: var(--space-3);
	bottom: var(--space-3);
}

/* ---------- preview sheet ---------- */
.catalog-scrim {
	position: fixed;
	inset: 0;
	z-index: 1100;
	background: color-mix(in srgb, var(--color-brand-ink) 40%, transparent);
}

.catalog-scrim[hidden] { display: none; }

.catalog-sheet {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	z-index: 1200;
	width: min(30rem, 94vw);
	display: flex;
	flex-direction: column;
	background: var(--color-bg-base);
	box-shadow: -18px 0 48px color-mix(in srgb, var(--color-brand-deep) 16%, transparent);
	font-family: var(--font-sans);
	color: var(--color-text-primary);
}

.catalog-sheet[hidden] { display: none; }

.catalog-sheet__head {
	display: flex;
	align-items: flex-start;
	gap: var(--space-4);
	padding: var(--space-5) var(--space-5) 0;
}

.catalog-sheet__model {
	margin: 0;
	font-family: var(--font-display);
	font-size: var(--font-size-21);
	font-weight: 600;
	letter-spacing: var(--letter-spacing-tight);
	line-height: 1.15;
	overflow-wrap: anywhere;
}

.catalog-sheet__close { margin-left: auto; flex: none; }

.catalog-sheet__body {
	padding: 0 var(--space-5) var(--space-6);
	overflow-y: auto;
}

.catalog-sheet__sku {
	font-size: var(--font-size-12);
	color: var(--color-text-muted);
	font-variant-numeric: tabular-nums;
	margin: var(--space-1) 0 0;
}

.catalog-sheet__stage {
	margin: var(--space-4) 0;
	border-radius: var(--radius-panel);
	background: var(--color-bg-elevated);
	aspect-ratio: 16 / 10;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.catalog-sheet__stage img {
	max-width: 86%;
	max-height: 90%;
	width: auto;
	height: auto;
	object-fit: contain;
}

.catalog-sheet__buyline {
	display: flex;
	align-items: baseline;
	gap: var(--space-4);
	flex-wrap: wrap;
}

.catalog-sheet__price {
	font-family: var(--font-display);
	font-size: var(--font-size-18);
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

.catalog-sheet__price del { color: var(--color-text-muted); opacity: 0.7; margin-right: var(--space-2); }
.catalog-sheet__price ins { background: transparent; text-decoration: none; }

.catalog-sheet__stock { font-size: var(--font-size-12); color: var(--color-text-secondary); }

.catalog-sheet__ctas {
	display: flex;
	gap: var(--space-2);
	flex-wrap: wrap;
	margin-top: var(--space-4);
}

.catalog-btn {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2);
	border: 0;
	border-radius: var(--radius-control);
	cursor: pointer;
	padding: var(--space-2) var(--space-5);
	font-family: inherit;
	font-size: var(--font-size-14);
	font-weight: 500;
	text-decoration: none;
	transition: background-color var(--motion-duration-fast) var(--motion-ease-standard);
}

/* The sheet's cart CTA wears the same count bubble as the row buttons. */
.catalog-btn { position: relative; }

.catalog-btn--cta { background: var(--color-cta); color: var(--color-cta-ink); }
.catalog-btn--cta:hover { background: var(--color-cta-hover); color: var(--color-cta-ink); }
.catalog-btn--ghost { border: 1px solid var(--color-border-hairline); background: var(--color-bg-base); color: var(--color-text-primary); }
.catalog-btn--ghost:hover { background: var(--grey-50); color: var(--color-text-primary); }
.catalog-btn:active { opacity: 0.8; transition-duration: var(--motion-duration-press); }

.catalog-sheet__excerpt {
	font-size: var(--font-size-14);
	color: var(--color-text-secondary);
	line-height: 1.55;
	margin: var(--space-4) 0 0;
}

.catalog-sheet__body h3 {
	margin: var(--space-6) 0 var(--space-2);
	font-size: var(--font-size-12);
	font-weight: 600;
	letter-spacing: var(--letter-spacing-wide, 0.06em);
	text-transform: uppercase;
	color: var(--color-text-muted);
}

.catalog-sheet__specs { width: 100%; border-collapse: collapse; font-size: var(--font-size-14); }
.catalog-sheet__specs td { padding: var(--space-2) 0; border-bottom: 1px solid var(--grey-100); vertical-align: top; }
.catalog-sheet__specs td:first-child { color: var(--color-text-muted); width: 46%; padding-right: var(--space-4); }
.catalog-sheet__specs td:last-child { font-variant-numeric: tabular-nums; }

.catalog-sheet__dl {
	display: flex;
	align-items: center;
	gap: var(--space-2);
	width: 100%;
	padding: var(--space-2) 0;
	border-bottom: 1px solid var(--grey-100);
	font-size: var(--font-size-14);
	font-weight: 500;
	color: var(--color-text-primary);
	text-decoration: none;
}

.catalog-sheet__dl:hover { color: var(--color-link); }

.catalog-sheet__dl .tag {
	font-size: var(--font-size-12);
	font-weight: 600;
	color: var(--color-text-secondary);
	background: var(--grey-50);
	border-radius: var(--radius-sm, 4px);
	padding: 1px 7px;
	flex: none;
}

.catalog-sheet__dl .size { margin-left: auto; font-size: var(--font-size-12); color: var(--color-text-muted); white-space: nowrap; }

.catalog-sheet__rel {
	display: flex;
	align-items: center;
	gap: var(--space-3);
	width: 100%;
	text-align: left;
	border: 0;
	background: none;
	cursor: pointer;
	padding: var(--space-2) 0;
	border-bottom: 1px solid var(--grey-100);
	font-family: inherit;
	font-size: var(--font-size-14);
	color: var(--color-text-primary);
	transition: background-color var(--motion-duration-fast) var(--motion-ease-standard);
}

.catalog-sheet__rel:hover { background: var(--grey-50); }
.catalog-sheet__rel .nm { font-weight: 500; }
.catalog-sheet__rel .p { margin-left: auto; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- Merkliste panel ---------- */
.catalog-merk {
	position: fixed;
	top: calc(var(--nav-height, 48px) + 8px);
	right: max(var(--space-5), calc((100vw - var(--layout-content-max-width)) / 2 + var(--space-5)));
	width: min(24rem, calc(100vw - 2 * var(--space-5)));
	z-index: 70;
	background: var(--color-bg-translucent-strong);
	-webkit-backdrop-filter: saturate(180%) blur(20px);
	backdrop-filter: saturate(180%) blur(20px);
	border: 1px solid var(--color-border-hairline-translucent);
	border-radius: var(--radius-card);
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
	padding: var(--space-4);
}

.catalog-merk[hidden] { display: none; }

.catalog-merk__title {
	margin: 0 0 var(--space-3);
	font-family: var(--font-display);
	font-size: var(--font-size-18);
	font-weight: 600;
	letter-spacing: var(--letter-spacing-tight);
}

.catalog-merk__item {
	display: flex;
	align-items: center;
	gap: var(--space-2);
	padding: var(--space-2) 0;
	border-bottom: 1px solid var(--grey-100);
	font-size: var(--font-size-14);
}

.catalog-merk__item a { color: var(--color-text-primary); text-decoration: none; font-weight: 500; }
.catalog-merk__item a:hover { color: var(--color-link); }
.catalog-merk__price { margin-left: auto; font-variant-numeric: tabular-nums; white-space: nowrap; }

.catalog-merk__rm {
	border: 0;
	background: none;
	cursor: pointer;
	color: var(--color-text-muted);
	font-size: var(--font-size-18);
	line-height: 1;
	padding: var(--space-1) var(--space-2);
	border-radius: var(--radius-sm);
}

.catalog-merk__rm:hover { color: var(--color-danger); background: var(--grey-50); }
.catalog-merk__rm:active { background: var(--grey-100); transition-duration: var(--motion-duration-press); }

.catalog-merk__empty { margin: 0; font-size: var(--font-size-14); color: var(--color-text-secondary); }
.catalog-merk__foot { display: flex; gap: var(--space-2); margin-top: var(--space-4); }
.catalog-merk__note { margin: var(--space-3) 0 0; font-size: var(--font-size-12); color: var(--color-text-muted); }

.catalog-btn {
	display: inline-flex;
	align-items: center;
	border: 0;
	border-radius: var(--radius-control);
	cursor: pointer;
	padding: var(--space-2) var(--space-5);
	font-family: var(--font-sans);
	font-size: var(--font-size-14);
	font-weight: 500;
	transition: background-color var(--motion-duration-fast) var(--motion-ease-standard);
}

.catalog-btn--cta { background: var(--color-cta); color: var(--color-cta-ink); }
.catalog-btn--cta:hover { background: var(--color-cta-hover); }
.catalog-btn--ghost { border: 1px solid var(--color-border-hairline); background: var(--color-bg-base); color: var(--color-text-primary); }
.catalog-btn--ghost:hover { background: var(--grey-50); }
.catalog-btn:active { opacity: 0.8; transition-duration: var(--motion-duration-press); }

/* Toast styles live in cart-toast.css, a declared dependency,
   shared with the single product page. */

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
	.catalog-head,
	.catalog-row,
	.catalog-family {
		grid-template-columns: 56px minmax(7.5rem, 1fr) 2.9fr 6.5rem 5rem;
	}
	.catalog-row__marks,
	.catalog-head > .col-schutz { display: none; }
	.catalog-family__chev { grid-column: 5; }
	.catalog-row__media { width: 56px; }
}

@media (max-width: 940px) {
	.catalog-head { display: none; }

	.catalog-row,
	.catalog-family {
		grid-template-columns: 56px 1fr auto;
		grid-template-rows: auto auto;
		row-gap: var(--space-1);
		padding: var(--space-3) var(--space-4);
	}

	.catalog-row__media { grid-row: 1 / 3; }
	.catalog-row__id,
	.catalog-family__code { grid-column: 2; }
	.catalog-row__price { grid-column: 3; grid-row: 1; }
	.catalog-row__actions { grid-column: 3; grid-row: 2; }

	.catalog-row__specs {
		grid-column: 2;
		grid-row: 2;
		display: flex;
		flex-wrap: wrap;
		gap: var(--space-1) var(--space-3);
	}

	.catalog-family__sub { grid-column: 2; grid-row: 2; }
	.catalog-family__chev { grid-column: 3; grid-row: 1 / 3; align-self: center; }

	.catalog-icon { width: 2.5rem; height: 2.5rem; }
	.catalog-merk__rm { min-width: 2.5rem; min-height: 2.5rem; display: inline-flex; align-items: center; justify-content: center; }
}

@media (max-width: 640px) {
	.catalog { --catalog-pad-x: var(--space-4); }
	.catalog-variants { padding-left: var(--space-4); }

	/* Visually hidden, NOT display: none. This label is the button's
	   only text node (the icon is aria-hidden and there is no
	   aria-label), so hiding it outright left the Merkliste button
	   announcing itself as "0", its count badge. */
	.catalog-tool__label {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
	}
}

/* ---------- motion, transparency and contrast fallbacks ---------- */
@media (prefers-reduced-motion: reduce) {
	.catalog-row,
	.catalog-family,
	.catalog-icon,
	.catalog-tool {
		transition: background-color 120ms var(--motion-ease-standard),
			border-color 120ms var(--motion-ease-standard),
			color 120ms var(--motion-ease-standard);
	}

	.catalog-icon:active { transform: none; }
	.catalog-family__chev svg { transition: none; }
	.cf-switch__knob,
	.cf-chev { transition: none; }
}

@media (prefers-reduced-transparency: reduce) {
	.catalog-merk {
		background: var(--color-bg-base);
		-webkit-backdrop-filter: none;
		backdrop-filter: none;
	}
}

@media (prefers-contrast: more) {
	.catalog-merk {
		background: var(--color-bg-base);
		-webkit-backdrop-filter: none;
		backdrop-filter: none;
	}

	.cf-slot,
	.cf-switch,
	.cf-all,
	.cf-chip,
	.cf-search { border-color: var(--cf-ink); }

	.catalog-row,
	.catalog-family { border-color: var(--color-border-hairline); }
}

@media print {
	.catalog-bandcards,
	.cf,
	.cf-compact,
	.cf-pop,
	.catalog-listtools,
	.catalog-row__actions,
	.catalog-merk,
	.catalog-toast { display: none !important; }

	.catalog-band[hidden] { display: block !important; }
	.catalog-variants[hidden] { display: flex !important; }
	.catalog-row[hidden],
	.catalog-family[hidden] { display: grid !important; }
	.catalog-list[hidden] { display: flex !important; }
	.catalog-bandcards { display: none !important; }
}
