/**
 * PricePress - Badge Styles
 *
 * Styles for the On-Sale Badge feature applied to products in shop loops
 * and single product pages.
 */

/* ── Base Badge ── */
.pricepress-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1.4;
    white-space: nowrap;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    cursor: default;
    /* WooCommerce .onsale overrides */
    min-height: unset;
    min-width: unset;
}

/* ── Position inside the image wrapper ── */
ul.products li.product .pricepress-badge,
.woocommerce-loop-product__link .pricepress-badge {
    position: absolute;
    top: 0.5em;
    left: 0.5em;
    z-index: 9;
    margin: 0;
}

/* Override WC default badge shape */
.woocommerce span.onsale.pricepress-badge {
    border-radius: 6px;
    min-height: unset;
    min-width: unset;
    padding: 4px 10px;
    line-height: 1.4;
    background: none; /* Will be set via inline style */
}

/* ── Single product badge wrapper ── */
.pricepress-badge-wrap {
    position: relative;
    display: block;
    margin-bottom: 8px;
}

.pricepress-badge-wrap .pricepress-badge {
    display: inline-block;
}

/* ── Fade-in animation ── */
@keyframes ppBadgePop {
    from { opacity: 0; transform: scale(0.85); }
    to   { opacity: 1; transform: scale(1); }
}

.pricepress-badge {
    animation: ppBadgePop 0.2s ease;
}
