/* Tabella Prodotti Terranova — stile moderno e compatto, brand Terranova Alimenti */

.tnv-tabella-wrap {
	--tnv-verde: #7a9c59;
	--tnv-verde-scuro: #64814a;
	--tnv-verde-chiaro: #f0f5ea;
	--tnv-rosso: #870000;
	--tnv-grigio: #6b7280;
	--tnv-bordo: #e5e7eb;
	--tnv-raggio: 12px;
	--tnv-ombra: 0 1px 3px rgba(0, 0, 0, .06), 0 4px 14px rgba(0, 0, 0, .04);
	margin: 0 0 1.5em;
	font-size: 14px;
}

.tnv-tabella-wrap *,
.tnv-tabella-wrap *::before,
.tnv-tabella-wrap *::after { box-sizing: border-box; }

/* ---------- TOOLBAR (discreta, una riga) ---------- */
.tnv-toolbar {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 10px;
}
.tnv-cerca {
	position: relative;
	flex: 0 1 260px;
	min-width: 150px;
	color: var(--tnv-grigio);
}
.tnv-cerca svg {
	position: absolute;
	left: 12px;
	top: 50%;
	transform: translateY(-50%);
	pointer-events: none;
}
/* pulsante X per azzerare il filtro (visibile solo con testo digitato) */
.tnv-cerca .tnv-cerca-x {
	position: absolute;
	right: 6px;
	top: 50%;
	transform: translateY(-50%);
	width: 26px;
	height: 26px;
	border-radius: 50%;
	border: none;
	background: var(--tnv-bordo);
	color: #4b5563;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
	margin: 0;
	min-height: 0;
	display: none;
	align-items: center;
	justify-content: center;
	transition: background .12s, color .12s;
}
.tnv-cerca .tnv-cerca-x.visibile { display: inline-flex; }
.tnv-cerca .tnv-cerca-x:hover { background: var(--tnv-rosso); color: #fff; }

/* specificità alta: Flatsome stila input[type=search] e vincerebbe sulla classe */
.tnv-tabella-wrap .tnv-cerca input.tnv-input-cerca[type="search"] {
	width: 100%;
	height: 38px;
	margin: 0;
	padding: 0 36px 0 38px;
	border: 1.5px solid var(--tnv-bordo);
	border-radius: 999px;
	background: #fff;
	font-size: 13px;
	font-weight: 600;
	color: #374151;
	box-shadow: none;
	transition: border-color .15s, box-shadow .15s;
}
.tnv-tabella-wrap .tnv-cerca input.tnv-input-cerca::placeholder { font-weight: 400; color: var(--tnv-grigio); }
/* niente doppia X: nascondi quella nativa dei browser sugli input search */
.tnv-tabella-wrap .tnv-cerca input.tnv-input-cerca::-webkit-search-cancel-button,
.tnv-tabella-wrap .tnv-cerca input.tnv-input-cerca::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.tnv-tabella-wrap .tnv-cerca input.tnv-input-cerca[type="search"]:focus {
	outline: none;
	border-color: var(--tnv-verde);
	box-shadow: 0 0 0 3px rgba(122, 156, 89, .18);
}
/* specificità alta + !important: Flatsome stila i select con altezza/margini
   propri che disallineano il campo rispetto al resto della toolbar */
.tnv-tabella-wrap .tnv-toolbar select.tnv-select {
	height: 38px !important;
	min-height: 0 !important;
	max-width: 210px;
	margin: 0 !important;
	padding: 0 30px 0 12px !important;
	border: 1.5px solid var(--tnv-bordo) !important;
	border-radius: 999px !important;
	background-color: #fff;
	box-shadow: none !important;
	font-size: 13px;
	font-weight: 600;
	color: #374151;
	line-height: 36px;
	vertical-align: middle;
	cursor: pointer;
	transition: border-color .15s;
}
.tnv-tabella-wrap .tnv-toolbar select.tnv-select:hover { border-color: var(--tnv-verde) !important; }
.tnv-tabella-wrap .tnv-toolbar select.tnv-select:focus { outline: none; border-color: var(--tnv-verde) !important; }
/* pillola "filtro attivo" (termine cercato dall'header) — clic per azzerare */
.tnv-toolbar .tnv-filtro-attivo {
	display: inline-flex;
	align-items: center;
	height: 38px;
	padding: 0 14px;
	border-radius: 999px;
	border: 1.5px solid var(--tnv-rosso);
	background: #fff;
	color: var(--tnv-rosso);
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
	max-width: 220px;
	overflow: hidden;
	text-overflow: ellipsis;
	cursor: pointer;
	transition: background .15s, color .15s;
	margin: 0;
	min-height: 0;
	flex: 0 0 auto;
}
.tnv-toolbar .tnv-filtro-attivo:hover { background: var(--tnv-rosso); color: #fff; }
.tnv-toolbar .tnv-filtro-attivo[hidden] { display: none; }

/* conteggio: visibile solo con un filtro attivo */
.tnv-conteggio {
	display: none;
	margin-left: auto;
	font-size: 12.5px;
	color: var(--tnv-grigio);
	white-space: nowrap;
}
.tnv-conteggio.visibile { display: inline; }

/* pulsante Acquistati: stessa pillola degli altri controlli della toolbar */
.tnv-toolbar .tnv-btn-acquistati {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 38px;
	padding: 0 14px;
	border-radius: 999px;
	border: 1.5px solid var(--tnv-bordo);
	background: #fff;
	color: #374151 !important;
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: border-color .15s, background .15s, color .15s;
	margin: 0;
	min-height: 0;
	flex: 0 0 auto;
}
.tnv-toolbar .tnv-btn-acquistati svg { color: var(--tnv-verde-scuro); }
.tnv-toolbar .tnv-btn-acquistati:hover {
	border-color: var(--tnv-verde);
	background: var(--tnv-verde-chiaro);
	color: var(--tnv-verde-scuro) !important;
}

/* toggle IVA: stessa pillola degli altri controlli */
.tnv-toolbar .tnv-toolbar-iva {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	height: 38px;
	padding: 0 14px;
	border: 1.5px solid var(--tnv-bordo);
	border-radius: 999px;
	background: #fff;
	transition: border-color .15s;
}
.tnv-toolbar .tnv-toolbar-iva:hover { border-color: var(--tnv-verde); }
.tnv-toolbar .terranova-iva-toggle { margin: 0 !important; padding: 0 !important; display: flex; align-items: center; gap: 6px; background: transparent !important; border: none !important; }
.tnv-toolbar .terranova-iva-toggle__label { font-size: 13px; font-weight: 600; color: #374151; white-space: nowrap; }

/* il pulsante Acquistati originale nei breadcrumb sparisce quando la tabella è attiva */
body.tnv-tabella-attiva .prodotti-acquistati { display: none !important; }

/* niente spazio sopra la riga del catalogo (Flatsome) quando la tabella è attiva */
body.tnv-tabella-attiva main .row.category-page-row { padding-top: 0; }

/* ---------- TABELLA (desktop) ---------- */
.tnv-tabella-scroll {
	border-radius: var(--tnv-raggio);
	box-shadow: var(--tnv-ombra);
	background: #fff;
	overflow: hidden;
}
table.tnv-tabella {
	width: 100%;
	border-collapse: collapse;
	margin: 0;
	border: none;
	table-layout: auto;
}
.tnv-tabella thead th {
	position: sticky;
	top: 0;
	z-index: 5;
	background: var(--tnv-verde);
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .04em;
	padding: 10px 12px;
	text-align: left;
	border: none;
}
.tnv-ordinabile { cursor: pointer; user-select: none; }
.tnv-ordinabile:hover { background: var(--tnv-verde-scuro); }
.tnv-tabella tbody td {
	padding: 8px 12px;
	border: none;
	border-bottom: 1px solid var(--tnv-bordo);
	vertical-align: middle;
	background: #fff;
	transition: background .12s;
}
.tnv-tabella tbody tr:last-child td { border-bottom: none; }
.tnv-tabella tbody tr:hover td { background: var(--tnv-verde-chiaro); }

.tnv-riga { animation: tnv-appari .25s ease both; }
@keyframes tnv-appari {
	from { opacity: 0; transform: translateY(4px); }
	to   { opacity: 1; transform: none; }
}

/* immagine grande, cella stretta */
.tnv-col-img { width: 116px; }
.tnv-col-img .tnv-img,
.tnv-col-img img {
	width: 100px;
	height: 100px;
	object-fit: contain;
	display: block;
	margin: 0 auto;
	border-radius: 8px;
}
/* colonna descrizione contenuta: il testo va a capo invece di allargarsi */
.tnv-col-nome { width: 34%; max-width: 340px; }
.tnv-nome {
	font-weight: 600;
	color: #1f2937;
	text-decoration: none;
	display: block;
	line-height: 1.3;
	font-size: 14px;
}
.tnv-nome:hover { color: var(--tnv-verde-scuro); }
.tnv-qxc {
	display: block;
	font-size: 12px;
	color: var(--tnv-grigio);
	margin-top: 1px;
}
.tnv-nota-cauzione {
	display: block;
	font-size: 11.5px;
	font-style: italic;
	font-weight: 600;
	color: var(--tnv-rosso);
	margin-top: 2px;
}
.tnv-col-prezzo { white-space: nowrap; width: 130px; }
.tnv-prezzo { font-weight: 700; color: #1f2937; font-size: 14.5px; }
.tnv-prezzo del { opacity: .5; font-weight: 400; }
.tnv-prezzo ins { text-decoration: none; color: var(--tnv-rosso); }
.tnv-col-stock { width: 110px; }
.tnv-stock { font-size: 12.5px; color: var(--tnv-grigio); }
.tnv-stock.in-stock { color: var(--tnv-verde-scuro); font-weight: 600; }
.tnv-stock.out-of-stock { color: var(--tnv-rosso); font-weight: 600; }

/* ---------- COLONNA ACQUISTA: griglia a 2 colonne uguali ----------
   Lo stepper (col.1) e ogni pillola Pedana/Strato/Scatola hanno la STESSA
   larghezza, così tutto è allineato in verticale. Il carrello sta in col.2. */
.tnv-col-buy { width: 180px; }
.tnv-acquisto {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 5px 8px;
	width: 160px;
	align-items: center;
}
.tnv-compra { display: contents; }

/* stepper: riempie la sua colonna, [−] e [+] fissi, numero al centro */
.tnv-stepper {
	display: flex;
	align-items: stretch;
	border: 1.5px solid var(--tnv-bordo);
	border-radius: 999px;
	overflow: hidden;
	background: #fff;
	height: 32px;
	width: 100%;
	grid-column: 1;
}
.tnv-tabella-wrap .tnv-stepper .tnv-step {
	flex: 0 0 26px;
	width: 26px;
	border: none;
	background: transparent;
	color: var(--tnv-grigio);
	font-size: 18px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	transition: background .12s, color .12s;
	padding: 0;
	margin: 0;
	min-height: 0;
	min-width: 0;
	border-radius: 0;
}
.tnv-tabella-wrap .tnv-stepper .tnv-step:hover { background: var(--tnv-verde-chiaro); color: var(--tnv-verde-scuro); }
/* specificità alta + !important: Flatsome/Woo stilano input[type=number] con
   larghezze e padding propri che altrimenti vincono su questa classe */
.tnv-tabella-wrap .tnv-stepper input.tnv-qty[type="number"] {
	flex: 1 1 auto;
	width: auto !important;
	min-width: 0 !important;
	max-width: none !important;
	border: none !important;
	text-align: center;
	font-size: 13.5px;
	font-weight: 600;
	padding: 0 !important;
	margin: 0 !important;
	box-shadow: none !important;
	background: transparent;
	-moz-appearance: textfield;
	appearance: textfield;
	min-height: 0 !important;
	height: 100% !important;
	border-radius: 0;
}
.tnv-tabella-wrap .tnv-stepper input.tnv-qty::-webkit-outer-spin-button,
.tnv-tabella-wrap .tnv-stepper input.tnv-qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.tnv-tabella-wrap .tnv-stepper input.tnv-qty:focus { outline: none; }

/* pulsante carrello tondo a icona */
.tnv-btn-cart {
	grid-column: 2;
	justify-self: center;
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--tnv-rosso);
	color: #fff !important;
	box-shadow: 0 2px 6px rgba(135, 0, 0, .35);
	cursor: pointer;
	text-decoration: none;
	transition: background .15s, transform .1s, box-shadow .15s;
	line-height: 1;
	padding: 0;
	margin: 0;
	min-height: 0;
}
.tnv-btn-cart:hover { background: #6b0000; color: #fff; transform: scale(1.06); }
.tnv-btn-cart:active { transform: scale(.92); }

.tnv-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	height: 32px;
	padding: 0 12px;
	border-radius: 999px;
	border: none;
	font-size: 12.5px;
	font-weight: 700;
	letter-spacing: .02em;
	cursor: pointer;
	text-decoration: none;
	transition: background .15s, color .15s, transform .1s;
	line-height: 1;
	white-space: nowrap;
}
.tnv-btn:active { transform: scale(.96); }
.tnv-btn-outline {
	background: #fff;
	color: var(--tnv-rosso) !important;
	border: 1.5px solid var(--tnv-rosso);
	height: 32px;
	font-size: 12.5px;
}
.tnv-btn-outline:hover { background: var(--tnv-rosso); color: #fff !important; }
.tnv-accedi {
	margin-top: 4px;
	white-space: normal;
	text-align: center;
	height: auto;
	min-height: 30px;
	padding: 4px 10px;
	line-height: 1.2;
	display: inline-flex;
}

/* spunta "aggiunto" */
.tnv-btn-check { display: none; }
.tnv-btn-cart.added .tnv-icona-cart { display: none; }
.tnv-btn-cart.added .tnv-btn-check { display: block; }
.tnv-btn-cart.loading { opacity: .7; pointer-events: none; animation: tnv-pulse .8s ease infinite; }
@keyframes tnv-pulse {
	50% { transform: scale(.9); }
}
/* link "Visualizza carrello" generato da WooCommerce: nascosto come nel sito attuale */
.tnv-tabella a.added_to_cart.wc-forward { display: none !important; }

/* scorciatoie quantità: stessa larghezza dello stepper, allineate in griglia */
.tnv-chips {
	grid-column: 1 / -1;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 4px 8px;
}
.tnv-chip {
	width: 100%;
	border: 1px solid var(--tnv-bordo);
	background: #fff;
	border-radius: 999px;
	padding: 4px 4px;
	font-size: 11px;
	color: var(--tnv-grigio);
	cursor: pointer;
	text-align: center;
	line-height: 1.4;
	white-space: nowrap;
	transition: border-color .12s, background .12s, color .12s;
	min-height: 0;
	margin: 0;
}
.tnv-chip strong { font-size: 12px; color: #1f2937; font-weight: 700; }
.tnv-chip:hover { border-color: var(--tnv-verde); background: var(--tnv-verde-chiaro); }
.tnv-chip:active { transform: scale(.95); }

/* ---------- PAGINAZIONE ---------- */
.tnv-paginazione {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 5px;
	margin-top: 14px;
	flex-wrap: wrap;
}
.tnv-pag {
	min-width: 36px;
	height: 36px;
	border-radius: 999px;
	border: 1.5px solid var(--tnv-bordo);
	background: #fff;
	color: #374151;
	font-size: 13.5px;
	font-weight: 600;
	cursor: pointer;
	transition: border-color .12s, background .12s, color .12s;
	padding: 0 6px;
	margin: 0;
	line-height: 1;
	min-height: 0;
}
.tnv-pag:hover:not(:disabled):not(.tnv-pag-attiva) { border-color: var(--tnv-verde); color: var(--tnv-verde-scuro); }
.tnv-pag-attiva { background: var(--tnv-verde); border-color: var(--tnv-verde); color: #fff; cursor: default; }
.tnv-pag:disabled { opacity: .35; cursor: default; }
.tnv-pag-dots { color: var(--tnv-grigio); padding: 0 2px; }

/* ---------- CARICAMENTO (skeleton) ---------- */
.tnv-tabella-wrap.is-loading .tnv-tbody td { opacity: .45; }
.tnv-tabella-wrap.is-loading .tnv-tabella-scroll { position: relative; overflow: hidden; }
.tnv-tabella-wrap.is-loading .tnv-tabella-scroll::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .75) 50%, transparent 70%);
	background-size: 200% 100%;
	animation: tnv-shimmer 1.1s linear infinite;
	pointer-events: none;
	z-index: 6;
}
@keyframes tnv-shimmer {
	from { background-position: 160% 0; }
	to   { background-position: -60% 0; }
}

/* ---------- TOAST ---------- */
.tnv-toast {
	position: fixed;
	left: 50%;
	bottom: 24px;
	transform: translate(-50%, 80px);
	background: #1f2937;
	color: #fff;
	padding: 11px 20px;
	border-radius: 999px;
	font-size: 14px;
	font-weight: 600;
	box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
	opacity: 0;
	transition: transform .3s cubic-bezier(.2, .9, .3, 1.2), opacity .3s;
	z-index: 99999;
	pointer-events: none;
	display: flex;
	align-items: center;
	gap: 8px;
}
.tnv-toast.visibile { transform: translate(-50%, 0); opacity: 1; }
.tnv-toast .tnv-toast-icona { color: #86efac; }

/* riga vuota */
.tnv-riga-vuota td {
	text-align: center;
	padding: 36px 12px !important;
	color: var(--tnv-grigio);
	font-size: 14px;
}

/* ---------- MOBILE: card compatte, adattamento totale ---------- */
@media only screen and (max-width: 849px) {
	body.tnv-tabella-attiva .large-9.col { padding: 0; }

	/* niente spazio tra breadcrumbs e tabella su mobile */
	body.tnv-tabella-attiva .breadcrumbs { margin-top: 0; margin-bottom: 0; }
	body.tnv-tabella-attiva .shop-page-title .page-title-inner { padding-top: 0; padding-bottom: 0; min-height: 0; }
	body.tnv-tabella-attiva main .row.category-page-row { padding-top: 0 !important; }
	body.tnv-tabella-attiva .shop-container > .woocommerce-notices-wrapper:empty { display: none; }

	.tnv-tabella-wrap {
		font-size: 13.5px;
		margin: 0 0 1em;
		max-width: 100vw;
		overflow-x: hidden;
	}

	/* toolbar: due righe ordinate (filtra+ordina / acquistati+iva) */
	.tnv-toolbar {
		position: sticky;
		top: 0;
		z-index: 20;
		background: #fff;
		padding: 8px;
		margin: 0 0 6px;
		gap: 6px;
		box-shadow: 0 2px 6px rgba(0, 0, 0, .05);
		flex-wrap: wrap;
	}
	.tnv-cerca { flex: 1 1 52%; min-width: 0; }
	.tnv-tabella-wrap .tnv-toolbar select.tnv-select { flex: 1 1 38%; max-width: none; }
	.tnv-conteggio { display: none; }
	.tnv-toolbar .tnv-btn-acquistati { height: 36px; flex: 0 0 auto; }
	.tnv-toolbar .tnv-toolbar-iva { margin-left: auto; }

	.tnv-tabella-scroll { box-shadow: none; background: transparent; overflow: visible; border-radius: 0; }
	table.tnv-tabella, .tnv-tbody { display: block; width: 100%; }
	.tnv-tabella thead { display: none; }

	.tnv-tabella .tnv-riga,
	.tnv-tabella .tnv-riga-vuota {
		display: grid;
		grid-template-columns: 84px minmax(0, 1fr);
		grid-template-areas:
			"img nome"
			"img prezzo"
			"img stato"
			"buy buy";
		gap: 1px 10px;
		align-items: start;
		background: #fff;
		border-radius: 10px;
		box-shadow: var(--tnv-ombra);
		padding: 10px;
		margin: 0 6px 8px;
		animation: none;
	}
	.tnv-riga-vuota { grid-template-areas: "img nome"; }
	.tnv-tabella tbody td {
		display: block;
		padding: 0;
		border: none !important;
		background: transparent !important;
		width: auto;
	}
	.tnv-col-img { grid-area: img; }
	.tnv-col-img .tnv-img, .tnv-col-img img { width: 84px; height: 84px; margin: 0; }
	.tnv-col-nome { grid-area: nome; min-width: 0; }
	.tnv-nome { font-size: 13.5px; }
	.tnv-col-prezzo { grid-area: prezzo; white-space: normal; margin-top: 3px; width: auto; }
	.tnv-col-buy { grid-area: buy; width: auto; margin-top: 8px; }
	/* stato visibile anche su mobile, sotto il prezzo */
	.tnv-col-stock { grid-area: stato; width: auto; margin-top: 2px; }
	.tnv-col-stock .tnv-stock { font-size: 12px; }

	/* acquisto stile app: blocco compatto allineato a DESTRA della card,
	   stessa griglia del desktop → stepper, Pedana e Strato larghi uguali */
	.tnv-acquisto {
		width: 190px;
		margin-left: auto;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 5px 6px;
	}
	.tnv-stepper { height: 36px; }
	.tnv-tabella-wrap .tnv-stepper .tnv-step { flex: 0 0 32px; width: 32px; font-size: 18px; }
	.tnv-tabella-wrap .tnv-stepper input.tnv-qty[type="number"] { font-size: 14px; }
	.tnv-btn-cart { width: 40px; height: 40px; justify-self: center; }
	.tnv-chip { padding: 5px 4px; font-size: 11.5px; }
	.tnv-chip strong { font-size: 12.5px; }
	.tnv-accedi { margin-top: 2px; }

	.tnv-paginazione { margin: 10px 6px 0; }
	.tnv-pag { min-width: 38px; height: 38px; }

	.tnv-toast { bottom: 84px; } /* sopra la bottom bar PWA */
}

/* schermi molto piccoli */
@media only screen and (max-width: 380px) {
	.tnv-tabella .tnv-riga { grid-template-columns: 70px minmax(0, 1fr); }
	.tnv-col-img .tnv-img, .tnv-col-img img { width: 70px; height: 70px; }
	.tnv-chip { font-size: 10px; padding: 3px 4px; }
}

/* ---------- PULSANTE FILTRA MOBILE: cerchio fluttuante sopra la barra PWA ---------- */
@media only screen and (max-width: 849px) {
	body.tnv-tabella-attiva .category-filter-row { margin: 0; }
	body.tnv-tabella-attiva .category-filter-row .filter-button {
		position: fixed;
		left: 14px;
		/* 50px di barra di navigazione PWA + 14px di margine + notch iPhone */
		bottom: calc(64px + env(safe-area-inset-bottom, 0px));
		/* sotto l'overlay off-canvas (1042): il pannello filtri aperto lo copre */
		z-index: 1041;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 3px;
		width: 58px;
		height: 58px;
		margin: 0;
		border-radius: 50%;
		background: #7a9c59;
		color: #fff !important;
		box-shadow: 0 3px 6px rgba(0, 0, 0, .18), 0 6px 18px rgba(122, 156, 89, .45);
		-webkit-tap-highlight-color: transparent;
		animation: tnv-fab-pop .35s cubic-bezier(.34, 1.56, .64, 1);
		transition: transform .15s, box-shadow .15s, background .15s;
	}
	body.tnv-tabella-attiva .category-filter-row .filter-button:hover,
	body.tnv-tabella-attiva .category-filter-row .filter-button:focus {
		background: #64814a;
		color: #fff !important;
	}
	body.tnv-tabella-attiva .category-filter-row .filter-button:active {
		transform: scale(.92);
		box-shadow: 0 2px 5px rgba(0, 0, 0, .2);
	}
	body.tnv-tabella-attiva .category-filter-row .filter-button i { font-size: 21px; line-height: 1; }
	body.tnv-tabella-attiva .category-filter-row .filter-button strong {
		font-size: 8.5px;
		font-weight: 700;
		letter-spacing: .06em;
		line-height: 1;
	}
}
@keyframes tnv-fab-pop {
	from { transform: scale(0); opacity: 0; }
	to { transform: scale(1); opacity: 1; }
}

/* ---------- LIGHTBOX FOTO ---------- */
.tnv-zoom { display: block; cursor: zoom-in; }
html.tnv-no-scroll, html.tnv-no-scroll body { overflow: hidden; }
.tnv-lightbox {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(17, 24, 39, .85);
	backdrop-filter: blur(3px);
	-webkit-backdrop-filter: blur(3px);
	opacity: 0;
	visibility: hidden;
	transition: opacity .2s;
	cursor: zoom-out;
	padding: 20px;
}
.tnv-lightbox.aperto { opacity: 1; visibility: visible; }
.tnv-lightbox figure { margin: 0; text-align: center; max-width: 100%; }
.tnv-lightbox img {
	max-width: min(92vw, 900px);
	max-height: 82vh;
	width: auto;
	height: auto;
	border-radius: 12px;
	background: #fff;
	padding: 12px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .4);
	transform: scale(.92);
	transition: transform .2s;
}
.tnv-lightbox.aperto img { transform: scale(1); }
.tnv-lightbox figcaption {
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	margin-top: 12px;
	text-shadow: 0 1px 3px rgba(0, 0, 0, .5);
}
.tnv-lightbox-chiudi {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	border: none;
	background: rgba(255, 255, 255, .15);
	color: #fff;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	transition: background .15s;
	padding: 0;
	margin: 0;
	min-height: 0;
}
.tnv-lightbox-chiudi:hover { background: rgba(255, 255, 255, .3); }

/* ---------- ACCESSIBILITÀ ---------- */
@media (prefers-reduced-motion: reduce) {
	.tnv-tabella-wrap *, .tnv-toast,
	body.tnv-tabella-attiva .category-filter-row .filter-button { animation: none !important; transition: none !important; }
}
