/* Nelb WooCommerce Macchedil Pack — Griglia Prodotti.
   Stili pilotati da variabili CSS impostate dai controlli Elementor. */

.nelb-pg {
	--nelb-primary: #FE3F12;
	--nelb-lines: 2;
	--nelb-thumb-ratio: 1 / 1;
	--nelb-btn-bg: #FE3F12;
	--nelb-btn-fg: #ffffff;
	--nelb-btn-bg-h: #FE3F12;
	--nelb-btn-fg-h: #ffffff;
	--nelb-btn-radius: 10px;
	--nelb-btn-bw: 0px;
	--nelb-btn-bc: transparent;
}

.nelb-pg-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 18px;
	transition: opacity .15s ease;
}

/* Card */
.nelb-pg-card {
	position: relative;
	background: #fff;
	border: 1px solid #ededed;
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 2px 10px rgba(20, 20, 20, .04);
	display: flex;
	flex-direction: column;
}
.nelb-pg-thumb {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: var(--nelb-thumb-ratio);
	padding: 14px;
	background: #fff;
}
.nelb-pg-img {
	width: 100%;
	height: 100%;
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	display: block;
}
.nelb-pg-body {
	padding: 8px 16px 16px;
	display: flex;
	flex-direction: column;
	flex: 1;
}
.nelb-pg-title {
	font-weight: 800;
	font-size: 14px;
	line-height: 1.25;
	color: #212121;
	text-transform: uppercase;
	margin: 0 0 10px;
	display: -webkit-box;
	-webkit-line-clamp: var(--nelb-lines);
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.nelb-pg-title a {
	color: inherit;
	text-decoration: none;
}
.nelb-pg-title a:hover {
	color: var(--nelb-primary);
}

/* Piede card: prezzo + azione */
.nelb-pg-foot {
	margin-top: auto;
}
.nelb-pg-price {
	font-weight: 800;
	font-size: 16px;
	color: var(--nelb-primary);
}
.nelb-pg-price del {
	color: #9a9a9a;
	font-weight: 400;
	font-size: .78em;
	margin-right: 5px;
}
.nelb-pg-price ins {
	text-decoration: none;
}
.nelb-pg-price .woocommerce-price-suffix {
	color: #9a9a9a;
	font-weight: 400;
	font-size: .72em;
	margin-left: 3px;
}

/* ---- Bottone: stile INTERO ---- */
.nelb-pg.style-full .nelb-pg-cart {
	margin-top: 12px;
}
.nelb-pg.style-full .nelb-pg-cart .button {
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 100%;
	min-height: 44px;
	padding: 8px 14px;
	text-align: center;
	line-height: 1.2;
	white-space: normal;
	border: var(--nelb-btn-bw) solid var(--nelb-btn-bc);
	border-radius: var(--nelb-btn-radius);
	font-weight: 800;
	font-size: 14px;
	text-decoration: none;
	cursor: pointer;
	background: var(--nelb-btn-bg);
	color: var(--nelb-btn-fg);
}
.nelb-pg.style-full .nelb-pg-cart .button:hover {
	background: var(--nelb-btn-bg-h);
	color: var(--nelb-btn-fg-h);
}
/* Non acquistabili al volo (variabili/bundle/compositi): outline scuro */
.nelb-pg.style-full .nelb-pg-cart .button:not(.ajax_add_to_cart) {
	background: #fff;
	color: #212121;
	border: 1.5px solid #212121;
}
.nelb-pg.style-full .nelb-pg-cart .button:not(.ajax_add_to_cart):hover {
	background: #212121;
	color: #fff;
}

/* ---- Bottone: stile "+" ---- */
.nelb-pg.style-plus .nelb-pg-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}
.nelb-pg.style-plus .nelb-pg-cart .button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	padding: 0;
	font-size: 0;
	text-decoration: none;
	cursor: pointer;
	border: var(--nelb-btn-bw) solid var(--nelb-btn-bc);
	border-radius: var(--nelb-btn-radius);
	background: var(--nelb-btn-bg);
	color: var(--nelb-btn-fg);
}
.nelb-pg.style-plus .nelb-pg-cart .button::after {
	font-size: 24px;
	line-height: 1;
}
.nelb-pg.style-plus .nelb-pg-cart .button.ajax_add_to_cart::after {
	content: '+';
}
.nelb-pg.style-plus .nelb-pg-cart .button:not(.ajax_add_to_cart) {
	background: #fff;
	color: #212121;
	border: 1.5px solid #212121;
}
.nelb-pg.style-plus .nelb-pg-cart .button:not(.ajax_add_to_cart)::after {
	content: '\2192';
	font-size: 20px;
}
.nelb-pg.style-plus .nelb-pg-cart .button:hover {
	filter: brightness(.96);
}
.nelb-pg .nelb-pg-cart .button.loading {
	opacity: .7;
}

