/* ============================================================
   Configuratore Lampadine LED — restyle tema ape2026 (2026-08-19)
   Pagina 31299 /it/lampadine-led-per-auto/ — shortcode [lampadine_compatibili]
   (mu-plugins/ape-configurators/lampadine.php).
   Lo shortcode porta un suo <style> INLINE NEL BODY: vince i pareggi col CSS
   in head, quindi ogni regola qui è scopata body.page-id-31299 (specificità
   maggiore). Gli id #risultati-lampadine-led / #contenuto-risultati e le
   classi di stato (show/selezionata/active) sono agganciati a JS e tracking:
   MAI rinominarli, solo vestirli.
   ============================================================ */

/* ---- variabili locali del configuratore → token del tema ---- */
body.page-id-31299 .lampadine-container {
	--primary-color: var(--ape-accent);
	--secondary-color: var(--ape-accent);
	--border-color: var(--ape-line);
	--text-primary: var(--ape-ink);
	--text-secondary: var(--ape-ink-mute);
	--bg-white: var(--ape-surface);
	--bg-light: #F6F8FA;
	--radius: var(--ape-r-card);
	font-family: var(--ape-font);
	color: var(--ape-ink);
}

/* ---- titolo + sottotitolo-guida ---- */
body.page-id-31299 .lampadine-title {
	font-weight: 800;
	letter-spacing: -0.01em;
	color: var(--ape-ink);
	margin-bottom: 6px;
}
body.page-id-31299 .lampadine-title .emoji {
	background: none;
	padding: 0;
	font-size: 1em;
}
body.page-id-31299 .lampadine-title::after {
	content: "Scegli l'attacco della tua lampada: i kit LED compatibili compaiono di fianco. Non conosci l'attacco? Guarda il libretto o scrivici su WhatsApp.";
	display: block;
	font-size: 15px;
	font-weight: 400;
	letter-spacing: 0;
	color: var(--ape-ink-mute);
	margin-top: 10px;
	line-height: 1.55;
}

