/* =============================================================================
   redess.it — IL CARRELLO: la pagina e il pannello laterale
   Accodato DOPO negozio.css.
   ========================================================================== */

/* -----------------------------------------------------------------------------
   1. LA PAGINA /shopping-cart/
   -------------------------------------------------------------------------- */

/* ⚠️ Le foto erano `object-fit: fill` dentro un riquadro fisso: una locandina
   verticale veniva STIRATA e la riga diventava alta il doppio dell'altra. */
.woocommerce-cart table.cart td.product-thumbnail img,
.woocommerce table.shop_table td.product-thumbnail img {
	/* ⚠️ L'altezza va con !important: senza, restava a 220px (una locandina
	   verticale) e la riga del carrello diventava alta il triplo. */
	width: 88px !important;
	height: 88px !important;
	max-width: 88px;
	object-fit: cover;
	border-radius: 10px;
	background: #f4ecdc;
}

.woocommerce-cart table.cart td.product-name a,
.woocommerce table.shop_table td.product-name a {
	font-family: Roboto, system-ui, sans-serif;
	font-size: 15.5px;
	font-weight: 600;
	line-height: 1.4;
	color: #221e1a;
}
.woocommerce-cart table.cart td.product-name a:hover { color: #be1e2d; }

/* la crocetta: era una «×» nuda da 22px, ora e' un bersaglio vero */
.woocommerce-cart table.cart td.product-remove a.remove,
.woocommerce table.shop_table td.product-remove a.remove {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: #f4ecdc;
	color: #6f655c !important;
	font-size: 17px;
	line-height: 1;
	transition: background-color .16s ease, color .16s ease;
}
.woocommerce-cart table.cart td.product-remove a.remove:hover {
	background: #be1e2d;
	color: #fff !important;
}

/* la quantita' */
.woocommerce-cart .quantity .qty {
	height: 40px;
	border: 1px solid #e3d9c7;
	font-family: Roboto, system-ui, sans-serif;
	font-size: 15px;
}
.woocommerce-cart .quantity .minus,
.woocommerce-cart .quantity .plus {
	width: 36px;
	height: 40px;
	border: 1px solid #e3d9c7;
	background: #fdf8ec;
	color: #4c443d;
	font-size: 16px;
	transition: background-color .16s ease;
}
.woocommerce-cart .quantity .minus:hover,
.woocommerce-cart .quantity .plus:hover { background: #f4ecdc; color: #be1e2d; }

/* la riga del codice promozionale: stava su due piani sfalsati */
.woocommerce-cart .coupon {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}
.woocommerce-cart .coupon #coupon_code {
	height: 45px;
	min-width: 220px;
	border: 1px solid #e3d9c7;
	border-radius: 10px;
	padding: 0 14px;
	font-size: 14.5px;
}

/* ⚠️ «Aggiorna carrello» non e' un'azione principale: era rosso pieno come
   «Applica codice» e come «Procedi con l'ordine». Tre rossi uguali non dicono
   piu' qual e' il pulsante che conta. */
.woocommerce-cart table.cart button[name="update_cart"],
.woocommerce-cart table.cart input[name="update_cart"] {
	background: none !important;
	border: 1px solid #d9cdb8 !important;
	color: #4c443d !important;
}
/* ⚠️ Da spento il tema lo scrive BIANCO: su fondo trasparente il pulsante
   sembrava una cornice vuota. */
.woocommerce-cart table.cart button[name="update_cart"]:disabled,
.woocommerce-cart table.cart input[name="update_cart"]:disabled,
.woocommerce-cart table.cart button[name="update_cart"][disabled],
.woocommerce-cart table.cart input[name="update_cart"][disabled] {
	/* ⚠️ #a2968a stava a 2,89:1: «spento» non vuol dire illeggibile. */
	color: #7a7168 !important;
	border-color: #e6ddcc !important;
	opacity: 1 !important;
}
.woocommerce-cart table.cart button[name="update_cart"]:hover:not(:disabled),
.woocommerce-cart table.cart input[name="update_cart"]:hover:not(:disabled) {
	border-color: #be1e2d !important;
	color: #be1e2d !important;
}

/* --- il riquadro dei totali ---------------------------------------------- */
.woocommerce-cart .cart_totals h2 {
	font-family: Roboto, system-ui, sans-serif;
	font-size: 17px;
	font-weight: 700;
	text-transform: none;
	letter-spacing: 0;
	color: #221e1a;
}
.woocommerce-cart .cart_totals table th,
.woocommerce-cart .cart_totals table td {
	font-family: Roboto, system-ui, sans-serif;
	font-size: 14.5px;
	/* ⚠️ Il tema mette `text-transform: capitalize` e in italiano esce
	   «Inserisci Il Tuo Indirizzo Per Visualizzare Le Opzioni Di Spedizione»:
	   la maiuscola a ogni parola e' una regola inglese. */
	text-transform: none;
}
.woocommerce-cart .cart_totals table th { color: #6f655c; font-weight: 600; }
.woocommerce-cart .cart_totals .order-total td,
.woocommerce-cart .cart_totals .order-total th { font-size: 16px; color: #221e1a; }
.woocommerce-cart .cart_totals .order-total .amount { color: #be1e2d; font-weight: 700; }

/* ⚠️ Due pulsanti rossi identici, uno sopra l'altro: quello che porta a pagare
   e quello che torna indietro avevano lo stesso peso. */
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button {
	font-family: Roboto, system-ui, sans-serif;
	font-weight: 700;
	border-radius: 10px;
}
.woocommerce-cart .wc-proceed-to-checkout a:not(.checkout-button) {
	background: none !important;
	border: 1px solid #d9cdb8 !important;
	color: #4c443d !important;
	border-radius: 10px;
	font-weight: 600;
}
.woocommerce-cart .wc-proceed-to-checkout a:not(.checkout-button):hover {
	border-color: #be1e2d !important;
	color: #be1e2d !important;
}

/* -----------------------------------------------------------------------------
   2. IL PANNELLO LATERALE (.ftc-off-canvas-cart)
   -------------------------------------------------------------------------- */
.ftc-off-canvas-cart .off-canvas-cart-title,
.ftc-off-canvas-cart .off-canvas-cart-title * {
	font-family: Roboto, system-ui, sans-serif;
	font-size: 16px;
	font-weight: 700;
	letter-spacing: .02em;
	text-transform: uppercase;
	color: #221e1a;
}

/* ⚠️ Il tema tiene le righe `inline-block` con un selettore piu' specifico:
   senza !important restavano impilate a caso, con la crocetta sopra la foto e
   il prezzo su una riga a se'. */
.ftc-off-canvas-cart ul.cart_list li,
.ftc-off-canvas-cart .widget_shopping_cart_content ul li {
	display: flex !important;
	align-items: center;
	flex-wrap: wrap;
	gap: 0 12px;
	padding: 14px 0;
	margin: 0;
	border-bottom: 1px solid #f1eade;
}
.ftc-off-canvas-cart ul.cart_list li img,
.ftc-off-canvas-cart .widget_shopping_cart_content ul li img {
	flex: 0 0 auto;
	/* ⚠️ `height` da sola non bastava: restava 90px. Con `max-height` il
	   riquadro e' garantito comunque. */
	width: 64px !important;
	height: 64px !important;
	min-height: 0 !important;
	max-height: 64px !important;
	aspect-ratio: 1 / 1;
	margin: 0 !important;
	object-fit: cover;
	border-radius: 8px;
	background: #f4ecdc;
	float: none !important;
}
/* ⚠️ La foto sta DENTRO il collegamento del nome: percio' il collegamento
   diventa a sua volta una riga, e il prezzo va a capo sotto, rientrato di
   quanto e' larga la foto. */
.ftc-off-canvas-cart ul.cart_list li > a:not(.remove) {
	order: 1;
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	align-items: center;
	gap: 12px;
	font-family: Roboto, system-ui, sans-serif;
	font-size: 14.5px;
	font-weight: 600;
	line-height: 1.35;
	color: #221e1a;
	padding: 0;
}
.ftc-off-canvas-cart ul.cart_list li a:not(.remove):hover { color: #be1e2d; }
.ftc-off-canvas-cart ul.cart_list li .quantity {
	order: 3;
	flex: 1 1 100%;
	display: block;
	padding-left: 76px !important;
	margin-top: 2px;
	font-family: Roboto, system-ui, sans-serif;
	font-size: 13.5px;
	color: #6f655c;
}
.ftc-off-canvas-cart ul.cart_list li .quantity .amount { color: #be1e2d; font-weight: 600; }

/* la crocetta del pannello: stessa pastiglia della pagina */
.ftc-off-canvas-cart ul.cart_list li a.remove {
	/* ⚠️ Da `inline` un collegamento ignora larghezza e altezza: usciva 11x0. */
	position: static !important;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	order: 2;
	flex: 0 0 auto;
	width: 28px;
	height: 28px;
	margin: 0 !important;
	border-radius: 50%;
	background: #f4ecdc;
	color: #6f655c !important;
	font-size: 15px;
	line-height: 26px;
	text-align: center;
}
.ftc-off-canvas-cart ul.cart_list li a.remove:hover { background: #be1e2d; color: #fff !important; }

.ftc-off-canvas-cart .total {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	padding: 14px 0;
	border-top: 1px solid #ece4d6;
	font-family: Roboto, system-ui, sans-serif;
	font-size: 14.5px;
	text-transform: none;
	color: #6f655c;
}
.ftc-off-canvas-cart .total .amount { font-size: 19px; font-weight: 700; color: #be1e2d; }

.ftc-off-canvas-cart .buttons a {
	display: block;
	height: 46px;
	line-height: 44px;
	margin: 0 0 10px;
	border-radius: 10px;
	font-family: Roboto, system-ui, sans-serif;
	font-size: 14.5px;
	font-weight: 700;
	text-align: center;
	text-transform: none;
}
/* ⚠️ prima erano due bottoni scuri uguali: il primo e' «guarda», il secondo
   e' «paga». Il peso deve dirlo. */
.ftc-off-canvas-cart .buttons a.view-cart {
	background: none !important;
	border: 1px solid #d9cdb8 !important;
	color: #4c443d !important;
}
.ftc-off-canvas-cart .buttons a.view-cart:hover { border-color: #be1e2d !important; color: #be1e2d !important; }
.ftc-off-canvas-cart .buttons a.checkout {
	background: #be1e2d !important;
	border: 0 !important;
	color: #fff !important;
}
.ftc-off-canvas-cart .buttons a.checkout:hover { background: #9c1824 !important; }

/* =============================================================================
   IL CARRELLO COME DUE SCHEDE
   ⚠️ Misurato: il bianco della tabella arrivava a 891,5 e quello dei totali era
   RIENTRATO di 20 px dentro un riquadro con il bordo — due trattamenti diversi
   per due blocchi affiancati. Ora sono due schede uguali: bianche, angoli 14,
   ombra al posto del bordo (lo stesso linguaggio della griglia prodotti), con
   i bordi esterni sulla colonna del contenuto e una gronda di 35 px in mezzo.
   ========================================================================== */

.woocommerce-cart table.shop_table {
	background: #fff;
	border: 0 !important;
	border-radius: 14px;
	border-collapse: separate;
	border-spacing: 0;
	overflow: hidden;
	box-shadow: 0 1px 2px rgba( 60, 40, 25, .06 ), 0 6px 18px -12px rgba( 60, 40, 25, .28 );
}
/* il contenuto non deve toccare il bordo della scheda */
.woocommerce-cart table.shop_table td:first-child,
.woocommerce-cart table.shop_table th:first-child { padding-left: 22px; }
.woocommerce-cart table.shop_table td:last-child,
.woocommerce-cart table.shop_table th:last-child { padding-right: 22px; }
.woocommerce-cart table.shop_table td { border: 0; }
.woocommerce-cart table.shop_table tr.cart_item + tr.cart_item td { border-top: 1px solid #f1eade; }
.woocommerce-cart table.shop_table td.actions {
	padding: 18px 22px 22px;
	border-top: 1px solid #f1eade;
}

/* la colonna dei totali: stessa scheda, niente riquadro dentro il riquadro */
.woocommerce-cart .cart-collaterals {
	background: #fff;
	border: 0 !important;
	border-radius: 14px;
	padding: 22px !important;
	box-shadow: 0 1px 2px rgba( 60, 40, 25, .06 ), 0 6px 18px -12px rgba( 60, 40, 25, .28 );
}
.woocommerce-cart .cart_totals table,
.woocommerce-cart .cart_totals table.shop_table {
	background: none !important;
	box-shadow: none !important;
	border-radius: 0;
	overflow: visible;
}
.woocommerce-cart .cart_totals table th:first-child,
.woocommerce-cart .cart_totals table td:first-child { padding-left: 0; }
.woocommerce-cart .cart_totals table th:last-child,
.woocommerce-cart .cart_totals table td:last-child { padding-right: 0; }
.woocommerce-cart .cart_totals table tr th,
.woocommerce-cart .cart_totals table tr td {
	border: 0;
	border-bottom: 1px solid #f1eade;
	padding-top: 13px;
	padding-bottom: 13px;
}
.woocommerce-cart .cart_totals table tr:last-child th,
.woocommerce-cart .cart_totals table tr:last-child td { border-bottom: 0; }
.woocommerce-cart .cart_totals h2 { margin: 0 0 6px; }

/* i pulsanti sotto i totali, a filo della scheda */
.woocommerce-cart .wc-proceed-to-checkout { padding: 14px 0 0; }
.woocommerce-cart .wc-proceed-to-checkout a { display: block; width: 100%; text-align: center; }

/* l'avviso «aggiunto al carrello» in tinta, non grigio di sistema */
.woocommerce-cart .woocommerce-message {
	background: #fff;
	border: 0;
	border-left: 4px solid #be1e2d;
	border-radius: 12px;
	box-shadow: 0 1px 2px rgba( 60, 40, 25, .06 ), 0 6px 18px -12px rgba( 60, 40, 25, .28 );
	font-family: Roboto, system-ui, sans-serif;
	color: #3f3830;
}
.woocommerce-cart .woocommerce-message .button {
	background: none !important;
	border: 1px solid #d9cdb8 !important;
	color: #4c443d !important;
	border-radius: 8px;
}

/* --- sotto le dita ---------------------------------------------------------- */
@media ( max-width: 1199px ) {
	.woocommerce-cart table.cart td.product-remove a.remove,
	.woocommerce table.shop_table td.product-remove a.remove { width: 44px; height: 44px; font-size: 19px; }
	.woocommerce-cart .woocommerce-message .button,
	.woocommerce-cart .cart_totals a,
	.woocommerce-cart .wc-proceed-to-checkout a { min-height: 44px; line-height: 42px; }
	.woocommerce-cart table.shop_table td:first-child,
	.woocommerce-cart table.shop_table th:first-child { padding-left: 14px; }
	.woocommerce-cart table.shop_table td:last-child,
	.woocommerce-cart table.shop_table th:last-child { padding-right: 14px; }
	.woocommerce-cart .cart-collaterals { padding: 18px !important; }
	.woocommerce-cart .quantity .minus,
	.woocommerce-cart .quantity .plus { width: 44px; height: 44px; }
	.woocommerce-cart .quantity .qty { height: 44px; width: 46px; }
}