/* Carica altri */
.nelb-pg-loadmore {
	text-align: center;
}
.nelb-pg-more {
	display: inline-block;
	margin-top: 1.5rem;
	background: #fff;
	border: 1.5px solid var(--nelb-primary);
	color: var(--nelb-primary);
	font-weight: 800;
	font-size: 14px;
	padding: 11px 26px;
	border-radius: 8px;
	cursor: pointer;
	transition: all .12s ease;
}
.nelb-pg-more:hover {
	background: var(--nelb-primary);
	color: #fff;
}
.nelb-pg-more[disabled] {
	opacity: .5;
	cursor: default;
}

/* Vuoto + loading */
.nelb-pg-empty {
	padding: 40px 10px;
	text-align: center;
	color: #9a9a9a;
}
.nelb-pg.nelb-pg-loading .nelb-pg-grid {
	opacity: .5;
}

/* ---- Carosello (Swiper) ---- */
.nelb-pg-mode-carousel {
	position: relative;
	--nelb-arrow-bg: #fff;
	--nelb-arrow-fg: #212121;
	--nelb-arrow-bg-h: #FE3F12;
	--nelb-arrow-fg-h: #fff;
	--nelb-dot-active: #FE3F12;
}
.nelb-pg-mode-carousel .nelb-pg-swiper {
	overflow: hidden;
	padding: 4px 0 30px;
}
.nelb-pg-mode-carousel .nelb-pg-track {
	display: flex;
	box-sizing: content-box;
}
.nelb-pg-mode-carousel .swiper-slide {
	height: auto;
	display: flex;
}
.nelb-pg-mode-carousel .swiper-slide > .nelb-pg-card {
	width: 100%;
}
/* Le card prodotto possono avere classi di WooCommerce: il loro figlio diretto
   nella slide è la card, quindi forziamo width:100% e altezza piena. */
.nelb-pg-mode-carousel .swiper-slide > * {
	width: 100%;
}

/* Frecce */
.nelb-pg-arrow {
	position: absolute;
	top: calc(50% - 22px);
	width: 40px;
	height: 40px;
	border-radius: 999px;
	border: 1px solid #ededed;
	background: var(--nelb-arrow-bg);
	color: var(--nelb-arrow-fg);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 5;
	box-shadow: 0 2px 8px rgba(20, 20, 20, .06);
	transition: background .15s ease, color .15s ease, transform .1s ease;
}
.nelb-pg-arrow:hover {
	background: var(--nelb-arrow-bg-h);
	color: var(--nelb-arrow-fg-h);
}
.nelb-pg-arrow:active {
	transform: scale(.96);
}
.nelb-pg-arrow.swiper-button-disabled {
	opacity: .35;
	cursor: default;
}
.nelb-pg-prev { left: -8px; }
.nelb-pg-next { right: -8px; }

