/* RH WP Master – Frontend Discount Styles */

/* ── Product cards: ensure relative positioning for badge ────── */
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product,
ul.products li.product {
    position: relative;
}

/* ═══════════════════════════════════════════════════════════════
   Badge — overrides WC sale flash, shows on product image
   Works in: loop (shop/category), single product image, Elementor
   ═══════════════════════════════════════════════════════════════ */
span.onsale.rh-discount-badge,
.woocommerce span.onsale.rh-discount-badge,
.woocommerce-page span.onsale.rh-discount-badge {
    /* Position: top-right corner of the product card */
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    left: auto !important;
    bottom: auto !important;
    margin: 0 !important;

    /* Appearance */
    background: #dc2626 !important;
    color: #fff !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    padding: 6px 11px !important;
    border-radius: 20px !important;
    min-height: auto !important;
    min-width: auto !important;
    width: auto !important;
    height: auto !important;

    /* Polish */
    box-shadow: 0 2px 8px rgba(220, 38, 38, .38) !important;
    letter-spacing: .3px;
    white-space: nowrap;
    z-index: 10;

    /* Remove text-decoration that might bleed from <del> parent */
    text-decoration: none !important;
}

/* Single product image: slightly larger badge ───────────────── */
.woocommerce div.product .woocommerce-product-gallery span.onsale.rh-discount-badge {
    top: 14px !important;
    right: 14px !important;
    font-size: 14px !important;
    padding: 7px 13px !important;
}

/* ═══════════════════════════════════════════════════════════════
   Banner — single product page, below price / above add-to-cart
   ═══════════════════════════════════════════════════════════════ */
.rh-discount-banner {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 11px 20px !important;
    border-radius: 7px !important;
    color: #fff !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    letter-spacing: .25px;
    margin: 8px 0 14px !important;
    text-align: center;
    line-height: 1.3 !important;
    width: 100%;
    box-sizing: border-box;

    /* Guarantee no strikethrough bleed from WC <del> ancestors */
    text-decoration: none !important;
    font-style: normal !important;
}
