/* Nelb WooCommerce Macchedil Pack — Griglia Categorie (v1.28.0, riscritta).
   Card sempre bianca (funziona su sezioni light e dark).
   Modalità: --vendita / --nolopoint. Barretta sempre arancio (brandbook).
   La card è <article>: testata linkata + chip link reali + CTA. */

.nelb-cg {
	--nelb-cg-ratio: 4 / 3;
	--nelb-cg-orange: #FE3F12;
	--nelb-cg-dark: #212121;
	--nelb-cg-muted: #9A9A9A;
	--nelb-cg-soft: #F5F7F7;
	--nelb-cg-border: #EDEDED;
}

/* ---------- Toolbar ricerca ---------- */
.nelb-cg-toolbar {
	display: flex;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
	margin-bottom: 18px;
}
.nelb-cg-search {
	position: relative;
	flex: 1 1 260px;
	max-width: 460px;
}
.nelb-cg-lens {
	position: absolute;
	left: 15px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--nelb-cg-muted);
	pointer-events: none;
}
.nelb-cg-input {
	width: 100%;
	height: 48px;
	border: 1.5px solid #E0E0E0;
	border-radius: 10px;
	padding: 0 42px;
	font-family: 'Gudea', Arial, sans-serif;
	font-size: 15px;
	color: var(--nelb-cg-dark);
	background: #fff;
	transition: border-color .2s ease;
	-webkit-appearance: none;
	appearance: none;
	box-shadow: none;
}
.nelb-cg-input:focus {
	outline: none;
	border-color: var(--nelb-cg-orange);
}
.nelb-cg-input::placeholder {
	color: var(--nelb-cg-muted);
}
.nelb-cg-clear {
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	width: 24px;
	height: 24px;
	border: 0;
	border-radius: 50%;
	background: var(--nelb-cg-soft);
	color: var(--nelb-cg-muted);
	cursor: pointer;
	font-size: 15px;
	line-height: 1;
	padding: 0;
	display: none;
	align-items: center;
	justify-content: center;
}
.nelb-cg-clear.is-on {
	display: flex;
}
.nelb-cg-counter {
	font-family: 'Gudea', Arial, sans-serif;
	font-size: 13px;
	font-weight: 700;
	color: var(--nelb-cg-muted);
	margin-left: auto;
}
.nelb-cg-counter b {
	color: var(--nelb-cg-dark);
}

/* ---------- Griglia ---------- */
.nelb-cg-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 18px;
}

/* ---------- Card ---------- */
.nelb-cg-card {
	position: relative;
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--nelb-cg-border);
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 2px 10px rgba(20, 20, 20, .04);
	transition: transform .15s ease, box-shadow .15s ease;
}
.nelb-cg-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 18px rgba(20, 20, 20, .08);
}
.nelb-cg-card.is-off {
	display: none;
}

/* Testata linkata (foto o colorata + titolo) */
.nelb-cg-headlink {
	display: block;
	text-decoration: none;
	color: inherit;
}

/* Area immagine */
.nelb-cg-thumb {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: var(--nelb-cg-ratio);
	padding: 14px;
	background: var(--nelb-cg-soft);
}
.nelb-cg-img {
	width: 100%;
	height: 100%;
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	display: block;
}
.nelb-cg-flush-yes .nelb-cg-thumb {
	padding: 0;
}
.nelb-cg-flush-yes .nelb-cg-img {
	object-fit: cover;
}

/* Titolo sotto la foto */
.nelb-cg-body-top {
	display: block;
	padding: 14px 16px 0;
}

/* Testata colorata (nessuna foto): stessa proporzione dell'immagine,
   così foto e testate convivono nella stessa riga senza sbalzi */
.nelb-cg-chead {
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	gap: 6px;
	aspect-ratio: var(--nelb-cg-ratio);
	padding: 16px;
	background: var(--nelb-cg-soft);
	border-bottom: 1px solid var(--nelb-cg-border);
	position: relative;
}
.nelb-cg-bar {
	display: block;
	width: 32px;
	height: 3px;
	border-radius: 2px;
	background: var(--nelb-cg-orange); /* sempre arancio, anche Nolopoint */
}

/* Titolo e conteggio */
.nelb-cg-title {
	display: block;
	font-family: 'Libre Franklin', Arial, sans-serif;
	font-weight: 800;
	font-size: 14px;
	line-height: 1.25;
	color: var(--nelb-cg-dark);
	text-transform: uppercase;
}
.nelb-cg-headlink:hover .nelb-cg-title {
	color: var(--nelb-cg-orange);
}
.nelb-cg-count {
	display: block;
	font-family: 'Gudea', Arial, sans-serif;
	font-weight: 400;
	font-size: 12px;
	text-transform: none;
	letter-spacing: 0;
	color: var(--nelb-cg-muted);
	margin-top: 3px;
}

