.pfc-filter {
	--pfc-primary: #7357b8;
	--pfc-primary-light: #f1edfb;
	--pfc-hover: #f1edfb;
	--pfc-focus: #9d86d3;
	--pfc-border: #e4e1e9;
	--pfc-text: #26222d;
	--pfc-muted: #77717f;
	--pfc-radius: 12px;
	--pfc-field-height: 46px;
	--pfc-gap: 9px;
	--pfc-dropdown-height: 280px;
	position: relative;
	z-index: 20;
	margin-block: 0 26px;
	color: var(--pfc-text);
	direction: inherit;
}

.pfc-icon-sprite {
	position: absolute;
	width: 0;
	height: 0;
	overflow: hidden;
}

.pfc-filter__controls {
	display: flex;
	flex-wrap: nowrap;
	gap: var(--pfc-gap);
	align-items: flex-start;
	width: 100%;
}

.pfc-search,
.pfc-select__toggle,
.pfc-clear {
	min-height: var(--pfc-field-height);
	box-sizing: border-box;
	border-radius: var(--pfc-radius);
	font: inherit;
}

.pfc-clear-button-wrap {
	display: none;
	flex: 0 0 auto;
	align-items: stretch;
}

.pfc-clear-button-wrap.is-visible {
	display: inline-flex;
}

.pfc-search,
.pfc-select__toggle {
	align-items: center;
	width: 100%;
	border: 1px solid var(--pfc-border);
	background: #fff;
	color: var(--pfc-text);
	transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.pfc-search {
	display: flex;
	flex: 1.35 1 220px;
	min-width: 190px;
	padding-inline: 13px;
}

.pfc-search:focus-within,
.pfc-select__toggle:focus-visible {
	border-color: var(--pfc-focus);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--pfc-focus) 18%, transparent);
	outline: none;
}

.pfc-filter .pfc-search .pfc-search__input {
	-webkit-appearance: none !important;
	appearance: none !important;
	width: 100%;
	min-width: 0;
	height: calc(var(--pfc-field-height) - 4px);
	padding: 0 9px;
	border: 0 !important;
	border-radius: 0 !important;
	outline: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	-webkit-box-shadow: none !important;
	color: inherit;
	font: inherit;
	text-align: start;
}

.pfc-filter .pfc-search .pfc-search__input:focus,
.pfc-filter .pfc-search .pfc-search__input:focus-visible,
.pfc-filter .pfc-search .pfc-search__input:hover,
.pfc-filter .pfc-search .pfc-search__input:active {
	border: 0 !important;
	outline: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	-webkit-box-shadow: none !important;
}

.pfc-search__input::-webkit-search-decoration,
.pfc-search__input::-webkit-search-cancel-button,
.pfc-search__input::-webkit-search-results-button,
.pfc-search__input::-webkit-search-results-decoration { -webkit-appearance: none; }

.pfc-search__input::placeholder {
	color: #918b97;
	opacity: 1;
}

.pfc-select__chevron {
	display: block;
	width: 19px;
	height: 19px;
	flex: 0 0 auto;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.7;
	stroke-linecap: round;
	stroke-linejoin: round;
	color: var(--pfc-muted);
}

.pfc-select {
	position: relative;
	flex: 1 1 145px;
	min-width: 118px;
}

.pfc-filter .pfc-select__toggle {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto auto;
	gap: 8px;
	align-items: center;
	direction: inherit;
	width: 100%;
	padding: 0 12px;
	cursor: pointer;
	text-align: start;
}

.pfc-select__toggle .pfc-field-icon {
	grid-column: 1;
}

.pfc-select__toggle:hover {
	border-color: #c9c2d4;
	background: #fdfcff;
}

.pfc-select__value {
	grid-column: 2;
	overflow: hidden;
	min-width: 0;
	width: 100%;
	text-overflow: ellipsis;
	text-align: start;
	white-space: nowrap;
}

.pfc-select__badge {
	grid-column: 3;
	min-width: 20px;
	height: 20px;
	box-sizing: border-box;
	padding-inline: 5px;
	border-radius: 50px;
	background: var(--pfc-primary);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 20px;
	text-align: center;
}

.pfc-select__badge[hidden] {
	display: none;
}

