/* Cart page: match the theme's product/checkout styling. */

.woocommerce-cart .woocommerce {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 380px;
	gap: 40px 48px;
	align-items: start;
}
.woocommerce-cart .woocommerce > .woocommerce-notices-wrapper,
.woocommerce-cart .woocommerce > .progress,
.woocommerce-cart .woocommerce > .woocommerce-message,
.woocommerce-cart .woocommerce > .woocommerce-info,
.woocommerce-cart .woocommerce > .woocommerce-error {
	grid-column: 1 / -1;
}
.woocommerce-cart .woocommerce-cart-form { grid-column: 1; margin: 0; }
.woocommerce-cart .cart-collaterals { grid-column: 2; margin: 0; }

/* Table */
.woocommerce-cart table.shop_table.cart {
	width: 100%;
	margin: 0;
	border: 1px solid var(--line);
	border-radius: var(--r-lg);
	border-collapse: separate;
	border-spacing: 0;
	overflow: hidden;
	background: var(--surface);
}
.woocommerce-cart table.shop_table.cart thead th {
	padding: 14px 16px;
	border-bottom: 1px solid var(--line);
	background: var(--sand);
	color: var(--muted);
	font: 600 .68rem/1.2 var(--sans);
	letter-spacing: .1em;
	text-transform: uppercase;
}
.woocommerce-cart table.shop_table.cart td {
	padding: 18px 16px;
	border-top: 1px solid var(--line);
	vertical-align: middle;
}
.woocommerce-cart table.shop_table.cart tbody tr:first-child td { border-top: 0; }

.woocommerce-cart table.shop_table.cart th,
.woocommerce-cart table.shop_table.cart td { text-align: left; }
.woocommerce-cart table.shop_table.cart .product-price,
.woocommerce-cart table.shop_table.cart .product-subtotal { text-align: right; }
.woocommerce-cart table.shop_table.cart .product-quantity { text-align: center; }

.woocommerce-cart table.shop_table.cart .product-remove { width: 48px; }
.woocommerce-cart table.shop_table.cart .product-thumbnail { width: 108px; }
.woocommerce-cart table.shop_table.cart .product-price,
.woocommerce-cart table.shop_table.cart .product-subtotal { width: 130px; }
.woocommerce-cart table.shop_table.cart .product-quantity { width: 130px; }
.woocommerce-cart .product-thumbnail img {
	width: 76px;
	height: 76px;
	max-width: none;
	object-fit: cover;
	border-radius: var(--r-sm);
	background: var(--sand);
}
.woocommerce-cart .product-name a {
	color: var(--ink);
	font: 500 1.02rem/1.3 var(--serif);
	text-decoration: none;
}
.woocommerce-cart .product-name a:hover { text-decoration: underline; }
.woocommerce-cart .product-name .variation,
.woocommerce-cart .product-name p { margin: 4px 0 0; color: var(--muted); font-size: .8rem; }
.woocommerce-cart .product-price,
.woocommerce-cart .product-subtotal { font-size: .95rem; white-space: nowrap; }
.woocommerce-cart .product-subtotal .amount { font-weight: 600; }
.woocommerce-cart a.remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	color: var(--muted) !important;
	font-size: 1.1rem;
	line-height: 1;
	text-decoration: none;
}
.woocommerce-cart a.remove:hover { background: var(--sand); color: var(--ink) !important; }
.woocommerce-cart .quantity .qty {
	width: 68px;
	height: 44px;
	padding: 0 8px;
	border: 1px solid var(--line-strong);
	border-radius: var(--r-sm);
	background: var(--surface);
	font: 500 .95rem/1 var(--sans);
	text-align: center;
}

