/**
 * Product Card Badge - Frontend Styles
 */

/* Badge Wrapper */
.pcb-badge-wrapper {
    position: relative !important;
    display: block !important;
    overflow: visible !important;
}

/* Badges Container */
.pcb-badges {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    pointer-events: none !important;
    z-index: 10 !important;
    overflow: visible !important;
}

/* Individual Badge */
.pcb-badge {
    position: absolute !important;
    height: auto !important;
    max-width: none !important;
    pointer-events: none !important;
    display: block !important;
}

/* Single Product */
.pcb-single-badges {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    pointer-events: none !important;
    z-index: 10 !important;
}

.woocommerce-product-gallery {
    position: relative !important;
}

/* Ensure sale badge stays on top */
.pcb-badge-wrapper .onsale,
span.onsale {
    z-index: 20 !important;
}

/* Parent link positioning */
.woocommerce ul.products li.product a:has(.pcb-badge-wrapper),
ul.products li.product a:has(.pcb-badge-wrapper) {
    position: relative !important;
    display: block !important;
}

/* Fallback for browsers without :has() */
.woocommerce ul.products li.product > a,
ul.products li.product > a {
    position: relative !important;
    display: block !important;
}

/* Responsive */
@media (max-width: 768px) {
    .pcb-badges {
        z-index: 8 !important;
    }
}

/* Print */
@media print {
    .pcb-badges,
    .pcb-badge {
        display: none !important;
    }
}