/*
 * Cart page look (loaded only on the cart, after app.min.css).
 * Same language as css/checkout.css: trips in a card on the left, totals card
 * on the right; Montserrat, #1a1a2e text, #32BEED accent, 10–16px corners.
 * Scoped to body.woocommerce-cart and forceful where the theme's own rules
 * use !important.
 */

body.woocommerce-cart {
	--tmc-text: #1a1a2e;
	--tmc-muted: #6b7785;
	--tmc-faint: #8a96a3;
	--tmc-line: #e6ebf0;
	--tmc-field: #dfe5eb;
	--tmc-accent: #32BEED;
	--tmc-accent-soft: rgba(50, 190, 237, .08);
	--tmc-error: #e03131;
	--tmc-font: "Montserrat", sans-serif;
}

/* ---------- Page frame ---------- */

body.woocommerce-cart .pages_container h1.entry-title,
body.woocommerce-cart header.entry-header1 h1 {
	font-family: var(--tmc-font) !important;
	font-size: 30px !important;
	font-weight: 700 !important;
	color: var(--tmc-text) !important;
	text-decoration: none !important;
	letter-spacing: -.01em;
}

body.woocommerce-cart .woocommerce {
	max-width: 1120px;
	margin: 0 auto;
	font-family: var(--tmc-font);
	color: var(--tmc-text);
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 380px);
	grid-template-areas: "notices notices" "items totals";
	column-gap: 32px;
	align-items: start;
}
body.woocommerce-cart .woocommerce > * {
	grid-column: 1 / -1;
}
body.woocommerce-cart .woocommerce > .woocommerce-notices-wrapper {
	grid-area: notices;
}
body.woocommerce-cart .woocommerce > form.woocommerce-cart-form {
	grid-area: items;
	min-width: 0;
}
body.woocommerce-cart .woocommerce > .cart-collaterals {
	grid-area: totals;
	position: sticky;
	top: 100px;
	width: 100% !important;
	float: none !important;
}

/* ---------- Notices ---------- */

body.woocommerce-cart .woocommerce-message,
body.woocommerce-cart .woocommerce-info,
body.woocommerce-cart .woocommerce-error {
	display: flex !important;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 8px 16px;
	background: #f4f9fc !important;
	border: 1px solid #cfeefb !important;
	border-radius: 12px !important;
	color: var(--tmc-text) !important;
	font-family: var(--tmc-font) !important;
	font-size: 14px !important;
	font-weight: 500;
	padding: 14px 18px !important;
	margin: 0 0 24px !important;
	list-style: none !important;
}
body.woocommerce-cart .woocommerce-error {
	background: #fff5f5 !important;
	border-color: #f3c4c4 !important;
	color: #a61b1b !important;
	display: block !important;
}
body.woocommerce-cart .woocommerce-message::before,
body.woocommerce-cart .woocommerce-info::before,
body.woocommerce-cart .woocommerce-error::before {
	display: none !important;
}
body.woocommerce-cart .woocommerce-message .button,
body.woocommerce-cart .woocommerce-info .button {
	order: 2;
	float: none !important;
	background: none !important;
	border: 0 !important;
	box-shadow: none !important;
	padding: 0 !important;
	min-height: 0 !important;
	color: var(--tmc-accent) !important;
	font-family: var(--tmc-font) !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	text-decoration: none !important;
}
body.woocommerce-cart .woocommerce-message .button:hover,
body.woocommerce-cart .woocommerce-info .button:hover {
	text-decoration: underline !important;
}

/* ---------- Items card ---------- */

body.woocommerce-cart form.woocommerce-cart-form {
	background: #fff;
	border: 1px solid var(--tmc-line);
	border-radius: 16px;
	padding: 8px 24px 4px;
	box-shadow: 0 4px 24px rgba(26, 26, 46, .05);
	box-sizing: border-box;
}

