/*
 * Custom code goes here.
 * A template should always ship with an empty custom.css
 */

/*
 * Changes for product availability display
 */

/*
* Disable "Add to cart" button styles when product is out of stock*
*/
.add-to-cart[disabled] {
    background: #c2c2c2;
    border-color: #b1b1b1;
    color: #666;
    cursor: not-allowed;
    opacity: 0.9;
}

/*
 * Grayscale product image and overlay "Out of stock" text
 */
.product-miniature:has(.add-to-cart[disabled]), .page-product .add-to-cart[disabled] {
    filter: grayscale(100%);
    opacity: .6;
}

.product-miniature:has(.add-to-cart[disabled]) .thumbnail-container::after {
    content: "Brak w magazynie";
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
    pointer-events: none;
}

/*
 * End of changes for product availability display
 */


/*
 * Other fixes
 */

/*
 * Ensure product flags are not clickable and layered correctly
 */
.product-miniature .product-flags li,
.page-product .product-flags li
{
    pointer-events: none;
}

.page-product .product-flags li {
    z-index: 1 !important;
}

.page-product .product-cover .layer {
    z-index: 5 !important;
}

/*
 * End of other fixes
 */