/**
 * Alpha Amino Sale Badges
 * Version 1.0.2
 * Alpha blue: #3465D1
 */

:root {
    --alpha-sale-blue: #3465d1;
}

/* Product loops: hide legacy/default badges. */
.woocommerce ul.products li.product span.onsale:not(.alpha-sale-badge),
.woocommerce-page ul.products li.product span.onsale:not(.alpha-sale-badge),
.woocommerce ul.products li.product .qodef-woo-product-mark,
.woocommerce-page ul.products li.product .qodef-woo-product-mark {
    display: none !important;
}

.alpha-sale-badge {
    position: absolute;
    z-index: 40;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 38px;
    padding: 9px 14px;
    margin: 0;
    border: 0;
    border-radius: 9px;
    background: var(--alpha-sale-blue) !important;
    color: #fff !important;
    box-shadow: 0 5px 14px rgba(52, 101, 209, 0.22);
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    white-space: nowrap;
    pointer-events: none;
}

.alpha-sale-badge__label,
.alpha-sale-badge__amount {
    color: inherit !important;
    font: inherit;
    line-height: inherit;
}

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product,
.products .product {
    position: relative;
}

.alpha-sale-badge--loop {
    top: 14px;
    left: 14px;
}

/* Single product */
.single-product .woocommerce-product-gallery,
.single-product .qodef-woo-single-image,
.single-product .qodef-woo-product-image,
.single-product .qodef-woo-product-image-inner {
    position: relative !important;
}

.single-product .alpha-sale-badge--single {
    top: 14px;
    left: 14px;
}

/*
 * The single-product JS inserts exactly one Alpha badge and hides all native
 * sale markers. These selectors keep the theme's original "-20%" hidden.
 */
.single-product span.onsale:not(.alpha-sale-badge),
.single-product .qodef-woo-product-mark,
.single-product .qodef-woo-product-mark-inner,
.single-product .qodef-woo-product-mark--sale,
.single-product .qodef--on-sale {
    display: none !important;
}

@media (max-width: 767px) {
    .alpha-sale-badge {
        min-height: 34px;
        padding: 8px 11px;
        border-radius: 8px;
        font-size: 13px;
        gap: 4px;
    }

    .alpha-sale-badge--loop,
    .single-product .alpha-sale-badge--single {
        top: 10px;
        left: 10px;
    }
}
