/* Shared storefront typography and text CTAs. No payment/widget state changes.
   Keep icon controls and provider-owned wallet buttons outside this allowlist. */
body :is(h1, h2, h3, h4, h5, h6, .page-title, .products-widget-title,
    .step-title, .block-title, .fieldset > .legend, .opc-block-summary > .title,
    .post-title, .post-view .post-header .post-title) {
    font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif !important;
    font-weight: 700 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    line-height: 1.2;
}
body :is(h1, h2, h3, h4, h5, h6, .page-title, .products-widget-title,
    .step-title, .block-title, .fieldset > .legend, .opc-block-summary > .title,
    .post-title) :is(span, strong, a) {
    font-family: inherit !important;
    font-weight: inherit !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}
body h1.page-title {
    font-size: clamp(28px, 2.4vw, 32px) !important;
    text-align: left !important;
}
body .block-title > strong[role="heading"] {
    font-size: clamp(21px, 2vw, 25px) !important;
    font-weight: 700 !important;
}
/* Icon-only buttons keep their dimensions; their accessible text still uses
   the same natural letter case when it is exposed. */
body button.icons-additional span { text-transform: none !important; }
/* Product names are labels, not section headings; retain their lighter weight. */
body .product-sliders-container .product_slider_item a h3 {
    font-weight: 400 !important;
}
body :is(.products-widget-title, .megango-section-heading, .post-view .post-title) {
    text-align: left !important;
    font-size: clamp(25px, 2.4vw, 32px) !important;
}
body :is(.step-title, .opc-block-summary > .title, .login-container .block-title) {
    font-size: clamp(21px, 2vw, 25px) !important;
}

/* IDs here are actual Magento CTAs: they also keep these shared rules above
   legacy theme rules without changing the existing button markup or handlers. */
body :is(#product-addtocart-button, #top-cart-btn-checkout, .action.primary,
    .action.secondary, .action-primary, .action-secondary, .action.subscribe,
    .action.search, .action.update, .action.clear, .action.apply, .action.action-apply,
    .actions-toolbar .action.back, .actions-toolbar .action.cancel,
    a.btn, a.more-button, .tmjs-open-modal-btn, .omniva-btn,
    .megango-product-description-toggle, input[type="submit"]):not(.icons-additional)
    :is(span, strong) {
    font: inherit !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    text-decoration: none !important;
}
body :is(#product-addtocart-button, #top-cart-btn-checkout, .action.primary,
    .action.secondary, .action-primary, .action-secondary, .action.subscribe,
    .action.search, .action.update, .action.clear, .action.apply, .action.action-apply,
    .actions-toolbar .action.back, .actions-toolbar .action.cancel,
    a.btn, a.more-button, .tmjs-open-modal-btn, .omniva-btn,
    .megango-product-description-toggle, input[type="submit"]):not(.icons-additional) {
    box-sizing: border-box !important;
    min-height: 44px;
    max-width: 100%;
    padding: 12px 20px !important;
    border: 1px solid #ea5455 !important;
    border-radius: var(--megango-radius, 5px) !important;
    background: #ea5455 !important;
    color: #fff !important;
    font: 700 16px/1.25 "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif !important;
    text-align: center;
    text-transform: none !important;
    letter-spacing: normal !important;
    text-decoration: none !important;
    white-space: normal;
    box-shadow: none !important;
    transform: none !important;
    transition: background-color .15s, border-color .15s, color .15s !important;
}
body :is(#product-addtocart-button, #top-cart-btn-checkout, .action.primary,
    .action.secondary, .action-primary, .action-secondary, .action.subscribe,
    .action.search, .action.update, .action.clear, .action.apply, .action.action-apply,
    .actions-toolbar .action.back, .actions-toolbar .action.cancel,
    a.btn, a.more-button, .tmjs-open-modal-btn, .omniva-btn,
    .megango-product-description-toggle, input[type="submit"]):not(.icons-additional):is(:hover, :focus-visible) {
    background: #191919 !important;
    border-color: #191919 !important;
    color: #fff !important;
    text-decoration: none !important;
    transform: none !important;
}
/* Secondary actions use the outlined Back-button treatment. */
body :is(#checkout, .page-wrapper, .modal-popup) :is(.checkout-go-back,
    .action.secondary, .action-secondary, .actions-toolbar .action.back,
    .actions-toolbar .action.cancel, .action.update, .action.clear,
    .megango-product-description-toggle) {
    background: transparent !important;
    border-color: #ea5455 !important;
    color: #ea5455 !important;
}
body :is(#checkout, .page-wrapper, .modal-popup) :is(.checkout-go-back,
    .action.secondary, .action-secondary, .actions-toolbar .action.back,
    .actions-toolbar .action.cancel, .action.update, .action.clear,
    .megango-product-description-toggle):is(:hover, :focus-visible) {
    background: #ea5455 !important;
    border-color: #ea5455 !important;
    color: #fff !important;
}
body :is(#product-addtocart-button, #top-cart-btn-checkout, .action.primary,
    .action.secondary, .action-primary, .action-secondary, .tmjs-open-modal-btn,
    .omniva-btn, .megango-product-description-toggle):focus-visible {
    outline: 2px solid #ea5455 !important;
    outline-offset: 3px;
}
body :is(#product-addtocart-button, #top-cart-btn-checkout, .action.primary,
    .action.secondary, .action-primary, .action-secondary):disabled {
    opacity: .55;
    cursor: not-allowed;
}
