/* Nelb WooCommerce Macchedil Pack — Carrello. */

.nelb-cart {
	--nelb-primary: #FE3F12;
	--nelb-cart-top: 80px;
	display: grid;
	grid-template-columns: 1.55fr 1fr;
	gap: 18px;
	align-items: start;
}

.nelb-cart .panel {
	background: #fff;
	border: 1px solid #ededed;
	border-radius: 14px;
	box-shadow: 0 2px 10px rgba(20, 20, 20, .04);
	overflow: hidden;
}

.nelb-cart-head {
	font-weight: 800;
	font-size: 13px;
	letter-spacing: .05em;
	text-transform: uppercase;
	color: #212121;
	padding: 16px 20px;
	border-bottom: 1px solid #f0f0f0;
}
.nelb-cart-count {
	font-weight: 400;
	color: #9a9a9a;
	margin-left: 4px;
}

/* Riga prodotto */
.nelb-cart-row {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 14px 20px;
	border-bottom: 1px solid #f0f0f0;
}
.nelb-cart-row:last-child { border-bottom: none; }

.nelb-cart-thumb {
	width: 60px;
	height: 60px;
	flex: 0 0 60px;
	border-radius: 10px;
	overflow: hidden;
	background: #FFFFFF;
	border: 1px solid #EDEDED;
	padding: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
}
.nelb-cart-img { width: 100%; height: 100%; object-fit: contain; display: block; }
.nelb-cart-noimg { width: 100%; height: 100%; }

