:where(.apf-host, .apf-toolbar, .apf-drawer) {
	--apf-ink: #22201d;
	--apf-muted: #655e54;
	--apf-line: #e2dcd3;
	--apf-wash: #f7f4ef;
	--apf-paper: #fffdfa;
	--apf-focus: #725136;
	color: var(--apf-ink);
}

.apf-host {
	box-sizing: border-box;
	padding: clamp(12px, 1.25vw, 18px);
	border: 1px solid var(--apf-line);
	border-radius: 16px;
	background: var(--apf-paper);
}

.apf-host .widget { margin-bottom: 0; }
.apf-host .widget[hidden] { display: none !important; }
.apf-host .apf-title, .apf-drawer .apf-title {
	margin: 0;
	color: var(--apf-ink);
	font-size: 1.22rem;
	font-weight: 650;
	line-height: 1.25;
	letter-spacing: -.02em;
}
.apf-host > .apf-title { padding: 0 0 13px; }
.apf-host .wpfMainWrapper { margin: 0; padding: 0; }
.apf-host .wpfMainWrapper .wpfFilterWrapper {
	box-sizing: border-box;
	margin: 0;
	padding: 10px 0;
	border-top: 1px solid var(--apf-line);
}
.apf-host .wpfMainWrapper .wpfFilterTitle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin: 0;
	color: var(--apf-ink);
	font-size: .94rem;
	font-weight: 650;
	line-height: 1.35;
}
.apf-host .wpfFilterTitle .wfpClickable { flex: 1; padding: 5px 0; }
.apf-host .wpfFilterTitle .wpfTitleToggle { font-size: .7rem; color: var(--apf-muted); }
.apf-host .wpfFilterContent { margin-top: 5px; }
.apf-host .wpfMainWrapper .wpfLiLabel { color: var(--apf-ink); font-size: .85rem; line-height: 1.35; }
.apf-host .wpfMainWrapper .wpfLiLabel:hover { color: var(--apf-focus); }
.apf-host .wpfMainWrapper li { margin-block: 0; }
.apf-host .wpfMainWrapper .wpfFilterVerScroll { scrollbar-width: thin; scrollbar-color: #b8a898 transparent; }

.apf-host .wpfMainWrapper [data-taxonomy="product_cat"] ul.wpfFilterVerScroll,
.apf-host .wpfMainWrapper [data-taxonomy="pa_color"] ul.wpfFilterVerScroll,
.apf-host .wpfMainWrapper :is([data-taxonomy="product_cat"], [data-taxonomy="pa_color"]) .wpfCheckboxHier {
	max-height: none !important;
	overflow: visible !important;
}
.apf-host .wpfMainWrapper li[data-apf-trimmed] { display: none !important; }
.apf-host [data-taxonomy="product_cat"] .wpfLiLabel { min-height: 24px; padding-block: 1px; }
.apf-host .wpfMainWrapper .apf-more {
	display: inline-flex;
	align-items: center;
	min-height: 32px;
	margin: 5px 0 0;
	padding: 4px 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: var(--apf-ink);
	font: inherit;
	font-size: .83rem;
	font-weight: 650;
	text-transform: none;
	letter-spacing: normal;
	text-decoration: underline;
	text-underline-offset: 3px;
}
.apf-host .apf-more::after {
	content: '';
	width: 6px;
	height: 6px;
	margin: 0 2px 3px 8px;
	border-right: 1px solid currentColor;
	border-bottom: 1px solid currentColor;
	transform: rotate(45deg);
}
.apf-host .apf-more[aria-expanded="true"]::after { margin-bottom: -3px; transform: rotate(225deg); }

.apf-host .wpfMainWrapper [data-taxonomy="pa_talla"] ul.wpfFilterVerScroll {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(42px, 1fr));
	gap: 6px;
	max-height: none !important;
}
.apf-host [data-taxonomy="pa_talla"] .wpfLiLabel {
	position: relative;
	display: grid;
	place-items: center;
	min-height: 42px;
	margin: 0;
	padding: 4px;
	border: 1px solid var(--apf-line);
	border-radius: 8px;
	text-align: center;
}
.apf-host [data-taxonomy="pa_talla"] .wpfLiLabel .wpfDisplay { display: block; padding: 0; }
.apf-host [data-taxonomy="pa_talla"] .wpfCheckbox {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
}
.apf-host [data-taxonomy="pa_talla"] .wpfLiLabel:hover { border-color: var(--apf-focus); }
.apf-host [data-taxonomy="pa_talla"] .wpfLiLabel:has(input:checked) {
	border-color: var(--apf-ink);
	background: var(--apf-ink);
	color: #fff;
}
.apf-host [data-taxonomy="pa_talla"] .wpfLiLabel:has(input:disabled) { opacity: .45; cursor: not-allowed; }
.apf-host [data-taxonomy="pa_talla"] .wpfLiLabel:focus-within { outline: 2px solid var(--apf-focus); outline-offset: 2px; }