/* Puntini */
.nelb-pg-mode-carousel .swiper-pagination {
	position: absolute;
	bottom: 4px;
	left: 0;
	right: 0;
	text-align: center;
}
.nelb-pg-mode-carousel .swiper-pagination-bullet-active {
	background: var(--nelb-dot-active);
	opacity: 1;
}
@media (max-width: 767px) {
	.nelb-pg.mob-horizontal .nelb-pg-grid {
		display: flex;
		flex-direction: column;
		gap: 12px;
	}
	.nelb-pg.mob-horizontal .nelb-pg-card {
		flex-direction: row;
		align-items: stretch;
		min-height: 116px;
	}
	.nelb-pg.mob-horizontal .nelb-pg-thumb {
		width: 108px;
		flex: 0 0 108px;
		aspect-ratio: auto;
	}
	.nelb-pg.mob-horizontal .nelb-pg-body {
		flex: 1;
		min-width: 0;
		justify-content: center;
	}
}

/* ============================================================
 * SEARCH RESULTS — empty message + fallback "novità"
 * ============================================================ */
.nelb-pg-empty {
	font-family: 'Gudea', system-ui, sans-serif;
	font-size: 15px;
	color: #4A4A4A;
	padding: 24px 20px;
	text-align: center;
	background: #F5F7F7;
	border-radius: 10px;
	margin: 8px 0 0;
}

.nelb-pg-fallback {
	margin-top: 28px;
	padding-top: 24px;
	border-top: 1px solid #EDEDED;
}
.nelb-pg-fallback[hidden] { display: none; }
.nelb-pg-fallback-eyebrow {
	font-family: 'Libre Franklin', system-ui, sans-serif;
	font-weight: 800;
	font-size: 12px;
	letter-spacing: .14em;
	color: #FE3F12;
	text-transform: uppercase;
	margin-bottom: 14px;
	position: relative;
	padding-left: 12px;
}
.nelb-pg-fallback-eyebrow::before {
	content: '';
	position: absolute;
	left: 0; top: 4px; bottom: 4px;
	width: 3px;
	background: #FE3F12;
	border-radius: 2px;
}

/* Responsive: l'empty resta centrato, fallback eredita grid del widget */
@media (max-width: 480px) {
	.nelb-pg-empty {
		font-size: 14px;
		padding: 18px 14px;
	}
	.nelb-pg-fallback { margin-top: 22px; padding-top: 18px; }
}

/* ===== Modalità Noleggio (card senza prezzo/carrello) ===== */
.nelb-pg-card--noleggio .nelb-pg-body {
	flex: 1;
	display: flex;
	flex-direction: column;
}
.nelb-pg-card--noleggio .nelb-pg-specs {
	margin-top: 11px;
	margin-bottom: 14px;
	display: flex;
	flex-direction: column;
}
.nelb-pg-card--noleggio .nelb-pg-spec {
	display: flex;
	align-items: baseline;
	gap: 8px;
	padding: 8px 0;
	border-bottom: 1px solid var(--nelb-nol-line, #ededed);
	font-size: 12.5px;
	line-height: 1.3;
}
.nelb-pg-card--noleggio .nelb-pg-spec:first-child {
	border-top: 1px solid var(--nelb-nol-line, #ededed);
}
.nelb-pg-card--noleggio .nelb-pg-spec-mark {
	color: var(--nelb-nol-mark, #FE3F12);
	font-weight: 800;
	font-size: 12px;
	line-height: 1;
}
.nelb-pg-card--noleggio .nelb-pg-spec-label {
	font-weight: 800;
	font-size: 12px;
	letter-spacing: .01em;
	color: var(--nelb-nol-label, #212121);
}
.nelb-pg-card--noleggio .nelb-pg-spec-val {
	margin-left: auto;
	text-align: right;
	color: var(--nelb-nol-val, #4A4A4A);
}
.nelb-pg-card--noleggio .nelb-pg-info {
	margin-top: auto;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	text-align: center;
	text-decoration: none;
	font-weight: 800;
	font-size: 12px;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--nelb-nol-info-fg, #FE3F12);
	border: 1.5px solid var(--nelb-nol-info-bd, #FE3F12);
	border-radius: 10px;
	padding: 11px 12px;
	transition: background-color .15s ease, color .15s ease;
}
.nelb-pg-card--noleggio .nelb-pg-info:hover {
	background: var(--nelb-nol-info-bg-h, #FE3F12);
	color: var(--nelb-nol-info-fg-h, #ffffff);
}
