/* ==========================================================================
   Cart page — mobile layout (Kendall child)
   Kendall doesn't load WooCommerce's small-screen table styles, so the cart
   table stays 6 columns wide on phones. Below 768px each cart row becomes a
   card: thumbnail left, name + remove on top, then Price / Quantity / Total
   rows labelled from the cells' data-title attributes.
   ========================================================================== */
@media (max-width: 768px) {

	.woocommerce-cart .woocommerce,
	.woocommerce-cart .woocommerce-cart-form {
		max-width: 100%;
		overflow-x: hidden;
	}

	/* Table → stacked blocks */
	.woocommerce-cart table.shop_table.cart,
	.woocommerce-cart table.shop_table.cart tbody,
	.woocommerce-cart table.shop_table.cart tr,
	.woocommerce-cart table.shop_table.cart td {
		display: block !important;
		width: 100% !important;
		box-sizing: border-box;
	}
	.woocommerce-cart table.shop_table.cart {
		border: 0 !important;
		table-layout: auto;
	}
	.woocommerce-cart table.shop_table.cart thead {
		display: none !important;
	}

	/* One card per product */
	.woocommerce-cart table.shop_table.cart tr.cart_item {
		position: relative;
		min-height: 116px;
		margin: 0 0 16px;
		padding: 16px 16px 8px 108px;
		border: 1px solid #e5e5e5;
		background: #fff;
	}
	.woocommerce-cart table.shop_table.cart tr.cart_item td {
		display: flex !important;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
		padding: 8px 0 !important;
		border: 0 !important;
		border-top: 1px solid #f0f0f0 !important;
		text-align: right !important;
		white-space: normal !important;
		background: none !important;
	}

	/* Labels from data-title */
	.woocommerce-cart table.shop_table.cart tr.cart_item td[data-title]::before {
		content: attr(data-title);
		flex: 0 0 auto;
		font-size: 12px;
		letter-spacing: .08em;
		text-transform: uppercase;
		color: #888;
		text-align: left;
	}

	/* Thumbnail — pinned left */
	.woocommerce-cart table.shop_table.cart td.product-thumbnail {
		position: absolute;
		top: 16px;
		left: 16px;
		width: 76px !important;
		padding: 0 !important;
		border: 0 !important;
	}
	.woocommerce-cart table.shop_table.cart td.product-thumbnail img {
		display: block;
		width: 76px !important;
		max-width: 76px;
		height: auto;
	}

	/* Remove (×) — top right */
	.woocommerce-cart table.shop_table.cart td.product-remove {
		position: absolute;
		top: 6px;
		right: 6px;
		width: auto !important;
		padding: 0 !important;
		border: 0 !important;
	}
	.woocommerce-cart table.shop_table.cart td.product-remove a.remove {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 36px;
		height: 36px;
		font-size: 22px;
		line-height: 1;
	}

	/* Product name — full width, no label, room for the × */
	.woocommerce-cart table.shop_table.cart tr.cart_item td.product-name {
		display: block !important;
		padding: 0 32px 10px 0 !important;
		border-top: 0 !important;
		text-align: left !important;
		font-size: 17px;
		line-height: 1.35;
	}
	.woocommerce-cart table.shop_table.cart tr.cart_item td.product-name::before {
		content: none !important;
	}
	.woocommerce-cart table.shop_table.cart td.product-name dl.variation {
		margin: 6px 0 0;
		font-size: 13px;
	}

	.woocommerce-cart table.shop_table.cart td.product-subtotal {
		font-weight: 600;
	}

	/* Quantity control stays compact on the right */
	.woocommerce-cart table.shop_table.cart td.product-quantity .screen-reader-text {
		position: absolute !important;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(1px, 1px, 1px, 1px);
		white-space: nowrap;
	}
	.woocommerce-cart table.shop_table.cart td.product-quantity .quantity {
		float: none !important;
		margin: 0 !important;
		display: inline-flex;
	}

	/* Coupon + buttons */
	.woocommerce-cart table.shop_table.cart td.actions {
		padding: 8px 0 0 !important;
		border: 0 !important;
		text-align: left !important;
	}
	.woocommerce-cart table.shop_table.cart td.actions .coupon,
	.woocommerce-cart table.shop_table.cart td.actions .eltd-cart-proceed-update {
		display: flex;
		flex-direction: column;
		gap: 10px;
		float: none !important;
		width: 100% !important;
		margin: 0 0 16px !important;
	}
	.woocommerce-cart table.shop_table.cart td.actions .coupon label {
		display: none;
	}
	.woocommerce-cart table.shop_table.cart td.actions .coupon .input-text,
	.woocommerce-cart table.shop_table.cart td.actions .button,
	.woocommerce-cart table.shop_table.cart td.actions .eltd-btn,
	.woocommerce-cart table.shop_table.cart td.actions input[type="submit"] {
		display: block !important;
		float: none !important;
		width: 100% !important;
		max-width: 100%;
		margin: 0 !important;
		box-sizing: border-box;
		text-align: center;
	}
	/* Checkout first, Update Cart second */
	.woocommerce-cart table.shop_table.cart td.actions .eltd-cart-proceed-update .checkout-button {
		order: -1;
	}

	/* Cart totals below */
	.woocommerce-cart .cart-collaterals,
	.woocommerce-cart .cart-collaterals .cart_totals,
	.woocommerce-cart .cart-collaterals .cross-sells {
		float: none !important;
		width: 100% !important;
		margin-left: 0 !important;
		box-sizing: border-box;
	}
	.woocommerce-cart .cart_totals table.shop_table {
		width: 100% !important;
		table-layout: fixed;
	}
	.woocommerce-cart .cart_totals table.shop_table th {
		width: 38%;
	}
	.woocommerce-cart .cart_totals table.shop_table td,
	.woocommerce-cart .cart_totals table.shop_table th {
		overflow-wrap: anywhere;
		white-space: normal !important;
		padding-left: 10px !important;
		padding-right: 10px !important;
	}
	.woocommerce-cart .cart_totals .wc-proceed-to-checkout a {
		display: block;
		width: 100%;
		box-sizing: border-box;
		text-align: center;
	}
}