body.woocommerce-cart table.shop_table.cart {
	width: 100% !important;
	border: 0 !important;
	border-collapse: collapse !important;
	border-radius: 0 !important;
	margin: 0 !important;
	background: none !important;
	font-family: var(--tmc-font);
}
body.woocommerce-cart table.shop_table.cart tr,
body.woocommerce-cart table.shop_table.cart th,
body.woocommerce-cart table.shop_table.cart td {
	border: 0 !important;
	background: none !important;
	box-shadow: none !important;
	outline: 0 !important;
}
body.woocommerce-cart table.shop_table.cart thead th {
	font-family: var(--tmc-font) !important;
	font-size: 11px !important;
	font-weight: 600 !important;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--tmc-faint) !important;
	padding: 14px 8px 12px !important;
	text-align: left;
	border-bottom: 1px solid var(--tmc-line) !important;
}
body.woocommerce-cart table.shop_table.cart td {
	padding: 18px 8px !important;
	vertical-align: middle !important;
	font-size: 14px;
	color: var(--tmc-text);
}
body.woocommerce-cart table.shop_table.cart tr.cart_item td {
	border-bottom: 1px solid var(--tmc-line) !important;
}
body.woocommerce-cart table.shop_table.cart th.product-price,
body.woocommerce-cart table.shop_table.cart th.product-quantity,
body.woocommerce-cart table.shop_table.cart th.product-subtotal,
body.woocommerce-cart table.shop_table.cart td.product-price,
body.woocommerce-cart table.shop_table.cart td.product-quantity,
body.woocommerce-cart table.shop_table.cart td.product-subtotal {
	text-align: right !important;
	white-space: nowrap;
}
body.woocommerce-cart table.shop_table.cart th.product-quantity,
body.woocommerce-cart table.shop_table.cart td.product-quantity {
	text-align: center !important;
}

/* Remove (×) */
body.woocommerce-cart table.shop_table.cart td.product-remove {
	width: 40px;
	padding-left: 0 !important;
}
body.woocommerce-cart table.shop_table.cart td.product-remove a.remove {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 28px !important;
	height: 28px !important;
	border-radius: 50% !important;
	background: #f2f5f8 !important;
	color: var(--tmc-faint) !important;
	font-size: 18px !important;
	font-weight: 400 !important;
	line-height: 1 !important;
	text-decoration: none !important;
	transition: background-color .15s, color .15s;
}
body.woocommerce-cart table.shop_table.cart td.product-remove a.remove:hover {
	background: #fde8e8 !important;
	color: var(--tmc-error) !important;
}

/* Thumbnail */
body.woocommerce-cart table.shop_table.cart td.product-thumbnail {
	width: 104px;
}
body.woocommerce-cart table.shop_table.cart td.product-thumbnail img {
	display: block;
	width: 88px !important;
	height: 88px !important;
	max-width: none !important;
	object-fit: cover;
	border-radius: 12px !important;
	box-shadow: none !important;
}

/* Name and its details */
body.woocommerce-cart table.shop_table.cart td.product-name {
	line-height: 1.4;
}
body.woocommerce-cart table.shop_table.cart td.product-name > a {
	/* The theme floats this link, which squeezes the details below to 0 width. */
	float: none !important;
	display: block;
	color: var(--tmc-text) !important;
	font-family: var(--tmc-font) !important;
	font-size: 15px !important;
	font-weight: 700 !important;
	text-decoration: none !important;
}
body.woocommerce-cart table.shop_table.cart td.product-name > a:hover {
	color: var(--tmc-accent) !important;
}
body.woocommerce-cart table.shop_table.cart dl.variation {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 3px 6px;
	margin: 8px 0 0 !important;
	padding: 0 !important;
	border: 0 !important;
	font-size: 12.5px !important;
	line-height: 1.45 !important;
}
body.woocommerce-cart table.shop_table.cart dl.variation dt,
body.woocommerce-cart table.shop_table.cart dl.variation dd {
	float: none !important;
	margin: 0 !important;
	padding: 0 !important;
	clear: none !important;
	font-size: inherit !important;
	line-height: inherit !important;
}
body.woocommerce-cart table.shop_table.cart dl.variation dt {
	font-weight: 500 !important;
	color: var(--tmc-muted) !important;
}
body.woocommerce-cart table.shop_table.cart dl.variation dd {
	font-weight: 600 !important;
	color: var(--tmc-text) !important;
}
body.woocommerce-cart table.shop_table.cart dl.variation dd p {
	display: inline;
	margin: 0 !important;
	font-size: inherit !important;
	line-height: inherit !important;
}

