:root {
	--apf-primary: var(--fs-color-primary, #446084);
	--apf-radius: 6px;
	--apf-font-size: 14px;
	--apf-title-font-size: 15px;
	--apf-border: #e2e8f0;
	--apf-text: #1e293b;
	--apf-text-muted: #64748b;
	--apf-bg-subtle: #f8fafc;
}

.apf-filter {
	position: relative;
	font-size: var(--apf-font-size);
	color: var(--apf-text);
	margin-bottom: 24px;
	box-sizing: border-box;
}

.apf-filter *,
.apf-filter *:before,
.apf-filter *:after {
	box-sizing: border-box;
}

.apf-active-filters-wrap {
	display: none !important;
}

.apf-filter-head {
	margin-bottom: 22px;
	padding-bottom: 4px;
}

.apf-filter-head-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 18px;
}

.apf-filter-head-title {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: calc(var(--apf-title-font-size, 15px) + 2px);
	font-weight: 700;
	color: #0f172a;
	line-height: 1.2;
}

.apf-filter-head-icon {
	color: var(--apf-primary, var(--fs-color-primary));
	stroke: var(--apf-primary, var(--fs-color-primary));
	width: 20px;
	height: 20px;
	flex-shrink: 0;
}

.apf-head-reset-btn {
	background: transparent;
	border: none;
	outline: none;
	padding: 0;
	font-size: var(--apf-font-size, 14px);
	font-weight: 500;
	color: var(--apf-primary, var(--fs-color-primary));
	cursor: pointer;
	text-decoration: none;
	transition: color 0.15s ease, opacity 0.15s ease;
	line-height: 1;
}

.apf-head-reset-btn:hover {
	opacity: 0.85;
	text-decoration: underline;
}

.apf-filter-head-search {
	margin-top: 14px;
}

.apf-filter-search-title {
	font-size: var(--apf-title-font-size, 15px);
	font-weight: 700;
	color: #0f172a;
	margin: 0 0 10px 0;
	line-height: 1.2;
}

.apf-filter-search-box {
	position: relative;
	display: flex;
	align-items: center;
	width: 100%;
}

.apf-filter-search-icon {
	position: absolute;
	left: 12px;
	top: 50%;
	transform: translateY(-50%);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #94a3b8;
	pointer-events: none;
	width: 18px;
	height: 18px;
}

.apf-head-search-input {
	width: 100%;
	height: 42px;
	padding: 8px 14px 8px 38px !important;
	font-size: var(--apf-font-size, 14px) !important;
	color: #0f172a !important;
	background-color: #ffffff !important;
	border: 1px solid #cbd5e1 !important;
	border-radius: var(--apf-radius) !important;
	box-shadow: none !important;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	box-sizing: border-box !important;
}

.apf-head-search-input::placeholder {
	color: #94a3b8 !important;
	opacity: 1;
}

.apf-head-search-input:focus {
	border-color: var(--apf-primary, var(--fs-color-primary)) !important;
	outline: none !important;
	box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12) !important;
}

.apf-groups-container {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.apf-filter-group {
	border: 1px solid var(--apf-border);
	border-radius: var(--apf-radius);
	background: #ffffff;
	overflow: hidden;
}

.apf-filter-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 12px 16px;
	background: #ffffff;
	cursor: pointer;
	user-select: none;
}

.apf-filter-title {
	margin: 0;
	font-size: var(--apf-title-font-size, 15px);
	font-weight: 700;
	color: var(--apf-text);
}

.apf-toggle-group {
	background: none;
	border: none;
	padding: 4px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--apf-text-muted);
}

.apf-toggle-group:before {
	content: "";
	display: inline-block;
	width: 8px;
	height: 8px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	transition: transform 0.2s ease;
}

.apf-filter-group.is-collapsed .apf-toggle-group:before {
	transform: rotate(-45deg);
}

.apf-filter-content {
	padding: 14px 16px;
	border-top: 1px solid var(--apf-border);
}

.apf-filter-group.is-collapsed .apf-filter-content {
	display: none;
}

.apf-search-terms-wrap {
	margin-bottom: 10px;
}

