/* ===== Cart page ===== */
body.woocommerce-cart { background: var(--mu-bg); }
body.woocommerce-cart .mu-cart { max-width: var(--mu-container); margin: 0 auto; padding: 8px var(--mu-pad) 56px; background: transparent; }
@media (max-width: 1023px) { body.woocommerce-cart .mu-cart { padding-bottom: 110px; } }

.mu-cart__layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
@media (min-width: 1024px) { .mu-cart__layout { grid-template-columns: minmax(0, 1fr) 380px; gap: 32px; } }

.mu-cart__head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.mu-cart__title { margin: 0; font: 600 clamp(26px, 4vw, 38px)/1.15 var(--mu-font-head); background: var(--mu-gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mu-cart__count { color: var(--mu-muted); font-size: 14px; }

/* notices */
.mu-cart .woocommerce-notices-wrapper { margin-bottom: 16px; }
.mu-cart :is(.woocommerce-message, .woocommerce-info, .woocommerce-error) { margin: 0 0 12px; padding: 14px 16px 14px 44px; list-style: none; border: 1px solid var(--mu-line-strong); border-top-width: 1px; border-radius: 10px; background: var(--mu-surface); color: var(--mu-text); font-size: 14px; }
.mu-cart :is(.woocommerce-message, .woocommerce-info, .woocommerce-error)::before { color: var(--mu-gold); top: 14px; left: 16px; }
.mu-cart .woocommerce-error { border-color: var(--mu-danger); }
.mu-cart .woocommerce-error::before { color: var(--mu-danger); }
.mu-cart :is(.woocommerce-message, .woocommerce-info) a.button { float: right; }

/* free shipping bar */
.mu-ship { margin-bottom: 16px; padding: 14px 16px; border: 1px solid var(--mu-line); border-radius: var(--mu-radius); background: var(--mu-surface); }
.mu-ship p { margin: 0 0 10px; font-size: 13.5px; color: var(--mu-muted); }
.mu-ship strong { color: var(--mu-gold-2); }
.mu-ship__bar { height: 6px; border-radius: 3px; background: var(--mu-line); overflow: hidden; }
.mu-ship__bar span { display: block; height: 100%; border-radius: 3px; background: var(--mu-gold-grad); transition: width .4s ease; }
.mu-ship.is-done p { color: var(--mu-gold-2); }

/* ===== Items ===== */
.mu-cart__items { display: grid; gap: 12px; }
.mu-item { position: relative; display: grid; gap: 10px 14px; padding: 14px; background: var(--mu-surface); border: 1px solid var(--mu-line); border-radius: var(--mu-radius); grid-template-columns: 84px minmax(0, 1fr) auto; grid-template-areas: "media info remove" "media qty total"; align-items: center; }
.mu-item__media { grid-area: media; align-self: start; width: 84px; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--mu-bg-2); border: 1px solid var(--mu-line); }
.mu-item__media a, .mu-item__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mu-item__info { grid-area: info; min-width: 0; align-self: start; }
.mu-item__name { margin: 0 0 4px; font: 500 15px/1.35 var(--mu-font-body); }
.mu-item__name a:hover { color: var(--mu-gold-2); }
.mu-item__info .variation { display: flex; flex-wrap: wrap; gap: 2px 12px; margin: 0 0 4px; font-size: 12.5px; color: var(--mu-muted); }
.mu-item__info .variation dt, .mu-item__info .variation dd, .mu-item__info .variation p { display: inline; margin: 0; }
.mu-item__info .variation dt { font-weight: 500; }
.mu-item__info .backorder_notification { margin: 4px 0 0; font-size: 12px; color: var(--mu-gold-2); }
.mu-item__price { font-size: 13px; color: var(--mu-muted); }
.mu-item__qty { grid-area: qty; }
.mu-item__total { grid-area: total; justify-self: end; font: 700 17px var(--mu-font-body); color: var(--mu-text); }
.mu-item__remove { grid-area: remove; justify-self: end; align-self: start; }
.mu-remove { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: var(--mu-muted); transition: color .2s, background .2s; }
.mu-remove:hover { color: var(--mu-danger); background: rgba(255, 122, 122, .12); }

@media (min-width: 768px) {
	.mu-item { grid-template-columns: 110px minmax(0, 1fr) 132px 112px 36px; grid-template-areas: "media info qty total remove"; padding: 16px 18px; gap: 18px; }
	.mu-item__media { width: 110px; align-self: center; }
	.mu-item__remove { align-self: center; }
	.mu-item__total { font-size: 18px; }
}

/* coupon + actions */
.mu-cart__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 16px; }
.mu-coupon { display: flex; flex: 1 1 280px; gap: 8px; max-width: 460px; }
.mu-coupon input.input-text { flex: 1; min-width: 0; height: 44px; padding: 0 14px; border: 1px dashed var(--mu-gold); border-radius: 10px; background: var(--mu-input-bg); color: var(--mu-input-text); font: 500 14px var(--mu-font-body); box-shadow: none; }
.mu-coupon input.input-text::placeholder { color: var(--mu-input-placeholder); opacity: 1; }
.mu-coupon .mu-btn { min-height: 44px; }
.mu-cart.mu-js .mu-cart__update { display: none !important; } /* quantity changes auto-update when JS is on */
.mu-cart__continue { display: inline-block; margin-top: 18px; color: var(--mu-gold-2); font-size: 14px; text-decoration: underline; text-underline-offset: 4px; }

