/* Classic WooCommerce forms retain the existing WspinArt cart presentation.
   All quantities, totals and extension rows remain native WooCommerce content. */
.ws-commerce #main-content table.cart { display: block; width: 100%; border-radius: 16px; }
.ws-commerce #main-content table.cart :is(thead, tbody) { display: block; width: 100%; }
.ws-commerce #main-content table.cart thead tr { display: grid; grid-template-columns: 84px minmax(0, 1fr) 110px; gap: 16px; padding: 16px 22px; background: #fff; }
.ws-commerce #main-content table.cart thead th { padding: 0; border: 0; font-size: 13px; }
.ws-commerce #main-content table.cart thead .product-name { grid-column: 2; }
.ws-commerce #main-content table.cart thead .product-subtotal { grid-column: 3; text-align: right; }
.ws-commerce #main-content table.cart :is(th, td).product-price,
.ws-commerce #main-content table.cart thead :is(.product-remove, .product-thumbnail, .product-quantity) { display: none; }
.ws-commerce #main-content table.cart .cart_item {
	display: grid; grid-template-columns: 84px minmax(0, 1fr) 110px; gap: 12px 16px;
	padding: 22px; border-top: 1px solid var(--ws-border); background: #fff;
}
.ws-commerce #main-content table.cart .cart_item > :is(th, td) { padding: 0; margin: 0; border: 0; min-width: 0; background: transparent; }
.ws-commerce #main-content table.cart .cart_item > :is(th, td)::before { display: none; }
.ws-commerce #main-content table.cart .cart_item .product-thumbnail { display: block; grid-column: 1; grid-row: 1 / 3; }
.ws-commerce #main-content table.cart .cart_item .product-name { grid-column: 2; grid-row: 1; text-align: left !important; }
.ws-commerce #main-content table.cart .product-name > a { color: var(--ws-ink); font-size: 16px; font-weight: 700; line-height: 1.5; text-decoration: none; }
.ws-commerce #main-content table.cart .product-name > a:hover { color: var(--ws-link); text-decoration: underline; }
.ws-commerce #main-content table.cart .cart_item .product-subtotal { grid-column: 3; grid-row: 1; text-align: right !important; }
.ws-commerce #main-content table.cart .cart_item .product-quantity { grid-column: 2; grid-row: 2; text-align: left !important; }
.ws-commerce #main-content table.cart .cart_item .product-remove { display: flex; justify-content: flex-end; grid-column: 3; grid-row: 2; width: auto; }
.ws-commerce #main-content table.cart .cart_item .variation { font-size: 12px; line-height: 1.5; }
.ws-commerce #main-content table.cart .cart_item .variation dt { font-weight: 400; }
.ws-commerce #main-content table.cart tbody > tr:not(.cart_item) { display: block; }
.ws-commerce #main-content table.cart td.actions { display: block; width: 100%; padding: 18px 22px; }
.ws-commerce #main-content table.cart td.actions .coupon { margin: 0; }
.ws-commerce #main-content .cart_totals table { table-layout: fixed; }
.ws-commerce #main-content .cart_totals table th { width: 62%; }
.ws-commerce #main-content .cart_totals table td { width: 38%; }
.ws-commerce #main-content .woocommerce :is(.cart_totals, #order_review) .order-paid :is(th, td) {
	color: var(--ws-link); font-size: 20px; font-weight: 800;
}
.ws-commerce #main-content .woocommerce :is(.cart_totals, #order_review):has(.order-paid) .order-total :is(th, td) { font-size: 14px; font-weight: 400; }
/* The deposit is already listed with the product and in the payment totals. */
.ws-commerce #main-content .woocommerce:has(.order-paid) .product-subtotal > :is(small, br) { display: none; }
/* Dopłata is set by our cart-item filter, including before checkout AJAX completes. */
.ws-commerce #main-content #order_review .cart_item:has(.variation-Dopata) .product-total > :is(small, br) { display: none; }
.ws-commerce #main-content #order_review .cart_item > td { vertical-align: top; }
.ws-commerce #main-content #order_review .product-total { width: 1%; white-space: nowrap; }
.ws-commerce #main-content :is(table.cart, .cart_totals, #order_review) .amount { white-space: nowrap; }
@media (max-width: 768px) {
	/* WooCommerce hides the heading cells on mobile and repeats labels in ::before. */
	.ws-commerce #main-content .cart_totals table.shop_table_responsive tr { margin-bottom: 0; }
	.ws-commerce #main-content .cart_totals table.shop_table_responsive td {
		display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px;
		align-items: center; width: 100%; padding: 16px 0;
	}
	.ws-commerce #main-content .cart_totals table.shop_table_responsive td::before {
		grid-column: 1; grid-row: 1; float: none; margin: 0;
		text-align: left; font-size: 14px; line-height: 1.5;
	}
	.ws-commerce #main-content .cart_totals table.shop_table_responsive td > * { grid-column: 2; }
	.ws-commerce #main-content .woocommerce .cart_totals table.shop_table_responsive .order-paid td { font-size: 18px; }
	.ws-commerce #main-content .woocommerce .cart-collaterals .cart_totals { padding: 22px; }
	.ws-commerce #main-content table.cart thead { display: none; }
	.ws-commerce #main-content table.cart .cart_item { grid-template-columns: 56px minmax(0, 1fr) 36px; gap: 10px; padding: 18px; }
	.ws-commerce #main-content table.cart .cart_item .product-thumbnail { grid-row: 1 / 3; }
	.ws-commerce #main-content table.cart .cart_item .product-thumbnail img { width: 56px; }
	.ws-commerce #main-content table.cart .cart_item .product-name { grid-column: 2 / -1; }
	.ws-commerce #main-content table.cart .cart_item .product-subtotal { grid-column: 2 / -1; grid-row: 2; text-align: left !important; }
	.ws-commerce #main-content table.cart .cart_item .product-quantity { grid-column: 2; grid-row: 3; }
	.ws-commerce #main-content table.cart .cart_item .product-remove { grid-column: 3; grid-row: 3; }
	.ws-commerce #main-content table.cart td.actions { padding: 16px 18px; }
	.ws-commerce #main-content table.cart td.actions .coupon { width: 100%; }
	.ws-commerce #main-content table.cart td.actions button { width: 100%; margin-top: 8px; }
}
