.affsync-smart-filters {
	--affsync-accent: #db176e;
	--affsync-accent-dark: #a81050;
	--affsync-background: #fff2f7;
	--affsync-surface: #fff;
	--affsync-border: #efc8d9;
	--affsync-text: #282727;
	position: relative;
	z-index: 20;
	width: 100%;
	margin: 0 0 22px;
	color: var(--affsync-text);
	background: var(--affsync-surface);
	border: 1px solid var(--affsync-border);
	border-radius: 16px;
	box-shadow: 0 8px 24px rgba(40, 39, 39, 0.1);
	overflow: visible;
}

.affsync-smart-filters.affsync-theme-lcdj {
	--affsync-accent: #2f5f50;
	--affsync-accent-dark: #21463b;
	--affsync-secondary: #c96c3b;
	--affsync-background: #f3ebdd;
	--affsync-surface: #fff;
	--affsync-border: #ddcfba;
	--affsync-text: #2c2c2c;
	border-radius: 14px;
	box-shadow: 0 10px 28px rgba(44, 44, 44, 0.12);
}

.affsync-filter-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	min-height: 54px;
	margin: -1px -1px 0;
	padding: 10px 16px;
	color: #fff;
	background: var(--affsync-accent);
	border-radius: 16px 16px 0 0;
}

.affsync-theme-lcdj .affsync-filter-header {
	border-bottom: 4px solid var(--affsync-secondary);
	border-radius: 14px 14px 0 0;
}

.affsync-filter-header h2 {
	margin: 0;
	color: inherit;
	font-family: inherit;
	font-size: 17px;
	font-weight: 700;
	letter-spacing: 0.01em;
	line-height: 1.25;
}

.affsync-theme-lcdj .affsync-filter-header h2 {
	font-family: Oswald, sans-serif;
	letter-spacing: 0.045em;
}

.affsync-filter-reset {
	flex: 0 0 auto;
	margin: 0;
	padding: 5px 0;
	color: #fff;
	background: transparent;
	border: 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.68);
	border-radius: 0;
	box-shadow: none;
	font: inherit;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
}

.affsync-filter-reset:hover,
.affsync-filter-reset:focus-visible {
	color: #fff;
	border-bottom-color: #fff;
	outline: 2px solid rgba(255, 255, 255, 0.72);
	outline-offset: 3px;
}

.affsync-filter-body {
	position: relative;
	padding: 13px 14px 16px;
	overflow: visible;
}

.affsync-facet-list {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 8px;
	overflow: visible;
}

.affsync-facet {
	position: relative;
	flex: 0 0 auto;
	min-width: 0;
}

.affsync-facet.is-open {
	z-index: 90;
}

.affsync-facet-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 42px;
	margin: 0;
	padding: 8px 10px 8px 13px;
	color: var(--affsync-text);
	background: var(--affsync-background);
	border: 1px solid var(--affsync-border);
	border-radius: 999px;
	box-shadow: none;
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	line-height: 1;
	white-space: nowrap;
	cursor: pointer;
	touch-action: manipulation;
	transition:
		color 160ms ease,
		background-color 160ms ease,
		border-color 160ms ease,
		box-shadow 160ms ease;
}

.affsync-facet-button:hover,
.affsync-facet-button:focus-visible {
	color: var(--affsync-accent-dark);
	background: #fff;
	border-color: var(--affsync-secondary, var(--affsync-accent));
	outline: 0;
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--affsync-accent) 18%, transparent);
}

.affsync-facet.is-open .affsync-facet-button {
	color: #fff;
	background: var(--affsync-accent);
	border-color: var(--affsync-accent);
}

.affsync-facet-button.is-active:not(:focus):not(:hover),
.affsync-facet:not(.is-open) .affsync-facet-button.is-active {
	color: #fff;
	background: var(--affsync-secondary, var(--affsync-accent-dark));
	border-color: var(--affsync-secondary, var(--affsync-accent-dark));
}

.affsync-facet-symbol {
	display: grid;
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	place-items: center;
	color: var(--affsync-accent-dark);
	background: #fff;
	border-radius: 50%;
	font-size: 16px;
	font-weight: 500;
	line-height: 1;
}

