/* Estilos del selector de ordenamiento */
.weex-sorting-wrapper {
    margin-bottom: 20px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.weex-sorting-wrapper label {
    font-weight: 600;
    margin: 0;
}

.weex-sorting-wrapper select {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    font-size: 14px;
    cursor: pointer;
}

.weex-sorting-wrapper select:focus {
    outline: none;
    border-color: #0073aa;
}

/* Contenedor de productos */
.weex-products-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.weex-products-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.weex-product-row {
    display: flex;
    gap: 20px;
    padding: 20px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 5px;
}

.weex-product-image {
    flex-shrink: 0;
    position: relative;
    width: 150px;
}

/* Badge de oferta circular - Amarillo */
.weex-sale-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #FFC107;
    color: #333;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 13px;
    font-weight: bold;
    z-index: 1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    animation: pulse 2s infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.2;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Tamaños de imagen */
.weex-product-image img {
    width: 100%;
    height: auto;
    display: block;
}

.weex-product-content {
    flex: 1;
}

.weex-product-content h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

.weex-product-content h3 a {
    text-decoration: none;
    color: #333;
}

.weex-product-content h3 a:hover {
    color: #0073aa;
}

.weex-product-content .isbn,
.weex-product-content .vendor {
    color: #666;
    font-size: 14px;
    margin: 5px 0;
}

.weex-product-content .product-excerpt {
    margin: 10px 0;
    color: #555;
    font-size: 14px;
    line-height: 1.6;
}

.weex-product-content .price {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-top: 10px;
}

/* Estilos para precios en oferta */
.weex-product-content .price-wrapper {
    margin-top: 10px;
}

.weex-product-content .price.sale-price {
    display: flex;
    align-items: center;
    gap: 10px;
}

.weex-product-content .regular-price {
    color: #999;
    font-size: 16px;
    font-weight: normal;
    text-decoration: line-through;
}

.weex-product-content .sale-price-amount {
    color: #333;
    font-size: 22px;
    font-weight: bold;
    text-decoration: none;
}

/* Estilos para el botón agregar al carrito - Naranja */
.weex-product-content .add-to-cart-wrapper {
    margin-top: 15px;
}

.weex-product-content .add-to-cart-wrapper .button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #FF6B35;
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
}

.weex-product-content .add-to-cart-wrapper .button:hover {
    background-color: #E85D2C;
    color: #ffffff;
}

.weex-product-content .add-to-cart-wrapper .button.loading {
    opacity: 0.6;
}

.weex-product-content .add-to-cart-wrapper .added_to_cart {
    display: inline-block;
    margin-left: 10px;
    padding: 5px 10px;
    background-color: #5cb85c;
    color: white;
    text-decoration: none;
    border-radius: 3px;
    font-size: 12px;
}

/* ===== ESTILOS RESPONSIVOS PARA MÓVILES ===== */
@media (max-width: 767px) {
    /* Ajustar el selector de ordenamiento */
    .weex-sorting-wrapper {
        padding: 10px;
        gap: 10px;
        flex-wrap: wrap;
    }
    
    .weex-sorting-wrapper label {
        font-size: 14px;
    }
    
    .weex-sorting-wrapper select {
        font-size: 13px;
        padding: 6px 10px;
        flex: 1;
        min-width: 150px;
    }
    
    /* Contenedor de productos más compacto */
    .weex-products-container {
        gap: 15px;
    }
    
    .weex-products-list {
        gap: 15px;
    }
    
    /* Fila de producto más compacta */
    .weex-product-row {
        padding: 12px;
        gap: 12px;
    }
    
    /* Imagen más pequeña y fija */
    .weex-product-image {
        width: 80px;
        min-width: 80px;
        max-width: 80px;
    }
    
    /* Badge de oferta más pequeño */
    .weex-sale-badge {
        width: 36px;
        height: 36px;
        font-size: 11px;
        top: 5px;
        right: 5px;
        box-shadow: 0 1px 2px rgba(0,0,0,0.2);
    }
    
    /* Ajustar contenido del producto */
    .weex-product-content {
        overflow: hidden;
    }
    
    /* Título más pequeño */
    .weex-product-content h3 {
        font-size: 15px;
        margin-bottom: 6px;
        line-height: 1.3;
    }
    
    /* Ocultar ISBN y vendedor en móviles */
    .weex-product-content .isbn,
    .weex-product-content .vendor {
        display: none;
    }
    
    /* Descripción más compacta */
    .weex-product-content .product-excerpt {
        font-size: 13px;
        margin: 6px 0;
        line-height: 1.4;
    }
    
    /* Ajustar wrapper de precios */
    .weex-product-content .price-wrapper {
        margin-top: 8px;
    }
    
    /* Precio regular más pequeño */
    .weex-product-content .price {
        font-size: 16px;
    }
    
    /* Precios en oferta más compactos */
    .weex-product-content .price.sale-price {
        gap: 6px;
        flex-wrap: wrap;
    }
    
    .weex-product-content .regular-price {
        font-size: 14px;
    }
    
    .weex-product-content .sale-price-amount {
        font-size: 18px;
    }
    
    .weex-product-content .price-percentage {
        font-size: 12px;
    }
    
    /* Botón agregar al carrito más compacto */
    .weex-product-content .add-to-cart-wrapper {
        margin-top: 10px;
    }
    
    .weex-product-content .add-to-cart-wrapper .button {
        padding: 8px 16px;
        font-size: 13px;
        width: 100%;
        text-align: center;
    }
    
    .weex-product-content .add-to-cart-wrapper .added_to_cart {
        font-size: 11px;
        padding: 4px 8px;
        margin-left: 5px;
    }
}