/* Prices */
body.woocommerce-cart table.shop_table.cart .woocommerce-Price-amount,
body.woocommerce-cart table.shop_table.cart .woocommerce-Price-amount bdi {
	color: var(--tmc-text) !important;
	font-family: var(--tmc-font) !important;
	font-size: inherit !important;
}
body.woocommerce-cart table.shop_table.cart td.product-price {
	color: var(--tmc-muted) !important;
	font-weight: 500;
}
body.woocommerce-cart table.shop_table.cart td.product-price .woocommerce-Price-amount {
	color: var(--tmc-muted) !important;
}
body.woocommerce-cart table.shop_table.cart td.product-subtotal {
	font-size: 15px !important;
	font-weight: 700 !important;
}
body.woocommerce-cart table.shop_table.cart dl.variation .woocommerce-Price-amount {
	font-weight: inherit !important;
}

/* Quantity (number of travellers) */
body.woocommerce-cart table.shop_table.cart .quantity {
	display: inline-block;
}
body.woocommerce-cart table.shop_table.cart input.qty {
	width: 64px !important;
	height: 44px !important;
	padding: 0 6px !important;
	border: 1px solid var(--tmc-field) !important;
	border-radius: 10px !important;
	background: #fff !important;
	box-shadow: none !important;
	color: var(--tmc-text) !important;
	font-family: var(--tmc-font) !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	text-align: center !important;
	outline: none !important;
}
body.woocommerce-cart table.shop_table.cart input.qty:focus {
	border-color: var(--tmc-accent) !important;
	box-shadow: 0 0 0 3px rgba(50, 190, 237, .15) !important;
}

/* Coupon and "Aggiorna carrello" */
body.woocommerce-cart table.shop_table.cart td.actions {
	padding: 18px 0 !important;
	border: 0 !important;
}
body.woocommerce-cart table.shop_table.cart td.actions .coupon {
	display: flex !important;
	align-items: center;
	gap: 8px;
	float: left;
}
body.woocommerce-cart table.shop_table.cart td.actions .coupon label {
	display: none !important;
}
body.woocommerce-cart table.shop_table.cart td.actions input#coupon_code,
body.woocommerce-cart .woocommerce-cart-form .shop_table_responsive input#coupon_code.input-text {
	width: 200px !important;
	height: 44px !important;
	margin: 0 !important;
	padding: 0 14px !important;
	border: 1px solid var(--tmc-field) !important;
	border-radius: 10px !important;
	background: #fff !important;
	box-shadow: none !important;
	outline: none !important;
	color: var(--tmc-text) !important;
	font-family: var(--tmc-font) !important;
	font-size: 14px !important;
}
body.woocommerce-cart table.shop_table.cart td.actions input#coupon_code:focus {
	border-color: var(--tmc-accent) !important;
	box-shadow: 0 0 0 3px rgba(50, 190, 237, .15) !important;
}
body.woocommerce-cart table.shop_table.cart td.actions .button {
	height: 44px !important;
	min-height: 44px !important;
	margin: 0 !important;
	padding: 0 18px !important;
	border: 1px solid var(--tmc-accent) !important;
	border-radius: 10px !important;
	background: #fff !important;
	box-shadow: none !important;
	color: var(--tmc-accent) !important;
	font-family: var(--tmc-font) !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	line-height: 42px !important;
	text-transform: none !important;
	cursor: pointer;
	transition: background-color .15s, color .15s;
}
body.woocommerce-cart table.shop_table.cart td.actions .button:hover:not(:disabled) {
	background: var(--tmc-accent) !important;
	color: #fff !important;
}
body.woocommerce-cart table.shop_table.cart td.actions button[name="update_cart"] {
	float: right !important;
}
body.woocommerce-cart table.shop_table.cart td.actions button[name="update_cart"]:disabled {
	border-color: var(--tmc-field) !important;
	color: var(--tmc-faint) !important;
	opacity: 1 !important;
	cursor: default;
}

/* ---------- Totals card ---------- */

