/* Estilos para etiquetas de eventos especiales */
.event-label {
    position: absolute;
    top: 20px;
    left: 10px;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 14px;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    text-transform: uppercase;
    max-width: 120px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Clase especial para etiquetas que son solo imágenes */
.event-label.image-only {
    background-color: transparent !important;
    box-shadow: none;
    padding: 0;
    max-width: 130px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.event-label img {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    max-height: 70px;
    border-radius: 3px;
}

/* Propiedad específica para imágenes cuadradas */
.event-label.image-only img {
    max-height: 100%;
    width: auto;
    max-width: 100%;
    object-position: center;
    object-fit: contain;
}

/* Para la vista de detalles del producto */
#product-main-image-container {
    position: relative;
}

/* Estilos para precios con descuento */
.old-price {
    text-decoration: line-through;
    color: #999;
    font-size: 0.85em;
    margin-right: 10px;
}

.event-price {
    color: #e63946;
    font-weight: bold;
    font-size: 1.1em;
}

.discount-badge {
    display: inline-block;
    background-color: #e63946;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.75em;
    margin-left: 10px;
    vertical-align: middle;
}

/* Contador de tiempo */
.event-countdown {
    margin-top: 10px;
    padding: 8px 12px;
    background-color: #f8f9fa;
    border-radius: 4px;
    font-size: 0.9em;
    display: inline-block;
}

.countdown-timer {
    font-weight: bold;
    color: #e63946;
}

/* Estilos para productos en la página principal y búsqueda */
.product-box {
    position: relative;
    overflow: hidden;
}

.product-box .event-label {
    top: 5px;
    left: 5px;
    font-size: 11px;
    padding: 3px 6px;
    max-height: 35px;
}

.product-box .event-label.image-only {
    max-height: none;
    max-width: 100px;
    height: 50px;
    top: 8px;
    left: 8px;
}

.product-box .event-label img {
    max-height: 50px;
    max-width: 100%;
    object-fit: contain;
}

/* Animación para destacar ofertas */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.event-label.highlight {
    animation: pulse 2s infinite;
}

/* Nuevos estilos para etiquetas de eventos en el carrito */
.cart-event-label {
    position: absolute;
    top: 3px;
    left: 3px;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 10px;
    z-index: 10;
    max-width: 70px;
    text-align: center;
    overflow: hidden;
    background-color: #f8f9fa;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.cart-event-label.image-only {
    background-color: transparent !important;
    box-shadow: none;
    padding: 0;
    max-width: 80px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-event-label.image-only img {
    max-width: 100%;
    max-height: 35px;
    object-fit: contain;
    object-position: center;
    border-radius: 2px;
}

.mini-cart-event-label {
    position: absolute;
    top: 1px;
    left: 1px;
    padding: 1px 2px;
    border-radius: 2px;
    font-size: 8px;
    z-index: 10;
    text-align: center;
    overflow: hidden;
    background-color: #f8f9fa;
}

.mini-cart-event-label.image-only {
    background-color: transparent !important;
    box-shadow: none;
    padding: 0;
    max-width: 50px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mini-cart-event-label.image-only img {
    max-width: 100%;
    max-height: 22px;
    object-fit: contain;
    object-position: center;
    border-radius: 1px;
}

/* Asegurar que los contenedores de imagen tengan posición relativa */
.img-product {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.mini-cart-item-image {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}
