/* =============================================================
   EH Product Filter – Stylesheet v3 (Figma-aligned)
   Design ref: node 240:2300 – Prodotti Page sidebar
   ============================================================= */

/* ── Sidebar container ───────────────────────────────────── */
.eh-filter-sidebar {
	width: 100%;
}

.eh-filter-sidebar-inner {
	position: sticky;
	top: var(--eh-filter-sticky-top, 100px);
	padding: 29px 30px 30px;
	border: 1px solid rgba(0, 0, 0, 0.1);
	background: #fff;
}

/* ── Search pill ─────────────────────────────────────────── */
.eh-filter-search-wrap {
	margin-bottom: 30px;
}

.eh-filter-search-pill {
	position: relative;
	display: flex;
	align-items: center;
}

.eh-filter-search-icon {
	position: absolute;
	left: 16px;
	width: 18px;
	height: 18px;
	color: #aaa;
	pointer-events: none;
	flex-shrink: 0;
	z-index: 1;
}

/* Forza reset tema sull'input di ricerca */
.eh-filter-sidebar .eh-filter-search-input {
	width: 100% !important;
	height: 50px !important;
	border: 1px solid rgba(0, 0, 0, 0.15) !important;
	border-radius: 50px !important;
	background: #fff !important;
	background-color: #fff !important;
	padding: 0 20px 0 46px !important;
	font-size: 13px !important;
	font-family: inherit !important;
	color: #333 !important;
	outline: none !important;
	box-shadow: none !important;
	box-sizing: border-box !important;
	transition: border-color 0.15s !important;
	appearance: none !important;
	-webkit-appearance: none !important;
}

.eh-filter-sidebar .eh-filter-search-input::placeholder {
	color: #bbb !important;
}

.eh-filter-sidebar .eh-filter-search-input:focus {
	border-color: rgba(0, 0, 0, 0.3) !important;
	outline: none !important;
	box-shadow: none !important;
}

/* ── Heading + divider ───────────────────────────────────── */
.eh-filter-header {
	margin-bottom: 15px;
}

.eh-filter-heading {
	font-size: 20px;
	font-weight: 500;
	font-family: 'Inter', sans-serif;
	line-height: 1;
	text-transform: capitalize;
	color: #000;
	margin: 0 0 15px;
	padding: 0;
}

.eh-filter-divider {
	border: none;
	border-top: 1px solid rgba(0, 0, 0, 0.1);
	margin: 0;
}

/* ── Bottone "Azzera filtri" ─────────────────────────────── */
/* Piccolo bottone outlined, più visibile ma non invadente */
.eh-filter-sidebar .eh-filter-reset {
	display: inline-flex !important;
	align-items: center !important;
	gap: 5px !important;
	margin: 0 0 14px !important;
	padding: 5px 12px !important;
	background: transparent !important;
	background-color: transparent !important;
	border: 1px solid rgba(0, 0, 0, 0.25) !important;
	border-radius: 4px !important;
	box-shadow: none !important;
	outline: none !important;
	cursor: pointer !important;
	font-size: 0.78rem !important;
	font-family: inherit !important;
	font-weight: 500 !important;
	color: #444 !important;
	text-align: left !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	line-height: 1.4 !important;
	transition: background-color 0.15s, color 0.15s, border-color 0.15s !important;
	width: auto !important;
	min-width: 0 !important;
}

.eh-filter-sidebar .eh-filter-reset:hover {
	background-color: #f5f5f5 !important;
	border-color: rgba(0, 0, 0, 0.4) !important;
	color: #111 !important;
	text-decoration: none !important;
}

/* ── Accordion sezione linea ─────────────────────────────── */
.eh-filter-section {
	border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}

.eh-filter-section:last-of-type {
	border-bottom: none;
}

/* Forza reset stili tema: appare come testo puro + freccia */
.eh-filter-sidebar .eh-filter-section-toggle {
	display: flex !important;
	align-items: center !important;
	justify-content: space-between !important;
	width: 100% !important;
	background: none !important;
	background-color: transparent !important;
	border: none !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	outline: none !important;
	padding: 11px 0 !important;
	margin: 0 !important;
	cursor: pointer !important;
	text-align: left !important;
	line-height: 1.5 !important;
	color: inherit !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	min-width: 0 !important;
	min-height: 0 !important;
}

