.rf-root {
	--rf-accent: #00a8a8;
	--rf-accent-strong: #087f7f;
	--rf-accent-soft: #edfafa;
	--rf-danger: #a32b2b;
	--rf-text: #292929;
	--rf-muted: #74716d;
	--rf-line: #e5e3df;
	--rf-line-strong: #d3d0ca;
	--rf-surface: #fff;
	--rf-soft: #f8f7f5;
	--rf-focus: rgba(0, 168, 168, .2);
	position: relative;
	margin-block: 10px 16px;
	color: var(--rf-text);
	font: inherit;
}

.rf-root [hidden] { display: none !important; }
.rf-root *, .rf-root *::before, .rf-root *::after { box-sizing: border-box; }
.rf-root button, .rf-root input, .rf-root select { font: inherit; }
.rf-root button:focus-visible,
.rf-root input:focus-visible,
.rf-root select:focus-visible { outline: 3px solid var(--rf-focus); outline-offset: 2px; }

.rf-root .screen-reader-text {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

.rf-toolbar {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 62px;
	padding: 9px 12px;
	border: 1px solid var(--rf-line);
	border-radius: 16px;
	background: var(--rf-surface);
	box-shadow: 0 2px 10px rgba(34, 30, 26, .035);
}

.rf-result-summary { display: inline-flex; align-items: baseline; gap: 5px; min-width: max-content; white-space: nowrap; }
.rf-result-summary strong { color: var(--rf-text); font-size: 1.08rem; font-weight: 700; }
.rf-result-summary span { color: var(--rf-muted); font-size: .82rem; }
.rf-toolbar__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.rf-dynamic-triggers { display: contents; }

.rf-trigger,
.rf-sort select,
.rf-chip,
.rf-button,
.rf-pagination button {
	min-height: 44px;
	border: 1px solid var(--rf-line);
	border-radius: 12px;
	background: #fff;
	color: var(--rf-text);
	cursor: pointer;
}

.rf-root .rf-trigger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-width: 76px;
	padding: 8px 13px;
	border-color: var(--rf-line) !important;
	background: var(--rf-soft) !important;
	color: var(--rf-text) !important;
	font-size: 13px;
	font-weight: 600;
	transition: border-color .16s ease, background-color .16s ease, color .16s ease, box-shadow .16s ease;
}
.rf-root .rf-trigger:hover { border-color: var(--rf-line-strong) !important; background: #fff !important; }
.rf-root .rf-trigger[aria-expanded="true"],
.rf-root .rf-trigger.has-value {
	border-color: var(--rf-accent) !important;
	background: var(--rf-accent-soft) !important;
	color: var(--rf-accent-strong) !important;
}
.rf-root .rf-trigger[aria-expanded="true"] { box-shadow: 0 0 0 3px var(--rf-focus); }
.rf-trigger__label { line-height: 1; }
.rf-trigger__chevron {
	width: 7px;
	height: 7px;
	margin-top: -3px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: rotate(45deg);
	transition: transform .16s ease;
}
.rf-trigger[aria-expanded="true"] .rf-trigger__chevron { margin-top: 3px; transform: rotate(225deg); }
.rf-trigger__icon {
	width: 17px;
	height: 14px;
	background:
		linear-gradient(currentColor 0 0) 0 2px / 100% 1.5px no-repeat,
		linear-gradient(currentColor 0 0) 0 7px / 100% 1.5px no-repeat,
		linear-gradient(currentColor 0 0) 0 12px / 100% 1.5px no-repeat;
	opacity: .78;
}
.rf-trigger__count { min-width: 21px; padding: 2px 6px; border-radius: 999px; background: var(--rf-accent); color: #fff; font-size: 11px; font-weight: 700; line-height: 17px; text-align: center; }
.rf-trigger--mobile { display: none !important; }

.rf-sort { position: relative; margin-inline-start: auto; }
.rf-sort select {
	min-width: 180px;
	padding: 8px 13px;
	border-color: var(--rf-line) !important;
	background-color: #fff !important;
	color: var(--rf-text) !important;
	font-size: 13px;
	font-weight: 500;
}
.rf-sort select:hover { border-color: var(--rf-line-strong) !important; }

.rf-active-filters { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.rf-root .rf-chip { min-height: 34px; padding: 5px 11px; border-color: #d8eeee !important; border-radius: 999px; background: var(--rf-accent-soft) !important; color: var(--rf-accent-strong) !important; font-size: 12px; font-weight: 500; }
.rf-root .rf-chip:hover { border-color: #e6caca !important; background: #fff6f6 !important; color: var(--rf-danger) !important; }

.rf-backdrop { position: fixed; inset: 0; z-index: 2147483000; background: rgba(25, 23, 21, .46); backdrop-filter: blur(2px); }

.rf-filter-surface {
	position: absolute;
	z-index: 2147483001;
	display: flex;
	flex-direction: column;
	width: min(400px, calc(100vw - 24px));
	max-height: min(680px, calc(100vh - 110px));
	overflow: hidden;
	border: 1px solid var(--rf-line-strong);
	border-radius: 20px;
	background: var(--rf-surface);
	box-shadow: 0 22px 60px rgba(36, 31, 26, .16), 0 4px 14px rgba(36, 31, 26, .08);
	transform-origin: top right;
	animation: rf-popover-in .16s ease-out;
}

.rf-filter-surface__header { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 72px; padding: 14px 16px; border-bottom: 1px solid var(--rf-line); }
.rf-filter-surface__header > div { display: grid; gap: 4px; }
.rf-filter-surface__header strong { font-size: 15px; font-weight: 700; line-height: 1.4; }
.rf-filter-surface__header span { color: var(--rf-muted); font-size: 11px; line-height: 1.5; }
.rf-root .rf-close { display: grid; flex: 0 0 auto; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid transparent !important; border-radius: 12px; background: var(--rf-soft) !important; color: var(--rf-text) !important; font-size: 22px; font-weight: 400; line-height: 1; cursor: pointer; }
.rf-root .rf-close:hover { border-color: var(--rf-line) !important; background: #fff !important; color: var(--rf-danger) !important; }

.rf-filter-surface__body { overflow: auto; overscroll-behavior: contain; padding: 20px; }
.rf-filter-group + .rf-filter-group { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--rf-line); }
[data-rf-dynamic-groups]:not(:empty) { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--rf-line); }
[data-rf-dynamic-groups] > .rf-filter-group:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.rf-filter-group__heading { display: grid; gap: 4px; }
.rf-filter-group h3 { margin: 0; color: var(--rf-text); font-size: 14px; font-weight: 700; }
.rf-filter-group__heading p { margin: 0; color: var(--rf-muted); font-size: 11px; line-height: 1.65; }
.rf-filter-surface[data-rf-mode="price"] [data-rf-group="category"],
.rf-filter-surface[data-rf-mode="category"] [data-rf-group="price"] { display: none; }

.rf-range { position: relative; height: 44px; margin: 14px 4px 8px; direction: rtl; }
.rf-range__track { position: absolute; top: 19px; right: 0; left: 0; height: 6px; border-radius: 999px; background: #dedcd8; }
.rf-range__track span { position: absolute; inset-block: 0; border-radius: inherit; background: var(--rf-accent); }
.rf-range input[type="range"] { position: absolute; inset: 0; z-index: 2; width: 100%; height: 44px; margin: 0; padding: 0; appearance: none; pointer-events: none; background: transparent; }
.rf-range input[type="range"]::-webkit-slider-runnable-track { height: 6px; border: 0; background: transparent; }
.rf-range input[type="range"]::-webkit-slider-thumb { width: 20px; height: 20px; margin-top: -7px; border: 3px solid #fff; border-radius: 50%; appearance: none; pointer-events: auto; background: var(--rf-accent); box-shadow: 0 0 0 2px var(--rf-accent), 0 3px 9px rgba(0, 90, 90, .2); cursor: grab; }
.rf-range input[type="range"]::-moz-range-track { height: 6px; border: 0; background: transparent; }
.rf-range input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border: 3px solid #fff; border-radius: 50%; pointer-events: auto; background: var(--rf-accent); box-shadow: 0 0 0 2px var(--rf-accent), 0 3px 9px rgba(0, 90, 90, .2); cursor: grab; }
.rf-range input[type="range"]:active::-webkit-slider-thumb { cursor: grabbing; transform: scale(1.08); }
.rf-range input[type="range"]:focus-visible { outline: 0; }
.rf-range input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 2px #fff, 0 0 0 5px var(--rf-accent), 0 3px 9px rgba(0, 90, 90, .22); }
.rf-range input[type="range"]:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 2px #fff, 0 0 0 5px var(--rf-accent), 0 3px 9px rgba(0, 90, 90, .22); }

.rf-price-inputs { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; direction: rtl; }
.rf-price-input { display: grid; gap: 6px; min-width: 0; }
.rf-price-input__label { color: var(--rf-muted); font-size: 11px; font-weight: 500; }
.rf-price-input__field { display: flex; align-items: center; min-width: 0; min-height: 48px; padding-inline: 10px; border: 1px solid var(--rf-line); border-radius: 12px; background: #fff; transition: border-color .16s ease, box-shadow .16s ease; }
.rf-price-input__field:focus-within { border-color: var(--rf-accent); box-shadow: 0 0 0 3px var(--rf-focus); }
.rf-root .rf-price-input input { min-width: 0; width: 100%; height: 44px; padding: 4px 0; border: 0 !important; border-radius: 0 !important; outline: 0 !important; appearance: textfield; box-shadow: none !important; background: transparent !important; color: var(--rf-text); direction: ltr; font-size: 13px; font-weight: 600; text-align: center; }
.rf-root .rf-price-input input:focus { border: 0 !important; outline: 0 !important; box-shadow: none !important; }
.rf-price-input input::-webkit-inner-spin-button,
.rf-price-input input::-webkit-outer-spin-button { margin: 0; appearance: none; }
.rf-price-input b { flex: 0 0 auto; color: var(--rf-muted); font-size: 10px; font-weight: 500; }

.rf-category-options { display: grid; gap: 5px; margin-top: 12px; }
.rf-category-option { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 46px; padding: 7px 9px; border: 1px solid transparent; border-radius: 11px; cursor: pointer; }
.rf-category-option:hover { border-color: var(--rf-line); background: var(--rf-soft); }
.rf-category-option input { width: 18px; height: 18px; margin: 0; accent-color: var(--rf-accent); }
.rf-category-option > span { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.rf-category-option small { min-width: 28px; padding: 2px 7px; border-radius: 999px; background: #efeeeb; color: var(--rf-muted); font-size: 11px; font-weight: 600; text-align: center; }

.rf-filter-surface__footer { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--rf-line); background: rgba(255, 255, 255, .96); }
.rf-root .rf-button { flex: 1; min-height: 46px; padding: 9px 14px; background: #fff !important; color: var(--rf-text) !important; font-size: 13px; font-weight: 600; }
.rf-root .rf-button--primary { border-color: var(--rf-accent) !important; background: var(--rf-accent) !important; color: #fff !important; }
.rf-root .rf-button--primary:hover { border-color: var(--rf-accent-strong) !important; background: var(--rf-accent-strong) !important; }
.rf-root .rf-button--ghost:hover { border-color: #e6caca !important; color: var(--rf-danger) !important; }
.rf-status { margin: 8px 0 0; padding: 10px 12px; border-radius: 11px; background: #fff4f4; color: #8f1118; font-size: 13px; }

.rf-empty { grid-column: 1 / -1; display: grid; justify-items: center; gap: 9px; min-height: 220px; align-content: center; padding: 28px; border: 1px dashed var(--rf-line-strong); border-radius: 18px; background: var(--rf-soft); text-align: center; }
.rf-empty span { color: var(--rf-muted); font-size: 13px; }
.rf-empty button { min-height: 44px; padding: 8px 15px; border: 1px solid var(--rf-accent) !important; border-radius: 12px; background: var(--rf-accent) !important; color: #fff !important; cursor: pointer; }

.rf-pagination { display: flex; justify-content: center; gap: 7px; margin-block: 20px; }
.rf-pagination button { min-width: 44px; padding: 7px; background: #fff !important; color: var(--rf-text) !important; }
.rf-pagination button:hover { border-color: var(--rf-accent) !important; }
.rf-pagination button.is-current { border-color: var(--rf-accent) !important; background: var(--rf-accent) !important; color: #fff !important; }

[aria-busy="true"] { opacity: .58; pointer-events: none; }
.rf-lock-scroll { overflow: hidden !important; }

.rf-product-card { position: relative; overflow: hidden; height: 100%; border: 1px solid var(--rf-line); border-radius: 16px; background: #fff; }
.rf-product-card__image { position: relative; display: block; padding: 10px; text-align: center; }
.rf-product-card__image img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: contain; }
.rf-product-card__sale { position: absolute; top: 10px; right: 10px; padding: 3px 7px; border-radius: 999px; background: var(--rf-danger); color: #fff; font-size: 11px; }
.rf-product-card__body { display: grid; gap: 8px; padding: 12px; }
.rf-product-card__title { margin: 0; font-size: 14px; line-height: 1.6; }
.rf-product-card__title a { color: inherit; text-decoration: none; }
.rf-product-card__price { min-height: 24px; font-size: 13px; }
.rf-product-card__more { justify-self: start; color: var(--rf-accent-strong); font-size: 12px; text-decoration: none; }

@keyframes rf-popover-in { from { opacity: 0; transform: translateY(-5px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes rf-sheet-in { from { transform: translateY(24px); opacity: .8; } to { transform: translateY(0); opacity: 1; } }

@media (min-width: 1024px) {
	.rf-backdrop { display: none !important; }
	.rf-filter-surface__footer { display: none; }
	.rf-root[data-rf-desktop-auto-apply="0"] .rf-filter-surface__footer { display: flex; }
	.rf-filter-surface:not([data-rf-mode="all"]) .rf-filter-group__heading { display: none; }
	.rf-filter-surface:not([data-rf-mode="all"]) [data-rf-dynamic-groups],
	.rf-filter-surface:not([data-rf-mode="all"]) .rf-filter-group { margin-top: 0; padding-top: 0; border-top: 0; }
}

@media (max-width: 1023px) {
	.rf-toolbar { min-height: 58px; padding: 7px 9px; }
	.rf-toolbar__actions { flex-wrap: nowrap; }
	.rf-trigger--desktop { display: none !important; }
	.rf-root .rf-trigger--mobile { display: inline-flex !important; min-width: 104px; }
	.rf-filter-surface {
		position: fixed;
		top: auto !important;
		right: 0 !important;
		bottom: 0;
		left: 0;
		z-index: 2147483001;
		width: 100%;
		max-height: min(88dvh, 720px);
		border-width: 1px 0 0;
		border-radius: 24px 24px 0 0;
		box-shadow: 0 -18px 55px rgba(28, 25, 22, .2);
		transform-origin: bottom center;
		animation: rf-sheet-in .2s ease-out;
	}
	.rf-filter-surface__header { position: relative; min-height: 76px; padding-top: 20px; }
	.rf-filter-surface__header::before { content: ""; position: absolute; top: 7px; left: 50%; width: 40px; height: 4px; border-radius: 999px; background: #d9d7d2; transform: translateX(-50%); }
	.rf-filter-surface[data-rf-mode] [data-rf-group] { display: block; }
	.rf-filter-surface[data-rf-mode] [data-rf-group][hidden] { display: none; }
	.rf-filter-surface__body { padding: 18px 16px 26px; }
	.rf-filter-surface__footer { position: sticky; bottom: 0; padding-bottom: max(12px, env(safe-area-inset-bottom)); }
}

@media (max-width: 767px) {
	.rf-root { margin-block: 8px 12px; }
	.rf-result-summary span { display: none; }
	.rf-result-summary strong { font-size: 1rem; }
	.rf-root .rf-trigger, .rf-sort select { min-height: 44px; font-size: 12px; }
	.rf-sort select { min-width: 138px; max-width: 42vw; padding-inline: 10px; }
	.rf-toolbar { gap: 6px; }
	.rf-toolbar__actions { gap: 5px; }
	.rf-root .rf-trigger--mobile { min-width: 98px; padding-inline: 10px; }
	.rf-active-filters { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 3px; scrollbar-width: none; }
	.rf-active-filters::-webkit-scrollbar { display: none; }
	.rf-root .rf-chip { flex: 0 0 auto; font-size: 11px; }
	.rf-product-card__title { font-size: 12px; }
}

@media (max-width: 380px) {
	.rf-toolbar { padding-inline: 7px; }
	.rf-sort select { min-width: 124px; max-width: 40vw; }
	.rf-root .rf-trigger--mobile { min-width: 90px; gap: 6px; }
	.rf-trigger__icon { display: none; }
	.rf-price-inputs { gap: 7px; }
	.rf-price-input__field { padding-inline: 7px; }
}

@media (prefers-reduced-motion: reduce) {
	.rf-root *, .rf-root *::before, .rf-root *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
