/**
 * Classic [woocommerce_cart] shortcode layout.
 * The cart page is an Elementor shortcode widget, so Elementor Cart widget
 * styles and the theme two-column wrap do not apply.
 */

.woocommerce-cart .elementor-widget-shortcode .elementor-shortcode,
.woocommerce-cart .entry-content > .woocommerce {
	max-width: 1200px;
	margin-left: auto;
	margin-right: auto;
}

/* Two-column: items + totals */
.woocommerce-cart .woocommerce:has(> form.woocommerce-cart-form) {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
	gap: 28px 32px;
	align-items: start;
}

.woocommerce-cart .woocommerce > .woocommerce-notices-wrapper:empty {
	display: none;
}

.woocommerce-cart .woocommerce > .woocommerce-notices-wrapper,
.woocommerce-cart .woocommerce > .woocommerce-message,
.woocommerce-cart .woocommerce > .woocommerce-info,
.woocommerce-cart .woocommerce > .woocommerce-error,
.woocommerce-cart .woocommerce > .cross-sells {
	grid-column: 1 / -1;
}

.woocommerce-cart .woocommerce > form.woocommerce-cart-form {
	grid-column: 1;
	min-width: 0;
	width: 100% !important;
	float: none !important;
	padding: 0 !important;
}

.woocommerce-cart .woocommerce > .cart-collaterals {
	grid-column: 2;
	width: 100% !important;
	float: none !important;
	position: sticky;
	top: 112px;
}

/* Product table */
.woocommerce-cart table.shop_table.cart {
	width: 100%;
	border: 1px solid #e6edf5;
	border-radius: 14px;
	border-collapse: separate;
	border-spacing: 0;
	overflow: hidden;
	background: #fff;
	margin: 0;
	box-shadow: 0 8px 28px rgba(3, 29, 64, 0.06);
}

.woocommerce-cart table.shop_table.cart th.product-name {
	position: static !important;
	left: auto !important;
}

.woocommerce-cart table.shop_table.cart thead th {
	background: #031d40;
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 14px 16px;
	border: 0;
}

.woocommerce-cart table.shop_table.cart tbody td {
	padding: 18px 16px;
	vertical-align: middle;
	border-top: 1px solid #eef3f8;
	border-left: 0;
	border-right: 0;
	background: #fff;
}

.woocommerce-cart table.shop_table.cart tbody tr.cart_item:first-child td {
	border-top: 0;
}

.woocommerce-cart table.shop_table.cart img {
	width: 72px;
	height: 72px;
	object-fit: cover;
	border-radius: 10px;
	box-shadow: none;
}

.woocommerce-cart table.shop_table.cart .product-name a {
	color: #031d40;
	font-weight: 600;
	text-decoration: none;
	line-height: 1.4;
}

.woocommerce-cart table.shop_table.cart .product-name a:hover {
	color: #de1a31;
}

.woocommerce-cart table.shop_table.cart .product-price,
.woocommerce-cart table.shop_table.cart .product-subtotal {
	font-weight: 700;
	color: #031d40;
	white-space: nowrap;
}

.woocommerce-cart table.shop_table.cart a.remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: #fff1f2;
	color: #de1a31 !important;
	font-size: 20px;
	line-height: 1;
	text-decoration: none;
	border: 1px solid #ffd6db;
}

.woocommerce-cart table.shop_table.cart a.remove:hover {
	background: #de1a31;
	color: #fff !important;
	border-color: #de1a31;
}

/* Hide empty Dokan vendor variation rows */
.woocommerce-cart dl.variation:not(:has(dd:not(:empty))) {
	display: none;
}

.woocommerce-cart dt.variation-Vendor:has(+ dd.variation-Vendor:empty),
.woocommerce-cart dd.variation-Vendor:empty {
	display: none;
}

.woocommerce-cart table.shop_table.cart .quantity {
	display: inline-flex;
	align-items: center;
	border: 1px solid #d7e2ee;
	border-radius: 10px;
	overflow: hidden;
	background: #f7fafe;
}

.woocommerce-cart table.shop_table.cart .quantity .qty {
	width: 64px;
	min-height: 40px;
	margin: 0;
	border: 0;
	background: transparent;
	text-align: center;
	font-weight: 600;
	color: #031d40;
	box-shadow: none;
}

.woocommerce-cart table.shop_table.cart td.actions {
	background: #f7fafe;
	padding: 16px;
}

.woocommerce-cart table.shop_table.cart td.actions .coupon {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	float: none;
}

.woocommerce-cart table.shop_table.cart td.actions .coupon .input-text {
	float: none;
	height: 44px;
	min-width: 200px;
	margin: 0;
	border: 1px solid #d7e2ee;
	border-radius: 10px;
	padding: 0 14px;
	background: #fff;
}

.woocommerce-cart table.shop_table.cart td.actions .button {
	height: 44px;
	line-height: 44px;
	padding: 0 18px;
	border-radius: 10px;
	border: 0;
	font-weight: 600;
}

.woocommerce-cart table.shop_table.cart td.actions .coupon .button {
	background: #031d40;
	color: #fff;
}

.woocommerce-cart table.shop_table.cart td.actions button[name="update_cart"] {
	background: #fff;
	color: #031d40;
	border: 1px solid #d7e2ee;
	line-height: 42px;
}

.woocommerce-cart table.shop_table.cart td.actions button[name="update_cart"]:disabled {
	opacity: 0.45;
}

