.ml-afiliados-product-container {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
}

.ml-afiliados-product-image img {
    width: 240px;
    height: 300px;
    object-fit: cover;
}

.ml-afiliados-product-info {
    flex: 1;
}

.ml-afiliados-product-title {
    margin-top: 0;
    margin-bottom: 10px;
}

.ml-afiliados-product-description {
    margin-bottom: 10px;
}

.ml-afiliados-product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    border-top: 1px solid #eaeaea;
    padding-top: 10px;
}

.ml-afiliados-product-price {
    margin: 0;
    font-weight: bold;
}

.ml-afiliados-product-button {
    display: inline-block;
    background-color: #009EE3; 
    color: #fff !important; /* Forzamos que el texto sea blanco en todo momento */
    padding: 12px 24px; /* Más espacio interno para que el texto no esté pegado */
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.ml-afiliados-product-button:hover {
    background-color: #0073aa; /* Se mantiene el texto blanco al pasar el cursor */
    color: #fff;
}

/* Responsive: en pantallas pequeñas, se apilan la imagen y la info */
@media screen and (max-width: 768px) {
    .ml-afiliados-product-container {
        flex-direction: column;
        align-items: center;
    }
    .ml-afiliados-product-image {
        margin-right: 0;
        margin-bottom: 15px;
        flex: 0 0 auto;
    margin-right: 30px;
    }
    .ml-afiliados-product-footer {
        flex-direction: column;
        gap: 10px;
    }
}


.ml-afiliados-template-list .ml-afiliados-product {
    border: 1px solid #ccc;
    padding: 10px;
    margin-bottom: 15px;
}

/* Contenedor en grid con un máximo de 4 columnas */
.ml-afiliados-template-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    max-width: 1020px; /* 4 columnas de 240px + 3 gaps de 20px */
    margin: 0 auto;
}

/* Vista en pantallas pequeñas: 1 sola columna */
@media (max-width: 768px) {
    .ml-afiliados-template-list {
        grid-template-columns: 1fr;
        max-width: none;
    }
}


.ml-afiliados-template-comparison .ml-afiliados-product-comparison {
    text-align: center;
    border-radius: 4px;
}
