/**
 * Cart page — mobile & tablet layout only (≤1024px).
 * Visual styles come from existing Elementor / theme rules.
 */

@media (max-width: 1024px) {
	/* Stack columns + correct block order */
	body.woocommerce-cart .e-cart__container {
		display: flex;
		flex-direction: column;
		gap: 24px;
	}

	body.woocommerce-cart .e-cart__column-start,
	body.woocommerce-cart .woocommerce-cart-form {
		display: contents;
	}

	body.woocommerce-cart .e-shop-table {
		order: 1;
		width: 100%;
		margin-top: -24px;
	}

	body.woocommerce-cart .coupon.e-cart-section {
		order: 2;
		width: 100%;
	}

	body.woocommerce-cart .e-cart__column-end {
		order: 3;
		width: 100%;
	}

	body.woocommerce-cart .funngiz-cart-cross-sells--cart {
		order: 4;
		width: 100%;
	}

	body.woocommerce-cart .e-cart__column-inner.e-sticky-right-column {
		position: static !important;
		top: auto !important;
	}

	body.woocommerce-cart .e-cart__column-end,
	body.woocommerce-cart .e-cart-totals,
	body.woocommerce-cart .cart_totals {
		width: 100%;
		max-width: 100%;
	}

	/* Cart table → stacked rows (labels from data-title, like desktop content) */
	body.woocommerce-cart .e-shop-table .shop_table thead {
		display: none;
	}

	body.woocommerce-cart .e-shop-table .shop_table tbody tr.cart_item {
		display: block;
		padding-block: 16px;
	}

	body.woocommerce-cart .e-shop-table .shop_table tbody tr.cart_item td {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
		padding: 6px 0;
		text-align: start;
	}

	body.woocommerce-cart .e-shop-table .shop_table tbody tr.cart_item td::before {
		content: attr(data-title) ":";
		flex-shrink: 0;
		font-weight: 700;
	}

	body.woocommerce-cart .e-shop-table .shop_table tbody tr.cart_item td.product-thumbnail {
		display: none !important;
	}

	body.woocommerce-cart .e-shop-table .shop_table tbody tr.cart_item td.product-remove {
		display: block;
		width: 100%;
		padding: 0 0 8px;
		text-align: end;
	}

	body.woocommerce-cart .e-shop-table .shop_table tbody tr.cart_item td.product-remove::before {
		display: none;
	}

	body.woocommerce-cart .e-shop-table .shop_table tbody tr.cart_item td.product-name a {
		flex: 1;
		text-align: end;
	}

	body.woocommerce-cart .e-shop-table .shop_table tbody tr.cart_item td.product-quantity .quantity {
		margin: 0;
	}

	/* Update cart */
	body.woocommerce-cart .e-shop-table .shop_table tbody tr:has(.actions) {
		display: block;
		padding-top: 8px;
	}

	body.woocommerce-cart .e-shop-table .shop_table tbody tr:has(.actions) td.actions {
		display: block;
		padding: 0;
	}

	body.woocommerce-cart .e-shop-table .shop_table tbody tr:has(.actions) td.actions::before {
		display: none;
	}

	body.woocommerce-cart .e-shop-table .shop_table button[name="update_cart"] {
		display: block;
		width: 100%;
	}

	/* Coupon — vertical stack, full width */
	body.woocommerce-cart .coupon.e-cart-section .form-row.coupon-col {
		flex-direction: column;
		gap: 12px;
	}

	body.woocommerce-cart .coupon.e-cart-section .coupon-col-start,
	body.woocommerce-cart .coupon.e-cart-section .coupon-col-end {
		width: 100%;
		max-width: 100%;
		flex: 0 0 100%;
	}

	body.woocommerce-cart .coupon.e-cart-section #coupon_code,
	body.woocommerce-cart .coupon.e-cart-section .button.e-apply-coupon {
		width: 100%;
	}

	/* Cart totals — Elementor already styles this at ≤1024px; only full width */
	body.woocommerce-cart .cart-collaterals,
	body.woocommerce-cart .cart-collaterals .cart_totals {
		float: none;
		width: 100%;
		max-width: 100%;
	}

	body.woocommerce-cart .wc-proceed-to-checkout .checkout-button {
		display: block;
		width: 100%;
		box-sizing: border-box;
	}

	/* Cross-sells — last, full-width track */
	body.woocommerce-cart .funngiz-cart-cross-sells__slider .splide__track {
		width: 100%;
	}
}
