.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-form {
	display: contents;
}

.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__text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.ecf-group__value {
	display: none;
	overflow: hidden;
	color: var(--ecf-muted);
	font-size: 0.8125rem;
	font-weight: 400;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.ecf-group:not([open]) .ecf-group__value {
	display: block;
}

.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-fieldset {
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.ecf-options.is-collapsed > li.is-extra {
	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 {
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	-webkit-appearance: auto;
	appearance: auto;
	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,
.ecf-panel .ecf-option.is-empty input {
	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;
	text-transform: none;
	letter-spacing: normal;
	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-panel .ecf-range input[type="range"] {
	border-radius: 0;
	box-shadow: none;
	transition: none;
	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-panel .ecf-range input[type="range"]::-webkit-slider-runnable-track {
	height: 28px;
	background: none;
}

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

#ecf-panel .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-panel .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-panel .ecf-range input[type="range"]:focus-visible::-webkit-slider-thumb {
	outline: 2px solid var(--ecf-accent);
	outline-offset: 2px;
}

.ecf-prices {
	display: flex;
	align-items: flex-end;
	gap: 8px;
	margin-top: 12px;
}

.ecf-prices__dash {
	padding-bottom: 10px;
	color: var(--ecf-muted);
}

.ecf-panel label.ecf-price {
	display: flex;
	flex: 1 1 0;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
	margin: 0;
	font-size: 0.8125rem;
	color: var(--ecf-muted);
}

.ecf-price__box {
	display: flex;
	align-items: center;
	gap: 6px;
	height: 40px;
	padding: 0 10px;
	box-sizing: border-box;
	border: 1.5px solid #dcd6cb;
	border-radius: 8px;
	background: #fff;
	color: var(--ecf-ink);
}

.ecf-price__box:focus-within {
	border-color: var(--ecf-accent);
}

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

#ecf-panel .ecf-price input[type="number"] {
	flex: 1 1 auto;
	width: 100%;
	min-width: 0;
	height: auto;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	outline: 0;
	color: var(--ecf-ink);
	font: inherit;
	font-size: 0.9375rem;
	font-weight: 600;
	-moz-appearance: textfield;
	appearance: textfield;
}

#ecf-panel .ecf-price input[type="number"]::-webkit-outer-spin-button,
#ecf-panel .ecf-price input[type="number"]::-webkit-inner-spin-button {
	margin: 0;
	-webkit-appearance: none;
}

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

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

/* themes often animate "all" on buttons, which delays visibility inside the drawer */
.ecf-js .ecf-panel button,
.ecf-js .ecf-bar button,
.ecf-js .ecf-panel input {
	transition-property: color, background-color, border-color, opacity;
	transition-duration: 0.2s;
}

/* panel parts that only show in the mobile drawer */
.ecf-panel__head,
.ecf-close {
	display: none;
}

.ecf-panel__foot {
	display: flex;
	align-items: center;
	gap: 16px;
}

.ecf-js .ecf-panel__foot {
	display: none;
}

.ecf-panel__foot .ecf-reset {
	color: var(--ecf-accent);
	font-size: 0.875rem;
	font-weight: 600;
	text-decoration: underline;
	white-space: nowrap;
}

.ecf-panel.is-busy .ecf-submit {
	opacity: 0.7;
}

/* 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 .ecf-bar__top button.ecf-toggle {
	display: none;
	align-items: center;
	gap: 8px;
	height: 40px;
	padding: 0 16px;
	border: 1.5px solid #dcd6cb;
	border-radius: 999px;
	background: #fff;
	color: var(--ecf-ink);
	font: inherit;
	text-transform: none;
	letter-spacing: normal;
	font-size: 0.875rem;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
}

.ecf-bar .ecf-bar__top button.ecf-toggle:hover,
.ecf-bar .ecf-bar__top button.ecf-toggle:focus {
	border-color: var(--ecf-ink);
	background: #fff;
	color: var(--ecf-ink);
}

.ecf-bar .ecf-bar__top button.ecf-toggle:focus-visible {
	outline: 2px solid var(--ecf-accent);
	outline-offset: 2px;
}

.ecf-toggle__icon {
	width: 16px;
	height: 12px;
	background: linear-gradient(currentColor, currentColor) 0 0 / 16px 2px no-repeat, linear-gradient(currentColor, currentColor) 3px 5px / 10px 2px no-repeat, linear-gradient(currentColor, currentColor) 6px 10px / 4px 2px no-repeat;
}

.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;
	text-transform: none;
	letter-spacing: normal;
	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-chip__x {
	position: relative;
	width: 10px;
	height: 10px;
	flex: none;
}

.ecf-chip__x::before,
.ecf-chip__x::after {
	content: "";
	position: absolute;
	top: 4px;
	left: -1px;
	width: 12px;
	height: 2px;
	border-radius: 1px;
	background: currentColor;
	transform: rotate(45deg);
}

.ecf-chip__x::after {
	transform: rotate(-45deg);
}

.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-empty__text {
	margin: 24px 0;
	color: var(--ecf-muted);
}

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

/* mobile: the panel becomes a drawer opened from the filter button */
@media (max-width: 767px) {
	.ecf-js .ecf-bar .ecf-bar__top button.ecf-toggle {
		display: inline-flex;
	}

	.ecf-no-panel .ecf-bar .ecf-bar__top button.ecf-toggle {
		display: none;
	}

	.ecf-js .ecf-bar__count {
		order: 3;
		width: 100%;
	}

	.ecf-js .ecf-sort label {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
	}

	.ecf-js .ecf-panel {
		position: fixed;
		top: 0;
		bottom: 0;
		left: 0;
		z-index: 100001;
		display: flex;
		flex-direction: column;
		width: min(420px, 90vw);
		margin: 0 !important;
		background: #fff;
		box-shadow: 0 0 40px rgba(0, 0, 0, 0.18);
		transform: translateX(-105%);
		visibility: hidden;
	}

	.ecf-ready .ecf-panel {
		transition: transform 0.25s ease, visibility 0s linear 0.25s;
	}

	.ecf-drawer-open .ecf-panel {
		transform: none;
		visibility: visible;
	}

	.ecf-ready.ecf-drawer-open .ecf-panel {
		transition: transform 0.25s ease, visibility 0s;
	}

	.ecf-js .ecf-panel__head {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
		padding: 16px 20px;
		border-bottom: 1px solid var(--ecf-line);
	}

	.ecf-panel__title {
		font-size: 1.125rem;
		font-weight: 700;
	}

	.ecf-js .ecf-panel button.ecf-close,
	.ecf-js .ecf-panel button.ecf-close:hover,
	.ecf-js .ecf-panel button.ecf-close:focus {
		position: relative;
		display: block;
		width: 40px;
		height: 40px;
		margin: -8px -10px -8px 0;
		padding: 0;
		border: 0;
		border-radius: 50%;
		background: none;
		color: var(--ecf-ink);
		cursor: pointer;
	}

	.ecf-close span::before,
	.ecf-close span::after {
		content: "";
		position: absolute;
		top: 19px;
		left: 11px;
		width: 18px;
		height: 2px;
		border-radius: 1px;
		background: currentColor;
		transform: rotate(45deg);
	}

	.ecf-close span::after {
		transform: rotate(-45deg);
	}

	.ecf-js .ecf-panel__body {
		flex: 1 1 auto;
		overflow-y: auto;
		overscroll-behavior: contain;
		padding: 0 20px;
	}

	.ecf-js .ecf-panel__foot {
		display: flex;
		padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
		border-top: 1px solid var(--ecf-line);
	}

	.ecf-js .ecf-panel button.ecf-submit,
	.ecf-js .ecf-panel button.ecf-submit:hover,
	.ecf-js .ecf-panel button.ecf-submit:focus {
		display: block;
		flex: 1 1 auto;
		margin: 0;
	}

	.ecf-backdrop {
		position: fixed;
		inset: 0;
		z-index: 100000;
		background: rgba(20, 16, 10, 0.45);
		opacity: 0;
		visibility: hidden;
		transition: opacity 0.25s ease, visibility 0s linear 0.25s;
	}

	.ecf-drawer-open .ecf-backdrop {
		opacity: 1;
		visibility: visible;
		transition: opacity 0.25s ease, visibility 0s;
	}

	.ecf-drawer-open,
	.ecf-drawer-open body {
		overflow: hidden;
	}
}

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