/**
 * Zomu commerce palette. Theme-only color overrides, loaded after Commerce UI.
 * No geometry, typography, checkout logic, gateway frames or payment logos.
 * Errors and warnings retain independent semantic colors rather than borrowing
 * the promotional berry token, which is sage in this palette.
 */
body.zomu-motion-theme:is(.zomu-commerce-ui, .zcu-drawer-ui) {
  --zcu-header: var(--zomu-header, #233c46);
  --zcu-accent: var(--zomu-accent, #dfe7df);
  --zcu-plum: var(--zomu-plum, #263e46);
  --zcu-forest: var(--zomu-green, #456356);
  --zcu-berry: var(--zomu-berry, #456356);
  --zcu-mango: var(--zomu-green, #456356);
  --zcu-sand: var(--zomu-sand, #e9e8e1);
  --zcu-paper: var(--zomu-paper, #f7f6f2);
  --zcu-ink: var(--zomu-plum, #263e46);
  --zcu-muted: var(--zomu-muted, #606e68);
  --zcu-line: var(--zomu-line, #dce2dc);
  --zcu-journey-line: var(--zomu-line, #dce2dc);
  --zcu-journey-shadow: 0 10px 32px rgb(35 60 70 / 5%);
  --zcu-soft-surface: #eff3ee;
  --zcu-soft-error: #9a3f45;
  --zcu-soft-error-bg: #fbefef;
  --zcu-soft-warning: #795d2f;
  --zcu-soft-warning-bg: #f6f0e4;
}

/* Drawer: preserve the existing decorative rim and all fragment-safe markup. */
body.zomu-motion-theme.zcu-drawer-ui #cart-drawer {
  --zcu-drawer-navy: var(--zcu-header);
  --zcu-drawer-forest: var(--zcu-forest);
  --zcu-drawer-plum: var(--zcu-plum);
  --zcu-drawer-paper: var(--zcu-paper);
  --zcu-drawer-line: var(--zcu-line);
  border-inline-start-color: var(--zcu-line);
  box-shadow: -16px 0 64px rgb(35 60 70 / 15%);
}
body.zomu-motion-theme.zcu-drawer-ui #cart-drawer .cart-drawer__header {
  border-bottom-color: var(--zcu-accent);
  background: linear-gradient(110deg, var(--zcu-header) 48%, #314b50);
}
body.zomu-motion-theme.zcu-drawer-ui #cart-drawer .cart-drawer__header::after {
  border-color: rgb(223 231 223 / 23%);
  box-shadow: 0 0 0 17px rgb(223 231 223 / 4%), 0 0 0 36px rgb(223 231 223 / 3%);
}
body.zomu-motion-theme.zcu-drawer-ui #cart-drawer .widget_shopping_cart_content {
  background: linear-gradient(155deg, #f4f6f1, #fff 34%);
}
body.zomu-motion-theme.zcu-drawer-ui #cart-drawer .woocommerce-mini-cart-item img {
  border-color: var(--zcu-line);
  box-shadow: 0 4px 12px rgb(35 60 70 / 4%);
}
body.zomu-motion-theme.zcu-drawer-ui #cart-drawer .woocommerce-mini-cart-item :is(.quantity, dl.variation) { color: var(--zcu-muted); }
body.zomu-motion-theme.zcu-drawer-ui #cart-drawer .woocommerce-mini-cart-item .remove_from_cart_button {
  color: var(--zcu-muted) !important;
}
body.zomu-motion-theme.zcu-drawer-ui #cart-drawer .woocommerce-mini-cart-item .remove_from_cart_button:hover {
  border-color: var(--zcu-line);
  background: var(--zcu-soft-surface) !important;
  color: var(--zcu-plum) !important;
}
body.zomu-motion-theme.zcu-drawer-ui #cart-drawer .woocommerce-mini-cart__total { border-top-color: var(--zcu-line); }
body.zomu-motion-theme.zcu-drawer-ui #cart-drawer .woocommerce-mini-cart__buttons .button {
  border-color: var(--zcu-line);
  background: #f4f6f1;
  color: var(--zcu-forest);
}
body.zomu-motion-theme.zcu-drawer-ui #cart-drawer .woocommerce-mini-cart__buttons .button:hover {
  border-color: var(--zcu-forest);
  background: var(--zcu-accent);
  box-shadow: 0 3px 12px rgb(69 99 86 / 8%);
}
body.zomu-motion-theme.zcu-drawer-ui #cart-drawer .woocommerce-mini-cart__buttons .checkout {
  border-color: var(--zcu-forest);
  color: #fff;
  background: var(--zcu-forest);
  box-shadow: 0 5px 16px rgb(69 99 86 / 10%);
}
body.zomu-motion-theme.zcu-drawer-ui #cart-drawer .woocommerce-mini-cart__buttons .checkout:hover {
  border-color: var(--zcu-header);
  background: var(--zcu-header);
  color: #fff;
}
body.zomu-motion-theme.zcu-drawer-ui #cart-drawer .woocommerce-mini-cart__empty-message::before {
  border-color: var(--zcu-line);
  background-color: var(--zcu-soft-surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64' fill='none' stroke='%23456356' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 23h32l4 32H12l4-32Z'/%3E%3Cpath d='M23 27V18a9 9 0 0 1 18 0v9'/%3E%3C/svg%3E");
}

/* Native WooCommerce cart/checkout outer surfaces, including order-pay. */
body.zomu-motion-theme:is(.zomu-commerce-ui--cart, .zomu-commerce-ui--checkout) .page-hero {
  border-color: var(--zcu-line);
  background: linear-gradient(115deg, #eaf0e9, var(--zcu-paper) 75%);
}
body.zomu-motion-theme:is(.zomu-commerce-ui--cart, .zomu-commerce-ui--checkout) .page-hero::after {
  border-color: rgb(69 99 86 / 15%);
  box-shadow: 28px -14px 0 12px rgb(223 231 223 / 42%);
}
body.zomu-motion-theme:is(.zomu-commerce-ui--cart, .zomu-commerce-ui--checkout) .zcu-progress {
  border-color: var(--zcu-line);
  background: linear-gradient(105deg, #eff3ee, #fff 52%);
  box-shadow: 0 3px 16px rgb(35 60 70 / 2%);
}
body.zomu-motion-theme.zomu-commerce-ui .zcu-progress__item.is-active .zcu-progress__number {
  border-color: var(--zcu-header);
  background: var(--zcu-header);
  color: #fff;
  box-shadow: 0 0 0 7px rgb(35 60 70 / 9%);
}
body.zomu-motion-theme:is(.zomu-commerce-ui--cart, .zomu-commerce-ui--checkout) .wc-block-components-sidebar-layout > .wc-block-components-sidebar,
body.zomu-motion-theme.zomu-commerce-ui--cart .woocommerce .cart-collaterals .cart_totals {
  border-color: var(--zcu-line);
  border-top-color: var(--zcu-forest);
  background: linear-gradient(145deg, #f2f5f0, #fff 150px);
  box-shadow: var(--zcu-journey-shadow);
}
body.zomu-motion-theme.zomu-commerce-ui--cart .wc-block-cart__main table.wc-block-cart-items thead th { background: #edf1eb; }
body.zomu-motion-theme.zomu-commerce-ui--cart .wc-block-cart-item__image img,
body.zomu-motion-theme.zomu-commerce-ui--cart .woocommerce table.cart .product-thumbnail img {
  border-color: var(--zcu-line);
  box-shadow: 0 3px 10px rgb(35 60 70 / 4%);
}
body.zomu-motion-theme.zomu-commerce-ui--cart .wc-block-cart-item__remove-link { color: var(--zcu-muted); }
body.zomu-motion-theme.zomu-commerce-ui--cart .woocommerce table.cart .product-remove a.remove {
  border-color: var(--zcu-line);
  background: var(--zcu-soft-surface);
  color: var(--zcu-forest) !important;
}
body.zomu-motion-theme.zomu-commerce-ui--cart .woocommerce table.cart .product-remove a.remove:hover { background: var(--zcu-forest); color: #fff !important; }
body.zomu-motion-theme:is(.zomu-commerce-ui--cart, .zomu-commerce-ui--checkout) .wc-block-components-product-badge {
  border-color: var(--zcu-line);
  background: var(--zcu-soft-surface);
  color: var(--zcu-forest);
}
body.zomu-motion-theme.zomu-commerce-ui--checkout .wc-block-checkout__main .wc-block-components-checkout-step,
body.zomu-motion-theme.zomu-commerce-ui--checkout .woocommerce form.checkout #customer_details > :is(.col-1, .col-2) {
  border-color: var(--zcu-line);
  box-shadow: 0 3px 16px rgb(35 60 70 / 2%);
}
body.zomu-motion-theme.zomu-commerce-ui--checkout .wc-block-checkout__main .wc-block-components-checkout-step:focus-within,
body.zomu-motion-theme.zomu-commerce-ui--checkout .woocommerce form.checkout #customer_details > :is(.col-1, .col-2):focus-within {
  border-color: #9eafa2;
  box-shadow: 0 3px 18px rgb(69 99 86 / 6%);
}
body.zomu-motion-theme.zomu-commerce-ui--checkout .wc-block-checkout__main .wc-block-components-checkout-step--with-step-number .wc-block-components-checkout-step__title::before {
  background: var(--zcu-accent);
  color: var(--zcu-forest);
}
body.zomu-motion-theme.zomu-commerce-ui--checkout .wc-block-components-address-card { border-color: var(--zcu-line); background: #f5f7f2; }
body.zomu-motion-theme.zomu-commerce-ui--checkout .wc-block-checkout__shipping-option .wc-block-components-radio-control-accordion-option--checked-option-highlighted {
  border-color: var(--zcu-forest);
  background: #f3f6f1;
  box-shadow: 0 0 0 1px var(--zcu-forest);
}
body.zomu-motion-theme:is(.zomu-commerce-ui--cart, .zomu-commerce-ui--checkout) .woocommerce :is(.checkout-button, #place_order),
body.zomu-motion-theme:is(.zomu-commerce-ui--cart, .zomu-commerce-ui--checkout) :is(.wc-block-cart__submit-button, .wc-block-components-checkout-place-order-button) {
  box-shadow: 0 5px 15px rgb(69 99 86 / 9%);
}
body.zomu-motion-theme:is(.zomu-commerce-ui--cart, .zomu-commerce-ui--checkout) :is(.wc-block-cart__submit-button, .wc-block-components-checkout-place-order-button, #place_order):is(:disabled, [aria-disabled="true"], .is-loading) { box-shadow: none; }
body.zomu-motion-theme.zomu-commerce-ui--checkout .woocommerce ul.order_details {
  border-color: var(--zcu-line);
  background: linear-gradient(135deg, #f2f5f0, #fff 50%);
  box-shadow: 0 3px 16px rgb(35 60 70 / 2%);
}
body.zomu-motion-theme.zomu-commerce-ui .woocommerce :is(.cart-empty, .woocommerce-thankyou-order-received),
body.zomu-motion-theme.zomu-commerce-ui .wp-block-woocommerce-empty-cart-block {
  border-color: var(--zcu-line);
  background: radial-gradient(circle at 50% 0%, #e3ebe0, transparent 58%), #fff;
}

/* Payment feedback is semantic UI owned by Commerce UI, never the gateway. */
body.zomu-motion-theme.zomu-commerce-ui .zcu-payment-state {
  border-color: var(--zcu-line);
  border-left-color: var(--zcu-forest);
  background: linear-gradient(120deg, #edf3e9, #fff 76%);
  color: var(--zcu-ink);
  box-shadow: 0 12px 28px rgb(35 60 70 / 4%);
}
body.zomu-motion-theme.zomu-commerce-ui .zcu-payment-state__icon { background: var(--zcu-accent); color: var(--zcu-forest); }
body.zomu-motion-theme.zomu-commerce-ui .zcu-payment-state p { color: var(--zcu-muted); }
body.zomu-motion-theme.zomu-commerce-ui .zcu-account-payment-explainer,
body.zomu-motion-theme.zomu-commerce-ui .zcu-order-payment-note {
  border-color: var(--zcu-line);
  background: var(--zcu-soft-surface);
  color: var(--zcu-muted);
}
body.zomu-motion-theme.zomu-commerce-ui .zcu-recent-order__actions .zcu-order-pay-link { border-color: #bcccbf; background: #f2f5f0; color: var(--zcu-forest); }
body.zomu-motion-theme.zomu-commerce-ui .zcu-recent-order__actions .zcu-order-pay-link:hover { border-color: var(--zcu-forest); background: var(--zcu-accent); }

/* Account surfaces follow the same sage / warm-white rhythm. */
body.zomu-motion-theme.zomu-commerce-ui .zcu-account-stat:nth-child(2) { background: #edf2e9; }
body.zomu-motion-theme.zomu-commerce-ui .zcu-sidebar-collection,
body.zomu-motion-theme.zomu-commerce-ui .zcu-auth-story { background: var(--zcu-header); }
body.zomu-motion-theme.zomu-commerce-ui .zcu-auth-story > p,
body.zomu-motion-theme.zomu-commerce-ui .zcu-auth-story li { color: #e0e7e1; }
body.zomu-motion-theme.zomu-commerce-ui .woocommerce .woocommerce-MyAccount-navigation .is-active a { background: var(--zcu-header); color: #fff; }
body.zomu-motion-theme.zomu-commerce-ui .zcu-order-status--processing { background: #edf2e9; color: #49603e; }
body.zomu-motion-theme.zomu-commerce-ui .zcu-order-status--completed { background: #e4eee6; color: #315c43; }
body.zomu-motion-theme.zomu-commerce-ui :is(.zcu-order-status--pending, .zcu-order-status--on-hold) { background: var(--zcu-soft-warning-bg); color: var(--zcu-soft-warning); }

/* Success/info are quiet; error and warning remain recognizable and readable. */
body.zomu-motion-theme.zomu-commerce-ui :is(.woocommerce-message, .woocommerce-info),
body.zomu-motion-theme.zomu-commerce-ui .wc-block-components-notice-banner:not(.is-error, .is-warning) {
  border-color: #c7d6c7;
  border-left-color: var(--zcu-forest);
  color: var(--zcu-ink);
  background: var(--zcu-soft-surface);
  box-shadow: 0 8px 24px rgb(35 60 70 / 4%);
}
body.zomu-motion-theme.zomu-commerce-ui .wc-block-components-notice-banner:not(.is-error, .is-warning) > svg { color: #fff; background: var(--zcu-forest); }
body.zomu-motion-theme.zomu-commerce-ui :is(.woocommerce-error, .wc-block-components-notice-banner.is-error) {
  border-color: #e8cbd0;
  border-left-color: var(--zcu-soft-error);
  background: var(--zcu-soft-error-bg);
  color: #77343a;
}
body.zomu-motion-theme.zomu-commerce-ui .woocommerce-error::before { color: var(--zcu-soft-error); }
body.zomu-motion-theme.zomu-commerce-ui .wc-block-components-notice-banner.is-error > svg { color: #fff; background: var(--zcu-soft-error); }
body.zomu-motion-theme.zomu-commerce-ui .wc-block-components-notice-banner.is-warning {
  border-color: #dfd3b9;
  border-left-color: var(--zcu-soft-warning);
  background: var(--zcu-soft-warning-bg);
  color: var(--zcu-soft-warning);
}
body.zomu-motion-theme.zomu-commerce-ui .wc-block-components-notice-banner.is-warning > svg { color: #fff; background: var(--zcu-soft-warning); }
body.zomu-motion-theme.zomu-commerce-ui .zcu-payment-state--failed {
  border-color: #e8cbd0;
  border-left-color: var(--zcu-soft-error);
  background: linear-gradient(120deg, var(--zcu-soft-error-bg), #fff 76%);
}
body.zomu-motion-theme.zomu-commerce-ui .zcu-payment-state--failed .zcu-payment-state__icon,
body.zomu-motion-theme.zomu-commerce-ui :is(.zcu-order-status--failed, .zcu-order-status--cancelled) {
  background: var(--zcu-soft-error-bg);
  color: var(--zcu-soft-error);
}
/* Limit field overrides to account/address/contact fields, not card fields. */
body.zomu-motion-theme.zomu-commerce-ui .woocommerce :is(.woocommerce-form-login, .woocommerce-form-register, .woocommerce-ResetPassword, .edit-account, .woocommerce-address-fields, #customer_details) :is(input, select, textarea)[aria-invalid="true"],
body.zomu-motion-theme.zomu-commerce-ui .woocommerce #customer_details .woocommerce-invalid :is(input, select, textarea),
body.zomu-motion-theme.zomu-commerce-ui .wc-block-checkout__main :is(.wc-block-checkout__contact-fields, .wc-block-checkout__shipping-fields, .wc-block-checkout__billing-fields) :is(input, select, textarea)[aria-invalid="true"] {
  border-color: var(--zcu-soft-error);
  box-shadow: 0 0 0 3px rgb(154 63 69 / 9%);
}
body.zomu-motion-theme.zomu-commerce-ui .woocommerce .form-row .required { color: var(--zcu-soft-error); }
body.zomu-motion-theme.zomu-commerce-ui .woocommerce :is(.woocommerce-form-login, .woocommerce-form-register, .woocommerce-ResetPassword, .edit-account, .woocommerce-address-fields, #customer_details) :is(input, select, textarea):focus:not([aria-invalid="true"]) {
  border-color: var(--zcu-forest);
  box-shadow: 0 0 0 4px rgb(69 99 86 / 10%);
}
body.zomu-motion-theme.zomu-commerce-ui :is(.zcu-progress, .zcu-account-sidebar, .zcu-dashboard, .woocommerce-MyAccount-content, .zcu-auth-forms, .wc-block-cart__main, .wc-block-cart__sidebar, .wc-block-checkout__sidebar) :is(a, button, input, select, textarea):focus-visible,
body.zomu-motion-theme.zomu-commerce-ui--checkout :is(#place_order, .wc-block-components-checkout-place-order-button, .wc-block-components-checkout-return-to-cart-button):focus-visible,
body.zomu-motion-theme.zomu-commerce-ui--checkout :is(#customer_details, .wc-block-checkout__contact-fields, .wc-block-checkout__shipping-fields, .wc-block-checkout__billing-fields) :is(a, button, input, select, textarea):focus-visible {
  outline-color: var(--zcu-forest);
}