.affsync-facet.is-open .affsync-facet-symbol {
	color: var(--affsync-secondary, var(--affsync-accent-dark));
}

.affsync-active-count {
	display: grid;
	min-width: 19px;
	height: 19px;
	padding: 0 5px;
	place-items: center;
	color: var(--affsync-accent-dark);
	background: #fff;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 800;
	line-height: 1;
}

.affsync-facet-panel {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	z-index: 100;
	width: min(330px, calc(100vw - 32px));
	max-width: calc(100vw - 32px);
	max-height: min(62vh, 430px);
	margin: 0;
	padding: 14px;
	overflow: auto;
	background: #fff;
	border: 1px solid var(--affsync-border);
	border-radius: 14px;
	box-shadow: 0 16px 38px rgba(26, 39, 24, 0.2);
	overscroll-behavior: contain;
}

.affsync-theme-lcdj .affsync-facet-panel {
	border-radius: 12px;
	box-shadow: 0 18px 42px rgba(33, 70, 59, 0.24);
}

.affsync-facet.align-right .affsync-facet-panel {
	right: 0;
	left: auto;
}

.affsync-facet.is-compact .affsync-facet-panel {
	position: fixed !important;
	top: var(--affsync-mobile-panel-top, 140px) !important;
	right: auto !important;
	left: var(--affsync-mobile-panel-left, 50vw) !important;
	width: var(--affsync-mobile-panel-width, calc(100vw - 24px)) !important;
	max-width: calc(100vw - 24px) !important;
	max-height: var(--affsync-mobile-panel-max-height, 66vh) !important;
	margin: 0 !important;
	box-sizing: border-box;
	transform: translateX(-50%);
}

.affsync-value-search {
	display: block;
	margin: 0 0 10px;
}

.affsync-value-search input {
	width: 100%;
	min-height: 40px;
	margin: 0;
	padding: 8px 11px;
	color: var(--affsync-text);
	background: #fff;
	border: 1px solid var(--affsync-border);
	border-radius: 9px;
	font: inherit;
	font-size: 14px;
}

.affsync-value-search input:focus {
	border-color: var(--affsync-accent);
	outline: 0;
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--affsync-accent) 14%, transparent);
}

.affsync-value-list {
	display: grid;
	gap: 5px;
	max-height: 300px;
	padding: 0 3px 0 0;
	overflow-x: hidden;
	overflow-y: auto;
}

.affsync-value-option {
	display: grid;
	grid-template-columns: 20px minmax(0, 1fr) auto;
	align-items: center;
	gap: 9px;
	min-height: 40px;
	margin: 0;
	padding: 7px 8px;
	color: var(--affsync-text);
	background: #fff;
	border-radius: 9px;
	font-size: 14px;
	line-height: 1.25;
	cursor: pointer;
}

.affsync-value-option:hover {
	background: var(--affsync-background);
}

.affsync-value-option input {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	opacity: 0;
}

.affsync-checkmark {
	display: grid;
	width: 19px;
	height: 19px;
	place-items: center;
	background: #fff;
	border: 1px solid var(--affsync-border);
	border-radius: 5px;
}

.affsync-value-option input:checked + .affsync-checkmark {
	background: var(--affsync-accent);
	border-color: var(--affsync-accent);
}

.affsync-value-option input:checked + .affsync-checkmark::after {
	content: "";
	width: 8px;
	height: 4px;
	border: solid #fff;
	border-width: 0 0 2px 2px;
	transform: rotate(-45deg) translateY(-1px);
}

.affsync-value-option input:focus-visible + .affsync-checkmark {
	outline: 3px solid color-mix(in srgb, var(--affsync-accent) 25%, transparent);
	outline-offset: 2px;
}

.affsync-value-name {
	min-width: 0;
	overflow-wrap: anywhere;
}

.affsync-value-count {
	min-width: 26px;
	padding: 3px 6px;
	color: var(--affsync-accent-dark);
	background: var(--affsync-background);
	border-radius: 999px;
	font-size: 11px;
	font-weight: 800;
	text-align: center;
}

.affsync-no-value {
	margin: 10px 0 0;
	color: #6f6f6f;
	font-size: 13px;
	text-align: center;
}

