/*
 * Sezione "Completa il tuo tris" (prodotti correlati) + badge upsell
 * Usa le variabili CSS del tema (Woodmart) cosi' colori/font restano coerenti col resto del sito.
 */

.lpdo-tris-section,
.lpdo-upsell-badge {
	--lpdo-upsell-bg: #faf7f2;
	--lpdo-upsell-border: rgba(0, 0, 0, .08);
	--lpdo-upsell-accent: var(--wd-primary-color, #a9824c);
}

/* ---------- "Completa il tuo tris" (prodotti correlati esistenti) ---------- */

.lpdo-tris-section {
	text-align: center;
}

h3.title.slider-title {
	text-align: center;
}

.lpdo-tris-section .slider-title {
	margin-bottom: 8px;
}

.lpdo-tris-section .slider-title:before {
	left: 50%;
	transform: translateX(-50%);
}

.lpdo-tris-section .products,
.lpdo-tris-section .wd-products-slider {
	text-align: left;
}

.lpdo-tris-section .descrizione-clamping {
	display: none;
}

.lpdo-tris-section .woodmart-add-btn {
	padding: 10px;
	text-align: center;
}

.lpdo-tris-section .woodmart-add-btn .add_to_cart_button {
	width: 100%;
}

.lpdo-tris-subtitle {
	max-width: 560px;
	margin: 0 auto 26px;
	font-size: 15px;
	line-height: 1.5;
	color: var(--wd-text-color, #555);
}

.lpdo-tris-subtitle strong {
	color: var(--lpdo-upsell-accent);
	font-weight: 700;
}

/* ---------- Riepilogo offerta ---------- */

.lpdo-tris-offer-recap {
	display: flex;
	align-items: center;
	gap: 18px;
	max-width: 720px;
	margin: 30px auto 0;
	background: var(--lpdo-upsell-bg);
	border: 1px solid var(--lpdo-upsell-border);
	border-radius: 14px;
	padding: 18px 22px;
	text-align: left;
}

.lpdo-tris-offer-icon {
	width: 40px;
	height: 40px;
	flex-shrink: 0;
	background-image: url("../img/gift-icon.png");
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
}

.lpdo-tris-offer-text {
	flex: 1;
	min-width: 0;
}

.lpdo-tris-offer-text strong {
	display: block;
	font-size: 15px;
	font-weight: 700;
	color: var(--wd-title-color, #222);
	text-transform: uppercase;
	letter-spacing: .02em;
	margin-bottom: 4px;
}

.lpdo-tris-offer-desc {
	display: block;
	font-size: 13px;
	color: var(--wd-text-color, #666);
	margin-bottom: 8px;
}

.lpdo-tris-offer-text ul {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 4px 18px;
}

.lpdo-tris-offer-text li {
	font-size: 13px;
	line-height: 1.3;
	color: #2e7d32;
	font-weight: 600;
	position: relative;
	padding-left: 18px;
}

.lpdo-tris-offer-text li::before {
	content: "\2713";
	position: absolute;
	left: 0;
	color: #2e7d32;
}

.lpdo-tris-offer-total {
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	background: color-mix(in srgb, var(--lpdo-upsell-accent) 80%, #000 20%);
	color: #fff;
	border-radius: 10px;
	padding: 12px 22px;
	text-align: center;
}

.lpdo-tris-offer-total-label {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: .06em;
	opacity: .85;
}

.lpdo-tris-offer-total-price {
	display: flex;
	align-items: baseline;
	gap: 8px;
	white-space: nowrap;
}

.lpdo-tris-offer-total-old {
	font-size: 13px;
	font-weight: 400;
	text-decoration: line-through;
	opacity: .65;
}

.lpdo-tris-offer-total-amount {
	font-size: 22px;
	font-weight: 700;
	white-space: nowrap;
}

@media (max-width: 600px) {
	.lpdo-tris-offer-recap {
		flex-wrap: wrap;
		justify-content: center;
		text-align: center;
	}

	.lpdo-tris-offer-text {
		flex: 1 1 100%;
		text-align: center;
	}

	.lpdo-tris-offer-text ul {
		justify-content: center;
	}

	.lpdo-tris-offer-total {
		flex: 1 1 100%;
	}
}

/* ---------- Badge upsell sotto il pulsante "Aggiungi al carrello" ---------- */

.lpdo-upsell-badge {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	background: var(--lpdo-upsell-bg);
	border: 1px solid var(--lpdo-upsell-border);
	border-radius: 12px;
	padding: 14px 16px;
	margin: 14px 0 0;
	max-width: 460px;
	/* form.cart e' un flex container; alcune integrazioni (es. woo-payments/stripe)
	   impostano "order" su quantity/pulsante, quindi il badge deve avere un suo
	   "order" esplicito (dopo il pulsante) e occupare tutta la riga per andare a capo. */
	flex: 0 0 100% !important;
	width: 100%;
	order: 11;
}

.lpdo-upsell-badge-icon {
	font-size: 15px;
	line-height: 1.3;
	flex-shrink: 0;
}

.lpdo-upsell-badge-text {
	flex: 1;
	min-width: 0;
}

.lpdo-upsell-badge-text strong {
	display: block;
	font-size: 14px;
	font-weight: 600;
	color: var(--wd-title-color, #222);
	margin-bottom: 6px;
}

.lpdo-upsell-badge-text ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.lpdo-upsell-badge-text li {
	font-size: 13px;
	line-height: 1;
	color: var(--wd-text-color, #555);
	position: relative;
	padding-left: 14px;
}

.lpdo-upsell-badge-text li:not(:last-child) {
	margin-bottom: 4px;
}

.lpdo-upsell-badge-text li::before {
	content: "\2022";
	position: absolute;
	left: 0;
	color: var(--lpdo-upsell-accent);
}

.lpdo-upsell-badge-gift {
	width: 42px;
	height: 42px;
	flex-shrink: 0;
	align-self: center;
	background-image: url("../img/gift-icon.png");
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
}
