/**
 * Product Card Styles
 * Estilos para tarjetas de productos individuales
 */

.unicomer-product-card .product-card {
    display: flex;
    padding: 20px;
    flex-direction: column;
    height: 100%;
    min-height: 500px;
}

.product-image {
    flex: 0 0 45%;
    max-width: 500px;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    max-height: 250px;
}

.product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.scraper-product-name {
    font-size: 15px;
    font-weight: 400;
    color: #000000;
    font-family: 'Encode Sans', sans-serif;
    margin: 0;
    line-height: 1.3;
    /* Limitar a 3 líneas máximo */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 58px; /* 15px * 1.3 * 3 líneas ≈ 58px */
    max-height: 58px;
}

.product-pricing {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
}

.price-main {
    display: flex;
    align-items: center;
    gap: 15px;
}

.price-current {
    font-size: 18px;
    font-weight: 700;
    font-family: 'Encode Sans', sans-serif;
    color: #002CB6;
}

.discount-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #FFD900;
    color: #000000;
    font-weight: 700;
    font-size: 13px;
    font-family: 'Encode Sans', sans-serif;
    padding: 4px 16px;
    border-radius: 8px;
    min-width: 70px;
}

.price-original {
    font-size: 15px;
    font-weight: 500;
    font-family: 'Encode Sans', sans-serif;
    color: #6b7280;
}

.price-original span {
    text-decoration: line-through;
}

.product-cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #FFD900;
    color: #000000;
    font-size: 18px;
    font-weight: 700;
    padding: 8px 40px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 300px;
}

.product-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(251, 191, 36, 0.3);
}



/* Error state */
.product-card-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 16px;
    border-radius: 8px;
    text-align: center;
    margin: 20px 0;
}

/* Responsive */
@media (max-width: 1024px) {
    .unicomer-product-card .product-card {
        flex-direction: column;
        text-align: center;
        min-height: 450px;
    }
    
    .product-image {
        flex: 0 0 auto;
        max-width: 400px;
        min-height: 180px;
    }
    
    .product-image img {
        max-height: 220px;
    }
    
    .scraper-product-name {
        font-size: 24px;
        min-height: 93px; /* 24px * 1.3 * 3 ≈ 93px */
        max-height: 93px;
    }
    
    .price-current {
        font-size: 36px;
    }
    
    .product-cta-button {
        max-width: 100%;
    }
}

@media (max-width: 640px) {
    .unicomer-product-card {
        padding: 0 10px;
        margin: 20px auto;
    }
    
    .unicomer-product-card .product-card {
        padding: 20px;
        gap: 20px;
        min-height: 420px;
    }
    
    .product-image {
        min-height: 150px;
    }
    
    .product-image img {
        max-height: 180px;
    }
    
    .scraper-product-name {
        font-size: 20px;
        min-height: 78px; /* 20px * 1.3 * 3 ≈ 78px */
        max-height: 78px;
        text-align: start;
    }
    
    .price-current {
        font-size: 28px;
    }
    
    .discount-badge {
        font-size: 16px;
        padding: 6px 12px;
    }
    
    .price-original {
        font-size: 16px;
    }
    
    .product-cta-button {
        font-size: 18px;
        padding: 14px 30px;
    }
}
