/* =====================================================================
   ModusTech basket (page 11366, Elementor "Cart" widget with WooCommerce's basket inside).
   Product rows become cards, totals become an "Order summary" card, teal checkout button, trust line,
   and on phones a bar with the total and the checkout button pinned to the bottom.
   Loads after modustech-product-fields' checkout.css (page title, notices).
   ===================================================================== */
body.woocommerce-cart {
	--mt-navy: #1A1A2E;
	--mt-teal: #008A94;
	--mt-teal-dark: #00727A;
	--mt-text: #3A3E52;
	--mt-muted: #4A4E63;
	--mt-line: #DCE6EA;
	--mt-tint: #F1F7F9;
	--mt-green: #1B7F3A;
}

body.woocommerce-cart .elementor-widget-woocommerce-cart {
	font-family: Jost, Arial, sans-serif;
	color: var(--mt-text);
}

/* ---------- Product rows: cards ---------- */
body.woocommerce-cart .woocommerce-cart-form__contents thead { display: none; }
body.woocommerce-cart .woocommerce-cart-form__contents,
body.woocommerce-cart .woocommerce-cart-form__contents tbody,
body.woocommerce-cart .e-shop-table { display: block; width: 100%; border: 0 !important; background: none !important; padding: 0 !important; }
body.woocommerce-cart .elementor-widget-woocommerce-cart .e-shop-table tr.cart_item {
	display: grid !important;
	grid-template-columns: 120px minmax(0, 1fr) auto;
	grid-template-areas: "thumb name subtotal" "thumb name qty" "thumb name remove";
	column-gap: 24px;
	row-gap: 10px;
	align-items: center;
	background: #ffffff;
	border: 1px solid var(--mt-line);
	border-radius: 18px;
	padding: 24px;
	margin: 0 0 16px;
}
body.woocommerce-cart .elementor-widget-woocommerce-cart .e-shop-table tr.cart_item td { display: block !important; position: static !important; float: none !important; width: auto !important; min-height: 0 !important; border: 0 !important; padding: 0 !important; background: none !important; text-align: left; }
body.woocommerce-cart .elementor-widget-woocommerce-cart .e-shop-table tr.cart_item td::before { display: none !important; content: none !important; }
body.woocommerce-cart .elementor-widget-woocommerce-cart .e-shop-table tr.cart_item td.product-thumbnail { grid-area: thumb; display: block !important; }
body.woocommerce-cart .elementor-widget-woocommerce-cart .e-shop-table tr.cart_item td.product-thumbnail img { width: 120px !important; max-width: 120px !important; height: 120px; object-fit: cover; border-radius: 12px; background: var(--mt-tint); display: block; }
body.woocommerce-cart .elementor-widget-woocommerce-cart .e-shop-table tr.cart_item td.product-name { grid-area: name; display: flex !important; flex-direction: column !important; align-items: flex-start !important; gap: 6px; text-align: left !important; }
body.woocommerce-cart .elementor-widget-woocommerce-cart .e-shop-table tr.cart_item td.product-price { display: none !important; }
body.woocommerce-cart .elementor-widget-woocommerce-cart .e-shop-table tr.cart_item td.product-subtotal,
body.woocommerce-cart .elementor-widget-woocommerce-cart .e-shop-table tr.cart_item td.product-subtotal .amount { grid-area: subtotal; justify-self: end; text-align: right !important; font-size: 22px !important; font-weight: 600 !important; color: var(--mt-navy) !important; }
body.woocommerce-cart .elementor-widget-woocommerce-cart .e-shop-table tr.cart_item td.product-quantity { grid-area: qty; justify-self: end; }
body.woocommerce-cart .elementor-widget-woocommerce-cart .e-shop-table tr.cart_item td.product-remove { grid-area: remove; justify-self: end; }

