/* Container principale per i prodotti upsell */
.woobedding-upsell-products {
    width: 100%;
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
    font-family: 'Montserrat', sans-serif;
}

/* Ogni blocco prodotto upsell in layout orizzontale */
.upsell-product {
    display: flex;
    align-items: center;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s, box-shadow 0.3s;
    animation: fadeIn 0.4s ease forwards;
}

/* Colonna sinistra: Immagine */
.upsell-left {
    flex: 0 0 auto;
    margin-right: 20px;
}
.upsell-image-wrapper {
    width: 120px;
    height: 120px;
    overflow: hidden;
    border-radius: 6px;
}
.upsell-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.upsell-product:hover .upsell-image {
    transform: scale(1.03);
}

/* Colonna centrale: Dettagli (Titolo, Prezzo, Varianti) */
.upsell-middle {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.upsell-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px;
}
.upsell-price {
    font-size: 16px;
    font-weight: 500;
    color: #00448A;
    margin-bottom: 8px;
}
.upsell-variations {
    width: 100%;
    max-width: 250px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f9f9f9;
}

/* Colonna destra: Pulsante "Aggiungi" */
.upsell-right {
    flex: 0 0 auto;
    margin-left: 20px;
}
.button.aggiungi,
.button.add_to_cart_button.aggiungi {
    background-color: #00448A;
    color: #fff;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 6px;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 0.5px;
    border: none;
    transition: background-color 0.3s, transform 0.2s;
    cursor: pointer;
    width: 100%;
    max-width: 250px;
    margin: 0 auto;
}
.button.aggiungi:hover,
.button.add_to_cart_button.aggiungi:hover {
    background-color: #003366;
    transform: translateY(-1px);
}

/* Animazione fade in */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsivo per dispositivi mobili */
@media (max-width: 768px) {
    /* Container principale - rimuovi margini laterali */
    .woobedding-upsell-products {
        margin: 10px 0;
        gap: 15px;
        padding: 0;
    }

    /* Box prodotto - espandi a tutta larghezza */
    .upsell-product {
        flex-direction: column;
        align-items: center;
        margin: 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
        padding: 15px 10px;
        width: 100%;
        box-sizing: border-box;
    }

    /* Immagine */
    .upsell-left {
        margin-right: 0;
        margin-bottom: 12px;
    }

    .upsell-image-wrapper {
        width: 100px;
        height: 100px;
    }

    /* Contenuto centrale */
    .upsell-middle {
        align-items: center;
        text-align: center;
        width: 100%;
        padding: 0 10px;
    }

    .upsell-title {
        font-size: 16px;
        margin-bottom: 6px;
    }

    .upsell-price {
        font-size: 15px;
        margin-bottom: 10px;
    }

    .upsell-variations {
        max-width: 100%;
        width: 100%;
    }

    /* Pulsante */
    .upsell-right {
        margin-left: 0;
        margin-top: 12px;
        width: 100%;
        padding: 0 10px;
    }

    .button.aggiungi,
    .button.add_to_cart_button.aggiungi {
        max-width: 100%;
        width: 100%;
        padding: 12px 20px;
        font-size: 13px;
    }
}

/* Smartphone piccoli */
@media (max-width: 480px) {
    .woobedding-upsell-products {
        gap: 12px;
    }

    .upsell-product {
        padding: 12px 8px;
    }

    .upsell-image-wrapper {
        width: 80px;
        height: 80px;
    }

    .upsell-title {
        font-size: 15px;
    }

    .upsell-price {
        font-size: 14px;
    }

    .upsell-middle,
    .upsell-right {
        padding: 0 8px;
    }

    .button.aggiungi,
    .button.add_to_cart_button.aggiungi {
        padding: 10px 15px;
        font-size: 12px;
    }
}