body.woocommerce-cart .cart-collaterals .cart_totals {
	width: 100% !important;
	float: none !important;
	background: #fff;
	border: 1px solid var(--tmc-line);
	border-radius: 16px;
	padding: 24px;
	box-shadow: 0 4px 24px rgba(26, 26, 46, .05);
	box-sizing: border-box;
}
body.woocommerce-cart .cart_totals h2 {
	font-family: var(--tmc-font) !important;
	font-size: 18px !important;
	font-weight: 700 !important;
	color: var(--tmc-text) !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
	margin: 0 0 12px !important;
	padding: 0 !important;
	border: 0 !important;
}
body.woocommerce-cart .cart_totals table.shop_table {
	width: 100% !important;
	border: 0 !important;
	border-collapse: collapse !important;
	border-radius: 0 !important;
	margin: 0 0 16px !important;
	background: none !important;
}
body.woocommerce-cart .cart_totals table.shop_table tr {
	/* The theme floats these rows (".cart_totals .shop_table_responsive tr"),
	   which forces them to blocks, so label and amount can't spread out. */
	display: table-row !important;
	float: none !important;
	width: auto !important;
	margin: 0 !important;
	padding: 0 !important;
	border-radius: 0 !important;
}
body.woocommerce-cart .cart_totals table.shop_table tr,
body.woocommerce-cart .cart_totals table.shop_table th,
body.woocommerce-cart .cart_totals table.shop_table td {
	border: 0 !important;
	background: none !important;
	box-shadow: none !important;
	outline: 0 !important;
}
body.woocommerce-cart .cart_totals table.shop_table th,
body.woocommerce-cart .cart_totals table.shop_table td {
	display: table-cell !important;
	padding: 10px 0 !important;
	font-family: var(--tmc-font) !important;
	font-size: 14px !important;
	vertical-align: middle;
}
body.woocommerce-cart .cart_totals table.shop_table th {
	text-align: left !important;
	font-weight: 500 !important;
	color: var(--tmc-muted) !important;
	width: auto !important;
}
body.woocommerce-cart .cart_totals table.shop_table td {
	text-align: right !important;
	font-weight: 600 !important;
	color: var(--tmc-text) !important;
}
body.woocommerce-cart .cart_totals table.shop_table td::before {
	display: none !important;
}
body.woocommerce-cart .cart_totals table.shop_table .woocommerce-Price-amount,
body.woocommerce-cart .cart_totals table.shop_table .woocommerce-Price-amount bdi {
	color: var(--tmc-text) !important;
	font-family: var(--tmc-font) !important;
}
body.woocommerce-cart .cart_totals tr.order-total th,
body.woocommerce-cart .cart_totals tr.order-total td {
	border-top: 1px solid var(--tmc-line) !important;
	padding-top: 16px !important;
	font-size: 18px !important;
	font-weight: 700 !important;
	color: var(--tmc-text) !important;
}
body.woocommerce-cart .cart_totals tr.order-total .woocommerce-Price-amount {
	font-size: 20px !important;
}

body.woocommerce-cart .wc-proceed-to-checkout {
	display: flow-root;
	padding: 0 !important;
	margin: 0 !important;
}
body.woocommerce-cart .wc-proceed-to-checkout #payment-method-message {
	margin: 0 0 14px !important;
}
body.woocommerce-cart .wc-proceed-to-checkout a.checkout-button {
	float: none !important;
	position: static !important;
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 100% !important;
	min-height: 56px !important;
	margin: 0 0 12px !important;
	padding: 0 20px !important;
	border: 0 !important;
	border-radius: 12px !important;
	background: var(--tmc-accent) !important;
	color: #fff !important;
	font-family: var(--tmc-font) !important;
	font-size: 16px !important;
	font-weight: 700 !important;
	letter-spacing: .3px;
	text-transform: none !important;
	text-decoration: none !important;
	box-shadow: 0 8px 20px rgba(50, 190, 237, .3);
	box-sizing: border-box;
	transition: filter .15s, transform .15s;
}
body.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover {
	filter: brightness(.95);
}
body.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:active {
	transform: translateY(1px);
}

/* ---------- Empty cart ---------- */

body.woocommerce-cart .woocommerce > .cart-empty,
body.woocommerce-cart .woocommerce > .wc-empty-cart-message {
	text-align: center;
}
body.woocommerce-cart .return-to-shop {
	text-align: center;
	margin: 8px 0 0 !important;
}
body.woocommerce-cart .return-to-shop a.button {
	display: inline-flex !important;
	align-items: center;
	min-height: 48px !important;
	padding: 0 24px !important;
	border: 0 !important;
	border-radius: 12px !important;
	background: var(--tmc-accent) !important;
	color: #fff !important;
	font-family: var(--tmc-font) !important;
	font-size: 15px !important;
	font-weight: 700 !important;
	text-decoration: none !important;
}

/* ---------- Narrow screens ---------- */