/* Totals card */
.woocommerce-cart .cart_totals {
	background: #fff;
	border: 1px solid #e6edf5;
	border-radius: 14px;
	padding: 24px;
	box-shadow: 0 8px 28px rgba(3, 29, 64, 0.06);
}

.woocommerce-cart .cart_totals h2 {
	margin: 0 0 16px;
	padding-bottom: 14px;
	border-bottom: 2px solid #de1a31;
	font-size: 20px;
	font-weight: 700;
	color: #031d40;
}

.woocommerce-cart .cart_totals table.shop_table {
	border: 0;
	margin: 0;
	background: transparent;
}

.woocommerce-cart .cart_totals table.shop_table th,
.woocommerce-cart .cart_totals table.shop_table td {
	padding: 12px 0;
	border-left: 0;
	border-right: 0;
	border-top: 0;
	border-bottom: 1px solid #eef3f8;
	background: transparent;
}

.woocommerce-cart .cart_totals table.shop_table th {
	color: #5b6b7c;
	font-weight: 600;
	width: 42%;
}

.woocommerce-cart .cart_totals table.shop_table td {
	text-align: right;
	font-weight: 700;
	color: #031d40;
}

.woocommerce-cart .cart_totals tr.order-total th,
.woocommerce-cart .cart_totals tr.order-total td {
	border-bottom: 0;
	font-size: 18px;
	color: #de1a31;
	padding-top: 16px;
}

.woocommerce-cart .wc-proceed-to-checkout {
	padding: 18px 0 0;
}

.woocommerce-cart .wc-proceed-to-checkout .checkout-button {
	display: block;
	width: 100%;
	text-align: center;
	background: #de1a31;
	color: #fff !important;
	border: 0;
	border-radius: 10px;
	padding: 14px 18px;
	font-weight: 700;
	font-size: 16px;
	line-height: 1.3;
	box-shadow: 0 8px 18px rgba(222, 26, 49, 0.25);
}

.woocommerce-cart .wc-proceed-to-checkout .checkout-button:hover {
	background: #031d40;
	box-shadow: none;
}

/* Empty cart */
.woocommerce-cart .wc-empty-cart-message {
	max-width: 560px;
	margin: 0 auto;
	padding: 48px 28px 20px;
	background: #fff;
	border: 1px solid #e6edf5;
	border-radius: 16px;
	box-shadow: 0 8px 28px rgba(3, 29, 64, 0.06);
	text-align: center;
}

.woocommerce-cart .cart-empty.woocommerce-info {
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: #031d40;
	font-size: 22px;
	font-weight: 700;
	text-align: center;
}

.woocommerce-cart .cart-empty.woocommerce-info::before,
.woocommerce-cart .cart-empty.woocommerce-info::after {
	display: none;
}

.woocommerce-cart .return-to-shop {
	margin: 18px auto 40px;
	text-align: center;
}

.woocommerce-cart .return-to-shop .button {
	background: #de1a31;
	color: #fff;
	border: 0;
	border-radius: 10px;
	padding: 12px 28px;
	font-weight: 600;
}

.woocommerce-cart .return-to-shop .button:hover {
	background: #031d40;
}

@media screen and (max-width: 1024px) {
	.woocommerce-cart .woocommerce:has(> form.woocommerce-cart-form) {
		grid-template-columns: 1fr;
	}

	.woocommerce-cart .woocommerce > .cart-collaterals {
		grid-column: 1;
		position: static;
	}
}

@media screen and (max-width: 768px) {
	.woocommerce-cart table.shop_table.cart thead {
		display: none;
	}

	.woocommerce-cart table.shop_table.cart tbody tr.cart_item {
		display: grid;
		grid-template-columns: 72px 1fr auto;
		grid-template-areas:
			"thumb name remove"
			"thumb price price"
			"qty qty subtotal";
		gap: 8px 12px;
		padding: 16px;
		border-bottom: 1px solid #eef3f8;
	}

	.woocommerce-cart table.shop_table.cart tbody td {
		padding: 0;
		border: 0 !important;
		width: auto !important;
	}

	.woocommerce-cart table.shop_table.cart td.product-thumbnail {
		grid-area: thumb;
	}

	.woocommerce-cart table.shop_table.cart td.product-name {
		grid-area: name;
	}

	.woocommerce-cart table.shop_table.cart td.product-remove {
		grid-area: remove;
		text-align: right;
	}

	.woocommerce-cart table.shop_table.cart td.product-price {
		grid-area: price;
	}

	.woocommerce-cart table.shop_table.cart td.product-quantity {
		grid-area: qty;
	}

	.woocommerce-cart table.shop_table.cart td.product-subtotal {
		grid-area: subtotal;
		text-align: right;
	}

	.woocommerce-cart table.shop_table.cart td.product-price::before,
	.woocommerce-cart table.shop_table.cart td.product-quantity::before,
	.woocommerce-cart table.shop_table.cart td.product-subtotal::before,
	.woocommerce-cart table.shop_table.cart td.product-name::before {
		display: none;
	}

	.woocommerce-cart table.shop_table.cart tbody tr.actions,
	.woocommerce-cart table.shop_table.cart td.actions {
		display: block;
		grid-column: 1 / -1;
	}

	.woocommerce-cart table.shop_table.cart td.actions .coupon .input-text,
	.woocommerce-cart table.shop_table.cart td.actions .button {
		width: 100%;
		min-width: 0;
	}
}