.affsync-price-panel {
	width: min(300px, calc(100vw - 32px));
}

.affsync-price-fields {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

.affsync-price-fields > label {
	display: grid;
	gap: 5px;
	margin: 0;
	color: var(--affsync-text);
	font-size: 12px;
	font-weight: 700;
}

.affsync-price-input {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	min-height: 42px;
	padding: 0 10px 0 0;
	background: #fff;
	border: 1px solid var(--affsync-border);
	border-radius: 9px;
}

.affsync-price-input:focus-within {
	border-color: var(--affsync-accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--affsync-accent) 14%, transparent);
}

.affsync-price-input input {
	width: 100%;
	min-width: 0;
	height: 40px;
	margin: 0;
	padding: 8px 4px 8px 10px;
	color: var(--affsync-text);
	background: transparent;
	border: 0;
	box-shadow: none;
	font: inherit;
	font-size: 14px;
}

.affsync-price-input input:focus {
	outline: 0;
	box-shadow: none;
}

.affsync-price-apply {
	width: 100%;
	min-height: 41px;
	margin: 12px 0 0;
	padding: 8px 14px;
	color: #fff;
	background: var(--affsync-accent);
	border: 0;
	border-radius: 999px;
	box-shadow: none;
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
}

.affsync-price-apply:hover,
.affsync-price-apply:focus-visible {
	color: #fff;
	background: var(--affsync-accent-dark);
	outline: 3px solid color-mix(in srgb, var(--affsync-accent) 22%, transparent);
	outline-offset: 2px;
}

.affsync-filter-loader {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(255, 255, 255, 0.8);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
}

body.affsync-filter-loading {
	cursor: progress;
}

body.affsync-filter-loading .affsync-filter-loader {
	display: flex;
}

.affsync-loader-mark {
	position: relative;
	display: grid;
	width: 112px;
	height: 112px;
	place-items: center;
	padding: 22px;
	background: #fff;
	border-radius: 50%;
	box-shadow: 0 16px 45px rgba(0, 0, 0, 0.16);
	animation: affsync-logo-pulse 1.15s ease-in-out infinite;
}

.affsync-loader-mark::before {
	content: "";
	position: absolute;
	inset: -7px;
	border: 4px solid color-mix(in srgb, var(--affsync-accent) 22%, transparent);
	border-top-color: var(--affsync-accent);
	border-radius: 50%;
	animation: affsync-logo-spin 0.85s linear infinite;
}

.affsync-loader-mark img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.affsync-loader-mark span {
	color: var(--affsync-accent);
	font-size: 13px;
	font-weight: 800;
}

@keyframes affsync-logo-spin {
	to {
		transform: rotate(360deg);
	}
}

@keyframes affsync-logo-pulse {
	0%,
	100% {
		transform: scale(0.96);
	}
	50% {
		transform: scale(1.03);
	}
}

@media screen and (max-width: 1024px) {
	.affsync-smart-filters {
		margin-bottom: 18px;
	}

	.affsync-filter-header {
		align-items: flex-start;
	}

	.affsync-filter-reset {
		max-width: 112px;
		text-align: right;
	}

	.affsync-filter-body {
		padding: 12px 12px 15px;
	}

	.affsync-facet-list {
		gap: 7px;
	}

	.affsync-facet-button {
		min-height: 40px;
		padding: 7px 9px 7px 12px;
		font-size: 13px;
	}

	.affsync-facet-panel {
		position: fixed !important;
		top: var(--affsync-mobile-panel-top, 140px) !important;
		right: auto !important;
		left: var(--affsync-mobile-panel-left, 50vw) !important;
		width: var(--affsync-mobile-panel-width, min(520px, calc(100vw - 24px))) !important;
		max-width: calc(100vw - 24px) !important;
		max-height: min(
			66vh,
			calc(100dvh - var(--affsync-mobile-panel-top, 140px) - 14px)
		) !important;
		margin: 0 !important;
		box-sizing: border-box;
		transform: translateX(-50%);
	}
}

@media (prefers-reduced-motion: reduce) {
	.affsync-loader-mark,
	.affsync-loader-mark::before {
		animation-duration: 2.2s;
	}
}
