/* Scoped archive controls. Presentation follows the --wf-* contract in docs/THEMING.md. */
.wf-catalog .wf-facet {
	min-width: 0;
	margin: 0;
	padding: 18px;
	border: 1px solid var(--wf-border, var(--color-neutral-400, #e4e4e7));
	border-radius: var(--wf-radius-panel, 16px);
	background: var(--wf-surface, var(--color-white, #fff));
	color: var(--wf-text, var(--color-neutral-900, #27272a));
}
.wf-catalog .wf-facet legend {
	float: left;
	width: 100%;
	margin: 0 0 12px;
	padding: 0;
	font-family: var(--wf-heading-font, var(--font-heading, sans-serif));
	font-size: 14px;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: .035em;
	text-transform: uppercase;
}
.wf-catalog .wf-facet__choices { clear: both; display: grid; gap: 2px; }
.wf-catalog .wf-choice {
	display: flex;
	align-items: center;
	gap: 9px;
	min-height: 34px;
	margin: 0;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.4;
	cursor: pointer;
}
.wf-catalog .wf-choice input {
	appearance: auto;
	position: static;
	width: 16px;
	height: 16px;
	flex: 0 0 16px;
	margin: 0;
	opacity: 1;
	accent-color: var(--wf-accent, var(--color-primary-500, #3f3f46));
	cursor: inherit;
}
.wf-catalog .wf-choice input:focus-visible { outline: 2px solid var(--wf-accent, var(--color-primary-500, #3f3f46)); outline-offset: 3px; }
.wf-catalog .wf-choice__label { overflow-wrap: anywhere; }
.wf-catalog .wf-choice__count { margin-left: auto; padding-left: 6px; color: var(--wf-muted, var(--color-neutral-800, #52525b)); font-variant-numeric: tabular-nums; }
.wf-catalog .wf-choice:has(input:checked) .wf-choice__label { color: var(--wf-accent, var(--color-primary-500, #3f3f46)); font-weight: 600; }
.wf-catalog .wf-choice:has(input:disabled) { opacity: .5; cursor: not-allowed; }
.wf-catalog .wf-facet__selected { display: flex; flex-wrap: wrap; gap: 6px; }
.wf-catalog .wf-facet__selected:not(:empty) { margin-top: 12px; }
.wf-catalog .wf-facet__chip {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	max-width: 100%;
	padding: 5px 9px;
	border-radius: var(--wf-radius-pill, 20px);
	background: var(--wf-tint, var(--color-primary-100, #f4f4f5));
	color: var(--wf-accent, var(--color-primary-500, #3f3f46));
	font-size: 12px;
	line-height: 1.4;
	text-decoration: none;
	overflow-wrap: anywhere;
}
.wf-catalog .wf-facet__chip::after { content: '×'; font-size: 17px; line-height: 1; }
.wf-catalog .wf-facet__search { display: flex; gap: 6px; margin-top: 12px; }
.wf-catalog .wf-facet__search input[type=search] {
	min-width: 0;
	width: 100%;
	height: 36px;
	padding: 6px 9px;
	border: 1px solid var(--wf-border, var(--color-neutral-400, #e4e4e7));
	border-radius: var(--wf-radius-field, 8px);
	background: var(--wf-surface, var(--color-white, #fff));
	font: inherit;
	font-size: 13px;
	color: inherit;
}
.wf-catalog .wf-facet__search button {
	flex: 0 0 auto;
	max-width: 50%;
	padding: 6px 9px;
	border: 1px solid var(--wf-border, var(--color-neutral-400, #e4e4e7));
	border-radius: var(--wf-radius-field, 8px);
	background: var(--wf-tint, var(--color-primary-100, #f4f4f5));
	color: var(--wf-accent, var(--color-primary-500, #3f3f46));
	font: inherit;
	font-size: 12px;
	cursor: pointer;
}
.wf-catalog [data-wf-values-status], .wf-catalog [data-wf-values-error] { margin: 10px 0 0; font-size: 13px; line-height: 1.5; }
.wf-catalog [data-wf-values-status]:empty { display: none; }
.wf-catalog [data-wf-values-error] { color: var(--wf-error, var(--color-ds-critical, #b91c1c)); }
.wf-catalog [data-wf-values-pages] { display: flex; justify-content: space-between; gap: 10px; }
.wf-catalog [data-wf-values-page], .wf-catalog [data-wf-values-fallback] { margin-top: 10px; font-size: 13px; color: var(--wf-accent, var(--color-primary-500, #3f3f46)); text-underline-offset: 3px; }
.wf-catalog [data-wf-values-fallback] { display: inline-block; }
.wf-catalog .wf-facet [hidden] { display: none !important; }
@media (max-width: 990px) {
	.wf-catalog .wf-choice { min-height: 44px; }
	.wf-catalog .wf-facet__search input[type=search] { font-size: 16px; height: 44px; }
	.wf-catalog .wf-facet__search button { min-height: 44px; }
}

.wf-catalog .wf-facet--chips .wf-facet__choices { display:flex; flex-wrap:wrap; gap:8px; }
.wf-catalog .wf-facet--chips .wf-choice { position:relative; padding:7px 12px; border:1px solid transparent; border-radius:var(--wf-radius-field, 9px); background:var(--wf-tint, var(--color-primary-100, #f4f4f5)); }
.wf-catalog .wf-facet--chips .wf-choice input { position:absolute; width:1px; height:1px; opacity:0; }
.wf-catalog .wf-facet--chips .wf-choice:has(input:focus-visible) { outline:2px solid var(--wf-accent, var(--color-primary-500, #3f3f46)); outline-offset:2px; }
.wf-catalog .wf-facet--chips .wf-choice:has(input:checked) { border-color:var(--wf-accent, var(--color-primary-500, #3f3f46)); }
.wf-catalog .wf-facet--chips .wf-choice__count { padding:0; font-size:12px; }

.wf-catalog select[data-wf-choice] {
	width: 100%;
	min-width: 0;
	min-height: 44px;
	padding: 8px;
	border: 1px solid var(--wf-border, var(--color-neutral-400, #e4e4e7));
	border-radius: var(--wf-radius-field, 8px);
	background: var(--wf-surface, var(--color-white, #fff));
	color: var(--wf-text, var(--color-neutral-900, #27272a));
	font: inherit;
}
.wf-catalog select[data-wf-choice]:focus-visible { outline: 2px solid var(--wf-accent, var(--color-primary-500, #3f3f46)); outline-offset: 2px; }
.wf-catalog .wf-choice__swatch { width: 28px; height: 28px; flex: 0 0 28px; border: 1px solid var(--wf-border, var(--color-neutral-400, #e4e4e7)); border-radius: 5px; object-fit: cover; }
.wf-catalog .wf-facet--chips .wf-choice:has(input:checked)::after { content: '✓'; font-weight: 700; }
