/* Clienti HQ · Filtri. Computer: tendine in riga. Telefono (sotto 768px): pannello a tutto schermo. */
.chq {
	--chq-nero: var(--k-color-1, #111);
	--chq-testo: var(--k-color-3, #222);
	--chq-grigio: #6f6a66;
	--chq-linea: #e6e1dc;
	--chq-chiaro: var(--k-color-9, #f7f5f3);
	margin: 0 0 22px;
	font-size: 14px;
	color: var(--chq-testo);
}
.chq-conta { margin: 0 0 14px; color: var(--chq-grigio); font-size: 13px; letter-spacing: .04em; }
.chq-nessuno { margin: 18px 0 0; color: var(--chq-grigio); }

/* Sottocategorie */
.chq-sottocat { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.chq-pill {
	display: inline-block; border: 1px solid var(--chq-linea); border-radius: 999px; padding: 7px 15px;
	font-size: 13px; line-height: 1.3; color: var(--chq-testo); background: #fff; text-decoration: none; white-space: nowrap;
	transition: border-color .15s, background .15s, color .15s;
}
.chq-pill:hover { border-color: var(--chq-nero); color: var(--chq-nero); }
.chq-pill.is-on { background: var(--chq-nero); border-color: var(--chq-nero); color: #fff; }
.chq-pill.chq-su { border-color: transparent; padding-left: 4px; color: var(--chq-grigio); }

/* Barra dei filtri */
.chq-form { margin: 0; }
.chq-barra {
	display: flex; align-items: center; justify-content: space-between; gap: 12px 20px;
	border-top: 1px solid var(--chq-linea); border-bottom: 1px solid var(--chq-linea); padding: 8px 0;
}
.chq-pannello { flex: 1 1 auto; min-width: 0; }
.chq-gruppi { display: flex; flex-wrap: wrap; gap: 4px 26px; }
.chq-gruppo { position: relative; }
.chq-gruppo > summary {
	list-style: none; cursor: pointer; user-select: none; padding: 8px 0;
	font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--chq-testo);
	display: flex; align-items: center; gap: 7px;
}
.chq-gruppo > summary::-webkit-details-marker { display: none; }
.chq-gruppo > summary::after {
	content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
	transform: rotate(45deg); margin: -3px 0 0 3px; transition: transform .15s;
}
.chq-gruppo[open] > summary::after { transform: rotate(-135deg); margin-top: 3px; }
.chq-badge {
	display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px;
	border-radius: 9px; background: var(--chq-nero); color: #fff; font-size: 11px; letter-spacing: 0; line-height: 1;
}
.chq-tendina {
	position: absolute; z-index: 60; top: calc(100% + 9px); left: 0;
	background: #fff; border: 1px solid var(--chq-linea); box-shadow: 0 12px 32px rgba(0, 0, 0, .08);
	padding: 16px; width: 300px; max-height: min(62vh, 470px); overflow: auto;
}
.chq-gruppo--colore .chq-tendina { width: 340px; }

/* Taglie in caselle, 5 per riga */
.chq-taglie { border: 0; margin: 0 0 14px; padding: 0; min-width: 0; }
.chq-taglie:last-child { margin-bottom: 0; }
.chq-taglie legend { padding: 0; margin: 0 0 8px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--chq-grigio); }
.chq-griglia-taglie { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.chq-casella { position: relative; display: block; margin: 0; cursor: pointer; }
.chq-casella input, .chq-voce input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.chq-casella span {
	display: flex; align-items: center; justify-content: center; height: 40px; border: 1px solid var(--chq-linea);
	font-size: 13px; color: var(--chq-testo); background: #fff; transition: border-color .15s;
}
.chq-casella:hover span { border-color: var(--chq-nero); }
.chq-casella input:checked + span { background: var(--chq-nero); border-color: var(--chq-nero); color: #fff; }
.chq-casella input:focus-visible + span, .chq-voce input:focus-visible ~ .chq-nome { outline: 2px solid var(--chq-nero); outline-offset: 2px; }

/* Liste (colore, marca, prezzo, sconto) */
.chq-lista { display: grid; grid-template-columns: 1fr; gap: 2px; }
.chq-lista--colore { grid-template-columns: 1fr 1fr; column-gap: 14px; }
.chq-lista--marca { max-height: 300px; overflow: auto; }
.chq-voce { position: relative; display: flex; align-items: center; gap: 9px; margin: 0; padding: 7px 0 7px 26px; cursor: pointer; font-size: 14px; line-height: 1.3; }
.chq-voce::before {
	content: ""; position: absolute; left: 0; top: 50%; width: 16px; height: 16px; margin-top: -8px;
	border: 1px solid #bdb6af; background: #fff;
}
.chq-voce.is-on::before, .chq-voce:has(input:checked)::before { background: var(--chq-nero); border-color: var(--chq-nero); }
.chq-voce.is-on::after, .chq-voce:has(input:checked)::after {
	content: ""; position: absolute; left: 5px; top: 50%; width: 6px; height: 10px; margin-top: -7px;
	border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(45deg);
}
.chq-voce:not(:has(input:checked))::after { display: none; }
.chq-lista--marca .chq-nome { text-transform: uppercase; letter-spacing: .03em; font-size: 13px; }
.chq-n { color: var(--chq-grigio); font-size: 12px; margin-left: auto; }
.chq-voce.is-nascosta { display: none; }
.chq-pallino { flex: 0 0 auto; width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .15); }
.chq-pallino--multi { background: conic-gradient(#c0262d, #e8812f, #f2cf3b, #3f6b3a, #1f3a73, #6a3d8f, #c0262d); }
.chq-pallino--vuoto { background: #fff; }
.chq-cerca {
	display: block; width: 100%; box-sizing: border-box; margin: 0 0 10px; padding: 9px 11px;
	border: 1px solid var(--chq-linea); font-size: 14px; background: #fff; color: var(--chq-testo);
}

/* Ordina per */
.chq-ordina { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 0 auto; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.chq-ordina span { color: var(--chq-grigio); }
.chq-ordina select {
	border: 0; background: transparent; padding: 6px 4px 6px 2px; font-size: 13px; letter-spacing: .06em; text-transform: uppercase;
	color: var(--chq-testo); cursor: pointer; appearance: none; -webkit-appearance: none;
}
.chq-ordina::after {
	content: ""; flex: 0 0 auto; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
	transform: rotate(45deg); margin: -4px 0 0 -2px; pointer-events: none;
}

/* Filtri attivi */
.chq-attivi { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 14px 0 0; }
.chq-chip {
	display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border: 1px solid var(--chq-linea);
	background: var(--chq-chiaro); border-radius: 999px; font-size: 13px; color: var(--chq-testo); text-decoration: none;
}
.chq-chip:hover { border-color: var(--chq-nero); }
.chq-chip span { font-size: 15px; line-height: 1; }
.chq-azzera { font-size: 13px; color: var(--chq-testo); text-decoration: underline; text-underline-offset: 3px; margin-left: 4px; }

/* Solo telefono / solo senza JavaScript */
.chq-apri, .chq-pannello-testa, .chq-piede { display: none; }
.chq-js .chq-applica { display: none; }
.chq-applica { flex: 0 0 auto; border: 1px solid var(--chq-nero); background: var(--chq-nero); color: #fff; padding: 8px 16px; font-size: 13px; cursor: pointer; }

/* Caricamento */
.chq-carica #chq-regione ul.products, .chq-carica #main ul.products { opacity: .45; transition: opacity .2s; }
.chq-carica .chq-conta::after { content: " …"; }

/* Taglie sotto la scheda del prodotto */
.chq-taglie-prodotto { margin: 4px 0 0; text-align: center; font-size: 12px; line-height: 1.5; color: var(--chq-grigio, #6f6a66); letter-spacing: .02em; }
.chq-taglie-prodotto strong { color: var(--k-color-1, #111); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

@media (max-width: 767px) {
	.chq { margin-bottom: 16px; }
	.chq-conta { margin-bottom: 10px; }
	.chq-sottocat { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; margin: 0 -16px 12px; padding: 0 16px 2px; }
	.chq-sottocat::-webkit-scrollbar { display: none; }
	.chq-barra { border: 0; padding: 0; gap: 10px; }
	.chq-apri {
		display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex: 1 1 0; height: 44px;
		border: 1px solid var(--chq-nero); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--chq-nero); text-decoration: none;
	}
	.chq-ordina { flex: 1 1 0; height: 44px; margin: 0; justify-content: center; border: 1px solid var(--chq-linea); position: relative; }
	.chq-ordina span { display: none; }
	.chq-ordina select { width: 100%; height: 100%; text-align: center; text-align-last: center; padding: 0 30px; }
	.chq-ordina::after { position: absolute; right: 18px; top: 50%; margin: -5px 0 0; }
	.chq-pannello {
		display: none; position: fixed; inset: 0; z-index: 2147483000; background: #fff;
		flex-direction: column; height: 100%; height: 100dvh;
	}
	.chq-pannello.is-aperto, .chq-pannello:target { display: flex; }
	.chq-pannello-testa {
		display: flex; align-items: center; justify-content: space-between; flex: 0 0 auto;
		padding: 14px 16px; border-bottom: 1px solid var(--chq-linea); font-size: 14px; letter-spacing: .12em; text-transform: uppercase;
	}
	.chq-chiudi { font-size: 30px; line-height: 1; color: var(--chq-nero); text-decoration: none; padding: 0 4px; }
	.chq-gruppi { display: block; flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0 16px; }
	.chq-gruppo { border-bottom: 1px solid var(--chq-linea); }
	.chq-gruppo > summary { padding: 17px 0; justify-content: flex-start; font-size: 14px; }
	.chq-gruppo > summary::after { margin-left: auto; }
	.chq-tendina, .chq-gruppo--colore .chq-tendina { position: static; width: auto; max-height: none; overflow: visible; border: 0; box-shadow: none; padding: 0 0 18px; }
	.chq-griglia-taglie { gap: 8px; }
	.chq-casella span { height: 46px; font-size: 14px; }
	.chq-voce { padding-top: 10px; padding-bottom: 10px; font-size: 15px; }
	.chq-lista--marca { max-height: 50vh; }
	.chq-piede {
		display: flex; gap: 10px; flex: 0 0 auto; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
		border-top: 1px solid var(--chq-linea); background: #fff;
	}
	.chq-azzera-p {
		flex: 1 1 0; min-width: 0; display: flex; align-items: center; justify-content: center; height: 48px; border: 1px solid var(--chq-nero);
		color: var(--chq-nero); text-decoration: none; font-size: 12px; letter-spacing: .05em; text-transform: uppercase;
	}
	.chq-mostra { flex: 2 1 0; min-width: 0; white-space: nowrap; height: 48px; border: 1px solid var(--chq-nero); background: var(--chq-nero); color: #fff; font-size: 12px; letter-spacing: .05em; text-transform: uppercase; cursor: pointer; }
	.chq-applica { display: none; }
	html.chq-pannello-aperto, html.chq-pannello-aperto body { overflow: hidden; }
	html.chq-pannello-aperto .qlwapp, html.chq-pannello-aperto #qlwapp { display: none !important; }
}

/* Difesa dallo stile del tema (Kalium colora ogni pulsante, link e campo): regole più forti. */
html body .chq a.chq-pill, html body .chq a.chq-chip, html body .chq a.chq-azzera, html body .chq a.chq-apri, html body .chq a.chq-chiudi, html body .chq a.chq-azzera-p { box-shadow: none !important; background-image: none !important; }
html body .chq a.chq-pill:after, html body .chq a.chq-chip:after, html body .chq a.chq-azzera-p:after, html body .chq a.chq-apri:after { display: none !important; }
html body .chq button.chq-mostra, html body .chq button.chq-applica {
	background: var(--chq-nero) !important; color: #fff !important; border: 1px solid var(--chq-nero) !important; border-radius: 0 !important;
	box-shadow: none !important; text-shadow: none !important; transform: none !important; min-height: 0 !important; font-weight: 400 !important;
}
html body .chq button.chq-applica { padding: 8px 16px !important; height: auto !important; line-height: 1.3 !important; }
html body .chq button.chq-mostra { padding: 0 10px !important; line-height: 46px !important; font-size: 12px !important; letter-spacing: .05em !important; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; }
html body .chq .chq-ordina select { field-sizing: content; background-image: none !important; width: auto !important; flex: 0 0 auto !important; max-width: 240px !important; border: 0 !important; box-shadow: none !important; min-height: 0 !important; height: auto; background-color: transparent !important; border-radius: 0 !important; }
html body .chq input.chq-cerca { border: 1px solid var(--chq-linea) !important; border-radius: 0 !important; box-shadow: none !important; height: auto !important; min-height: 0 !important; }
html body .chq .chq-casella input, html body .chq .chq-voce input { position: absolute !important; opacity: 0 !important; }
@media (max-width: 767px) {
	html body .chq .chq-ordina select { field-sizing: fixed; height: 100% !important; width: 100% !important; max-width: none !important; flex: 1 1 auto !important; }
}
