/* Filtro de productos. Especificidad baja: los controles de Elementor siempre ganan. */

.wzpy-filter {
	--wzpy-filter-accent: #ff6500;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.wzpy-filter__heading {
	display: block;
	color: #333;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
}

.wzpy-filter__group {
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0 solid transparent;
}

.wzpy-filter__title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin: 0 0 10px;
	padding: 0;
	color: #333;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
}

/* Flecha de los grupos desplegables (details/summary nativo). */
summary.wzpy-filter__title {
	list-style: none;
	cursor: pointer;
}

summary.wzpy-filter__title::-webkit-details-marker {
	display: none;
}

summary.wzpy-filter__title::after {
	content: "";
	flex-shrink: 0;
	width: 8px;
	height: 8px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	transition: transform .2s;
}

.wzpy-filter__group:not([open]) > summary.wzpy-filter__title {
	margin-bottom: 0;
}

.wzpy-filter__group:not([open]) > summary.wzpy-filter__title::after {
	transform: rotate(-45deg);
}

.wzpy-filter__list {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Muchos términos (p. ej. etiquetas): scroll propio en vez de un filtro kilométrico. */
.wzpy-filter__group > .wzpy-filter__list {
	max-height: 240px;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.wzpy-filter__list .wzpy-filter__list {
	margin-top: 6px;
	padding-left: 18px;
}

.wzpy-filter__option {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: #555;
	font-size: 14px;
	line-height: 1.3;
	cursor: pointer;
}

.wzpy-filter__option:hover {
	color: #333;
}

.wzpy-filter__option input {
	flex-shrink: 0;
	width: 16px;
	height: 16px;
	margin: 0;
	accent-color: var(--wzpy-filter-accent);
	cursor: pointer;
}

.wzpy-filter__count {
	color: #999;
	font-size: .9em;
}

.wzpy-filter__price {
	display: flex;
	align-items: center;
	gap: 8px;
}

.wzpy-filter .wzpy-filter__input {
	flex: 1;
	width: 100%;
	min-width: 0;
	min-height: 38px;
	padding: 6px 10px;
	border: 1px solid #ddd;
	border-radius: 4px;
	background: #fff;
	color: #333;
	font-size: 14px;
	box-sizing: border-box;
	transition: all .2s;
}

.wzpy-filter .wzpy-filter__input:focus {
	border-color: var(--wzpy-filter-accent);
	outline: none;
}

.wzpy-filter__actions {
	display: flex;
}

.wzpy-filter__actions[hidden] {
	display: none;
}

.wzpy-filter .wzpy-filter__reset {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 0;
	border: 0 solid transparent;
	color: var(--wzpy-filter-accent);
	font-size: 14px;
	font-weight: 600;
	text-decoration: underline;
	transition: all .2s;
}

.wzpy-filter__reset svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}
