/* Carrello laterale: prodotti consigliati (inc/sidecart.php) */

.mfn-cart-holder .osm-sc-upsells:empty {
	display: none;
}

.osm-sc-upsells__box {
	padding: 12px 20px 14px;
	border-top: 1px solid var(--mfn-woo-border, #e5e5e5);
}

.osm-sc-upsells__box summary {
	display: flex;
	justify-content: space-between;
	align-items: center;
	cursor: pointer;
	list-style: none;
	font-family: "EB Garamond", serif;
	font-size: 18px;
	color: #1D231E;
}

.osm-sc-upsells__box summary::-webkit-details-marker {
	display: none;
}

.osm-sc-upsells__box summary::after {
	content: "";
	width: 8px;
	height: 8px;
	margin-right: 4px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: rotate(-135deg);
	transition: transform .2s;
}

.osm-sc-upsells__box:not([open]) summary::after {
	transform: rotate(45deg);
}

/* card in orizzontale: il carrello resta alto quanto prima */
.osm-sc-upsells__list {
	display: flex;
	gap: 10px;
	margin: 10px 0 0;
	padding: 0 0 4px;
	list-style: none;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: thin;
}

.osm-sc-upsell {
	display: flex;
	flex: 0 0 82%;
	align-items: center;
	gap: 10px;
	padding: 8px;
	border: 1px solid var(--mfn-woo-border, #e5e5e5);
	border-radius: 8px;
	background: #fff;
	scroll-snap-align: start;
}

.osm-sc-upsell__img {
	flex: 0 0 56px;
}

.osm-sc-upsell__img img {
	display: block;
	width: 56px;
	height: 56px;
	object-fit: cover;
	border-radius: 6px;
}

.osm-sc-upsell__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	min-width: 0;
	gap: 2px;
}

.osm-sc-upsell__name {
	display: -webkit-box;
	overflow: hidden;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	font-size: 13px;
	line-height: 1.3;
	color: #1D231E;
	text-decoration: none;
}

.osm-sc-upsell__price {
	font-size: 13px;
	font-weight: 600;
}

.osm-sc-upsell__add.add_to_cart_button {
	display: flex;
	flex: 0 0 34px;
	justify-content: center;
	align-items: center;
	width: 34px;
	height: 34px;
	margin: 0;
	padding: 0;
	border-radius: 50%;
	background: #727a35;
	color: #fff;
	font-size: 20px;
	line-height: 1;
	text-decoration: none;
}

.osm-sc-upsell__add.loading {
	opacity: .5;
	pointer-events: none;
}

/* WooCommerce aggiunge "Visualizza carrello" accanto al bottone: qui siamo gia' nel carrello */
.osm-sc-upsell .added_to_cart {
	display: none;
}

/* prezzo dei consigliati come quello dei prodotti nel carrello, senza "IVA inclusa" */
.osm-sc-upsell__price .woocommerce-price-suffix {
	display: none;
}

/* ---------------------------------------------------------------------------
 * Prodotti nel carrello: card compatte
 * Il tema le impagina a colonne (immagine 100px | nome e prezzo | totale con
 * un filetto) e sotto i 768px manda il totale su una riga sua al centro: il
 * nome va su tre o quattro righe e due prodotti non entrano nello schermo.
 * Qui immagine 72px | nome | totale a destra, quantita' e "Rimuovi" sotto.
 * ------------------------------------------------------------------------- */

.mfn-cart-holder .mfn-ch-content .mfn-ch-product:not(.mfn-sidecart-subproduct) {
	display: grid;
	grid-template-columns: 72px minmax(0, 1fr) auto;
	column-gap: 12px;
	align-items: start;
	margin-bottom: 12px;
	padding: 12px;
	border: 1px solid #E2E2E2;
	border-radius: 12px;
	background: #fff;
}

.mfn-cart-holder .mfn-ch-content .mfn-ch-product:not(.mfn-sidecart-subproduct) .mfn-chp-image {
	margin: 0;
}

.mfn-cart-holder .mfn-ch-content .mfn-ch-product:not(.mfn-sidecart-subproduct) .mfn-chp-image a img {
	width: 72px;
	height: 72px;
	object-fit: contain;
}

.mfn-cart-holder .mfn-ch-content .mfn-ch-product:not(.mfn-sidecart-subproduct) .mfn-chp-info {
	min-height: 0;
	padding-right: 0;
	border-right: 0;
	justify-content: flex-start;
}

.mfn-cart-holder .mfn-ch-content .mfn-ch-product:not(.mfn-sidecart-subproduct) .mfn-chp-info .mfn-chp-name {
	margin-bottom: 4px;
	font-size: 15px;
	line-height: 1.35;
}

.mfn-cart-holder .mfn-ch-content .mfn-ch-product:not(.mfn-sidecart-subproduct) .mfn-chp-info p.price {
	margin-bottom: 0;
	font-size: 13px;
	line-height: 1.4;
}

/* con 1 pezzo il prezzo unitario ripete il totale accanto */
.mfn-cart-holder .mfn-ch-content .mfn-ch-product:not(.mfn-sidecart-subproduct):has(.mfn-chp-quantity input.qty[value="1"]) .mfn-chp-info p.price {
	display: none;
}

.mfn-cart-holder .mfn-ch-content .mfn-ch-product:not(.mfn-sidecart-subproduct) .mfn-chp-price {
	width: auto;
	margin: 0;
	padding: 0;
	text-align: right;
	font-size: 15px;
	white-space: nowrap;
}

.mfn-cart-holder .mfn-ch-content .mfn-ch-product:not(.mfn-sidecart-subproduct) .mfn-chp-footer {
	grid-column: 1 / -1;
	width: auto;
	margin: 10px -12px -12px;
	border-top: 1px solid #EFEFEF;
	border-radius: 0 0 12px 12px;
	background: transparent;
}

.mfn-cart-holder .mfn-ch-content .mfn-ch-product:not(.mfn-sidecart-subproduct) .mfn-chp-footer .mfn-chpf-col {
	padding: 6px 12px;
}

.mfn-cart-holder .mfn-ch-content .mfn-ch-product:not(.mfn-sidecart-subproduct) .mfn-chp-footer .mfn-chpf-left {
	text-align: left;
}

.mfn-cart-holder .mfn-ch-content .mfn-ch-product .mfn-chp-footer a.mfn-chp-remove {
	font-size: 14px;
	color: #6B6F68;
}

.mfn-cart-holder .mfn-ch-content .mfn-ch-product .mfn-chp-footer a.mfn-chp-remove:hover {
	color: #B3261E;
}

/* ---------------------------------------------------------------------------
 * Piede: righe piu' strette, cosi' resta spazio per i prodotti
 * ------------------------------------------------------------------------- */

.mfn-cart-holder .mfn-ch-footer {
	padding: 14px 20px 16px;
}

.mfn-cart-holder .mfn-ch-footer .mfn-ch-footer-totals {
	margin-bottom: 14px;
}

.mfn-cart-holder .mfn-ch-footer .mfn-ch-footer-totals .mfn-chft-row {
	line-height: 1.7;
}

.mfn-cart-holder .mfn-ch-footer .mfn-ch-footer-totals .mfn-chft-row-shipping span {
	color: #537D5D;
}

.mfn-cart-holder .mfn-ch-footer .mfn-chft-apply-coupon-wrapper .mfn-chft-apply-coupon-switcher {
	margin-bottom: 6px;
}

.mfn-cart-holder .mfn-ch-footer .mfn-ch-footer-buttons a.button {
	margin-bottom: 8px;
}

.mfn-cart-holder .mfn-ch-footer .mfn-ch-footer-buttons .mfn-ch-footer-links {
	font-size: 14px;
}