.apf-search-terms,
.apf-select-search-input,
.apf-search-input {
	width: 100%;
	padding: 7px 12px;
	border: 1px solid var(--apf-border);
	border-radius: var(--apf-radius);
	font-size: var(--apf-font-size, 14px);
	background: #ffffff;
	outline: none;
	transition: border-color 0.2s;
}

.apf-search-terms:focus,
.apf-search-input:focus {
	border-color: var(--apf-primary, var(--fs-color-primary));
}

.apf-terms-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding-right: 4px;
}

.apf-terms-list::-webkit-scrollbar {
	width: 4px;
}

.apf-terms-list::-webkit-scrollbar-track {
	background: transparent;
}

.apf-terms-list::-webkit-scrollbar-thumb {
	background: #cbd5e1;
	border-radius: 4px;
}

.apf-terms-list::-webkit-scrollbar-thumb:hover {
	background: #94a3b8;
}

.apf-term-item {
	margin: 0;
	padding: 0;
}

.apf-term-label {
	display: flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	font-size: var(--apf-font-size, 14px);
	color: #334155;
	user-select: none;
	width: 100%;
	line-height: 1.4;
	padding: 5px 0;
	transition: color 0.15s ease;
}

.apf-term-label input[type="checkbox"],
.apf-term-label input[type="radio"] {
	position: absolute;
	opacity: 0;
	cursor: pointer;
	height: 0;
	width: 0;
}

.apf-custom-indicator {
	width: 17px;
	height: 17px;
	border: 1.5px solid #94a3b8;
	border-radius: 4px;
	background: #ffffff;
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: all 0.15s ease;
	box-sizing: border-box;
	margin-right: 10px;
}

.apf-custom-indicator .apf-icon {
	display: none !important;
}

.apf-term-label input[type="radio"]~.apf-custom-indicator,
.apf-term-label input[type="radio"]+.apf-custom-indicator {
	border-radius: 50%;
}

.apf-term-label:hover .apf-custom-indicator {
	border-color: var(--apf-primary, var(--fs-color-primary));
}

.apf-term-label input[type="checkbox"]:checked~.apf-custom-indicator,
.apf-term-label input[type="checkbox"]:checked+.apf-custom-indicator,
.apf-term-item.is-active>.apf-term-label input[type="checkbox"]~.apf-custom-indicator {
	background: var(--apf-primary, var(--fs-color-primary));
	border-color: var(--apf-primary, var(--fs-color-primary));
}

.apf-term-label input[type="checkbox"]:checked~.apf-custom-indicator:after,
.apf-term-label input[type="checkbox"]:checked+.apf-custom-indicator:after,
.apf-term-item.is-active>.apf-term-label input[type="checkbox"]~.apf-custom-indicator:after {
	content: "";
	width: 5px;
	height: 9px;
	border: solid #ffffff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
	margin-bottom: 2px;
	box-sizing: border-box;
}

.apf-term-label input[type="radio"]:checked~.apf-custom-indicator,
.apf-term-label input[type="radio"]:checked+.apf-custom-indicator,
.apf-term-item.is-active>.apf-term-label input[type="radio"]~.apf-custom-indicator {
	background: #ffffff;
	border: 2px solid var(--apf-primary, var(--fs-color-primary));
}

.apf-term-label input[type="radio"]:checked~.apf-custom-indicator:after,
.apf-term-label input[type="radio"]:checked+.apf-custom-indicator:after,
.apf-term-item.is-active>.apf-term-label input[type="radio"]~.apf-custom-indicator:after {
	content: "";
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--apf-primary, var(--fs-color-primary));
	box-sizing: border-box;
}

.apf-term-title,
.apf-term-item.is-active .apf-term-title,
.apf-term-label input:checked~.apf-term-title {
	flex: 1;
	font-size: var(--apf-font-size, 14px);
	font-weight: 400;
	color: #334155;
	line-height: 1.4;
	transition: color 0.15s ease;
}

.apf-term-label:hover .apf-term-title {
	color: #0f172a;
}

.apf-count {
	margin-left: auto;
	font-size: 13px;
	color: #94a3b8;
	font-weight: 400;
	padding-left: 8px;
	flex-shrink: 0;
}

