/* Checkout/cart/account: presentation only. Core Woo commerce logic and Store API stay untouched. */
body.emm-ui-active .emm-main :is(.woocommerce-cart-form,.cart-collaterals,.woocommerce-checkout,.woocommerce-account .woocommerce,.woocommerce-order,.woocommerce-order-pay){color:var(--emm-color-text)}
body.emm-ui-active .emm-main :is(.cart_totals,.checkout_coupon,.woocommerce-checkout-review-order,.woocommerce-MyAccount-content,.woocommerce-form-login,.woocommerce-form-register,.woocommerce-order-details,.woocommerce-customer-details){padding:clamp(1rem,2vw,1.8rem);background:var(--emm-color-surface);border:1px solid var(--emm-color-line);border-radius:var(--emm-radius-lg);box-shadow:5px 5px 14px rgba(70,62,47,.06)}
body.emm-ui-active .emm-main table.shop_table{border:1px solid var(--emm-color-line);border-radius:var(--emm-radius-md);background:var(--emm-color-surface);border-collapse:separate;overflow:hidden}
body.emm-ui-active .emm-main table.shop_table :is(th,td){border-color:var(--emm-color-line);padding:.85rem}
body.emm-ui-active .emm-main :is(input.input-text,textarea,select,.select2-selection){border-radius:var(--emm-radius-sm);background:var(--emm-color-surface);border:1px solid var(--emm-color-line);min-height:42px;color:var(--emm-color-text)}
body.emm-ui-active .emm-main :is(button.button,input.button,a.button,a.checkout-button,#place_order){background:var(--emm-color-olive);color:#fff;border:0;border-radius:var(--emm-radius-pill);min-height:44px;padding:.7rem 1.2rem;font-weight:750}
body.emm-ui-active .emm-main :is(button.button,input.button,a.button,a.checkout-button,#place_order):hover{background:#263d1b;color:#fff}
body.emm-ui-active .emm-main .woocommerce-MyAccount-navigation ul{display:flex;flex-direction:column;gap:.35rem;list-style:none;margin:0 0 1rem;padding:0}
body.emm-ui-active .emm-main .woocommerce-MyAccount-navigation a{display:block;padding:.75rem 1rem;border-radius:var(--emm-radius-sm);background:var(--emm-color-surface);color:var(--emm-color-olive);text-decoration:none}
body.emm-ui-active .emm-main .woocommerce-MyAccount-navigation .is-active a{background:var(--emm-color-olive);color:#fff}
body.emm-ui-active .emm-main :is(.order_details,.woocommerce-orders-table){max-width:100%}
/* Both modern Woo Cart and Checkout Blocks: no PHP template override and no checkout field modifications. */
body.emm-ui-active .emm-main :is(.wp-block-woocommerce-cart,.wp-block-woocommerce-checkout){color:var(--emm-color-text);--wc-blocks-font-family:inherit;--wc-blocks-border-radius:var(--emm-radius-sm);--wc-blocks-components-background-color:var(--emm-color-surface);--wc-blocks-typography--font-size:1rem;container-type:inline-size}
body.emm-ui-active .emm-main :is(.wp-block-woocommerce-cart,.wp-block-woocommerce-checkout) :is(.wc-block-components-sidebar,.wc-block-cart-items,.wc-block-checkout__form,.wc-block-components-order-summary){border-radius:var(--emm-radius-lg);}
body.emm-ui-active .emm-main :is(.wp-block-woocommerce-cart,.wp-block-woocommerce-checkout) :is(.wc-block-components-button,.wc-block-cart__submit-button){background:var(--emm-color-olive);color:#fff;border-radius:var(--emm-radius-pill);border-color:var(--emm-color-olive);min-height:48px}
body.emm-ui-active .emm-main :is(.wp-block-woocommerce-cart,.wp-block-woocommerce-checkout) :is(.wc-block-components-text-input input,.wc-block-components-combobox-control input){border-color:var(--emm-color-line);border-radius:var(--emm-radius-sm)}
body.emm-ui-active .emm-main :is(.wp-block-woocommerce-cart,.wp-block-woocommerce-checkout) :is(.wc-block-components-notice-banner,.wc-block-components-totals-wrapper){border-radius:var(--emm-radius-sm)}
@media(max-width:680px){body.emm-ui-active .emm-main .wc-block-components-sidebar-layout{display:block}}
@media(max-width:600px){body.emm-ui-active .emm-main table.shop_table :is(th,td){padding:.55rem;font-size:.85rem}}
/* E.M.M Classic cart/checkout/order pages and native account endpoints: presentation only. */
body.emm-ui-active .emm-main :is(.woocommerce-cart-form,.woocommerce-checkout,.woocommerce-order,.woocommerce-order-pay,.woocommerce-account .woocommerce-MyAccount-content){min-width:0}
body.emm-ui-active .emm-main :is(.woocommerce-form-coupon,.woocommerce-billing-fields,.woocommerce-shipping-fields,.woocommerce-additional-fields,.woocommerce-checkout-payment,.woocommerce-Addresses .woocommerce-Address,.woocommerce-EditAccountForm,.woocommerce-form-track-order,.woocommerce-order-downloads){border-radius:var(--emm-radius-lg);background:var(--emm-color-surface);border:1px solid var(--emm-color-line);padding:clamp(.9rem,2.2vw,1.6rem);margin-block:1rem}
body.emm-ui-active .emm-main :is(.woocommerce-checkout #order_review_heading,.woocommerce-billing-fields h3,.woocommerce-shipping-fields h3,.woocommerce-MyAccount-content h2,.woocommerce-order-details__title,.woocommerce-column__title){color:var(--emm-color-olive);font-weight:800;line-height:1.45}
body.emm-ui-active .emm-main .woocommerce-checkout :is(.form-row,.form-row-first,.form-row-last){min-width:0}
body.emm-ui-active .emm-main .form-row :is(input.input-text,textarea,select){max-width:100%;min-height:44px}
body.emm-ui-active .emm-main :is(.select2-container--default .select2-selection--single,.select2-container--default .select2-selection--multiple){border-radius:var(--emm-radius-sm);min-height:44px;background:var(--emm-color-surface)}
body.emm-ui-active .emm-main :is(.woocommerce-checkout-payment,.wc_payment_methods){background:var(--emm-color-surface);border-radius:var(--emm-radius-md)}
body.emm-ui-active .emm-main #payment :is(.payment_box,.place-order){background:var(--emm-color-surface-soft);border-radius:var(--emm-radius-sm)}
body.emm-ui-active .emm-main .woocommerce-thankyou-order-received{padding:1rem 1.3rem;background:var(--emm-color-surface);color:var(--emm-color-olive);border-radius:var(--emm-radius-md);font-weight:750}
body.emm-ui-active .emm-main :is(.woocommerce-order-overview,.woocommerce-order-details,.woocommerce-customer-details,.woocommerce-bacs-bank-details){min-width:0;max-width:100%;overflow-wrap:anywhere}
body.emm-ui-active .emm-main :is(.woocommerce-MyAccount-navigation,.woocommerce-MyAccount-content){min-width:0}
body.emm-ui-active .emm-main :is(.woocommerce-MyAccount-navigation ul li a,.woocommerce-Address-title a,.woocommerce-Orders-table .woocommerce-button){border-radius:var(--emm-radius-sm)}
/* Block checkout and cart: no replacement of Woo Store API or React interaction. */
body.emm-ui-active .emm-main :is(.wp-block-woocommerce-cart,.wp-block-woocommerce-checkout) :is(.wc-block-components-order-summary,.wc-block-checkout__terms,.wc-block-checkout__actions,.wc-block-components-totals-wrapper){color:var(--emm-color-text)}
body.emm-ui-active .emm-main :is(.wp-block-woocommerce-cart,.wp-block-woocommerce-checkout) :is(.wc-block-components-text-input,.wc-block-components-combobox,.wc-block-components-form .wc-block-components-text-input){max-width:100%;min-width:0}
body.emm-ui-active .emm-main :is(.wp-block-woocommerce-cart,.wp-block-woocommerce-checkout) :is(.wc-block-components-button,.wc-block-cart__submit-button):focus-visible{outline:3px solid var(--emm-color-focus);outline-offset:3px}
body.emm-ui-active .emm-main :is(.wp-block-woocommerce-cart,.wp-block-woocommerce-checkout) :is(.wc-block-components-order-summary,.wc-block-components-totals-wrapper,.wc-block-components-sidebar){background:var(--emm-color-surface);border-color:var(--emm-color-line);border-radius:var(--emm-radius-md)}
body.emm-ui-active .emm-main .woocommerce-checkout :is(#place_order,button[type=submit]):disabled{opacity:.65;cursor:not-allowed}
@media(max-width:600px){body.emm-ui-active .emm-main :is(.cart_totals,.woocommerce-checkout-review-order,.woocommerce-MyAccount-content){padding:.8rem}body.emm-ui-active .emm-main table.shop_table{display:block;max-width:100%;overflow-x:auto}}

/* E.M.M checkout/cart refinement — scoped to WooCommerce inside the approved theme main content. */
@media(min-width:1024px){
 body.emm-ui-active .emm-main .woocommerce form.woocommerce-checkout.checkout{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(320px,.9fr);gap:0 1.5rem;align-items:start}
 body.emm-ui-active .emm-main .woocommerce form.checkout>#customer_details{grid-column:1;grid-row:1 / span 3;min-width:0}
 body.emm-ui-active .emm-main .woocommerce form.checkout>#order_review_heading{grid-column:2;grid-row:1}
 body.emm-ui-active .emm-main .woocommerce form.checkout>#order_review{grid-column:2;grid-row:2;min-width:0;position:sticky;top:18px}
 body.emm-ui-active .emm-main .woocommerce-cart-form{max-width:100%;min-width:0}
 body.emm-ui-active .emm-main .woocommerce .cart-collaterals{max-width:430px;margin-inline-start:auto}
}
body.emm-ui-active .emm-main .woocommerce form.checkout :is(input,select,textarea):focus-visible{outline:3px solid var(--emm-color-focus);outline-offset:2px}
body.emm-ui-active .emm-main .woocommerce form.checkout :is(#place_order,.woocommerce-terms-and-conditions-checkbox-text){overflow-wrap:anywhere}
body.emm-ui-active .emm-main .woocommerce-cart-form :is(.product-name,.product-thumbnail,.product-price){overflow-wrap:anywhere}
body.emm-ui-active .emm-main .woocommerce .cart_totals .checkout-button{display:flex;align-items:center;justify-content:center;text-align:center}
@media(max-width:767px){
 body.emm-ui-active .emm-main .woocommerce form.woocommerce-checkout.checkout{display:flex;flex-direction:column;align-items:stretch;gap:1rem}
 body.emm-ui-active .emm-main .woocommerce form.checkout :is(#customer_details,#order_review,#order_review_heading){width:100%;min-width:0;max-width:100%;position:static}
 body.emm-ui-active .emm-main .woocommerce-cart-form table.shop_table{max-width:100%;width:100%;border:0}
 body.emm-ui-active .emm-main .woocommerce-cart-form table.shop_table thead{display:none}
 body.emm-ui-active .emm-main .woocommerce-cart-form table.shop_table tbody tr.cart_item{display:grid;grid-template-columns:70px minmax(0,1fr);gap:.4rem .8rem;padding:1rem 0;border-bottom:1px solid var(--emm-color-line)}
 body.emm-ui-active .emm-main .woocommerce-cart-form table.shop_table tbody tr.cart_item td{border:0!important;display:block;width:auto!important;min-width:0;padding:.2rem .3rem}
 body.emm-ui-active .emm-main .woocommerce-cart-form table.shop_table tbody tr.cart_item .product-thumbnail{grid-column:1;grid-row:1 / span 3}
 body.emm-ui-active .emm-main .woocommerce-cart-form table.shop_table tbody tr.cart_item .product-thumbnail img{width:66px;height:66px;object-fit:contain}
 body.emm-ui-active .emm-main .woocommerce-cart-form table.shop_table tbody tr.cart_item .product-name{grid-column:2;grid-row:1;font-weight:700}
 body.emm-ui-active .emm-main .woocommerce-cart-form table.shop_table tbody tr.cart_item :is(.product-price,.product-quantity,.product-subtotal,.product-remove){grid-column:2}
 body.emm-ui-active .emm-main .woocommerce-cart-form table.shop_table tbody tr.cart_item td:before{float:none!important;display:inline-block;margin-inline-end:.5rem}
 body.emm-ui-active .emm-main .woocommerce-cart-form table.shop_table tbody tr:not(.cart_item) td.actions{padding:1rem 0;display:block}
 body.emm-ui-active .emm-main .woocommerce .cart-collaterals{width:100%}
}
@media(prefers-reduced-motion:reduce){body.emm-ui-active .emm-main .woocommerce :is(button,a){transition:none!important;scroll-behavior:auto!important}}