/* Coupon + update */
.woocommerce-cart .actions {
	padding: 16px !important;
	background: var(--surface);
}
.woocommerce-cart .actions .coupon {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	float: left;
	width: auto;
	max-width: 560px;
}
.woocommerce-cart .actions .coupon label { display: none; }
.woocommerce-cart .actions .coupon .input-text {
	flex: 1 1 180px;
	min-height: 44px;
	padding: 0 14px;
	border: 1px solid var(--line-strong);
	border-radius: var(--r-sm);
	background: var(--surface);
	font: 400 .95rem/1 var(--sans);
}
.woocommerce-cart .actions .coupon .button {
	min-height: 44px;
	padding: 0 18px;
	border: 1px solid var(--ink);
	border-radius: var(--pill);
	background: transparent;
	color: var(--ink);
	font: 600 .9rem/1 var(--sans);
	cursor: pointer;
}
.woocommerce-cart .actions .coupon .button:hover { background: var(--ink); color: #fff; }
.woocommerce-cart .actions > .button {
	float: right;
	min-height: 44px;
	padding: 0 20px;
	border: 0;
	border-radius: var(--pill);
	background: var(--sand);
	color: var(--ink);
	font: 600 .9rem/1 var(--sans);
	cursor: pointer;
}
.woocommerce-cart .actions > .button:disabled { opacity: .45; cursor: not-allowed; }

/* Totals card */
.woocommerce-cart .cart_totals {
	padding: 24px;
	border: 1px solid var(--line);
	border-radius: var(--r-lg);
	background: var(--surface);
	box-shadow: var(--shadow-soft);
}
.woocommerce-cart .cart_totals h2 {
	margin: 0 0 14px;
	font: 400 1.45rem/1.2 var(--serif);
}
.woocommerce-cart .cart_totals table.shop_table {
	width: 100%;
	margin: 0 0 18px;
	border: 0;
	border-collapse: collapse;
}
.woocommerce-cart .cart_totals table.shop_table th,
.woocommerce-cart .cart_totals table.shop_table td {
	padding: 10px 0;
	border: 0;
	border-bottom: 1px solid var(--line);
	background: transparent;
	vertical-align: top;
}
.woocommerce-cart .cart_totals table.shop_table th {
	color: var(--muted);
	font: 500 .88rem/1.4 var(--sans);
	text-align: left;
}
.woocommerce-cart .cart_totals table.shop_table td { text-align: right; }
.woocommerce-cart .cart_totals .order-total th,
.woocommerce-cart .cart_totals .order-total td {
	padding: 14px 10px;
	border-bottom: 0;
	background: var(--sand);
	font-size: 1.05rem;
}
.woocommerce-cart .cart_totals .order-total td .amount { font-weight: 600; }
.woocommerce-cart .cart_totals .woocommerce-shipping-methods { list-style: none; margin: 0; padding: 0; text-align: right; }
.woocommerce-cart .cart_totals .woocommerce-shipping-methods li { margin: 0 0 4px; }
.woocommerce-cart .cart_totals .shipping-calculator-button { font-size: .82rem; }
.woocommerce-cart .wc-proceed-to-checkout { padding: 0; margin: 0; }
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 56px;
	border-radius: var(--pill);
	background: var(--olive);
	color: #fff;
	font: 600 1rem/1 var(--sans);
	text-decoration: none;
}
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover { background: var(--olive-deep); }

/* Trust under the totals */
.phs-cart-trust { display: grid; gap: 8px; margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--line); }
.phs-cart-trust p { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--muted); font-size: .82rem; }
.phs-cart-trust svg { width: 18px; height: 18px; color: var(--olive); flex: none; }
.phs-cart-trust .payments { margin-top: 2px; }

/* Points card spacing */
.woocommerce-cart .phs-points-card { margin: 0 0 18px; }

/* Empty cart */
.woocommerce-cart .cart-empty { margin: 0 0 14px; font: 400 1.3rem/1.3 var(--serif); }
.woocommerce-cart .return-to-shop .button {
	display: inline-flex;
	align-items: center;
	min-height: 48px;
	padding: 0 22px;
	border-radius: var(--pill);
	background: var(--olive);
	color: #fff;
	text-decoration: none;
}

/* Stack before the table gets cramped. */
@media (max-width: 1100px) {
	.woocommerce-cart .woocommerce { display: block; }
	.woocommerce-cart .cart-collaterals { margin-top: 24px; }
	.woocommerce-cart .cart_totals { max-width: 520px; }
}

/* Mobile card rows. */
@media (max-width: 760px) {
	.woocommerce-cart table.shop_table.cart { border: 0; background: transparent; overflow: visible; }
	.woocommerce-cart table.shop_table.cart thead { display: none; }
	.woocommerce-cart table.shop_table.cart tbody,
	.woocommerce-cart table.shop_table.cart tr,
	.woocommerce-cart table.shop_table.cart td { display: block; }
	.woocommerce-cart table.shop_table.cart tr.cart_item {
		position: relative;
		display: grid;
		grid-template-columns: 84px minmax(0, 1fr);
		gap: 6px 14px;
		margin: 0 0 14px;
		padding: 16px;
		border: 1px solid var(--line);
		border-radius: var(--r-md);
		background: var(--surface);
	}
	.woocommerce-cart table.shop_table.cart tr.cart_item td { padding: 0; border: 0; }
	.woocommerce-cart td.product-thumbnail { grid-row: 1 / span 4; grid-column: 1; }
	.woocommerce-cart .product-thumbnail img { width: 84px; height: 84px; }
	.woocommerce-cart td.product-name { grid-column: 2; padding-right: 34px !important; }
	.woocommerce-cart td.product-price,
	.woocommerce-cart td.product-quantity,
	.woocommerce-cart td.product-subtotal {
		grid-column: 2;
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
		font-size: .88rem;
	}
	.woocommerce-cart td.product-price::before,
	.woocommerce-cart td.product-quantity::before,
	.woocommerce-cart td.product-subtotal::before {
		content: attr(data-title);
		color: var(--muted);
		font-size: .8rem;
	}
	.woocommerce-cart td.product-remove { position: absolute; top: 12px; right: 12px; z-index: 1; }
	.woocommerce-cart .quantity .qty { height: 40px; }

	.woocommerce-cart .actions { padding: 0 !important; border: 0 !important; background: transparent; }
	.woocommerce-cart .actions .coupon { float: none; max-width: none; }
	.woocommerce-cart .actions .coupon { margin-bottom: 10px; }
	.woocommerce-cart .actions > .button { width: 100%; }
	.woocommerce-cart .cart_totals { max-width: none; padding: 20px; }
}

/* Float clearance for the coupon/update row. */
.woocommerce-cart .actions::after { content: ""; display: table; clear: both; }