.apf-term-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.apf-toggle-children {
	background: none;
	border: none;
	cursor: pointer;
	color: var(--apf-text-muted);
	padding: 4px 6px;
}

.apf-toggle-children:before {
	content: "+";
	font-size: 14px;
	font-weight: 700;
}

.apf-term-item.has-children.is-expanded>.apf-term-row .apf-toggle-children:before {
	content: "−";
}

.apf-sub-terms {
	list-style: none;
	margin: 6px 0 0 16px;
	padding: 0 0 0 10px;
	border-left: 1.5px solid var(--apf-border);
	display: none;
}

.apf-term-item.is-expanded>.apf-sub-terms {
	display: block;
}

.apf-select-wrap select {
	width: 100%;
	padding: 8px 12px;
	border: 1px solid var(--apf-border);
	border-radius: var(--apf-radius);
	font-size: 13px;
	background: #ffffff;
	color: var(--apf-text);
	outline: none;
}

/* Price Slider Wrapper */
.apf-price-slider-wrap {
	padding: 0;
	margin-top: 5px;
}

/* Price Display Header */
.apf-price-display {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 16px;
}

.apf-price-formatted-min,
.apf-price-formatted-max {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 6px 12px;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: var(--apf-radius, 8px);
	font-size: 13px;
	font-weight: 700;
	color: #0f172a;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
	min-width: 90px;
	text-align: center;
	transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
	letter-spacing: -0.2px;
	flex: 1;
}

.apf-price-formatted-min:hover,
.apf-price-formatted-max:hover {
	border-color: var(--apf-primary, var(--fs-color-primary));
	background: #ffffff;
	color: var(--apf-primary, var(--fs-color-primary));
}

.apf-price-sep {
	color: #94a3b8;
	font-weight: 600;
	font-size: 14px;
	flex-shrink: 0;
	user-select: none;
}

/* Slider Track Container */
.apf-slider-track-container {
	position: relative;
	height: 6px;
	background: #e2e8f0;
	border-radius: 999px;
	margin: 20px 10px 14px 10px;
}

/* Slider Active Bar */
.apf-slider-bar {
	position: absolute;
	height: 100%;
	background: var(--apf-primary, var(--fs-color-primary));
	border-radius: 999px;
	pointer-events: none;
	z-index: 1;
}

/* Dual Range Inputs */
.apf-slider-input {
	position: absolute !important;
	left: -10px !important;
	top: 50% !important;
	transform: translateY(-50%) !important;
	width: calc(100% + 20px) !important;
	height: 20px !important;
	margin: 0 !important;
	padding: 0 !important;
	border: none !important;
	outline: none !important;
	background: transparent !important;
	box-shadow: none !important;
	pointer-events: none !important;
	-webkit-appearance: none !important;
	-moz-appearance: none !important;
	appearance: none !important;
	z-index: 2;
	min-height: unset !important;
	line-height: unset !important;
}

.apf-slider-input:focus {
	outline: none !important;
	box-shadow: none !important;
}

/* WebKit Track & Thumb */
.apf-slider-input::-webkit-slider-runnable-track {
	-webkit-appearance: none;
	appearance: none;
	background: transparent;
	border: none;
	height: 20px;
	cursor: pointer;
}

.apf-slider-input::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #ffffff;
	border: 3px solid var(--apf-primary, var(--fs-color-primary));
	box-shadow: 0 2px 6px rgba(15, 23, 42, 0.2), 0 0 0 1px rgba(15, 23, 42, 0.04);
	cursor: pointer;
	pointer-events: auto;
	margin-top: 0;
	transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.apf-slider-input::-webkit-slider-thumb:hover {
	transform: scale(1.18);
	box-shadow: 0 3px 8px rgba(15, 23, 42, 0.24), 0 0 0 4px rgba(3, 160, 226, 0.18);
}

.apf-slider-input::-webkit-slider-thumb:active {
	transform: scale(1.25);
	box-shadow: 0 2px 6px rgba(15, 23, 42, 0.28), 0 0 0 6px rgba(3, 160, 226, 0.28);
}