/* ---- filtri categoria: chips del tema ---- */
body.page-id-31299 .category-filters {
	gap: 8px;
	margin: 22px 0 18px;
}
body.page-id-31299 .filter-btn {
	background: var(--ape-surface);
	color: var(--ape-ink);
	border: 1px solid var(--ape-line);
	border-radius: 999px;
	padding: 8px 16px;
	font-size: 14px;
	font-weight: 600;
	box-shadow: none;
	transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
body.page-id-31299 .filter-btn:hover {
	border-color: var(--ape-ink);
	transform: none;
	background: var(--ape-surface);
	color: var(--ape-ink);
}
body.page-id-31299 .filter-btn.active {
	background: var(--ape-ink);
	border-color: var(--ape-ink);
	color: #fff;
}
body.page-id-31299 .filter-btn .count {
	background: var(--ape-accent);
	color: var(--ape-on-accent);
	border-radius: 999px;
	font-size: 11px;
	font-weight: 800;
	padding: 1px 7px;
}
body.page-id-31299 .filter-btn.active .count {
	background: var(--ape-accent);
	color: var(--ape-on-accent);
}

/* ---- griglia attacchi: card compatte, target generosi ---- */
body.page-id-31299 .lampadine-grid {
	gap: 10px;
	grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
}
body.page-id-31299 .lampadina-box {
	background: var(--ape-surface);
	border: 1px solid var(--ape-line);
	border-radius: 12px;
	padding: 12px 8px 10px;
	transition: opacity .25s ease, transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
body.page-id-31299 .lampadina-box.show:hover {
	border-color: var(--ape-ink);
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(13, 17, 23, .08);
}
/* la classe 'selezionata' vive sull'IMG (listener del configuratore), non sul box:
   illuminiamo la card intera con :has() e l'img con un anello morbido */
body.page-id-31299 .lampadina-box:has(.lampadina-img.selezionata),
body.page-id-31299 .lampadina-box:has(img.selezionata) {
	border: 2px solid var(--ape-accent);
	background: var(--ape-accent-soft);
	box-shadow: 0 0 0 1px var(--ape-accent);
}
body.page-id-31299 .lampadina-img.selezionata {
	outline: none;
	border-radius: 8px;
	background: transparent;
	box-shadow: none;
}
body.page-id-31299 .lampadina-box img {
	height: 76px;
	width: auto;
	max-width: 100%;
	object-fit: contain;
	margin: 0 auto 6px;
}
body.page-id-31299 .lampadina-label {
	font-size: 14px;
	font-weight: 700;
	color: var(--ape-ink);
}
body.page-id-31299 .lampadina-attacco {
	font-size: 11px;
	color: var(--ape-ink-mute);
}

/* ---- pannello risultati (desktop, sticky) ---- */
body.page-id-31299 #risultati-lampadine-led {
	background: #F6F8FA;
	border: 1px solid var(--ape-line);
	border-radius: var(--ape-r-sheet);
	padding: 18px;
	top: 96px;
}
body.page-id-31299 .risultati-header {
	font-size: 17px;
	font-weight: 800;
	color: var(--ape-ink);
	border-bottom: 1px solid var(--ape-line);
	padding-bottom: 10px;
	margin-bottom: 12px;
}

/* ---- card prodotto: layout orizzontale scansionabile ---- */
body.page-id-31299 .prodotto-led {
	background: var(--ape-surface);
	border: 1px solid var(--ape-line);
	border-radius: var(--ape-r-card);
	padding: 12px;
	flex-direction: row;
	align-items: center;
	gap: 12px;
	transition: border-color .15s ease, box-shadow .15s ease;
}
body.page-id-31299 .prodotto-led:hover {
	border-color: var(--ape-ink);
	box-shadow: 0 10px 24px rgba(13, 17, 23, .10);
	transform: none;
}
body.page-id-31299 .product-image-link {
	flex: none;
}
body.page-id-31299 .product-image {
	width: 84px;
	height: 84px;
	object-fit: contain;
}
body.page-id-31299 .product-content {
	min-width: 0;
}
body.page-id-31299 .product-title-link {
	color: var(--ape-ink);
	font-size: 14.5px;
	font-weight: 700;
	line-height: 1.35;
	text-decoration: none;
}
body.page-id-31299 .product-title-link:hover {
	color: var(--ape-accent-ink);
}
body.page-id-31299 .bollino-omologata {
	position: static;
	display: inline-block;
	background: var(--ape-ok-soft);
	color: var(--ape-ok);
	border-radius: 6px;
	padding: 2px 8px;
	font-size: 11px;
	font-weight: 700;
	margin-bottom: 4px;
}
body.page-id-31299 .product-specs {
	font-size: 12px;
	color: var(--ape-ink-mute);
}
body.page-id-31299 .price-wrapper,
body.page-id-31299 .price-wrapper .price {
	color: var(--ape-ink);
	font-weight: 800;
	font-size: 17px;
}

/* ---- overlay risultati mobile: bottom sheet ---- */
body.page-id-31299 .risultati-mobile-overlay {
	background: rgba(13, 17, 23, .55);
	backdrop-filter: blur(2px);
}
body.page-id-31299 #risultati-mobile {
	border-radius: var(--ape-r-sheet) var(--ape-r-sheet) 0 0;
	background: var(--ape-surface);
	max-height: 84vh;
	padding-top: 18px;
	padding-bottom: calc(14px + env(safe-area-inset-bottom));
}
body.page-id-31299 #risultati-mobile::before {
	content: "";
	display: block;
	width: 44px;
	height: 4px;
	border-radius: 999px;
	background: var(--ape-line);
	margin: 0 auto 12px;
}
body.page-id-31299 .close-risultati {
	background: #F1F5F9;
	color: var(--ape-ink);
	border: 0;
	border-radius: 50%;
	width: 36px;
	height: 36px;
	font-weight: 700;
}

/* ---- indicatore selezione + toast ---- */
body.page-id-31299 #selection-indicator {
	background: var(--ape-accent-soft);
	border: 1px solid var(--ape-accent);
	color: var(--ape-ink);
	border-radius: 10px;
	font-weight: 600;
}
body.page-id-31299 #toast {
	background: var(--ape-ink);
	color: #fff;
	border-radius: 10px;
	font-weight: 600;
}

/* ---- sezioni SEO sotto il configuratore: tipografia del tema ----
   Link scopati SOLO dentro i text-editor Elementor: MAI regole su link
   generici a livello pagina (lezione Contatti: colpiscono header/topbar). */