.pfc-select__chevron {
	grid-column: 4;
	width: 16px;
	height: 16px;
	margin-inline-start: auto;
	transition: transform 160ms ease;
}

.pfc-select__toggle[aria-expanded="true"] {
	border-color: var(--pfc-focus);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--pfc-focus) 16%, transparent);
}

.pfc-select__toggle[aria-expanded="true"] .pfc-select__chevron {
	transform: rotate(180deg);
}

.pfc-select__menu {
	position: absolute;
	z-index: 40;
	inset-block-start: calc(100% + 7px);
	inset-inline-start: 0;
	width: 100%;
	min-width: 100%;
	max-width: calc(100vw - 32px);
	max-height: var(--pfc-dropdown-height);
	overflow-x: hidden;
	overflow-y: auto;
	box-sizing: border-box;
	padding: 7px;
	border: 1px solid var(--pfc-border);
	border-radius: var(--pfc-radius);
	background: #fff;
	box-shadow: 0 14px 38px rgba(45, 35, 65, 0.14);
	animation: pfc-menu-open 150ms ease-out;
	transform-origin: top center;
}

.pfc-select__menu[hidden] {
	display: none;
}

.pfc-option {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	box-sizing: border-box;
	padding: 8px 9px;
	border-radius: 8px;
	cursor: pointer;
	line-height: 1.35;
	transition: background-color 130ms ease, color 130ms ease;
}