/* ===== Summary ===== */
.mu-cart__summary { display: grid; gap: 16px; }
@media (min-width: 1024px) { .mu-cart__summary { position: sticky; top: 24px; } }
.mu-cart .cart_totals { padding: 22px; background: var(--mu-surface); border: 1px solid var(--mu-line-strong); border-radius: var(--mu-radius); box-shadow: var(--mu-shadow); float: none; width: 100%; }
.mu-summary__title { margin: 0 0 14px; font: 600 22px var(--mu-font-head); color: var(--mu-text); }
.mu-cart table.mu-totals { display: block; width: 100%; margin: 0; border: 0; background: none; }
.mu-cart table.mu-totals tbody { display: block; }
.mu-cart table.mu-totals tr { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px; padding: 12px 0; border-top: 1px solid var(--mu-line); }
.mu-cart table.mu-totals tr:first-child { border-top: 0; }
.mu-cart table.mu-totals :is(th, td) { display: block; padding: 0; border: 0; background: none; color: var(--mu-text); font-size: 14px; line-height: 1.5; }
.mu-cart table.mu-totals th { font-weight: 500; color: var(--mu-muted); text-align: left; }
.mu-cart table.mu-totals td { text-align: right; font-weight: 600; }
.mu-cart table.mu-totals td::before { content: none !important; }
.mu-cart table.mu-totals .cart-discount td { color: var(--mu-gold-2); }
.mu-cart table.mu-totals .cart-discount a { color: var(--mu-muted); font-size: 12px; text-decoration: underline; margin-left: 6px; }
.mu-cart table.mu-totals .order-total { padding-top: 16px; }
.mu-cart table.mu-totals .order-total th { color: var(--mu-text); font: 600 17px var(--mu-font-head); }
.mu-cart table.mu-totals .order-total td { font-size: 22px; color: var(--mu-gold-2); }
.mu-cart table.mu-totals .order-total small { display: block; font-size: 12px; font-weight: 400; color: var(--mu-muted); }

