.ecf-panel,
.ecf-bar {
	--ecf-ink: #1b1b1b;
	--ecf-muted: #5e6455;
	--ecf-line: #f1ece3;
	--ecf-soft: #f7f3ec;
	--ecf-accent: #b85c00;
	--ecf-hover: #d56e00;
	--ecf-icon: #9da095;
	color: var(--ecf-ink);
	font-family: inherit;
}

.ecf-panel {
	margin: 0;
}

.ecf-group {
	border-bottom: 1px solid var(--ecf-line);
}

.ecf-group > summary {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 14px 0;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.3;
	cursor: pointer;
	list-style: none;
}

.ecf-group > summary::-webkit-details-marker {
	display: none;
}

.ecf-group > summary:hover {
	color: var(--ecf-hover);
}

.ecf-group > summary:focus-visible {
	outline: 2px solid var(--ecf-accent);
	outline-offset: 2px;
}

.ecf-group__badge {
	min-width: 20px;
	height: 20px;
	padding: 0 6px;
	box-sizing: border-box;
	border-radius: 999px;
	background: var(--ecf-accent);
	color: #fff;
	font-size: 12px;
	line-height: 20px;
	text-align: center;
}

.ecf-group__icon {
	position: relative;
	flex: none;
	width: 12px;
	height: 12px;
	margin-left: auto;
}

.ecf-group__icon::before,
.ecf-group__icon::after {
	content: "";
	position: absolute;
	top: 5px;
	left: 0;
	width: 12px;
	height: 2px;
	border-radius: 1px;
	background: var(--ecf-icon);
	transition: transform 0.2s;
}

.ecf-group__icon::after {
	transform: rotate(90deg);
}

.ecf-group[open] .ecf-group__icon::after {
	transform: rotate(0);
}

.ecf-group[open] .ecf-group__icon::before,
.ecf-group[open] .ecf-group__icon::after,
.ecf-group > summary:hover .ecf-group__icon::before,
.ecf-group > summary:hover .ecf-group__icon::after {
	background: var(--ecf-hover);
}

.ecf-group__body {
	padding: 0 0 14px;
}

.ecf-options {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ecf-options.is-collapsed > li:nth-child(n+9) {
	display: none;
}

.ecf-panel .ecf-option label {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 36px;
	font-size: 0.9375rem;
	line-height: 1.3;
	cursor: pointer;
}

.ecf-panel .ecf-option input {
	flex: none;
	width: 18px;
	height: 18px;
	margin: 0;
	accent-color: var(--ecf-accent);
	cursor: pointer;
}

.ecf-option__name {
	flex: 1 1 auto;
}

.ecf-option__count {
	font-size: 0.8125rem;
	color: var(--ecf-muted);
}

.ecf-option label:hover .ecf-option__name {
	color: var(--ecf-hover);
}

.ecf-option.is-empty label {
	opacity: 0.45;
	cursor: default;
}

.ecf-option.is-empty label:hover .ecf-option__name {
	color: inherit;
}

.ecf-panel button.ecf-more,
.ecf-panel button.ecf-more:hover,
.ecf-panel button.ecf-more:focus {
	margin: 6px 0 0;
	padding: 4px 0;
	border: 0;
	border-radius: 0;
	background: none;
	color: var(--ecf-accent);
	font: inherit;
	font-size: 0.875rem;
	font-weight: 600;
	text-decoration: underline;
	cursor: pointer;
}

/* price slider: two native ranges on one track */
.ecf-range {
	position: relative;
	height: 28px;
	margin: 4px 10px 0;
}

.ecf-range__track {
	position: absolute;
	top: 12px;
	left: 0;
	right: 0;
	height: 4px;
	border-radius: 2px;
	background: linear-gradient(to right, #e6e0d5 var(--lo), var(--ecf-accent) var(--lo), var(--ecf-accent) var(--hi), #e6e0d5 var(--hi));
}

.ecf-range input[type="range"] {
	position: absolute;
	top: 0;
	left: -10px;
	width: calc(100% + 20px);
	height: 28px;
	margin: 0;
	padding: 0;
	background: none;
	border: 0;
	pointer-events: none;
	-webkit-appearance: none;
	appearance: none;
}

.ecf-range input[type="range"]::-webkit-slider-runnable-track {
	height: 28px;
	background: none;
}

.ecf-range input[type="range"]::-moz-range-track {
	background: none;
}

.ecf-range input[type="range"]::-webkit-slider-thumb {
	width: 22px;
	height: 22px;
	margin-top: 3px;
	border: 2px solid var(--ecf-accent);
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
	cursor: grab;
	pointer-events: auto;
	-webkit-appearance: none;
	appearance: none;
}

.ecf-range input[type="range"]::-moz-range-thumb {
	width: 18px;
	height: 18px;
	border: 2px solid var(--ecf-accent);
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
	cursor: grab;
	pointer-events: auto;
}

.ecf-range input[type="range"]:focus-visible::-webkit-slider-thumb {
	outline: 2px solid var(--ecf-accent);
	outline-offset: 2px;
}

.ecf-range__values {
	display: flex;
	justify-content: space-between;
	margin: 8px 0 0;
	font-size: 0.875rem;
	font-weight: 600;
}

.ecf-panel button.ecf-submit {
	width: 100%;
	margin-top: 14px;
	padding: 10px 16px;
	border: 0;
	border-radius: 999px;
	background: var(--ecf-ink);
	color: #fff;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}

.ecf-js .ecf-panel button.ecf-submit {
	display: none;
}

/* bar above the grid */
.ecf-bar {
	display: flex;
	flex-direction: column;
	gap: 12px;
	width: 100%;
}

.ecf-bar__top {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px 16px;
}

.ecf-bar__count {
	margin: 0;
	font-size: 0.875rem;
	color: var(--ecf-muted);
}

.ecf-sort {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	font-size: 0.875rem;
}

.ecf-sort label {
	color: var(--ecf-muted);
	line-height: 1.3;
}

.ecf-bar .ecf-sort select {
	width: auto;
	height: 40px;
	padding: 0 36px 0 14px;
	border: 1.5px solid #dcd6cb;
	border-radius: 999px;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235e6455' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center;
	color: var(--ecf-ink);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

.ecf-bar .ecf-sort select:focus-visible {
	outline: 2px solid var(--ecf-accent);
	outline-offset: 2px;
}

.ecf-chips {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ecf-bar a.ecf-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 34px;
	padding: 0 12px 0 14px;
	border-radius: 999px;
	background: var(--ecf-soft);
	color: var(--ecf-ink);
	font-size: 0.875rem;
	line-height: 1.2;
	text-decoration: none;
}

.ecf-bar a.ecf-chip:hover,
.ecf-bar a.ecf-chip:focus-visible {
	background: #efe6d6;
	color: var(--ecf-ink);
}

.ecf-bar a.ecf-reset {
	color: var(--ecf-accent);
	font-size: 0.875rem;
	font-weight: 600;
	text-decoration: underline;
}

.ecf-bar a.ecf-reset:hover {
	color: #8a4500;
}

.ecf-panel .screen-reader-text,
.ecf-bar .screen-reader-text,
.ecf-live {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.ecf-loading {
	opacity: 0.45;
	pointer-events: none;
	transition: opacity 0.15s;
}

@media (prefers-reduced-motion: reduce) {
	.ecf-group__icon::before,
	.ecf-group__icon::after,
	.ecf-loading {
		transition: none;
	}
}
