/* Pagina carrello (override woocommerce/cart.php) — stessa struttura
   visiva di shop/scheda prodotto (topbar, card, bottoni pillola). */

.ept-cart-page {
	max-width: 1200px;
	margin: 0 auto;
	padding: 32px 32px 80px;
}

.ept-cart-title {
	font-size: 1.75rem;
	font-weight: 800;
	color: var(--c-primary-dark);
	margin: 0 0 24px;
}

/* ─── Stato vuoto ─── */
.ept-cart-empty {
	max-width: 440px;
	margin: 60px auto;
	text-align: center;
	color: var(--c-medium-gray);
}
.ept-cart-empty svg {
	margin-bottom: 16px;
}
.ept-cart-empty h1 {
	font-size: 1.375rem;
	font-weight: 800;
	color: var(--c-primary-dark);
	margin: 0 0 8px;
}
.ept-cart-empty p {
	margin: 0 0 24px;
}
.ept-cart-empty-cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 48px;
	padding: 0 26px;
	border-radius: 999px;
	background: var(--c-primary-dark);
	color: #fff;
	font-weight: 700;
	text-decoration: none;
	transition: opacity 150ms;
}
.ept-cart-empty-cta:hover {
	opacity: 0.9;
}

/* ─── Layout a 2 colonne ─── */
.ept-cart-layout {
	display: grid;
	grid-template-columns: 1fr 340px;
	gap: 32px;
	align-items: start;
}

/* ─── Righe prodotto ─── */
.ept-cart-items {
	background: #fff;
	border: 1.5px solid var(--c-light-gray);
	border-radius: 16px;
	overflow: hidden;
}
.ept-cart-item {
	display: grid;
	grid-template-columns: 64px 1fr auto auto 32px;
	align-items: center;
	gap: 16px;
	padding: 16px 20px;
}
.ept-cart-item + .ept-cart-item {
	border-top: 1px solid var(--c-light-gray);
}
.ept-cart-item-img {
	width: 64px;
	height: 64px;
	border-radius: 10px;
	overflow: hidden;
	background: var(--c-off-white);
	display: block;
	flex-shrink: 0;
}
.ept-cart-item-img img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}
.ept-cart-item-body {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.ept-cart-item-name {
	font-size: 0.9375rem;
	font-weight: 700;
	color: var(--c-almost-black);
	text-decoration: none;
}
.ept-cart-item-name:hover {
	color: var(--c-primary);
}
.ept-cart-item-meta {
	font-size: 0.75rem;
	color: var(--c-medium-gray);
}
.ept-cart-item-price {
	font-size: 0.8125rem;
	color: var(--c-medium-gray);
}
.ept-cart-item-qty-input {
	width: 60px;
	height: 40px;
	text-align: center;
	border: 1.5px solid var(--c-light-gray);
	border-radius: 8px;
	font-size: 0.9375rem;
}
.ept-cart-item-subtotal {
	font-size: 0.9375rem;
	font-weight: 700;
	color: var(--c-primary-dark);
	white-space: nowrap;
}
.ept-cart-item-remove {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	color: var(--c-medium-gray);
	transition: background 150ms, color 150ms;
}
.ept-cart-item-remove:hover {
	background: #fdeceb;
	color: #c0392b;
}

.ept-cart-form-actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
	padding: 16px 20px;
}
.ept-cart-coupon {
	display: flex;
	gap: 8px;
}
.ept-cart-coupon-input {
	height: 44px;
	padding: 0 14px;
	border: 1.5px solid var(--c-light-gray);
	border-radius: 999px;
	font-size: 0.875rem;
	width: 200px;
}
/* !important: <button type="submit"> nativo (Aggiorna carrello/Applica),
   colpito dallo stile globale "Bottoni" di Elementor senza questa
   protezione — stesso bug già documentato più volte in questo progetto. */
.ept-btn-outline {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 44px;
	padding: 0 22px;
	border-radius: 999px;
	background: none !important;
	border: 1.5px solid var(--c-primary-dark) !important;
	color: var(--c-primary-dark) !important;
	font-family: var(--font-body);
	font-size: 0.875rem;
	font-weight: 700;
	cursor: pointer;
	transition: background 150ms, color 150ms;
}
.ept-btn-outline:hover {
	background: var(--c-primary-dark) !important;
	color: #fff !important;
}

/* ─── Riepilogo ─── */
.ept-cart-summary {
	background: var(--c-primary-light);
	border-radius: 16px;
	padding: 24px;
	position: sticky;
	top: 96px;
}
.ept-cart-summary h2 {
	font-size: 1.0625rem;
	font-weight: 800;
	color: var(--c-primary-dark);
	margin: 0 0 16px;
}
.ept-cart-summary-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 0.875rem;
	color: var(--c-dark-gray);
	padding: 8px 0;
	border-bottom: 1px solid rgba(19, 65, 105, 0.08);
}
.ept-cart-summary-row--coupon {
	color: var(--c-accent-dark);
}
.ept-cart-summary-row--total {
	border-bottom: none;
	padding-top: 14px;
	font-size: 1.0625rem;
	font-weight: 800;
	color: var(--c-primary-dark);
}
.ept-cart-checkout-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 52px;
	margin-top: 18px;
	border-radius: 999px;
	background: var(--c-accent);
	color: #fff;
	font-weight: 700;
	text-decoration: none;
	transition: background 150ms;
}
.ept-cart-checkout-btn:hover {
	background: var(--c-accent-dark);
}

/* ─── Messaggi dinamici offerte (sopra la tabella carrello) ─── */
.ept-cart-page .eptmo-nudge--cart {
	margin: 0 0 20px;
}

/* ─── Cross-sell ─── */
.ept-cart-crosssell {
	margin-top: 48px;
	border-radius: 20px;
}

@media (max-width: 900px) {
	.ept-cart-layout {
		grid-template-columns: 1fr;
	}
	.ept-cart-summary {
		position: static;
	}
	.ept-cart-item {
		grid-template-columns: 56px 1fr auto;
		row-gap: 8px;
	}
	.ept-cart-item-qty {
		grid-column: 2;
	}
	.ept-cart-item-subtotal {
		grid-column: 2;
	}
	.ept-cart-item-remove {
		grid-row: 1 / 3;
	}
}

@media (max-width: 600px) {
	.ept-cart-page {
		padding: 20px 20px 60px;
	}
	.ept-cart-coupon-input {
		width: 140px;
	}
}
