/* Out of Stock Product Styling - Class-based approach for better browser compatibility */
.wfs-out-of-stock-product {
    position: relative;
    filter: grayscale(1) opacity(0.8);
    pointer-events: none;
    transition: all 0.3s ease;
    overflow: hidden;
}

/* Direct ribbon element added by JavaScript */
.out-of-stock-ribbon {
    position: absolute;
    top: 25px;
    left: -40px;
    background-color: #ff5252;
    color: white;
    padding: 5px 40px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    transform: rotate(-45deg);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

/* Create the overlay effect with blur */
.wfs-out-of-stock-product::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(1px);
    z-index: 1;
    pointer-events: none;
}

/* Out of stock ribbon badge */
.wfs-out-of-stock-product::after {
    content: 'Out of Stock';
    position: absolute;
    top: 35px;
    left: -40px;
    background-color: #ff5252;
    color: white;
    padding: 5px 40px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    transform: rotate(-45deg);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

/* Hide the default out of stock text since we're using the ribbon */
.wfs-text-out-of-stock {
    display: none !important;
}

/* Ensure the product image remains visible but grayscale */
.wfs-out-of-stock-product img {
    filter: grayscale(1);
    opacity: 0.8;
}

/* Ensure the product card is non-clickable */
.wfs-out-of-stock-product .wfs-product-link {
    pointer-events: none;
    cursor: default;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 767px) {
    .wfs-out-of-stock-product::after {
        font-size: 10px;
        padding: 3px 30px;
        top: 25px;
        left: -30px;
    }
    
    .out-of-stock-ribbon {
        font-size: 10px;
        padding: 3px 30px;
        top: 25px;
        left: -30px;
    }
}