@media (max-width: 960px) {
	body.woocommerce-cart .woocommerce {
		grid-template-columns: minmax(0, 1fr);
		grid-template-areas: "notices" "items" "totals";
		row-gap: 24px;
	}
	body.woocommerce-cart .woocommerce > .cart-collaterals {
		position: static;
	}
}

/* WooCommerce turns the table into stacked rows below 769px. */
@media (max-width: 768px) {
	body.woocommerce-cart .woocommerce {
		padding: 0 12px;
		box-sizing: border-box;
	}
	body.woocommerce-cart .pages_container h1.entry-title,
	body.woocommerce-cart header.entry-header1 h1 {
		font-size: 24px !important;
	}
	body.woocommerce-cart form.woocommerce-cart-form {
		padding: 4px 16px;
		border-radius: 14px;
	}
	body.woocommerce-cart table.shop_table.cart thead {
		display: none !important;
	}
	body.woocommerce-cart table.shop_table.cart tr.cart_item {
		display: grid !important;
		grid-template-columns: 76px minmax(0, 1fr) 32px;
		grid-template-areas:
			"thumb name remove"
			"thumb price price"
			"thumb qty qty"
			"thumb subtotal subtotal";
		column-gap: 12px;
		padding: 16px 0 !important;
		border-bottom: 1px solid var(--tmc-line) !important;
	}
	body.woocommerce-cart table.shop_table.cart tr.cart_item td {
		display: flex !important;
		align-items: center;
		justify-content: space-between;
		padding: 4px 0 !important;
		border: 0 !important;
		text-align: left !important;
		width: auto !important;
	}
	body.woocommerce-cart table.shop_table.cart tr.cart_item td::before {
		font-family: var(--tmc-font) !important;
		font-size: 12px !important;
		font-weight: 500 !important;
		color: var(--tmc-faint) !important;
		float: none !important;
	}
	body.woocommerce-cart table.shop_table.cart td.product-remove {
		grid-area: remove;
		justify-content: flex-end !important;
		align-items: flex-start !important;
	}
	body.woocommerce-cart table.shop_table.cart td.product-remove::before,
	body.woocommerce-cart table.shop_table.cart td.product-thumbnail::before,
	body.woocommerce-cart table.shop_table.cart td.product-name::before {
		display: none !important;
	}
	/* tr.cart_item in these selectors outranks the generic "tr.cart_item td" flex rule above. */
	body.woocommerce-cart table.shop_table.cart tr.cart_item td.product-thumbnail {
		grid-area: thumb;
		display: block !important;
		align-self: start;
	}
	body.woocommerce-cart table.shop_table.cart td.product-thumbnail img {
		width: 76px !important;
		height: 76px !important;
	}
	body.woocommerce-cart table.shop_table.cart tr.cart_item td.product-name {
		grid-area: name;
		display: block !important;
	}
	body.woocommerce-cart table.shop_table.cart td.product-price {
		grid-area: price;
	}
	body.woocommerce-cart table.shop_table.cart td.product-quantity {
		grid-area: qty;
	}
	body.woocommerce-cart table.shop_table.cart td.product-subtotal {
		grid-area: subtotal;
	}
	body.woocommerce-cart table.shop_table.cart input.qty {
		height: 38px !important;
		width: 58px !important;
	}
	body.woocommerce-cart table.shop_table.cart tr:not(.cart_item) {
		display: block !important;
	}
	body.woocommerce-cart table.shop_table.cart td.actions {
		display: block !important;
		padding: 16px 0 !important;
	}
	body.woocommerce-cart table.shop_table.cart td.actions::before {
		display: none !important;
	}
	body.woocommerce-cart table.shop_table.cart td.actions .coupon {
		float: none !important;
		flex-wrap: wrap;
		margin: 0 0 10px !important;
	}
	body.woocommerce-cart table.shop_table.cart td.actions input#coupon_code,
	body.woocommerce-cart .woocommerce-cart-form .shop_table_responsive input#coupon_code.input-text {
		width: 100% !important;
		flex: 1 1 100%;
		min-width: 0;
	}
	body.woocommerce-cart table.shop_table.cart td.actions .coupon .button {
		width: 100% !important;
	}
	body.woocommerce-cart table.shop_table.cart td.actions button[name="update_cart"] {
		float: none !important;
		width: 100% !important;
	}
	body.woocommerce-cart .cart-collaterals .cart_totals {
		padding: 20px;
		border-radius: 14px;
	}
}