.nelb-cart-info {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.nelb-cart-title {
	font-weight: 800;
	font-size: 13.5px;
	line-height: 1.25;
	color: #212121;
	text-transform: uppercase;
	text-decoration: none;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	word-break: break-word;
}
a.nelb-cart-title:hover { color: var(--nelb-primary); }

.nelb-cart-price {
	font-weight: 800;
	font-size: 13px;
	color: var(--nelb-primary);
}
.nelb-cart-price del { color: #9a9a9a; font-weight: 400; margin-right: 4px; }
.nelb-cart-price ins { text-decoration: none; }
.nelb-cart-price .woocommerce-price-suffix { color: #9a9a9a; font-weight: 400; font-size: .82em; margin-left: 3px; }

.nelb-cart-qty {
	display: inline-flex;
	align-items: center;
	background: #F5F7F7;
	border-radius: 8px;
	overflow: hidden;
	flex: 0 0 auto;
}
.nelb-cart-qbtn {
	width: 32px;
	height: 32px;
	border: none;
	background: transparent;
	color: #212121;
	font-size: 18px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	font-family: inherit;
	transition: background .12s ease, color .12s ease;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.nelb-cart-qbtn:hover {
	background: #FE3F12;
	color: #fff;
}
.nelb-cart-qbtn:active { transform: scale(.95); }
.nelb-cart-v {
	min-width: 28px;
	text-align: center;
	font-weight: 800;
	font-size: 13px;
	color: #212121;
	background: #fff;
	padding: 0 6px;
	align-self: stretch;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.nelb-cart-sub {
	font-weight: 800;
	font-size: 14px;
	color: var(--nelb-primary);
	min-width: 80px;
	text-align: right;
}

.nelb-cart-rm {
	flex: 0 0 auto;
	width: 28px;
	height: 28px;
	border: 1.5px solid #E0E0E0;
	background: #fff;
	color: #9a9a9a;
	border-radius: 999px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all .12s ease;
}
.nelb-cart-rm:hover {
	background: #FE3F12;
	border-color: #FE3F12;
	color: #fff;
}
.nelb-cart-rm:active { transform: scale(.95); }

.nelb-cart-empty {
	padding: 30px 20px;
	text-align: center;
	color: #9a9a9a;
}

/* Riepilogo lato destro */
.nelb-cart-ship {
	padding: 14px 20px;
	border-bottom: 1px solid #f0f0f0;
}
.nelb-cart-ship-title {
	font-weight: 800;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: #9a9a9a;
	margin: 0 0 8px;
}
.nelb-cart-ship-opt {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 9px 10px;
	border: 1.5px solid #ededed;
	border-radius: 10px;
	cursor: pointer;
	margin-bottom: 6px;
	transition: all .12s;
}
.nelb-cart-ship-opt:last-child { margin-bottom: 0; }
.nelb-cart-ship-opt.on {
	border-color: var(--nelb-primary);
	background: #FFF3EF;
}
.nelb-cart-dot {
	width: 14px;
	height: 14px;
	flex: 0 0 auto;
	border-radius: 999px;
	border: 2px solid #c0c0c0;
	position: relative;
}
.nelb-cart-ship-opt.on .nelb-cart-dot { border-color: var(--nelb-primary); }
.nelb-cart-ship-opt.on .nelb-cart-dot::after {
	content: '';
	position: absolute;
	inset: 2px;
	background: var(--nelb-primary);
	border-radius: 999px;
}
.nelb-cart-ship-lbl { flex: 1; font-weight: 700; font-size: 13px; color: #212121; }
.nelb-cart-ship-cost { font-weight: 800; font-size: 13px; color: var(--nelb-primary); }

.nelb-cart-totals {
	padding: 14px 20px;
	display: grid;
	gap: 6px;
}
.nelb-cart-trow {
	display: flex;
	justify-content: space-between;
	font-size: 13px;
}
.nelb-cart-trow .l { color: #6a6a6a; }
.nelb-cart-trow .v { font-weight: 700; color: #212121; }

.nelb-cart-total {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	padding: 14px 20px;
	border-top: 1px solid #f0f0f0;
	background: #fafafa;
}
.nelb-cart-total .l {
	font-weight: 800;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: .05em;
}
.nelb-cart-total .v {
	font-weight: 800;
	font-size: 22px;
	color: var(--nelb-primary);
}
.nelb-cart-total .iva {
	display: block;
	font-size: 11px;
	color: #9a9a9a;
	font-weight: 400;
	text-transform: none;
	letter-spacing: 0;
	margin-top: 2px;
}

.nelb-cart-go {
	display: block;
	margin: 16px 20px 6px;
	padding: 16px 22px;
	background: var(--nelb-primary);
	color: #fff;
	text-align: center;
	text-decoration: none;
	font-weight: 800;
	font-size: 15px;
	border: none;
	border-radius: 10px;
	cursor: pointer;
	text-transform: uppercase;
	letter-spacing: .04em;
}
.nelb-cart-go:hover { background: #e5380f; color: #fff; }

.nelb-cart-trust {
	text-align: center;
	font-size: 11px;
	color: #9a9a9a;
	padding: 6px 20px 16px;
}

/* Stati loading + vuoto */
.nelb-cart.is-loading .nelb-cart-list,
.nelb-cart.is-loading .nelb-cart-side { opacity: .6; pointer-events: none; }
.nelb-cart.is-empty .nelb-cart-side { display: none; }
.nelb-cart.is-empty { grid-template-columns: 1fr !important; }

/* Sticky riepilogo */
@media (min-width: 768px) {
	.nelb-cart.sticky-summary .nelb-cart-side {
		position: sticky;
		top: var(--nelb-cart-top);
	}
}

/* Mobile (via classe applicata dal JS in base alla soglia configurata).
 * !important per battere il CSS che Elementor genera dal controllo "split_ratio"
 * con specificità più alta (body.elementor-page .elementor-element-xxx .nelb-cart). */
.nelb-cart.is-narrow { grid-template-columns: 1fr !important; }
.nelb-cart.is-narrow .nelb-cart-row {
	flex-wrap: wrap;
}
.nelb-cart.is-narrow .nelb-cart-info { flex: 1 1 auto; min-width: 0; }
.nelb-cart.is-narrow .nelb-cart-qty { order: 3; }
.nelb-cart.is-narrow .nelb-cart-sub { order: 4; margin-left: auto; }
.nelb-cart.is-narrow .nelb-cart-rm { order: 5; }

/* ==========================================================
 * v1.8.2 — variabili per stepper e bottone rimuovi + stile brand.
 * Tutto controllato dal widget via custom properties (--nelb-*).
 * Usiamo !important mirato per battere stili di tema/host sui <button>.
 * ========================================================== */

.nelb-cart {
	--nelb-qty-bg: #fff;
	--nelb-qty-bg-h: #FE3F12;
	--nelb-qty-fg: #212121;
	--nelb-qty-fg-h: #fff;
	--nelb-qty-border: #E0E0E0;
	--nelb-qty-bw: 1px;
	--nelb-qty-radius: 8px;

	--nelb-rm-bg: #fff;
	--nelb-rm-bg-h: #FE3F12;
	--nelb-rm-fg: #9a9a9a;
	--nelb-rm-fg-h: #fff;
	--nelb-rm-border: #E0E0E0;
	--nelb-rm-bw: 1.5px;
}

/* --- Stepper: stile "brand" (default): tre elementi separati, niente cassone --- */
.nelb-cart.qty-brand .nelb-cart-qty {
	background: transparent !important;
	border-radius: 0 !important;
	overflow: visible !important;
	gap: 6px;
}
.nelb-cart.qty-brand .nelb-cart-qbtn {
	background: var(--nelb-qty-bg) !important;
	color: var(--nelb-qty-fg) !important;
	border: var(--nelb-qty-bw) solid var(--nelb-qty-border) !important;
	border-radius: var(--nelb-qty-radius) !important;
	box-shadow: none !important;
	text-shadow: none !important;
}
.nelb-cart.qty-brand .nelb-cart-qbtn:hover {
	background: var(--nelb-qty-bg-h) !important;
	color: var(--nelb-qty-fg-h) !important;
	border-color: var(--nelb-qty-bg-h) !important;
}
.nelb-cart.qty-brand .nelb-cart-v {
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
	min-width: 24px;
	padding: 0;
}

/* --- Stepper: stile "soft" (variante grigia continua) --- */
.nelb-cart.qty-soft .nelb-cart-qty {
	background: #F5F7F7 !important;
	border-radius: var(--nelb-qty-radius) !important;
	overflow: hidden !important;
	gap: 0;
}
.nelb-cart.qty-soft .nelb-cart-qbtn {
	background: transparent !important;
	color: var(--nelb-qty-fg) !important;
	border: none !important;
	box-shadow: none !important;
	border-radius: 0 !important;
}
.nelb-cart.qty-soft .nelb-cart-qbtn:hover {
	background: var(--nelb-qty-bg-h) !important;
	color: var(--nelb-qty-fg-h) !important;
}
.nelb-cart.qty-soft .nelb-cart-v {
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
}

/* --- Override generali sul pulsante (battono Hello Elementor / browser default) --- */
.nelb-cart .nelb-cart-qbtn,
.nelb-cart .nelb-cart-rm {
	-webkit-appearance: none !important;
	appearance: none !important;
	font-family: inherit;
	line-height: 1;
}

/* --- Bottone rimuovi: forme --- */
.nelb-cart .nelb-cart-rm {
	background: var(--nelb-rm-bg) !important;
	color: var(--nelb-rm-fg) !important;
	border: var(--nelb-rm-bw) solid var(--nelb-rm-border) !important;
	box-shadow: none !important;
	text-shadow: none !important;
	padding: 0 !important;
	flex: 0 0 auto;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: all .12s ease;
}
.nelb-cart.rm-circle .nelb-cart-rm { border-radius: 999px !important; }
.nelb-cart.rm-square .nelb-cart-rm { border-radius: 8px !important; }
.nelb-cart.rm-flat   .nelb-cart-rm {
	border: none !important;
	background: transparent !important;
	border-radius: 0 !important;
}
.nelb-cart .nelb-cart-rm:hover {
	background: var(--nelb-rm-bg-h) !important;
	color: var(--nelb-rm-fg-h) !important;
	border-color: var(--nelb-rm-bg-h) !important;
}
.nelb-cart.rm-flat .nelb-cart-rm:hover {
	background: transparent !important;
	border: none !important;
	color: var(--nelb-rm-bg-h) !important;
}

/* SVG dell'icona rimuovi: visibile e centrata */
.nelb-cart .nelb-cart-rm svg {
	display: block;
	pointer-events: none;
}

/* Switch X / cestino tramite classe sul wrapper */
.nelb-cart .nelb-cart-rm .ico-trash { display: none; }
.nelb-cart.rm-ico-trash .nelb-cart-rm .ico-x { display: none; }
.nelb-cart.rm-ico-trash .nelb-cart-rm .ico-trash { display: block; }
