/* Línea completa */
.stock-line {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 6px 0 10px;
    font-size: 13px;
}

/* Texto STOCK */
.stock-label {
    font-weight: 600;
    white-space: nowrap;
}

/* Barra */
.stock-progress {
    flex: 1;
    max-width: 160px;
    height: 9px;
    background: #e6e6e6;
    border-radius: 4px;
    overflow: hidden;
}

.stock-progress-bar {
    height: 100%;
    transition: width 0.25s ease;
}
/* Colores */
.stock-progress.low .stock-progress-bar { background-color: #d33e47; }
.stock-progress.medium .stock-progress-bar { background-color: #efdf5d; }
.stock-progress.high .stock-progress-bar { background-color: #a3c862; }

/* Texto final */
.stock-remaining {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
}

/* Ajustes catálogo */
.product-miniature .stock-line {
    margin-top: 4px;
    font-size: 12px;
    padding: 2px 0px 2px 0px
}

.product-miniature .stock-progress {
    max-width: 120px;
}

/* Evitar duplicados (Creative Elements) */
[data-stock-bar="1"] + [data-stock-bar="1"] {
    display: none;
}

/*ocultar stock-remaining para tablet y móvil exepto si la página es la de producto con id #product*/

@media (max-width: 768px) { 
    body:not(#product) .stock-remaining {
        display: none;
    }
}

/*cambiar el tamaño de stock-label en movil a 11px*/
@media (max-width: 468px) { 
    .stock-label {
        font-size: 11px;
    }
}


/*imagen agotado */

/* Contenedor de la imagen */
.elementor-product-miniature .elementor-image {
    position: relative;
    display: block;
}

/* El Overlay */
.agotado-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(180, 0, 0, 0.6);
    color: white;
    display: flex;
    z-index: 10;
    pointer-events: none;
    text-align: center;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.agotado-overlay span {
    /* border: 2px solid #fff; */
    font-weight: bold;
    text-transform: uppercase;
    font-size: 1.1rem;
    letter-spacing: 1px;
    font-weight: 700;
}

/* bajar la intensidad de la imagen agotada */
.elementor-product-miniature .is-out-of-stock .elementor-image img {
    filter: grayscale(0.8);
    opacity: 0.7;
}