/* shipping row */
.mu-cart table.mu-totals tr.shipping, .mu-cart table.mu-totals tr.woocommerce-shipping-totals { display: block; }
.mu-cart table.mu-totals tr.shipping th, .mu-cart table.mu-totals tr.woocommerce-shipping-totals th { margin-bottom: 8px; }
.mu-cart table.mu-totals tr.shipping td, .mu-cart table.mu-totals tr.woocommerce-shipping-totals td { text-align: left; font-weight: 500; }
.mu-cart #shipping_method { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.mu-cart #shipping_method li { display: flex; align-items: center; gap: 10px; margin: 0; padding: 10px 12px; border: 1px solid var(--mu-line); border-radius: 10px; background: var(--mu-bg); }
.mu-cart #shipping_method li:has(input:checked) { border-color: var(--mu-gold); background: rgba(217, 169, 91, .08); }
.mu-cart #shipping_method input { margin: 0; accent-color: var(--mu-gold); }
.mu-cart #shipping_method label { flex: 1; display: flex; justify-content: space-between; gap: 8px; margin: 0; cursor: pointer; font-size: 13.5px; }
.mu-cart .woocommerce-shipping-destination { margin: 10px 0 0; font-size: 12.5px; color: var(--mu-muted); font-weight: 400; }
.mu-cart .shipping-calculator-button { display: inline-block; margin-top: 6px; color: var(--mu-gold-2); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.mu-cart .shipping-calculator-form { display: grid; gap: 8px; margin-top: 10px; }
.mu-cart .shipping-calculator-form :is(input.input-text, select) { width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--mu-input-line); border-radius: 10px; background: var(--mu-input-bg); color: var(--mu-input-text); font-size: 14px; }
.mu-cart .shipping-calculator-form .select2-container .select2-selection--single { height: 42px; border: 1px solid var(--mu-input-line); border-radius: 10px; background: var(--mu-input-bg); }
.mu-cart .shipping-calculator-form .select2-selection__rendered { line-height: 40px; color: var(--mu-input-text); }
.mu-cart .shipping-calculator-form .select2-selection__arrow { height: 40px; }
.mu-cart .shipping-calculator-form .form-row { margin: 0; padding: 0; width: 100%; float: none; }

.mu-cart .wc-proceed-to-checkout { padding: 18px 0 0; margin: 0; }
.mu-trust--stack { display: grid; gap: 10px; margin: 0 !important; padding: 16px 18px; border: 1px solid var(--mu-line); border-radius: var(--mu-radius); background: var(--mu-surface); }

/* ===== Sticky mobile checkout bar ===== */
.mu-sticky { position: fixed; z-index: 99990; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px var(--mu-pad) calc(12px + env(safe-area-inset-bottom)); background: var(--mu-bg-2); border-top: 1px solid var(--mu-line-strong); box-shadow: 0 -10px 30px rgba(0, 0, 0, .35); }
.mu-sticky__sum { display: grid; line-height: 1.2; }
.mu-sticky__sum small { color: var(--mu-muted); font-size: 12px; }
.mu-sticky__sum strong { font-size: 18px; color: var(--mu-gold-2); }
.mu-sticky .mu-btn { flex: 0 1 220px; min-height: 48px; }
@media (min-width: 1024px) { .mu-sticky { display: none; } }

/* ===== Cross sells ===== */
.mu-cross { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--mu-line); }
.mu-cross__title { margin: 0; font: 600 clamp(22px, 3vw, 30px) var(--mu-font-head); color: var(--mu-text); }
.mu-cart .mu-wish { display: none; }

/* ===== Empty cart ===== */
.mu-empty--cart { margin: 24px auto; max-width: 520px; padding: 56px 24px; }
.mu-empty__icon { display: inline-grid; place-items: center; width: 72px; height: 72px; margin-bottom: 16px; border-radius: 50%; border: 1px solid var(--mu-line-strong); color: var(--mu-gold); background: var(--mu-surface); }

/* WooCommerce AJAX overlay */
.mu-cart .blockUI.blockOverlay { border-radius: var(--mu-radius); background: var(--mu-bg) !important; opacity: .55 !important; }

/* ===== Phones ===== */
.mu-item > * { min-width: 0; }
@media (max-width: 599px) {
	body.woocommerce-cart .mu-cart { padding-left: 12px; padding-right: 12px; }
	.mu-cart__title { font-size: 26px; }
	.mu-item { grid-template-columns: 76px minmax(0, 1fr) auto; padding: 12px; gap: 8px 12px; }
	.mu-item__media { width: 76px; }
	.mu-item__name { font-size: 14px; }
	.mu-item__total { font-size: 16px; }
	.mu-coupon { flex: 1 1 100%; max-width: none; }
	.mu-coupon input.input-text { font-size: 16px; }
	.mu-cart .cart_totals { padding: 18px 16px; }
	.mu-cart table.mu-totals .order-total td { font-size: 20px; }
}