.mt-item__type { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--mt-muted); }
.mt-item__name, .mt-item__name a { font-size: 22px; font-weight: 600; line-height: 1.2; color: var(--mt-navy) !important; text-decoration: none !important; }
.mt-item__name a:hover { color: var(--mt-teal-dark) !important; }
.mt-item__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.mt-tag { font-size: 14px; line-height: 1.4; background: var(--mt-tint); border: 1px solid var(--mt-line); border-radius: 999px; padding: 4px 12px; color: var(--mt-text); }
.mt-item__stock { font-size: 14px; color: var(--mt-green); display: inline-flex; gap: 6px; align-items: center; }
.mt-item__stock::before { content: ""; width: 14px; height: 14px; background: no-repeat center / 14px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231B7F3A' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); }

/* Remove: words, not a small red cross */
body.woocommerce-cart .elementor-widget-woocommerce-cart .e-shop-table tr.cart_item td.product-remove a.remove {
	display: inline-block !important; width: auto !important; height: auto !important; line-height: 1.4 !important;
	font-size: 0 !important; color: var(--mt-muted) !important; background: none !important; border-radius: 0 !important; text-decoration: underline;
}
body.woocommerce-cart .elementor-widget-woocommerce-cart .e-shop-table tr.cart_item td.product-remove a.remove::after { content: "Remove"; font-size: 14px; }
body.woocommerce-cart .elementor-widget-woocommerce-cart .e-shop-table tr.cart_item td.product-remove a.remove:hover { color: var(--mt-navy) !important; }

/* Quantity: one pill with − and + (buttons added by basket.js) */
body.woocommerce-cart .mt-qty { display: inline-flex; align-items: center; border: 1px solid var(--mt-line); border-radius: 999px; overflow: hidden; background: #fff; }
body.woocommerce-cart .mt-qty button { width: 44px; height: 44px; border: 0 !important; background: #fff !important; color: var(--mt-navy) !important; font-size: 20px; line-height: 1; padding: 0 !important; cursor: pointer; font-family: inherit; }
body.woocommerce-cart .mt-qty button:hover { background: var(--mt-tint) !important; }
body.woocommerce-cart .mt-qty button:focus-visible { outline: 2px solid var(--mt-teal); outline-offset: -2px; }
body.woocommerce-cart .mt-qty input.qty { width: 44px !important; height: 44px !important; border: 0 !important; padding: 0 !important; text-align: center; font-size: 16px; color: var(--mt-navy); background: #fff; -moz-appearance: textfield; box-shadow: none !important; }
body.woocommerce-cart .mt-qty input.qty::-webkit-outer-spin-button,
body.woocommerce-cart .mt-qty input.qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* The update button stays (basket.js clicks it after a change) but out of sight */
body.woocommerce-cart .woocommerce-cart-form__contents td.actions { display: block !important; padding: 0 !important; border: 0 !important; height: 0; overflow: hidden; }

.mt-continue { margin: 4px 0 0; }
.mt-continue a { font-size: 15px; font-weight: 500; color: var(--mt-teal-dark) !important; text-decoration: none; }
.mt-continue a::before { content: "\2039"; margin-right: 8px; font-size: 20px; }
.mt-continue a:hover { text-decoration: underline; }

/* ---------- Order summary card ---------- */
body.woocommerce-cart .cart_totals {
	background: #ffffff !important; border: 1px solid var(--mt-line) !important; border-radius: 18px !important; padding: 28px !important;
}
body.woocommerce-cart .cart_totals > h2 { font-size: 0 !important; margin: 0 0 12px !important; padding: 0 !important; border: 0 !important; }
body.woocommerce-cart .cart_totals > h2::after { content: "Order summary"; font-size: 22px; font-weight: 600; color: var(--mt-navy); text-transform: none; letter-spacing: 0; }
body.woocommerce-cart .cart_totals table,
body.woocommerce-cart .cart_totals tbody { display: block; width: 100%; border: 0 !important; }
body.woocommerce-cart .e-cart-totals.e-cart-section,
body.woocommerce-cart .e-cart-totals .cart-collaterals { border: 0 !important; padding: 0 !important; background: none !important; box-shadow: none !important; }
body.woocommerce-cart .cart_totals tr { display: flex !important; justify-content: space-between; align-items: baseline; gap: 12px; padding: 7px 0 !important; margin: 0 !important; border: 0 !important; }
body.woocommerce-cart .cart_totals th,
body.woocommerce-cart .cart_totals td { display: block !important; width: auto !important; padding: 0 !important; margin: 0 !important; border: 0 !important; background: none !important; font-size: 16px !important; font-weight: 400 !important; color: var(--mt-text) !important; text-align: right !important; }
body.woocommerce-cart .cart_totals th { text-align: left !important; }
body.woocommerce-cart .cart_totals td::before { display: none !important; }
body.woocommerce-cart .cart_totals tr.shipping th { font-size: 0 !important; }
body.woocommerce-cart .cart_totals tr.shipping th::after { content: "Delivery"; font-size: 16px; }
body.woocommerce-cart .cart_totals #shipping_method { margin: 0 !important; padding: 0 !important; list-style: none; }
body.woocommerce-cart .cart_totals .woocommerce-shipping-destination:empty { display: none; }
body.woocommerce-cart .cart_totals tr.order-total { flex-wrap: wrap; margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--mt-line) !important; }
body.woocommerce-cart .cart_totals tr.order-total th { font-size: 18px !important; font-weight: 600 !important; color: var(--mt-navy) !important; }
body.woocommerce-cart .cart_totals tr.order-total td strong,
body.woocommerce-cart .cart_totals tr.order-total td strong .amount { font-size: 26px !important; font-weight: 600 !important; color: var(--mt-navy) !important; }
body.woocommerce-cart .cart_totals tr.order-total .includes_tax { display: block; font-size: 13px; color: var(--mt-muted); margin-top: 2px; }

body.woocommerce-cart .wc-proceed-to-checkout { padding: 12px 0 0 !important; }
body.woocommerce-cart .wc-proceed-to-checkout a.checkout-button {
	display: flex !important; align-items: center; justify-content: center; gap: 10px;
	height: 56px; margin: 0 !important; padding: 0 24px !important; border: 0 !important; border-radius: 999px !important;
	background: var(--mt-teal) !important; color: #ffffff !important; font-size: 0 !important; text-transform: none !important; letter-spacing: 0 !important; box-shadow: none !important;
}
body.woocommerce-cart .wc-proceed-to-checkout a.checkout-button::before { content: ""; width: 18px; height: 18px; background: no-repeat center / 18px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E"); }
body.woocommerce-cart .wc-proceed-to-checkout a.checkout-button::after { content: "Checkout securely"; font-size: 18px; font-weight: 600; }
body.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover { background: var(--mt-teal-dark) !important; }
body.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:focus-visible { outline: 3px solid var(--mt-navy); outline-offset: 3px; }

.mt-trust { list-style: none; margin: 18px 0 0 !important; padding: 16px 0 0 !important; border-top: 1px solid var(--mt-line); display: flex; flex-direction: column; gap: 12px; }
.mt-trust li { display: flex; align-items: center; gap: 12px; font-size: 15px; color: var(--mt-text); margin: 0 !important; }
.mt-trust svg { color: var(--mt-teal); flex: none; }

/* BrikPanel "Share cart": a quiet text link */
body.woocommerce-cart .brikpanel-cshare-wrap { margin-top: 14px; text-align: center; }
body.woocommerce-cart .brikpanel-cshare-btn { background: none !important; border: 0 !important; color: var(--mt-muted) !important; font-size: 14px !important; box-shadow: none !important; }

/* Coupon box (only when coupons are switched on) */
body.woocommerce-cart .coupon.e-cart-section { background: #fff !important; border: 1px solid var(--mt-line) !important; border-radius: 18px !important; padding: 16px !important; margin-top: 4px; }
body.woocommerce-cart .coupon .input-text { border-radius: 10px !important; border: 1px solid #B9C6CC !important; height: 46px; }
body.woocommerce-cart .coupon .button { border-radius: 999px !important; background: #fff !important; color: var(--mt-teal-dark) !important; border: 2px solid var(--mt-teal) !important; }

/* ---------- Phone ---------- */
.mt-phonebar { display: none; }

@media (max-width: 767px) {
	body.woocommerce-cart .elementor-widget-woocommerce-cart .e-shop-table tr.cart_item {
		grid-template-columns: 88px minmax(0, 1fr) auto !important;
		grid-template-areas: "thumb name name" "qty qty subtotal" "remove remove remove" !important;
		column-gap: 14px;
		padding: 16px;
	}
	body.woocommerce-cart .elementor-widget-woocommerce-cart .e-shop-table tr.cart_item td.product-thumbnail img { width: 88px !important; max-width: 88px !important; height: 88px; }
	body.woocommerce-cart .elementor-widget-woocommerce-cart .e-shop-table tr.cart_item td.product-quantity { grid-area: qty !important; justify-self: start !important; }
	body.woocommerce-cart .elementor-widget-woocommerce-cart .e-shop-table tr.cart_item td.product-subtotal, body.woocommerce-cart .elementor-widget-woocommerce-cart .e-shop-table tr.cart_item td.product-subtotal .amount { grid-area: subtotal !important; justify-self: end !important; align-self: center !important; font-size: 20px !important; }
	body.woocommerce-cart .elementor-widget-woocommerce-cart .e-shop-table tr.cart_item td.product-remove { grid-area: remove !important; justify-self: start !important; text-align: left !important; }
	.mt-item__name, .mt-item__name a { font-size: 19px; }
	body.woocommerce-cart .cart_totals { padding: 20px !important; }

	.mt-phonebar {
		display: flex; align-items: center; gap: 14px;
		position: fixed; left: 0; right: 0; bottom: 0; z-index: 9990;
		padding: 12px 16px calc(14px + env(safe-area-inset-bottom));
		background: #ffffff; border-top: 1px solid var(--mt-line); box-shadow: 0 -6px 20px rgba(26, 26, 46, .08);
		font-family: Jost, Arial, sans-serif;
	}
	.mt-phonebar__total { display: flex; flex-direction: column; line-height: 1.2; }
	.mt-phonebar__total span { font-size: 13px; color: var(--mt-muted); }
	.mt-phonebar__total strong { font-size: 20px; font-weight: 600; color: var(--mt-navy); }
	.mt-phonebar__total small { display: none; }
	.mt-phonebar__go { flex: 1; height: 52px; border-radius: 999px; background: var(--mt-teal); color: #fff !important; text-decoration: none !important; font-size: 17px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
	.mt-phonebar__go:hover { background: var(--mt-teal-dark); }
	body.woocommerce-cart { padding-bottom: 92px; }
}

/* Free delivery badge (Modustech_Checkout::free_badge) */
.mt-free { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 9px; border-radius: 999px; background: #E6F4EA; color: #1B7F3A !important; font-size: 14px !important; font-weight: 600 !important; line-height: 1; white-space: nowrap; }
.mt-free::before { content: ""; flex: none; width: 16px; height: 16px; background: no-repeat center / 16px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231B7F3A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7h11v9H3z'/%3E%3Cpath d='M14 10h4l3 3v3h-7'/%3E%3Ccircle cx='7' cy='17.5' r='1.8'/%3E%3Ccircle cx='17' cy='17.5' r='1.8'/%3E%3C/svg%3E"); }