.eh-filter-section-label {
	font-family: 'Montserrat', sans-serif;
	font-size: 14px;
	font-weight: 600;
	color: #000;
}

.eh-filter-section-arrow {
	width: 14px;
	height: 14px;
	flex-shrink: 0;
	color: #000;
	transition: transform 0.2s ease;
}

/* Ruota la freccia quando la sezione è aperta */
.eh-filter-section.is-open .eh-filter-section-arrow {
	transform: rotate(180deg);
}

/* Lista nascosta per sezioni chiuse */
.eh-filter-list[hidden] {
	display: none;
}

/* ── Lista categorie ────────────────────────────────────── */
.eh-filter-list {
	list-style: none;
	margin: 0;
	padding: 6px 0 12px;
	display: flex;
	flex-direction: column;
	gap: 0;
}

/* Lista senza sezioni (pagina linea specifica) */
.eh-filter-sidebar > .eh-filter-sidebar-inner > .eh-filter-list {
	padding-top: 10px;
}

.eh-filter-item {
	padding: 9px 0;
}

/* Sottocategorie (children) */
.eh-filter-children {
	list-style: none;
	margin: 4px 0 6px 18px;
	padding: 0;
	border-left: 1px solid rgba(0, 0, 0, 0.08);
	padding-left: 12px;
}

.eh-filter-child {
	padding: 6px 0;
}

.eh-filter-child .eh-filter-name {
	font-size: 13px;
	color: rgba(0, 0, 0, 0.45);
}

/* Nasconde categorie non corrispondenti alla ricerca */
.eh-filter-item.eh-hidden {
	display: none;
}

.eh-filter-label {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	cursor: pointer;
	user-select: none;
}

.eh-filter-name {
	font-family: 'Montserrat', sans-serif;
	font-size: 14px;
	font-weight: 500;
	color: rgba(0, 0, 0, 0.5);
	line-height: 1.5;
	flex: 1;
	transition: color 0.15s;
}

.eh-filter-label:hover .eh-filter-name {
	color: rgba(0, 0, 0, 0.8);
}

/* ── Checkbox – stile Figma ──────────────────────────────── */
.eh-filter-check {
	flex-shrink: 0;
	width: 14px;
	height: 14px;
	border: 1px solid rgba(0, 0, 0, 0.25);
	border-radius: 2px;
	background-color: transparent;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	cursor: pointer;
	background-repeat: no-repeat;
	background-position: center;
	background-size: 12px 12px;
	transition: background-color 0.1s, border-color 0.1s;
}

/* Spunta bianca su sfondo blu #1d70b8 – da Figma */
.eh-filter-check:checked {
	background-color: #1d70b8;
	border-color: #1d70b8;
	background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3e%3cpolyline points='2,7 6,11 12,3' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e");
}

.eh-filter-check:focus-visible {
	outline: 2px solid #1d70b8;
	outline-offset: 2px;
}

/* ── Messaggio "nessun risultato" ─────────────────────────── */
.eh-filter-no-results {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 60px 20px;
	background: #fff;
	border: 1px dashed #ddd;
	border-radius: 6px;
	margin: 20px 0;
	min-height: 200px;
}

/* ── Responsive mobile ──────────────────────────────────── */
@media ( max-width: 768px ) {
	.eh-filter-sidebar-inner {
		position: static;
	}

	.eh-filter-heading {
		cursor: pointer;
		display: flex;
		justify-content: space-between;
		align-items: center;
	}

	.eh-filter-heading::after {
		content: '▾';
		font-size: 1rem;
		transition: transform 0.2s;
	}

	.eh-filter-heading.is-closed::after {
		transform: rotate(-90deg);
	}

	.eh-filter-heading.is-closed ~ .eh-filter-reset,
	.eh-filter-heading.is-closed ~ .eh-filter-section,
	.eh-filter-heading.is-closed ~ .eh-filter-list {
		display: none !important;
	}
}