.apf-host .wpfMainWrapper [data-taxonomy="pa_color"] ul.wpfFilterVerScroll {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 88px), 1fr));
	gap: 3px 5px;
	max-height: none !important;
}
.apf-host [data-taxonomy="pa_color"] .wpfLiLabel {
	box-sizing: border-box;
	display: flex;
	align-items: center;
	gap: 6px;
	min-height: 29px;
	margin: 0;
	padding: 3px 5px;
	border: 1px solid transparent;
	border-radius: 7px;
}
.apf-host [data-taxonomy="pa_color"] .wpfCheckbox {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
}
.apf-host [data-taxonomy="pa_color"] .wpfLiLabel::before {
	content: '';
	flex: 0 0 16px;
	height: 16px;
	border: 1px solid #22201d55;
	border-radius: 50%;
	background: var(--apf-swatch, #ece7de);
}
.apf-host [data-taxonomy="pa_color"] .wpfDisplay { padding: 0; overflow-wrap: anywhere; }
.apf-host [data-taxonomy="pa_color"] .wpfLiLabel:has(input:checked) {
	border-color: var(--apf-ink);
	background: var(--apf-wash);
	font-weight: 700;
}
.apf-host [data-taxonomy="pa_color"] .wpfLiLabel:focus-within { outline: 2px solid var(--apf-focus); outline-offset: 1px; }
.apf-host [data-term-slug="amarillo"] { --apf-swatch: #ebc73e; }
.apf-host [data-term-slug="azul"] { --apf-swatch: #345c8d; }
.apf-host [data-term-slug="beige"] { --apf-swatch: #d8c3a6; }
.apf-host [data-term-slug="blanco"] { --apf-swatch: #fff; }
.apf-host [data-term-slug="bronce"] { --apf-swatch: #ab7351; }
.apf-host [data-term-slug="gris"] { --apf-swatch: #80838a; }
.apf-host [data-term-slug="marron"] { --apf-swatch: #694632; }
.apf-host [data-term-slug="morado"] { --apf-swatch: #774c86; }
.apf-host [data-term-slug="multi"] { --apf-swatch: conic-gradient(#e17872,#edcb58,#5d9773,#648bac,#e17872); }
.apf-host [data-term-slug="naranja"] { --apf-swatch: #dd7938; }
.apf-host [data-term-slug="negro"] { --apf-swatch: #252422; }
.apf-host [data-term-slug="oro"] { --apf-swatch: #caaa53; }
.apf-host [data-term-slug="plata"] { --apf-swatch: #b8bec5; }
.apf-host [data-term-slug="rojo"] { --apf-swatch: #b94340; }
.apf-host [data-term-slug="rosa"] { --apf-swatch: #e0a3ad; }
.apf-host [data-term-slug="verde"] { --apf-swatch: #52704c; }

.apf-host .wpfPriceFilterRange.ui-slider {
	height: 5px;
	margin: 14px 9px 18px;
	border: 0;
	border-radius: 20px;
	background: var(--apf-line);
}
.apf-host .wpfPriceFilterRange .ui-slider-range { background: var(--apf-ink); }
.apf-host .wpfPriceFilterRange .ui-slider-handle {
	top: 50%;
	width: 18px;
	height: 18px;
	margin-top: 0;
	margin-left: -9px;
	transform: translateY(-50%);
	border: 2px solid var(--apf-ink);
	border-radius: 50%;
	background: var(--apf-paper);
	cursor: ew-resize;
}
.apf-host .wpfPriceInputs { color: var(--apf-muted); }
.apf-host .wpfMainWrapper .wpfClearButton,
.apf-toolbar .apf-open, .apf-toolbar .apf-chip, .apf-drawer .apf-close, .apf-drawer .apf-results {
	border: 1px solid var(--apf-line);
	border-radius: 8px;
	background: var(--apf-paper);
	color: var(--apf-ink);
	font: inherit;
	line-height: 1.25;
	text-transform: none;
	box-shadow: none;
}
.apf-host .wpfMainWrapper .wpfClearButton {
	width: 100%;
	margin: 2px 0 0;
	padding: 11px 8px;
	font-size: .85rem;
}
.apf-host .wpfMainWrapper .wpfClearButton:hover, .apf-toolbar button:hover, .apf-drawer .apf-close:hover {
	border-color: var(--apf-focus);
	background: var(--apf-wash);
	color: var(--apf-ink);
}
.apf-host :focus-visible, .apf-toolbar :focus-visible, .apf-drawer :focus-visible {
	outline: 2px solid var(--apf-focus);
	outline-offset: 2px;
}

.apf-toolbar:has(.apf-chips[hidden]) { display: none; }
.apf-toolbar { margin-bottom: 14px; }
.apf-toolbar .apf-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.apf-toolbar .apf-chips[hidden], .apf-toolbar .apf-count[hidden], .apf-toolbar .apf-open { display: none; }
.apf-toolbar .apf-chip {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	min-height: 36px;
	padding: 5px 11px;
	border-radius: 100px;
	background: var(--apf-wash);
	font-size: .85rem;
}
.apf-chip-cross { font-size: 1.05rem; }
.apf-open .apf-count { min-width: 23px; padding: 3px; border-radius: 20px; background: var(--apf-ink); color: #fff; font-size: .74rem; text-align: center; }
.apf-icon { position: relative; width: 17px; height: 11px; border-block: 2px solid currentColor; }
.apf-icon::before, .apf-icon::after { content: ''; position: absolute; width: 3px; height: 5px; background: currentColor; }
.apf-icon::before { top: -3px; left: 4px; }
.apf-icon::after { bottom: -3px; right: 4px; }

.apf-drawer:not([open]) { display: none; }
.apf-drawer[open] {
	box-sizing: border-box;
	position: fixed;
	inset: 0 0 0 auto;
	display: grid;
	grid-template-rows: auto minmax(0, 1fr) auto;
	width: min(100%, 450px);
	max-width: 100%;
	height: 100%;
	height: 100dvh;
	max-height: 100%;
	margin: 0;
	padding: 0;
	border: none;
	background: var(--apf-paper);
}
.apf-drawer::backdrop { background: #22201d88; }
.apf-drawer-header, .apf-drawer-footer { padding: 13px clamp(16px, 5vw, 23px); }
.apf-drawer-header { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--apf-line); }
.apf-drawer-body { overflow: auto; overscroll-behavior: contain; }
.apf-drawer-footer { border-top: 1px solid var(--apf-line); padding-bottom: max(13px, env(safe-area-inset-bottom)); }
.apf-drawer .apf-close { min-width: 44px; min-height: 44px; padding: 0; font-size: 1.6rem; }
.apf-drawer .apf-results {
	width: 100%;
	min-height: 46px;
	padding: 10px;
	border-color: var(--apf-ink);
	background: var(--apf-ink);
	color: #fff;
	font-weight: 650;
	letter-spacing: normal;
}
.apf-drawer-body .apf-host { padding: 0 clamp(16px, 5vw, 23px) 18px; border: 0; background: transparent; }
.apf-drawer-body .apf-host > .apf-title { display: none; }
.apf-drawer-open { overflow: hidden; }

.woocommerce-pagination.apf-scroll-replaced { display: none !important; }
.apf-scroll { min-height: 1px; padding: 12px 0; text-align: center; }
.apf-scroll-status { margin: 0; color: #655e54; font-size: .9rem; }
.apf-scroll-retry { margin-top: 10px; }
.apf-scroll [hidden] { display: none !important; }

@media (min-width: 922px) {
	.apf-catalog-ready #content .ast-container:has(> #secondary > .sidebar-main .apf-host) {
		--apf-sidebar-width: clamp(252px, 25vw, 324px);
	}
	.apf-catalog-ready #content .ast-container:has(> #secondary > .sidebar-main .apf-host) > #secondary {
		flex: 0 0 var(--apf-sidebar-width);
		width: var(--apf-sidebar-width);
		padding-inline-end: clamp(15px, 1.4vw, 26px);
	}
	.apf-catalog-ready #content .ast-container:has(> #secondary > .sidebar-main .apf-host) > #primary {
		flex: 1 1 auto;
		min-width: 0;
		width: calc(100% - var(--apf-sidebar-width));
	}
}

@media (max-width: 921px) {
	.apf-has-drawer #secondary .apf-host,
	.apf-has-drawer #artenpie-archive-filter { display: none; }
	.apf-has-drawer .apf-toolbar:has(.apf-open:not([hidden])) { display: block; }
	.apf-has-drawer .apf-toolbar .apf-open:not([hidden]) {
		display: inline-flex;
		align-items: center;
		gap: 9px;
		min-height: 44px;
		padding: 8px 13px;
		font-weight: 650;
	}
	.apf-toolbar .apf-chips:not([hidden]) { margin-top: 9px; }
	.apf-host [data-taxonomy="product_cat"] .wpfLiLabel,
	.apf-host [data-taxonomy="pa_color"] .wpfLiLabel { min-height: 34px; }
}
