/* Shared Agape storefront controls. Keep WooCommerce behavior and page layouts. */
body {
  --ag-ui-ink: #0d2342;
  --ag-ui-muted: #43566d;
  --ag-ui-border: #c8d3df;
  --ag-ui-gold: #e8b840;
  --ag-ui-gold-hover: #f4ca60;
  --ag-ui-focus: #285580;
  --ag-ui-radius: 7px;
  --ag-btn-gold: linear-gradient(180deg, #f6d878, #dfa92c);
  --ag-btn-gold-hover: linear-gradient(180deg, #ffe39a, #e9b73d);
  --ag-btn-navy: linear-gradient(110deg, #193a59, #0d2342);
  --ag-btn-navy-hover: linear-gradient(110deg, #284e70, #173653);
  --ag-btn-outline: #fff;
  --ag-btn-outline-hover: #f1f5f9;
}
/* Shared action system: navy = utility, gold = primary commerce,
   outline = secondary, translucent = secondary on dark hero. */
body.agape-commerce-ui :is(
  #agape-inner .woocommerce :is(a.button, button.button, input.button, a.woocommerce-button),
  #inner-wrap .woocommerce :is(a.button, button.button, input.button, a.woocommerce-button),
  #inner-wrap .summary form.cart .single_add_to_cart_button,
  #agape-inner .agape-checkout-content #place_order,
  #agape-home .agape-products li.product .button,
  #agape-inner .product-action-wrap a.button,
  #inner-wrap .product-action-wrap a.button,
  #agape-account .woocommerce-MyAccount-content :is(a.button, a.woocommerce-button, button.button, input.button, button[type="submit"], input[type="submit"], .ant-btn-primary, .ant-btn-default),
  #agape-account :is(.woocommerce-form, #acfw-store-credits-my-account, #agcfw-redeem-gift-card) :is(button.button, button[type="submit"], input[type="submit"], a.button, .ant-btn-primary, .ant-btn-default),
  #agape-affiliate :is(button[type="submit"], input[type="submit"], .button, .slicewp-button),
  .agape-header .woocommerce-mini-cart__buttons a,
  .agape-header__search button[type="submit"],
  .agape-hero__button, .agape-research__button,
  .agape-products__search-submit,
  .agape-cart-toast__link,
  #ypb-invite .ypb-invite__cta,
  #agape-inner :is(.wp-block-button__link, .wpcf7-submit, .wpforms-submit, .ypb-coa-cert-link.ypb-coa-button),
  #inner-wrap .ypb-coa-cert-link.ypb-coa-button,
  .agape-coa-library :is(.agape-coa-view, .agape-coa-download),
  .agape-coa-search button,
  .wc-block-components-button:not(.is-link)
):not(.remove):not(.is-link) {
  box-sizing: border-box;
  min-height: 44px;
  max-width: 100%;
  border: 1px solid var(--ag-btn-edge, #193a59) !important;
  border-radius: var(--ag-ui-radius) !important;
  background: var(--ag-btn-bg, var(--ag-btn-navy)) !important;
  color: var(--ag-btn-ink, #fff) !important;
  -webkit-text-fill-color: currentColor !important;
  font-family: inherit !important;
  font-size: var(--ag-action-font-size, 14px) !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  text-decoration: none !important;
  text-shadow: none !important;
  box-shadow: none !important;
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
body.agape-commerce-ui :is( .single_add_to_cart_button, .add_to_cart_button, .product-action-wrap a.button,
  .agape-products li.product .button, .checkout-button, #place_order,
  .wc-block-components-checkout-place-order-button, .wc-block-cart__submit-button,
  .woocommerce-mini-cart__buttons a.checkout, .return-to-shop a.button,
  .agape-hero__button--primary, .agape-research__button, #ypb-invite .ypb-invite__cta,
  .agape-cart-toast__link, .agape-coa-view) {
  --ag-btn-bg: var(--ag-btn-gold);
  --ag-btn-hover: var(--ag-btn-gold-hover);
  --ag-btn-ink: #071a2e;
  --ag-btn-edge: #d9ae36;
  --ag-btn-hover-edge: #c69b2c;
}
body.agape-commerce-ui :is( button[name="apply_coupon"], input[name="apply_coupon"], button[name="update_cart"], input[name="update_cart"],
  .woocommerce-mini-cart__buttons a:not(.checkout), .agape-coa-download,
  .woocommerce-orders-table a.button, .woocommerce-pagination a.button,
  .woocommerce-MyAccount-content a.button:not(.wc-forward), .ant-btn-default,
  .woocommerce-message a.button, .woocommerce-info a.button, .ypb-coa-cert-link.ypb-coa-button,
  .wp-block-button.is-style-outline .wp-block-button__link) {
  --ag-btn-bg: var(--ag-btn-outline);
  --ag-btn-hover: var(--ag-btn-outline-hover);
  --ag-btn-ink: var(--ag-ui-ink);
  --ag-btn-edge: #bdcad9;
  --ag-btn-hover-edge: #96a9bf;
}
body.agape-commerce-ui :is(.agape-hero__button--secondary) {
  --ag-btn-bg: rgba(3, 15, 32, .28);
  --ag-btn-hover: rgba(255, 255, 255, .12);
  --ag-btn-ink: #fff;
  --ag-btn-edge: rgba(255, 255, 255, .9);
  --ag-btn-hover-edge: #fff;
}
body.agape-commerce-ui :is(
  #agape-inner .woocommerce :is(a.button, button.button, input.button, a.woocommerce-button),
  #inner-wrap .woocommerce :is(a.button, button.button, input.button, a.woocommerce-button),
  #inner-wrap .summary form.cart .single_add_to_cart_button,
  #agape-inner .agape-checkout-content #place_order,
  #agape-home .agape-products li.product .button,
  #agape-inner .product-action-wrap a.button,
  #inner-wrap .product-action-wrap a.button,
  #agape-account .woocommerce-MyAccount-content :is(a.button, a.woocommerce-button, button.button, input.button, button[type="submit"], input[type="submit"], .ant-btn-primary, .ant-btn-default),
  #agape-account :is(.woocommerce-form, #acfw-store-credits-my-account, #agcfw-redeem-gift-card) :is(button.button, button[type="submit"], input[type="submit"], a.button, .ant-btn-primary, .ant-btn-default),
  #agape-affiliate :is(button[type="submit"], input[type="submit"], .button, .slicewp-button),
  .agape-header .woocommerce-mini-cart__buttons a,
  .agape-header__search button[type="submit"],
  .agape-hero__button, .agape-research__button,
  .agape-products__search-submit,
  .agape-cart-toast__link,
  #ypb-invite .ypb-invite__cta,
  #agape-inner :is(.wp-block-button__link, .wpcf7-submit, .wpforms-submit, .ypb-coa-cert-link.ypb-coa-button),
  #inner-wrap .ypb-coa-cert-link.ypb-coa-button,
  .agape-coa-library :is(.agape-coa-view, .agape-coa-download),
  .agape-coa-search button,
  .wc-block-components-button:not(.is-link)
):not(.remove):not(.is-link):not(:disabled):not(.disabled):not([aria-disabled="true"]):not(.loading):hover {
  background: var(--ag-btn-hover, var(--ag-btn-navy-hover)) !important;
  border-color: var(--ag-btn-hover-edge, #284e70) !important;
  color: var(--ag-btn-ink, #fff) !important;
  box-shadow: 0 3px 9px rgb(13 35 66 / 10%) !important;
}
body.agape-commerce-ui :is(
  #agape-inner .woocommerce :is(a.button, button.button, input.button, a.woocommerce-button),
  #inner-wrap .woocommerce :is(a.button, button.button, input.button, a.woocommerce-button),
  #inner-wrap .summary form.cart .single_add_to_cart_button,
  #agape-inner .agape-checkout-content #place_order,
  #agape-home .agape-products li.product .button,
  #agape-inner .product-action-wrap a.button,
  #inner-wrap .product-action-wrap a.button,
  #agape-account .woocommerce-MyAccount-content :is(a.button, a.woocommerce-button, button.button, input.button, button[type="submit"], input[type="submit"], .ant-btn-primary, .ant-btn-default),
  #agape-account :is(.woocommerce-form, #acfw-store-credits-my-account, #agcfw-redeem-gift-card) :is(button.button, button[type="submit"], input[type="submit"], a.button, .ant-btn-primary, .ant-btn-default),
  #agape-affiliate :is(button[type="submit"], input[type="submit"], .button, .slicewp-button),
  .agape-header .woocommerce-mini-cart__buttons a,
  .agape-header__search button[type="submit"],
  .agape-hero__button, .agape-research__button,
  .agape-products__search-submit,
  .agape-cart-toast__link,
  #ypb-invite .ypb-invite__cta,
  #agape-inner :is(.wp-block-button__link, .wpcf7-submit, .wpforms-submit, .ypb-coa-cert-link.ypb-coa-button),
  #inner-wrap .ypb-coa-cert-link.ypb-coa-button,
  .agape-coa-library :is(.agape-coa-view, .agape-coa-download),
  .agape-coa-search button,
  .wc-block-components-button:not(.is-link)
):not(.remove):not(.is-link):is(:disabled, .disabled, [aria-disabled="true"]) {
  background: #edf1f5 !important;
  border-color: #d5dde6 !important;
  color: #637184 !important;
  opacity: 1 !important;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}
/* Utility controls retain their own icon and sizing; action controls share the same baseline. */
body.agape-commerce-ui :is(#agape-inner, #inner-wrap, #agape-account) :is(.woocommerce a.button, .woocommerce button.button, .woocommerce a.woocommerce-button, .single_add_to_cart_button):not(.remove):not(.is-link) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 18px;
  text-align: center;
}
/* Keep existing compact product-card typography and responsive layouts. */
body.agape-commerce-ui :is(#agape-inner, #agape-home, #inner-wrap) .product-action-wrap a.button { min-height: 44px; padding: 9px 8px; }
body.agape-commerce-ui :is(#agape-inner, #inner-wrap) .woocommerce :is(button[name="apply_coupon"], button[name="update_cart"], input[name="apply_coupon"], input[name="update_cart"]) { padding: 10px 18px !important; }
body.agape-commerce-ui .agape-coa-library .agape-coa-download { min-width: 44px; }
body.agape-commerce-ui .agape-header .woocommerce-mini-cart__buttons a { --ag-action-font-size: 13px; }
/* Catalog search: same gold button on light homepage and dark banners. */
body.agape-commerce-ui :is(#agape-inner, #agape-home, #inner-wrap, .agape-product-banner) :is(.agape-products, .agape-page-banner) .agape-products__search form :is(button.agape-products__search-submit, button[type="submit"], input[type="submit"]) {
  --ag-btn-bg: var(--ag-btn-gold);
  --ag-btn-hover: var(--ag-btn-gold-hover);
  --ag-btn-ink: #071a2e;
  --ag-btn-edge: #d9ae36;
  --ag-btn-hover-edge: #c69b2c;
  background: var(--ag-btn-bg) !important;
  color: var(--ag-btn-ink) !important;
  -webkit-text-fill-color: currentColor !important;
  border-color: var(--ag-btn-edge) !important;
  height: 46px !important;
  min-height: 46px;
}
body.agape-commerce-ui :is(#agape-inner, #agape-home, #inner-wrap, .agape-product-banner) :is(.agape-products, .agape-page-banner) .agape-products__search form :is(button.agape-products__search-submit, button[type="submit"], input[type="submit"]):hover:not(:disabled) {
  background: var(--ag-btn-hover) !important;
}
body.agape-commerce-ui :is(#agape-inner, #agape-home, #inner-wrap, .agape-product-banner) :is(.agape-products, .agape-page-banner) .agape-products__search form :is(button.agape-products__search-submit, button[type="submit"], input[type="submit"]):disabled {
  --ag-btn-ink: #637184;
  background: #edf1f5 !important;
  border-color: #d5dde6 !important;
}
body.agape-commerce-ui :is(#agape-inner, #agape-home, #inner-wrap, .agape-product-banner) :is(.agape-products, .agape-page-banner) .agape-products__search-submit .agape-products__search-label {
  color: inherit !important;
  -webkit-text-fill-color: currentColor !important;
}
@media (max-width: 700px) {
  body.agape-commerce-ui :is(.product-action-wrap a.button, .agape-products li.product .button) { --ag-action-font-size: 12px; }
}
/* Preserve the original AJAX feedback: only a centered spinner, no text/icons. */
body.agape-commerce-ui :is(#agape-home, #agape-inner, #inner-wrap) :is(.product-action-wrap a.button, .summary form.cart .single_add_to_cart_button, a.add_to_cart_button).loading {
  position: relative;
  --ag-btn-ink: transparent;
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
  text-shadow: none !important;
  cursor: progress;
  transform: none !important;
  opacity: 1 !important;
}
body.agape-commerce-ui :is(#agape-home, #agape-inner, #inner-wrap) :is(.product-action-wrap a.button, .summary form.cart .single_add_to_cart_button, a.add_to_cart_button).loading > :is(span, svg, i),
body.agape-commerce-ui :is(#agape-home, #agape-inner, #inner-wrap) :is(.product-action-wrap a.button, .summary form.cart .single_add_to_cart_button, a.add_to_cart_button).loading::before { visibility: hidden !important; }
body.agape-commerce-ui :is(#agape-home, #agape-inner, #inner-wrap) :is(.product-action-wrap a.button, .summary form.cart .single_add_to_cart_button, a.add_to_cart_button).loading::after {
  content: "" !important;
  display: block !important;
  position: absolute !important;
  inset: 50% auto auto 50% !important;
  box-sizing: border-box;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px !important;
  padding: 0;
  border: 2px solid #081c3540;
  border-top-color: #081c35;
  border-radius: 50%;
  background: none !important;
  animation: agape-ui-spin .7s linear infinite !important;
  pointer-events: none;
}
@keyframes agape-ui-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  body.agape-commerce-ui :is(
  #agape-inner .woocommerce :is(a.button, button.button, input.button, a.woocommerce-button),
  #inner-wrap .woocommerce :is(a.button, button.button, input.button, a.woocommerce-button),
  #inner-wrap .summary form.cart .single_add_to_cart_button,
  #agape-inner .agape-checkout-content #place_order,
  #agape-home .agape-products li.product .button,
  #agape-inner .product-action-wrap a.button,
  #inner-wrap .product-action-wrap a.button,
  #agape-account .woocommerce-MyAccount-content :is(a.button, a.woocommerce-button, button.button, input.button, button[type="submit"], input[type="submit"], .ant-btn-primary, .ant-btn-default),
  #agape-account :is(.woocommerce-form, #acfw-store-credits-my-account, #agcfw-redeem-gift-card) :is(button.button, button[type="submit"], input[type="submit"], a.button, .ant-btn-primary, .ant-btn-default),
  #agape-affiliate :is(button[type="submit"], input[type="submit"], .button, .slicewp-button),
  .agape-header .woocommerce-mini-cart__buttons a,
  .agape-header__search button[type="submit"],
  .agape-hero__button, .agape-research__button,
  .agape-products__search-submit,
  .agape-cart-toast__link,
  #ypb-invite .ypb-invite__cta,
  #agape-inner :is(.wp-block-button__link, .wpcf7-submit, .wpforms-submit, .ypb-coa-cert-link.ypb-coa-button),
  #inner-wrap .ypb-coa-cert-link.ypb-coa-button,
  .agape-coa-library :is(.agape-coa-view, .agape-coa-download),
  .agape-coa-search button,
  .wc-block-components-button:not(.is-link)
):not(.remove):not(.is-link) { transition: none; }
  body.agape-commerce-ui :is(#agape-home, #agape-inner, #inner-wrap) :is(.product-action-wrap a.button, .summary form.cart .single_add_to_cart_button, a.add_to_cart_button).loading::after { animation-duration: 2s !important; }
}

/* Same remove control in cart and mini-cart; preserve each layout position. */
body.agape-commerce-ui :is(#agape-inner .agape-cart-content .product-remove a.remove, #inner-wrap .woocommerce-cart-form .product-remove a.remove, .agape-header .agape-header__mini-cart-content li.woocommerce-mini-cart-item a.remove) {
    position: var(--ag-remove-position, relative);
    display: grid !important;
    place-items: center;
    box-sizing: border-box;
    width: 28px !important;
    height: 28px !important;
    min-width: 28px;
    min-height: 28px;
    margin: 0;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: #fceaea !important;
    color: #ac3939 !important;
    font-size: 0 !important;
    line-height: 0 !important;
    text-decoration: none !important;
    text-indent: 0 !important;
    box-shadow: none !important;
    transform: none;
    -webkit-text-fill-color: currentColor !important;
}
body.agape-commerce-ui :is(#agape-inner .agape-cart-content .product-remove a.remove, #inner-wrap .woocommerce-cart-form .product-remove a.remove, .agape-header .agape-header__mini-cart-content li.woocommerce-mini-cart-item a.remove)::before,
body.agape-commerce-ui :is(#agape-inner .agape-cart-content .product-remove a.remove, #inner-wrap .woocommerce-cart-form .product-remove a.remove, .agape-header .agape-header__mini-cart-content li.woocommerce-mini-cart-item a.remove)::after {
    content: "" !important;
    position: absolute;
    top: 50%;
    left: 50%;
    display: block;
    width: 11px;
    height: 1.5px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 1px;
    background: currentColor;
    opacity: 1;
    transform: translate(-50%, -50%) rotate(45deg);
}

body.agape-commerce-ui :is(#agape-inner .agape-cart-content .product-remove a.remove, #inner-wrap .woocommerce-cart-form .product-remove a.remove, .agape-header .agape-header__mini-cart-content li.woocommerce-mini-cart-item a.remove)::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

body.agape-commerce-ui :is(#agape-inner .agape-cart-content .product-remove a.remove, #inner-wrap .woocommerce-cart-form .product-remove a.remove, .agape-header .agape-header__mini-cart-content li.woocommerce-mini-cart-item a.remove):hover {
    background: #f7d5d5 !important;
    color: #8d2222 !important;
}


body.agape-commerce-ui :is(#agape-inner .agape-cart-content .product-remove a.remove, #inner-wrap .woocommerce-cart-form .product-remove a.remove, .agape-header .agape-header__mini-cart-content li.woocommerce-mini-cart-item a.remove):focus-visible { outline: 2px solid #ac3939 !important; outline-offset: 2px; }
body.agape-commerce-ui .agape-header .agape-header__mini-cart-content li.woocommerce-mini-cart-item a.remove { --ag-remove-position: absolute; top: 9px; right: 2px; }

body.agape-commerce-ui :is(#agape-inner .agape-cart-content .product-remove a.remove, #inner-wrap .woocommerce-cart-form .product-remove a.remove, .agape-header .agape-header__mini-cart-content li.woocommerce-mini-cart-item a.remove) > :is(svg, i) { display: none !important; }

/* Native notices, including Woo's modern notice banners. Keep roles and links. */
body.agape-commerce-ui :is(#agape-inner, #agape-home, #agape-account, #inner-wrap) .woocommerce-notices-wrapper:empty { display: none; }
body.agape-commerce-ui :is(#agape-inner, #agape-home, #agape-account, #inner-wrap) :is(.woocommerce-message, .woocommerce-error, .woocommerce-info, .wc-block-components-notice-banner):not(:has(.acfw-notice-text, a.showcoupon)) {
  --notice-bg: #f2f6fb;
  --notice-edge: #c3d4e5;
  --notice-accent: #285580;
  box-sizing: border-box;
  margin: 0 0 16px !important;
  padding: 13px 16px !important;
  border: 1px solid var(--notice-edge) !important;
  border-inline-start: 3px solid var(--notice-accent) !important;
  border-radius: var(--ag-ui-radius) !important;
  background: var(--notice-bg) !important;
  color: var(--ag-ui-ink) !important;
  font-size: 14px !important; font-weight: 400 !important; line-height: 1.55 !important;
  box-shadow: none !important;
  list-style: none;
  overflow-wrap: anywhere;
}
body.agape-commerce-ui :is(#agape-inner, #agape-home, #agape-account, #inner-wrap) :is(.woocommerce-message, .wc-block-components-notice-banner.is-success):not(:has(.acfw-notice-text, a.showcoupon)) { --notice-bg: #f0f7f2; --notice-edge: #c8dfd0; --notice-accent: #34734a; }
body.agape-commerce-ui :is(#agape-inner, #agape-home, #agape-account, #inner-wrap) :is(.woocommerce-error, .wc-block-components-notice-banner.is-error):not(:has(.acfw-notice-text, a.showcoupon)) { --notice-bg: #fff3f2; --notice-edge: #efcecb; --notice-accent: #a23c36; }
body.agape-commerce-ui :is(#agape-inner, #agape-home, #agape-account, #inner-wrap) :is(.woocommerce-message, .woocommerce-error, .woocommerce-info):not(:has(.acfw-notice-text, a.showcoupon))::before { content: none !important; }
body.agape-commerce-ui :is(#agape-inner, #agape-home, #agape-account, #inner-wrap) :is(.woocommerce-message, .woocommerce-error, .woocommerce-info, .wc-block-components-notice-banner) a:not(.button) { color: #17456a !important; text-decoration: underline; text-underline-offset: 2px; }
/* Programmatic notice focus should not look like a second black border. */
body.agape-commerce-ui :is(#agape-inner, #agape-home, #agape-account, #inner-wrap) :is(.woocommerce-message, .woocommerce-error, .woocommerce-info)[tabindex="-1"]:focus { outline: none; }
/* Forms: only native commerce fields, not payment iframe inputs. */
body.agape-commerce-ui :is(#agape-inner, #agape-account, #inner-wrap) :is(.woocommerce form, form.cart) :is(input.input-text, textarea.input-text, select):not([type="hidden"]) {
  box-sizing: border-box;
  min-height: 44px;
  border: 1px solid var(--ag-ui-border);
  border-radius: var(--ag-ui-radius);
  background-color: #fff;
  color: var(--ag-ui-ink);
  box-shadow: none;
  font-size: 14px;
}
body.agape-commerce-ui :is(#agape-inner, #agape-account, #inner-wrap) .woocommerce .form-row.woocommerce-invalid :is(.input-text, select, .select2-selection) { border-color: #ab312e !important; }
body.agape-commerce-ui :is(#agape-inner, #agape-account, #agape-home, #inner-wrap) :is(a.button, button, input, select, textarea, .select2-selection):focus-visible { outline: 2px solid var(--ag-ui-focus) !important; outline-offset: 2px; }
/* SelectWoo appends its dropdown to body, outside the checkout wrapper. */
body.agape-commerce-ui:is(.woocommerce-checkout, .woocommerce-account, .woocommerce-cart, .agape-inner-page) .select2-container--default .select2-selection--single {
  background: #fff !important; color: var(--ag-ui-ink) !important;
  border: 1px solid var(--ag-ui-border) !important; border-radius: 8px;
  min-height: 44px;
}
body.agape-commerce-ui:is(.woocommerce-checkout, .woocommerce-account, .woocommerce-cart, .agape-inner-page) .select2-container--default .select2-selection--single .select2-selection__rendered { color: var(--ag-ui-ink) !important; line-height: 42px; padding-inline: 12px 30px; }
body.agape-commerce-ui:is(.woocommerce-checkout, .woocommerce-account, .woocommerce-cart, .agape-inner-page) .select2-container--default .select2-selection--single .select2-selection__arrow { height: 42px; }
body.agape-commerce-ui:is(.woocommerce-checkout, .woocommerce-account, .woocommerce-cart, .agape-inner-page) .select2-dropdown { background: #fff !important; border: 1px solid var(--ag-ui-border) !important; border-radius: 8px; color: var(--ag-ui-ink) !important; box-shadow: 0 8px 24px #0d23421a; overflow: hidden; }
body.agape-commerce-ui:is(.woocommerce-checkout, .woocommerce-account, .woocommerce-cart, .agape-inner-page) .select2-search--dropdown { padding: 8px; background: #fff !important; }
body.agape-commerce-ui:is(.woocommerce-checkout, .woocommerce-account, .woocommerce-cart, .agape-inner-page) .select2-search--dropdown .select2-search__field { background: #fff !important; color: var(--ag-ui-ink) !important; border: 1px solid var(--ag-ui-border) !important; border-radius: 6px; min-height: 36px; box-shadow: none; }
body.agape-commerce-ui:is(.woocommerce-checkout, .woocommerce-account, .woocommerce-cart, .agape-inner-page) .select2-results__option { color: var(--ag-ui-ink) !important; background: #fff !important; padding: 9px 12px; }
body.agape-commerce-ui:is(.woocommerce-checkout, .woocommerce-account, .woocommerce-cart, .agape-inner-page) .select2-results__option[aria-selected="true"],
body.agape-commerce-ui:is(.woocommerce-checkout, .woocommerce-account, .woocommerce-cart, .agape-inner-page) .select2-results__option--selected { background: #edf2f7 !important; }
body.agape-commerce-ui:is(.woocommerce-checkout, .woocommerce-account, .woocommerce-cart, .agape-inner-page) .select2-results__option--highlighted { background: #e8b840 !important; color: #0d2342 !important; }
body.agape-commerce-ui:is(.woocommerce-checkout, .woocommerce-account, .woocommerce-cart, .agape-inner-page) .select2-results__option[aria-disabled="true"] { color: #748195 !important; }

/* Notices can be printed directly by WooCommerce, without a .woocommerce ancestor. */
body.agape-commerce-ui .woocommerce-notices-wrapper:not(:empty) {
  background: transparent !important; border: 0 !important; padding: 0 !important; box-shadow: none !important;
}
body.agape-commerce-ui :is(#agape-inner, #agape-account, #inner-wrap, #agape-home) .woocommerce-notices-wrapper > :is(.woocommerce-message, .woocommerce-error, .woocommerce-info):not(:has(.acfw-notice-text, a.showcoupon)) {
  background: var(--notice-bg, #f2f6fb) !important;
  border: 1px solid var(--notice-edge, #c3d4e5) !important;
  border-inline-start: 3px solid var(--notice-accent, #285580) !important;
  border-radius: 8px !important; padding: 13px 16px !important;
  box-shadow: none !important;
}
body.agape-commerce-ui :is(#agape-inner, #agape-account, #inner-wrap, #agape-home) .woocommerce-notices-wrapper > :is(.woocommerce-message, .woocommerce-error, .woocommerce-info)[tabindex="-1"]:focus:not(:focus-visible) { outline: none !important; }
/* SelectWoo uses a detached dropdown appended to body. Target its actual markup. */
body.agape-commerce-ui :is(.select2-container, .select2-container--open) .select2-dropdown,
body.agape-commerce-ui .select2-dropdown :is(.select2-results, .select2-results__options, .select2-search--dropdown) {
  background: #fff !important; color: var(--ag-ui-ink) !important;
}
body.agape-commerce-ui .select2-container .select2-dropdown .select2-search__field {
  background: #fff !important; color: var(--ag-ui-ink) !important;
  -webkit-text-fill-color: currentColor !important; border: 1px solid var(--ag-ui-border) !important;
  border-radius: 6px !important; box-shadow: none !important;
}
body.agape-commerce-ui .select2-container .select2-dropdown .select2-results__option {
  background: #fff !important; color: var(--ag-ui-ink) !important; -webkit-text-fill-color: currentColor !important;
}
body.agape-commerce-ui .select2-container .select2-dropdown .select2-results__option:is([aria-selected="true"], .select2-results__option--selected) { background: #edf2f7 !important; }
body.agape-commerce-ui .select2-container .select2-dropdown .select2-results__option--highlighted { background: var(--ag-ui-gold) !important; color: var(--ag-ui-ink) !important; }
body.agape-commerce-ui .select2-container .select2-dropdown .select2-results__option[aria-disabled="true"] { color: #748195 !important; }

/* Classic coupon form: preserve native show/hide behavior. */
body.agape-commerce-ui #agape-inner .agape-checkout-content form.checkout_coupon,
body.agape-commerce-ui.woocommerce-checkout form.woocommerce-form-coupon {
  background: #fff !important;
  border: 1px solid var(--ag-ui-border) !important;
  border-radius: 10px !important;
  padding: 16px !important;
  box-shadow: none !important;
}
body.agape-commerce-ui #agape-inner .agape-checkout-content form.checkout_coupon :is(.form-row-first, .form-row-last) {
  box-sizing: border-box; min-width: 0; margin: 0 !important; padding: 0 !important;
}
body.agape-commerce-ui #agape-inner .agape-checkout-content form.checkout_coupon .form-row-first { float: left !important; width: calc(100% - 174px) !important; }
body.agape-commerce-ui #agape-inner .agape-checkout-content form.checkout_coupon .form-row-last { float: right !important; width: 162px !important; }
body.agape-commerce-ui #agape-inner .agape-checkout-content form.checkout_coupon::after { content: ''; display: block; clear: both; }
body.agape-commerce-ui #agape-inner .agape-checkout-content form.checkout_coupon :is(input.input-text, button.button, input.button) { width: 100% !important; min-height: 44px; margin: 0 !important; }
body.agape-commerce-ui #agape-inner .agape-checkout-content form.checkout_coupon { margin: 0 0 18px; }
body.agape-commerce-ui #agape-inner .agape-checkout-content form.checkout_coupon > p:first-child { color: var(--ag-ui-muted); margin: 0 0 12px; }
@media (max-width: 540px) {
  body.agape-commerce-ui #agape-inner .agape-checkout-content form.checkout_coupon :is(.form-row-first, .form-row-last) { float: none !important; width: 100% !important; }
  body.agape-commerce-ui #agape-inner .agape-checkout-content form.checkout_coupon .form-row-last { margin-top: 10px !important; }
}

/* Match native and enhanced address controls, including AJAX replacements. */
body.agape-commerce-ui.woocommerce-checkout #customer_details .form-row :is(input.input-text, select:not(.select2-hidden-accessible), .select2-selection--single) {
  box-sizing: border-box !important;
  width: 100% !important;
  height: 44px !important;
  min-height: 44px !important;
  border-radius: var(--ag-ui-radius) !important;
  font-family: inherit !important;
  font-size: 14px !important;
  font-weight: 400 !important;
}
body.agape-commerce-ui.woocommerce-checkout #customer_details .form-row .select2-container {
  width: 100% !important;
  max-width: 100%;
  font-size: 14px !important;
}
body.agape-commerce-ui.woocommerce-checkout #customer_details .form-row .select2-selection__rendered {
  font-family: inherit !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  line-height: 42px !important;
  padding: 0 32px 0 12px !important;
}
body.agape-commerce-ui.woocommerce-checkout #customer_details .form-row .select2-selection__arrow {
  height: 42px !important;
  right: 8px !important;
}
body.agape-commerce-ui.woocommerce-checkout #customer_details .form-row select:not(.select2-hidden-accessible) {
  padding: 0 32px 0 12px !important;
}
/* Payment provider emits inline colors: override only its presentation. */
body.agape-commerce-ui.woocommerce-checkout #vccp-checkout-flow-notice {
  box-sizing: border-box;
  background: #f7f9fc !important;
  border: 1px solid #d7e0eb !important;
  border-inline-start: 3px solid #dfa92c !important;
  border-radius: 8px !important;
  color: #243852 !important;
  padding: 16px !important;
  margin: 12px 0 16px !important;
  font-size: 14px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
body.agape-commerce-ui.woocommerce-checkout #vccp-checkout-flow-notice .vccp-notice-heading {
  color: #071a2e !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1.4;
  margin: 0 0 12px !important;
}
body.agape-commerce-ui.woocommerce-checkout #vccp-checkout-flow-notice .vccp-notice-section {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 10px;
}
body.agape-commerce-ui.woocommerce-checkout #vccp-checkout-flow-notice .vccp-notice-section:last-child { margin-bottom: 0; }
body.agape-commerce-ui.woocommerce-checkout #vccp-checkout-flow-notice .vccp-notice-icon {
  flex: 0 0 18px;
  text-align: center;
  color: #80601b !important;
}
/* Compact variation row, without a wide table pushing the select away. */
body.agape-commerce-ui.single-product #inner-wrap .summary form.variations_form table.variations {
  width: 100% !important;
  margin: 16px 0 12px !important;
  border: 0 !important;
  table-layout: auto;
}
body.agape-commerce-ui.single-product #inner-wrap .summary form.variations_form .variations tbody { display: block; }
body.agape-commerce-ui.single-product #inner-wrap .summary form.variations_form .variations tr {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
body.agape-commerce-ui.single-product #inner-wrap .summary form.variations_form .variations :is(th.label, td.label, td.value) {
  display: block;
  width: auto !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  text-align: start;
  background: transparent;
  min-width: 0;
}
body.agape-commerce-ui.single-product #inner-wrap .summary form.variations_form .variations label { margin: 0 !important; }
body.agape-commerce-ui.single-product #inner-wrap .summary form.variations_form .variations select {
  width: 100% !important;
  max-width: 300px !important;
  height: 44px !important;
  min-height: 44px !important;
  margin: 0 !important;
  font-size: 14px !important;
  font-family: inherit;
  font-weight: 400;
  padding: 0 32px 0 12px !important;
}
body.agape-commerce-ui.single-product #inner-wrap .summary form.variations_form .reset_variations { margin-inline-start: 8px; }
@media (max-width: 480px) {
  body.agape-commerce-ui.single-product #inner-wrap .summary form.variations_form .variations tr { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  body.agape-commerce-ui.single-product #inner-wrap .summary form.variations_form .variations select { max-width: none !important; }
}

/* Notice actions may sit outside the WooCommerce wrapper. */
body.agape-commerce-ui :is(#agape-inner, #agape-home, #agape-account, #inner-wrap) :is(.woocommerce-message, .woocommerce-info, .woocommerce-error) a:is(.button, .wc-forward) {
  box-sizing: border-box;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px !important;
  background: #fff !important;
  color: #0d2342 !important;
  -webkit-text-fill-color: #0d2342 !important;
  border: 1px solid #bdcad9 !important;
  border-radius: var(--ag-ui-radius) !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  text-decoration: none !important;
  text-shadow: none !important;
  box-shadow: none !important;
}
body.agape-commerce-ui :is(#agape-inner, #agape-home, #agape-account, #inner-wrap) :is(.woocommerce-message, .woocommerce-info, .woocommerce-error) a:is(.button, .wc-forward):hover {
  background: #f1f5f9 !important;
  color: #0d2342 !important;
  border-color: #96a9bf !important;
}
body.agape-commerce-ui :is(#agape-inner, #agape-home, #agape-account, #inner-wrap) :is(.woocommerce-message, .woocommerce-info, .woocommerce-error) a:is(.button, .wc-forward):focus-visible {
  outline: 2px solid var(--ag-ui-focus) !important;
  outline-offset: 2px;
}
body.agape-commerce-ui :is(#agape-inner, #agape-home, #agape-account, #inner-wrap) :is(.woocommerce-message, .woocommerce-info, .woocommerce-error)[tabindex="-1"]:focus {
  outline: none !important;
  box-shadow: none !important;
}
@media (max-width: 480px) {
  body.agape-commerce-ui :is(#agape-inner, #agape-home, #agape-account, #inner-wrap) :is(.woocommerce-message, .woocommerce-info, .woocommerce-error) a:is(.button, .wc-forward) {
    float: none !important;
    display: flex !important;
    width: 100%;
    margin: 0 0 10px !important;
  }
}

/* Add-to-cart success notice: primary gold CTA; keep other notice actions neutral. */
body.agape-commerce-ui :is(#agape-inner, #agape-home, #agape-account, #inner-wrap) .woocommerce-message a.button.wc-forward {
  background: linear-gradient(180deg, #f6d878, #dfa92c) !important;
  color: #071a2e !important;
  -webkit-text-fill-color: #071a2e !important;
  border-color: #d8a72d !important;
}
body.agape-commerce-ui :is(#agape-inner, #agape-home, #agape-account, #inner-wrap) .woocommerce-message a.button.wc-forward:hover {
  background: linear-gradient(180deg, #f8df8f, #e3b33f) !important;
  color: #071a2e !important;
  -webkit-text-fill-color: #071a2e !important;
  border-color: #d8a72d !important;
}
