/**
 * Custom Sale Badge Styles
 * Circular badge with percentage discount
 */

.custom-sale-badge-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 98;
	opacity: 0.9;
}

.custom-sale-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: #FF4645;
    border-radius: 50%;
    pointer-events: auto;
}

.custom-sale-badge .sale-percentage {
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Ensure product containers have relative positioning and proper overflow handling */
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product,
.woocommerce ul.products li.product .woocommerce-loop-product__link,
.woocommerce ul.products li.product a,
.woocommerce ul.products li.product .woocommerce-LoopProduct-link,
.woocommerce div.product div.images,
.woocommerce #content div.product div.images,
.woocommerce-page div.product div.images,
.woocommerce-page #content div.product div.images,
.woocommerce span.onsale,
.product .woocommerce-product-gallery,
.woocommerce .woocommerce-product-gallery,
.woocommerce-product-gallery__wrapper {
    position: relative !important;
}

/* Prevent layout breaking */
.woocommerce ul.products li.product {
    overflow: visible !important;
}

.woocommerce ul.products li.product a {
    display: block !important;
    position: relative !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .custom-sale-badge {
        width: 50px;
        height: 50px;
        top: 8px;
        left: 8px;
    }

    .custom-sale-badge .sale-percentage {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .custom-sale-badge {
        width: 45px;
        height: 45px;
        top: 5px;
        left: 5px;
    }

    .custom-sale-badge .sale-percentage {
        font-size: 12px;
    }
}

/* Alternative color schemes - uncomment to use */

/* Blue theme */
/*
.custom-sale-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}
*/

/* Green theme */
/*
.custom-sale-badge {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e063 100%);
    box-shadow: 0 4px 15px rgba(86, 171, 47, 0.4);
}
*/

/* Orange theme */
/*
.custom-sale-badge {
    background: linear-gradient(135deg, #f46b45 0%, #eea849 100%);
    box-shadow: 0 4px 15px rgba(244, 107, 69, 0.4);
}
*/
