﻿@keyframes fadein {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* 1. Stili Base del Pulsante */
.animated-cart-button {
    /* Stili del testo e forma */
    padding: 12px 25px;
    border: none;
    border-radius: 50px; /* Bordo arrotondato */
    color: white;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    overflow: hidden; /* Nasconde lo sfondo animato in eccesso */
    position: relative;
    z-index: 1; /* Assicura che il testo sia sopra l'animazione */
    display: flex;
    align-items: center;
    gap: 8px; /* Spazio tra icona e testo */
    transition: transform 0.2s ease; /* Transizione per effetto hover/click */
    margin: auto;
}

    /* 2. Sfondo Animato (Il "trucco" principale) */
    .animated-cart-button::before {
        content: "";
        position: absolute;
        top: -50px;
        left: -50px;
        right: -50px;
        bottom: -50px;
        /* Crea un gradiente con colori vivaci */
        background: linear-gradient(45deg, #FF512F, #DD2476, #FF512F);
        background-size: 300% 300%; /* Ingandisce lo sfondo per l'animazione */
        z-index: -1; /* Posiziona lo sfondo sotto il testo */
        transition: opacity 0.3s ease;
        /* Applica l'animazione */
        animation: moveGradient 4s ease infinite alternate;
    }

/* Animazione del gradiente */
@keyframes moveGradient {
    0% {
        background-position: 0% 50%; /* Inizia a sinistra */
    }

    100% {
        background-position: 100% 50%; /* Finisce a destra */
    }
}

/* 3. Stili Icona SVG */
.cart-icon {
    width: 20px;
    height: 20px;
    stroke: white; /* Colore del contorno dell'icona */
    fill: none;
}

/* 4. Effetto Hover e Attivo */
.animated-cart-button:hover {
    transform: translateY(-2px); /* Sposta leggermente in su */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); /* Aggiunge ombra */
}

.animated-cart-button:active {
    transform: translateY(0); /* Torna al posto, effetto "premere" */
}

.animated-cart-button-positive:before {
    background: linear-gradient(45deg, #76f742, #21a40c, #a1fb47);
}

.carrello {
    min-width: 300px;
    line-height: 1.5;
}

#totale {
font-weight:bold;
}

.ele_row {
    box-shadow: 0px 0px 10px 0px rgba(50, 50, 50, 0.75);
    background-color: rgba(255, 255, 255,1);
    border-radius: 5px;
    cursor: default;
    width: 100%;
    height: 130px;
    margin-top: 5px;
    animation: fadein 1s;
    text-align: left;
    display: flex;
    gap: 5px;
    padding-left:5px;
    padding-top:5px;
}


    .bnt_quantita {
        font-size: 16px;
        color: black;
        border-radius: 5px;
        background: linear-gradient(to bottom, gainsboro 10%,#dbdbdb 50%,#d1d1d1 55%,#e4e4e4 100%);
        transition: all 0.5s;
        text-align: center;
        width: 40px;
        height: 40px;
    }

        .bnt_quantita:hover {
            opacity: 1;
            color: orangered;
            background-color: paleturquoise;
        }
.bnt_azioni {
  padding:5px;
  margin-top:10px;
  font-size:16px;
}


.contenitore_quantita {
    width: 40px;
    height: 120px;
    background-color: dimgray;
    border-radius: 5px;
    gap: 0px;
    display: inline-grid;
    position:relative;
 
}

.quantita {
    display: flex;
    justify-content: center; /* centro orizzontale */
    align-items: center; /* centro verticale */
    color: white;
    font-weight: bold;
    height: 40px;
    font-size: 1em;
}





.contenitore_sinistro {
    overflow: hidden;
    width: 80px;
    height: 120px;
    border-radius: 5px;
    border: 1px solid black;
    position:relative;
}

    .contenitore_sinistro > img {
        position: relative;
        width: 128px;
    }


.prezzo {
    font-weight: bold;
    font-size: 1em;
    text-align: center;
    position: absolute;
    background: rgba(255, 255, 255,0.8);
    color: red;
    width: 80px;
    bottom: 0px;
    display: flex;
    justify-content: center; /* centro orizzontale */
    align-items: center; /* centro verticale */
}


.contenitore_destro {
    height: 120px;
    width: calc(100% - 120px);
}



.titolo {
    height: 22px;
    text-align: center;
    font-weight: bold;
    line-height: normal;
    overflow: hidden;
}



.descrizione {
    text-align: center;
    font-style: italic;
    font-weight: normal;
    height: 53px;
}

.contenitore_tools {
    width: 100%;
}

.contenitore_elimina {
    position: relative;
    float: left;
}








.bnt {
    padding: 5px;
    border-radius: 5px;
    margin: 10px;
    display: inline-block;
    min-width: 64px;
    color: dimgrey;
    border-bottom: outset;
    border-width: 0.25px;
    cursor: pointer;
    background-color: rgba(255, 255, 255,0.9);
    min-height: 50px;
    text-align: center;
    transition: background-color 0.5s;
}

    .bnt:hover {
        color: orangered;
        background-color: white;
    }

.bnt_label {
    display: table-cell;
    transition: color 1s;
    font-weight: bolder;
    font-size: 16px;
    text-shadow: 0 0 1px;
    text-align: center;
    vertical-align: middle;
    padding-left: 5px;
}

.bnt_icona {
    display: table-cell;
    max-width: 48px;
}

.bnt_img {
    width: 100%;
}

.bnt_acquista {
    color: black;
    cursor: pointer;
    border-radius: 5px;
    border: outset;
    border-width: 0.25px;
    background: linear-gradient(to bottom, gainsboro 10%,#dbdbdb 50%,#d1d1d1 55%,#e4e4e4 100%);
    min-height: 32px;
    opacity: 0.7;
    transition: opacity 0.5s;
    font-weight: bold;
    user-select: none;
}

    .bnt_acquista:hover {
        opacity: 1;
        color: orangered;
    }

.bnt_acquista_img {
    -webkit-flex-direction: column;
    display: flex;
}

.bnt_acquista_label {
    display: flex;
    -webkit-flex-direction: column;
    width: 70%;
    float: left;
    position: relative;
    top: 7px;
    transition: color 1s;
}



.pay_bnt {
    margin: auto;
    position: relative;
    top: 10px;
    background-color: forestgreen;
    width: 80%;
    text-align: center;
    font-size: medium;
    color: white;
    font-weight: bold;
    border-radius: 5px;
    padding: 5px;
}

    .pay_bnt:hover {
        background-color: darkgreen;
    }