/* Firefox Track & Thumb */
.apf-slider-input::-moz-range-track {
	appearance: none;
	background: transparent;
	border: none;
	height: 20px;
	cursor: pointer;
}

.apf-slider-input::-moz-range-thumb {
	appearance: none;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #ffffff;
	border: 3px solid var(--apf-primary, var(--fs-color-primary));
	box-shadow: 0 2px 6px rgba(15, 23, 42, 0.2), 0 0 0 1px rgba(15, 23, 42, 0.04);
	cursor: pointer;
	pointer-events: auto;
	transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.apf-slider-input::-moz-range-thumb:hover {
	transform: scale(1.18);
	box-shadow: 0 3px 8px rgba(15, 23, 42, 0.24), 0 0 0 4px rgba(3, 160, 226, 0.18);
}

.apf-slider-input::-moz-range-thumb:active {
	transform: scale(1.25);
	box-shadow: 0 2px 6px rgba(15, 23, 42, 0.28), 0 0 0 6px rgba(3, 160, 226, 0.28);
}

.apf-price-inputs {
	display: flex;
	align-items: center;
	gap: 8px;
}

.apf-price-input-col {
	flex: 1;
}

.apf-price-label {
	display: block;
	font-size: 11px;
	color: var(--apf-text-muted);
	margin-bottom: 4px;
}

.apf-price-inputs input {
	width: 100%;
	padding: 6px 10px;
	border: 1px solid var(--apf-border);
	border-radius: var(--apf-radius);
	font-size: var(--apf-font-size, 14px);
}

.apf-stars-wrap {
	display: inline-flex;
	font-size: 20px;
	line-height: 1;
}

.apf-star--full {
	color: #f59e0b;
}

.apf-star--empty {
	color: #cbd5e1;
}

.apf-rating-text {
	font-size: inherit;
	color: var(--apf-text-muted);
	margin-left: 6px;
}

.apf-badge-sale,
.apf-badge-featured {
	font-size: 10px;
	font-weight: 700;
	padding: 2px 6px;
	border-radius: 4px;
	text-transform: uppercase;
	margin-left: auto;
}

.apf-badge-sale {
	background: #fee2e2;
	color: #b91c1c;
}

.apf-badge-featured {
	background: #fef3c7;
	color: #b45309;
}

.apf-search-input-group {
	position: relative;
	display: flex;
}

.apf-search-submit {
	position: absolute;
	right: 4px;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	cursor: pointer;
	padding: 6px 8px;
}

.apf-filter-actions {
	display: flex;
	gap: 10px;
	margin-top: 16px;
}

.apf-btn {
	flex: 1;
	padding: 6px 16px;
	border-radius: var(--apf-radius);
	font-size: var(--apf-font-size, 14px);
	font-weight: 600;
	text-align: center;
	cursor: pointer;
	border: 1px solid transparent;
	transition: all 0.2s;
}

.apf-btn-apply {
	background: var(--apf-primary);
	color: #ffffff;
}

.apf-btn-apply:hover {
	opacity: 0.9;
}

.apf-btn-reset {
	background: #ffffff;
	border-color: var(--apf-border);
	color: var(--apf-text);
	margin: 0 !important;
}

.apf-btn-reset:hover {
	background: var(--apf-bg-subtle);
}

.loading.apf-loop-loading {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 999;
	display: flex;
	justify-content: center;
	align-items: center;
	background: var(--apf-loading-bg, #0002);
}

.apf-loader-spinner {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
}

.apf-loader-spinner .apf-spin-circle {
	width: 36px;
	height: 36px;
	border: 3.5px solid rgba(0, 0, 0, 0.08);
	border-top-color: var(--apf-primary, var(--fs-color-primary));
	border-right-color: var(--apf-primary, var(--fs-color-primary));
	border-radius: 50%;
	animation: apfSpin 0.75s linear infinite;
}

.apf-loader-dots {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
}

.apf-dots-bounce {
	display: flex;
	gap: 8px;
	align-items: center;
	height: 24px;
}

.apf-dots-bounce span {
	width: 10px;
	height: 10px;
	background-color: var(--apf-primary, var(--fs-color-primary));
	border-radius: 50%;
	display: inline-block;
	animation: apfBounce 1.4s infinite ease-in-out both;
}

.apf-dots-bounce span:nth-child(1) {
	animation-delay: -0.32s;
}

.apf-dots-bounce span:nth-child(2) {
	animation-delay: -0.16s;
}

.apf-loader-bars {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
}

.apf-bars-wave {
	display: flex;
	gap: 5px;
	align-items: center;
	height: 26px;
}

.apf-bars-wave span {
	width: 4px;
	height: 100%;
	background-color: var(--apf-primary, var(--fs-color-primary));
	border-radius: 2px;
	display: inline-block;
	animation: apfWave 1.2s infinite ease-in-out;
}

.apf-bars-wave span:nth-child(1) {
	animation-delay: -1.1s;
}

.apf-bars-wave span:nth-child(2) {
	animation-delay: -1.0s;
}

.apf-bars-wave span:nth-child(3) {
	animation-delay: -0.9s;
}

.apf-bars-wave span:nth-child(4) {
	animation-delay: -0.8s;
}

.apf-loader-text {
	font-size: 13px;
	color: var(--apf-loading-text-color, #64748b);
	font-weight: 500;
	letter-spacing: 0.2px;
}

.apf-custom-loader {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	font-size: 13px;
	color: var(--apf-loading-text-color, #64748b);
	font-weight: 500;
}

.apf-custom-loader .apf-custom-spinner {
	width: 20px;
	height: 20px;
	border: 2px solid rgba(0, 0, 0, 0.1);
	border-top-color: var(--apf-primary, var(--fs-color-primary));
	border-radius: 50%;
	animation: apfSpin 0.75s linear infinite;
	display: inline-block;
}

@keyframes apfSpin {
	to {
		transform: rotate(360deg);
	}
}

@keyframes apfBounce {

	0%,
	80%,
	100% {
		transform: scale(0.2);
		opacity: 0.3;
	}

	40% {
		transform: scale(1);
		opacity: 1;
	}
}

@keyframes apfWave {

	0%,
	40%,
	100% {
		transform: scaleY(0.35);
		opacity: 0.35;
	}

	20% {
		transform: scaleY(1);
		opacity: 1;
	}
}

.widget.apf-filter-widget,
.widget_apf_filter_widget,
#shop-sidebar .widget.apf-filter-widget,
#shop-sidebar .widget_apf_filter_widget,
aside.widget:has(.apf-filter) {
	background: transparent;
	border: none;
	padding: 0 !important;
	margin-bottom: 24px !important;
	box-shadow: none;
	overflow: visible;
}

.widget.apf-filter-widget .is-divider,
.widget_apf_filter_widget .is-divider,
#shop-sidebar .widget.apf-filter-widget .is-divider,
#shop-sidebar .widget_apf_filter_widget .is-divider {
	display: none;
}

.apf-filter form.apf-filter-form {
	margin: 0 !important;
	padding: 0 !important;
	border: none;
	background: transparent;
}

.apf-filter ul,
.apf-filter ol,
.apf-filter li {
	list-style: none !important;
	list-style-type: none !important;
	margin: 0 !important;
	padding: 0 !important;
	border: none;
	background: transparent;
}

.apf-filter ul::before,
.apf-filter ul::after,
.apf-filter li::before,
.apf-filter li::after {
	display: none;
	content: none;
}

.apf-filter input[type="checkbox"],
.apf-filter input[type="radio"] {
	position: absolute;
	opacity: 0 !important;
	pointer-events: none;
	width: 0 !important;
	height: 0 !important;
	min-height: 0 !important;
	max-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	border: none;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	overflow: hidden;
}

.apf-filter label.apf-term-label {
	margin: 0 !important;
	padding: 6px 0 !important;
}

.apf-filter button.apf-head-reset-btn,
.apf-filter button.apf-toggle-group,
.apf-filter button.apf-toggle-children {
	margin: 0 !important;
	padding: 0 !important;
	min-height: 0 !important;
	height: auto;
	box-shadow: none;
}

.apf-filter-group:has(.apf-empty-terms),
.apf-filter-group:not(:has(input, select)),
.apf-empty-terms {
	display: none;
}