body.page-id-31299 .elementor-widget-text-editor {
	font-family: var(--ape-font);
	color: var(--ape-ink-soft);
	font-size: 15px;
	line-height: 1.7;
}
body.page-id-31299 .elementor-widget-text-editor h2 {
	font-size: 24px;
	font-weight: 800;
	color: var(--ape-ink);
	letter-spacing: -0.01em;
	margin: 28px 0 12px;
}
body.page-id-31299 .elementor-widget-text-editor h3 {
	font-size: 18px;
	font-weight: 700;
	color: var(--ape-ink);
	margin: 20px 0 8px;
}
body.page-id-31299 .elementor-widget-text-editor strong {
	color: var(--ape-ink);
}
body.page-id-31299 .elementor-widget-text-editor a {
	color: var(--ape-accent-ink);
	text-decoration: underline;
	text-underline-offset: 2px;
}
body.page-id-31299 .elementor-widget-text-editor ul {
	padding-left: 20px;
}
body.page-id-31299 .elementor-widget-text-editor li {
	margin-bottom: 6px;
}

/* ---- mobile: griglia più fitta ma tappabile ---- */
@media (max-width: 767px) {
	body.page-id-31299 .lampadine-grid {
		grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
		gap: 8px;
	}
	body.page-id-31299 .lampadina-box img {
		height: 64px;
	}
	body.page-id-31299 .lampadine-title::after {
		font-size: 13.5px;
	}
	body.page-id-31299 .filter-btn {
		padding: 7px 12px;
		font-size: 13px;
	}
}

/* ---- desktop: il vassoio risultati tablet/mobile è un doppione della sidebar sticky ---- */
@media (min-width: 1200px) {
	body.page-id-31299 .risultati-tablet,
	body.page-id-31299 .risultati-mobile-overlay {
		display: none !important;
	}
}

/* ---- mobile: filtri su riga avvolgibile invece che impilati ---- */
@media (max-width: 767px) {
	body.page-id-31299 .category-filters {
		display: flex;
		flex-direction: row;
		flex-wrap: wrap;
		justify-content: center;
		gap: 6px;
	}
}

/* ---- v2 card risultato (feedback 19/8: immagini più grandi, tutto allineato) ---- */
body.page-id-31299 .prodotto-led {
	position: relative;
	display: grid;
	grid-template-columns: 128px minmax(0, 1fr);
	column-gap: 14px;
	align-items: start;
	padding: 14px;
}
body.page-id-31299 .product-image-link {
	grid-column: 1;
	background: #F8FAFC;
	border: 1px solid var(--ape-line);
	border-radius: 10px;
	padding: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
}
body.page-id-31299 .product-image {
	width: 112px;
	height: 112px;
	object-fit: contain;
}
body.page-id-31299 .product-content {
	grid-column: 2;
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
}
body.page-id-31299 .product-title-link {
	font-size: 15px;
	font-weight: 800;
	line-height: 1.3;
	display: block;
}
body.page-id-31299 .product-specs {
	background: #F8FAFC;
	border-radius: 8px;
	padding: 8px 10px;
	margin: 0;
}
body.page-id-31299 .spec-item {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	font-size: 12px;
	color: var(--ape-ink-mute);
	padding: 2px 0;
}
body.page-id-31299 .spec-value {
	color: var(--ape-ink);
	font-weight: 600;
}
body.page-id-31299 .price-wrapper {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}
body.page-id-31299 .price-wrapper .price {
	font-size: 19px;
}
body.page-id-31299 .prodotto-led .discount {
	font-weight: 800;
}
body.page-id-31299 .bollino-omologata {
	position: absolute;
	top: 10px;
	right: 10px;
	margin: 0;
	z-index: 2;
}
body.page-id-31299 .prodotto-led .add_to_cart_button {
	display: block;
	width: 100%;
	text-align: center;
	margin-top: 2px;
}
/* mobile: card compatta ma stessa gerarchia */
@media (max-width: 767px) {
	body.page-id-31299 .prodotto-led {
		grid-template-columns: 104px minmax(0, 1fr);
		column-gap: 10px;
	}
	body.page-id-31299 .product-image {
		width: 88px;
		height: 88px;
	}
}
