/**
 * Estilos para shortcodes de Nosolorol
 * @version 1.0.0
 */

/* ===== COUNTDOWN STYLES ===== */
.nosolorol-countdown-container {
    text-align: center;
    padding: 20px;
    border-radius: 12px;
    color: white;
    margin: 20px 0;
    width: fit-content;
}

.countdown-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.countdown-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
}

.countdown-number {
    font-size: 2.5rem;
    font-weight: bold;
    line-height: 1;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    width: 80px;
    margin-bottom: 5px;
}

.countdown-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
}

.countdown-separator {
    font-size: 2rem;
    font-weight: bold;
    margin: 0 5px;
    opacity: 0.7;
}

/* Estado expirado */
.countdown-expired {text-align: center;padding: 30px 20px;}
.expired-message {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: #ff4757;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}
.expired-submessage {font-size: 1.1rem;opacity: 0.9;}
.nosolorol-countdown-container.expired {background: linear-gradient(135deg, #ff4757 0%, #c44569 100%);}

/* Bloqueo de compras */
.purchases-blocked .product-add-to-cart,
.purchases-blocked [data-button-action="add-to-cart"],
.purchases-blocked .btn-primary[type="submit"],
.purchases-blocked .add-to-cart {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed !important;
}

.purchases-blocked .product-add-to-cart:after {
    content: " (Bloqueado)";
    color: #ff4757; 
    font-weight: bold;
}

/* ===== PRODUCT COUNTER STYLES ===== */
.nosolorol-product-counter {
    display: inline-block;
    color: white;
    margin: 5px;
    text-align: center;
}
.nosolorol-product-counter.units-sold {background: #007bff;}
.nosolorol-product-counter.units-remaining {background: #ffc107;color: #333;}
.nosolorol-product-counter.sales-amount {background: #28a745;}
.nosolorol-product-counter .counter-wrapper {}
.nosolorol-product-counter .counter-wrapper .counter-icon,
.nosolorol-product-counter .counter-wrapper .counter-info {display:none}
.nosolorol-product-counter .counter-wrapper .counter-value {
    line-height: 9rem;
    font-size: 10rem;
}

.nosolorol-product-counter.euros .counter-wrapper .counter-value {
    line-height: 7rem;
    font-size: 7rem;
}
/*modificacion tamaño €*/
.nosolorol-product-counter.euros .counter-wrapper .counter-value span {font-size: 4rem;}
    

/* ===== PRODUCT WIDGET STYLES ===== */
/* Contenedor padre con clearfix */
.nosolorol-shortcodes-container {
    margin: 15px 0;
    clear: both;
}

/* Clearfix para contener floats */
.nosolorol-shortcodes-container::after {
    content: '';
    display: table;
    clear: both;
}

/* Hacer que los widgets floten a la izquierda */
.nosolorol-product-widget {
    max-width: 263px;
    min-width: 250px;
    margin: 0 15px 20px 0;
    float: left;
    box-sizing: border-box;
    width: calc(25% - 12px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Pseudo-elemento para banda superior de color */
.nosolorol-product-widget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    z-index: 1;
}



/* Pseudo-elemento decorativo en la esquina */
.nosolorol-product-widget::after {
    content: '';
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    opacity: 0.3;
    z-index: 1;
}

.nosolorol-product-widget:nth-child(4n+1)::after {
    background: #667eea;
}

.nosolorol-product-widget:nth-child(4n+2)::after {
    background: #f093fb;
}

.nosolorol-product-widget:nth-child(4n+3)::after {
    background: #4facfe;
}

.nosolorol-product-widget:nth-child(4n+4)::after {
    background: #43e97b;
}

/* Efecto hover */
.nosolorol-product-widget:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.nosolorol-product-widget:hover::before {
    height: 6px;
}

.nosolorol-product-widget:hover::after {
    opacity: 0.6;
    width: 8px;
    height: 8px;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .nosolorol-product-widget {
        width: calc(33.333% - 10px);
        margin: 0 10px 20px 0;
    }
}

@media (max-width: 768px) {
    .nosolorol-product-widget {
        width: calc(50% - 8px);
        margin: 0 8px 20px 0;
    }
}

@media (max-width: 480px) {
    .nosolorol-product-widget {
        width: 100%;
        max-width: none;
        margin: 0 0 20px 0;
        float: none;
    }
}

/* Asegurar que el contenedor del widget ocupe toda la altura disponible */
.nosolorol-product-widget .product-widget-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 15px;
    position: relative;
    z-index: 2;
    font-size: initial;
    line-height: initial;
}

.nosolorol-product-widget .product-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.nosolorol-product-widget .product-actions {
    margin-top: auto;
}

.nosolorol-product-widget img {width: 100%;margin-bottom: 15px;}

.nosolorol-product-widget .product-description {display: none;}
.nosolorol-product-widget .product-actions .btn-primary {width: 100%;}
.nosolorol-product-widget .product-price-block {text-align: center;margin-bottom: 10px;}
.nosolorol-product-widget .product-price-block .product-price {
    font-size: 1.5rem;
}

.nosolorol-product-widget h3.product-name {
    text-align: center;
    line-height: 1.5rem;
    color: #333;
    margin-bottom: 10px;
}

/* Error states */
.shortcode-error {
    background: #f8d7da;
    color: #721c24;
    padding: 10px 15px;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin: 10px 0;
}
