/* Stock Status Styling */

/* Out of Stock badge on product cards */
.product-card.out-of-stock img {
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

/* Low Stock badge on product cards */
.product-card.low-stock img {
    opacity: 0.85;
    transition: opacity 0.3s ease;
}

.product-card .stock-status {
    z-index: 2;
    border-top-left-radius: 0;
    border-bottom-right-radius: 4px;
}

/* Stock status badges */
.stock-status .badge {
    font-size: 0.8rem;
    padding: 0.35rem 0.65rem;
}

/* Make the low stock badge more noticeable with a subtle animation */
.stock-status .badge.bg-warning {
    animation: pulse-warning 2s infinite;
}

@keyframes pulse-warning {
    0% { box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(255, 193, 7, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 193, 7, 0); }
}

/* Variant stock status in tables */
.variant-stock-status {
    font-weight: bold;
}

/* Low stock row styling */
tr.low-stock-row {
    background-color: rgba(255, 193, 7, 0.1);
}

/* Out of stock row styling */
tr.out-of-stock-row {
    background-color: rgba(220, 53, 69, 0.1);
}

/* Disabled add to cart button styling */
.add-to-cart-btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* Product details page stock status */
#product-details .stock-status {
    display: inline-block;
    margin-left: 10px;
    vertical-align: middle;
}

/* Tooltip for out of stock items */
.out-of-stock-tooltip {
    position: relative;
    display: inline-block;
}

.out-of-stock-tooltip .tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: #555;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
}

.out-of-stock-tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}