.pfc-option:hover,
.pfc-option:focus-within { background: #f6f7f8; }

.pfc-option[aria-selected="true"] { background: color-mix(in srgb, var(--pfc-primary) 5%, #fff); color: var(--pfc-text); }
.pfc-option[aria-selected="true"]:hover,
.pfc-option[aria-selected="true"]:focus-within { background: #f6f7f8; }

.pfc-select__menu.pfc-menu--just-opened .pfc-option:hover { background: transparent; }
.pfc-select__menu.pfc-menu--just-opened .pfc-option[aria-selected="true"]:hover { background: color-mix(in srgb, var(--pfc-primary) 5%, #fff); }

.pfc-field-icon,
.pfc-field-icon svg {
	display: block;
	width: 19px;
	height: 19px;
	max-width: 19px;
	max-height: 19px;
	overflow: hidden;
	flex: 0 0 19px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.7;
	stroke-linecap: round;
	stroke-linejoin: round;
	color: inherit;
	pointer-events: none;
}

.pfc-option input {
	width: 18px;
	height: 18px;
	flex: 0 0 auto;
	margin: 0;
	accent-color: var(--pfc-primary);
	cursor: pointer;
}

.pfc-option input:focus-visible {
	outline: 2px solid var(--pfc-primary);
	outline-offset: 2px;
}

.pfc-clear {
	flex: 0 0 auto;
	min-width: 68px;
	padding-inline: 17px;
	border: 1px solid transparent;
	background: var(--pfc-primary-light);
	color: var(--pfc-primary);
	font-weight: 700;
	cursor: pointer;
	transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.pfc-clear:hover:not(:disabled) {
	background: #e3daf7;
	color: #4e348e;
}

.pfc-clear:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--pfc-focus) 22%, transparent);
}

.pfc-clear:disabled {
	opacity: 0.5;
	cursor: default;
}

.pfc-filter--loading::after {
	position: absolute;
	inset-block-end: -12px;
	inset-inline-start: 0;
	width: 100%;
	height: 2px;
	background: linear-gradient(90deg, transparent, var(--pfc-primary), transparent);
	content: "";
	animation: pfc-loading 1s linear infinite;
}

.pfc-results[aria-busy="true"] {
	opacity: 0.58;
	pointer-events: none;
}

@keyframes pfc-menu-open {
	from {
		opacity: 0;
		transform: translateY(-4px) scaleY(0.98);
	}
	to {
		opacity: 1;
		transform: translateY(0) scaleY(1);
	}
}

@keyframes pfc-loading {
	from { transform: translateX(40%); }
	to { transform: translateX(-40%); }
}

@media (min-width: 1200px) {
	.pfc-filter { margin-block-end: var(--pfc-desktop-bottom-spacing, 20px); }
	.pfc-filter__controls { width: fit-content; max-width: 100%; flex-wrap: wrap; gap: clamp(12px, var(--pfc-gap), 16px); }
	.pfc-filter--desktop-align-start .pfc-filter__controls { margin-inline: 0 auto; }
	.pfc-filter--desktop-align-center .pfc-filter__controls { margin-inline: auto; }
	.pfc-filter--desktop-align-end .pfc-filter__controls { margin-inline: auto 0; }
	.pfc-filter--desktop-align-full .pfc-filter__controls,
	.pfc-filter--desktop-max-full .pfc-filter__controls { width: 100%; }
	.pfc-filter--desktop-max-custom .pfc-filter__controls { width: min(100%, var(--pfc-desktop-max-width)); }
	.pfc-filter--desktop-max-auto .pfc-filter__controls { width: fit-content; }
	.pfc-filter--desktop-size-compact { --pfc-field-height: 40px; }
	.pfc-filter--desktop-size-compact .pfc-search,
	.pfc-filter--desktop-size-custom .pfc-search { flex: 0 0 var(--pfc-desktop-search-width); width: var(--pfc-desktop-search-width); min-width: 0; }
	.pfc-filter--desktop-size-compact .pfc-select { flex: 0 0 auto; width: auto; min-width: 120px; max-width: 180px; }
	.pfc-filter--desktop-size-compact:not(.pfc-filter--desktop-attribute-auto) .pfc-select,
	.pfc-filter--desktop-size-custom .pfc-select { flex-basis: var(--pfc-desktop-attribute-width); width: var(--pfc-desktop-attribute-width); min-width: var(--pfc-desktop-attribute-width); max-width: var(--pfc-desktop-attribute-width); }
	.pfc-filter--desktop-size-equal .pfc-search,
	.pfc-filter--desktop-size-equal .pfc-select { flex: 0 0 150px; width: 150px; min-width: 150px; max-width: 150px; }
	.pfc-clear-button-wrap { width: auto; }
	.pfc-clear-button-wrap--desktop-quarter { flex-basis: 25%; }
	.pfc-clear-button-wrap--desktop-half { flex-basis: 50%; }
	.pfc-clear-button-wrap--desktop-full { flex-basis: 100%; width: 100%; }
	.pfc-clear-button-wrap--desktop-quarter .pfc-clear-button,
	.pfc-clear-button-wrap--desktop-half .pfc-clear-button,
	.pfc-clear-button-wrap--desktop-full .pfc-clear-button { width: 100%; }
	.pfc-select__menu { width: max-content; min-width: 100%; max-width: min(320px, calc(100vw - 32px)); }
	.pfc-option>span { white-space: nowrap; }
	.pfc-filter + .pfc-results { margin-top: 0; padding-top: 0; }
}

@media (max-width: 1199px) {
	.pfc-filter__controls {
		display: grid;
		grid-template-columns: repeat(var(--pfc-tablet-columns, 2), minmax(0, 1fr));
	}

	.pfc-search {
		grid-column: 1 / -1;
		min-width: 0;
	}

	.pfc-select {
		min-width: 0;
	}
}

@media (max-width: 699px) {
	.pfc-filter {
		--pfc-field-height: var(--pfc-mobile-field-height, 40px);
		--pfc-gap: var(--pfc-mobile-gap, 8px);
		margin-block-end: var(--pfc-mobile-bottom-spacing, 16px);
	}

	.pfc-filter__controls {
		gap: var(--pfc-mobile-gap, 8px);
	}

	.pfc-filter--mobile-grid .pfc-filter__controls {
		display: grid;
		grid-template-columns: repeat(var(--pfc-mobile-columns, 3), minmax(0, 1fr));
	}

	.pfc-filter--mobile-stacked .pfc-filter__controls {
		display: grid;
		grid-template-columns: minmax(0, 1fr);
	}

	.pfc-filter--mobile-scroll .pfc-filter__controls {
		display: grid;
		grid-auto-columns: calc((100% - (var(--pfc-mobile-columns, 3) - 1) * var(--pfc-mobile-gap, 8px)) / var(--pfc-mobile-columns, 3));
		grid-auto-flow: column;
		grid-template-rows: auto auto;
		overflow-x: auto;
		overflow-y: visible;
		scrollbar-width: thin;
		scroll-snap-type: inline proximity;
	}

	.pfc-filter--mobile-scroll .pfc-select,
	.pfc-filter--mobile-scroll .pfc-clear-button-wrap,
	.pfc-filter--mobile-scroll .pfc-price,
	.pfc-filter--mobile-scroll .pfc-product-total { grid-row: 2; scroll-snap-align: start; }

	.pfc-filter--mobile-search-row .pfc-search {
		grid-column: 1 / -1;
		min-width: 0;
	}

	.pfc-filter--mobile-scroll.pfc-filter--mobile-search-row .pfc-search {
		grid-column: 1 / span var(--pfc-mobile-columns, 3);
		grid-row: 1;
	}

	.pfc-filter--mobile-search-inline .pfc-search { grid-column: auto; min-width: 0; }
	.pfc-clear-button-wrap { grid-column: 1 / -1; width: 100%; }
	.pfc-clear-button-wrap--mobile-half { grid-column: span 1; }
	.pfc-clear-button-wrap--mobile-auto { grid-column: auto; width: auto; }
	.pfc-clear-button { width: 100%; min-height: var(--pfc-mobile-field-height, 40px); }
	.pfc-select__toggle {
		justify-content: flex-start;
		padding-inline: 9px;
	}
	.pfc-select__value { text-align: start; }
	.pfc-field-icon { width: 17px; height: 17px; max-width: 17px; max-height: 17px; flex-basis: 17px; }
	.pfc-select__chevron { width: 14px; height: 14px; }
	.pfc-search { padding-inline: 11px; }
	.pfc-search__input { height: calc(var(--pfc-mobile-field-height, 40px) - 2px); }
	.pfc-filter + .pfc-results { margin-top: 0; padding-top: 0; }
	.pfc-filter--menu-open { z-index: 30; }
	.pfc-select { position: relative; }
	.pfc-select__menu {
		inset-block-start: calc(100% + 6px);
		inset-inline-start: 0;
		inset-inline-end: auto;
		width: 100%;
		min-width: 100%;
		max-width: calc(100vw - 32px);
		max-height: min(var(--pfc-dropdown-height), 240px);
		box-sizing: border-box;
		overflow-y: auto;
		overscroll-behavior: contain;
		transform: none;
	}
	.pfc-select__menu.pfc-menu--mobile-attached {
		width: var(--pfc-menu-mobile-width, 100%);
		min-width: 0;
		transform: translateX(var(--pfc-menu-shift, 0));
	}
	.pfc-select__menu.pfc-menu--mobile-full {
		inset-block-start: var(--pfc-menu-mobile-top, calc(100% + 6px));
		width: var(--pfc-menu-mobile-width, calc(100vw - 32px));
		min-width: 0;
		transform: translateX(var(--pfc-menu-shift, 0));
	}
	.pfc-select__menu.pfc-menu--mobile-sheet {
		position: fixed;
		inset: auto 12px 12px;
		width: auto;
		min-width: 0;
		max-width: none;
		max-height: min(260px, calc(100vh - 32px));
		transform: none;
		border-radius: 14px;
	}
}

.pfc-filter--desktop-wrapped .pfc-filter__controls { flex-wrap: wrap; }
.pfc-filter--search-auto .pfc-search { flex-grow: 1; }
.pfc-filter--search-full .pfc-search { flex: 1 0 100%; }
.pfc-filter--clear-outline .pfc-clear { border-color: var(--pfc-primary); background: transparent; }
.pfc-filter--clear-text .pfc-clear { border-color: transparent; background: transparent; }
.pfc-product-total { align-self: center; white-space: nowrap; color: var(--pfc-muted); }
.pfc-option__count { color: var(--pfc-muted); }
.pfc-price { display: flex; flex: 1 1 260px; gap: var(--pfc-gap); }
.pfc-price input { width: 50%; min-height: var(--pfc-field-height); box-sizing: border-box; border: 1px solid var(--pfc-border); border-radius: var(--pfc-radius); padding-inline: 12px; }
.pfc-price input:focus { border-color: var(--pfc-focus); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--pfc-focus) 16%, transparent); }

@media (prefers-reduced-motion: reduce) {
	.pfc-select__menu,
	.pfc-filter--loading::after {
		animation: none;
	}

	.pfc-select__chevron {
		transition: none;
	}
}