/* Pill "A noleggio" */
.nelb-cg-pill {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 2;
	background: #0284C7;
	color: #E0F2FE;
	font-family: 'Libre Franklin', Arial, sans-serif;
	font-weight: 800;
	font-size: 10.5px;
	letter-spacing: .1em;
	text-transform: uppercase;
	padding: 5px 11px;
	border-radius: 999px;
	line-height: 1;
}
.nelb-cg-pill--inline {
	position: absolute;
	top: 12px;
	right: 12px;
	left: auto;
}

/* ---------- Corpo ---------- */
.nelb-cg-body {
	display: flex;
	flex-direction: column;
	flex: 1;
	gap: 10px;
	padding: 12px 16px 16px;
}

/* Chip */
.nelb-cg-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
}
.nelb-cg-chip {
	display: inline-block;
	font-family: 'Gudea', Arial, sans-serif;
	font-weight: 700;
	font-size: 12px;
	line-height: 1;
	padding: 6px 11px;
	border-radius: 999px;
	text-decoration: none;
	border: 1px solid transparent;
	transition: background .2s ease, color .2s ease;
}
.nelb-cg--vendita .nelb-cg-chip {
	background: var(--nelb-cg-soft);
	color: var(--nelb-cg-dark);
}
.nelb-cg--vendita a.nelb-cg-chip:hover {
	background: #FFF3EF;
	color: var(--nelb-cg-orange);
}
.nelb-cg--nolopoint .nelb-cg-chip {
	background: #E0F2FE;
	color: #0C4A6E;
}
.nelb-cg--nolopoint a.nelb-cg-chip:hover {
	background: #0284C7;
	color: #E0F2FE;
}
.nelb-cg-chip--sub {
	font-size: 11px;
	opacity: .85;
}
.nelb-cg-chip--extra.is-capped {
	display: none;
}
.nelb-cg-chip.is-hit {
	background: #FFF3EF;
	color: var(--nelb-cg-orange);
	border-color: #FCD4C7;
}
.nelb-cg--nolopoint .nelb-cg-chip.is-hit {
	background: #0284C7;
	color: #E0F2FE;
	border-color: transparent;
}
.nelb-cg-chip.is-miss {
	display: none;
}

/* "+N altre" */
.nelb-cg-more {
	align-self: flex-start;
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
	font-family: 'Libre Franklin', Arial, sans-serif;
	font-weight: 800;
	font-size: 11px;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--nelb-cg-muted);
	transition: color .2s ease;
}
.nelb-cg-more:hover {
	color: var(--nelb-cg-orange);
}
.nelb-cg-more.is-off {
	display: none;
}

/* Nota card senza chip */
.nelb-cg-note {
	font-family: 'Gudea', Arial, sans-serif;
	font-size: 12.5px;
	font-style: italic;
	color: var(--nelb-cg-muted);
}

/* CTA */
.nelb-cg-cta {
	margin-top: auto;
	font-family: 'Libre Franklin', Arial, sans-serif;
	font-weight: 800;
	font-size: 12.5px;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--nelb-cg-orange);
	text-decoration: none;
}
.nelb-cg-arrow {
	display: inline-block;
	transition: transform .15s ease;
}
.nelb-cg-cta:hover .nelb-cg-arrow,
.nelb-cg-card:hover .nelb-cg-arrow {
	transform: translateX(3px);
}

/* Empty state ricerca */
.nelb-cg-empty {
	background: #fff;
	border: 1px solid var(--nelb-cg-border);
	border-radius: 14px;
	padding: 40px 24px;
	text-align: center;
	font-family: 'Gudea', Arial, sans-serif;
	font-size: 14px;
	color: var(--nelb-cg-muted);
	margin-top: 18px;
}

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
	.nelb-cg-grid {
		gap: 12px;
	}
	.nelb-cg-body {
		padding: 10px 12px 14px;
	}
	.nelb-cg-body-top {
		padding: 12px 12px 0;
	}
	.nelb-cg-chead {
		padding: 12px;
	}
	.nelb-cg-title {
		font-size: 12.5px;
	}
	.nelb-cg-counter {
		width: 100%;
		margin-left: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.nelb-cg-card,
	.nelb-cg-arrow,
	.nelb-cg-chip,
	.nelb-cg-input {
		transition: none;
	}
}
