﻿#overlayRisultati {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 9999;
    display: none;
    padding: 0;
    overflow: hidden; /* ❗️Blocchiamo lo scroll qui */
}

.contenitoreOverlay {
    height: 100%;
    display: flex;
    flex-direction: column;
}

#TxtRicercaOverlay {
    width: 100%;
    padding: 15px;
    font-size: 20px;
    margin-bottom: 30px;
    border: 2px solid #ccc;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

#risultatiRicerca .prodotto {
    float: left;
    width: 23%;
    margin: 1%;
    text-align: center;
}

    #risultatiRicerca .prodotto img {
        width: 100%;
        max-height: 150px;
        object-fit: contain;
    }

.prodotto {
    float: left;
    width: 23%;
    margin: 1%;
    padding: 10px;
    background: #f1f1f1;
    text-align: center;
}

    .prodotto img {
        width: 100px;
        height: 100px;
        object-fit: contain;
    }

    .prodotto h4 {
        margin: 10px 0 5px;
        font-size: 16px;
    }

    .prodotto p {
        color: green;
        font-weight: bold;
    }

.clearfix::after {
    content: "";
    clear: both;
    display: table;
}

#btnChiudiOverlay {
    position: absolute;
    top: 5px;
    right: 20px;
    font-size: 30px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    z-index: 10001;
    transition: color 0.3s ease;
}

    #btnChiudiOverlay:hover {
        color: #333;
    }

.boxPrezzo {
    background-color: #000000; /* verde */
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: bold;
    display: inline-block;
    margin-top: 10px;
    font-size: 16px;
}

.layoutColonne {
    height: calc(100vh - 130px); /* Altezza dinamica togliendo header + padding */
    overflow-y: hidden;
    position: relative;
}

.layoutColonne::after {
    content: "";
    display: table;
    clear: both;
}

#colonnaCategorie {
    overflow-y: auto;
    max-height: 100%;
}

    #colonnaCategorie ul {
        list-style: none;
        padding: 0;
    }

    #colonnaCategorie li {
        background: #eee;
        padding: 8px 12px;
        margin-bottom: 5px;
        cursor: pointer;
        border-radius: 5px;
        transition: background 0.2s ease;
    }

        #colonnaCategorie li:hover,
        #colonnaCategorie li.attiva {
            background: #333333;
            color: white;
        }

#colonnaProdotti {
    overflow-y: auto;
    height: calc(100vh - 130px); /* o altra altezza calcolata correttamente */
    padding-bottom: 80px;
}


#colonnaBrand {
    width: 20%;
    float: left;
    margin-right: 20px;
}

    #colonnaBrand ul {
        list-style: none;
        padding: 0;
    }

    #colonnaBrand li {
        background: #eee;
        padding: 8px 12px;
        margin-bottom: 5px;
        cursor: pointer;
        border-radius: 5px;
        transition: background 0.2s ease;
    }

        #colonnaBrand li:hover,
        #colonnaBrand li.attiva {
            background: #000000;
            color: white;
        }

#Prodotto:hover {
    background-color: #f5f5f5;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.boxFiltriScroll {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 10px;
    border-right: 1px solid #ccc;
}

    /* Scrollbar personalizzata (opzionale, solo per WebKit) */
    .boxFiltriScroll::-webkit-scrollbar {
        width: 6px;
    }

    .boxFiltriScroll::-webkit-scrollbar-track {
        background: #f1f1f1;
    }

    .boxFiltriScroll::-webkit-scrollbar-thumb {
        background: #aaa;
        border-radius: 3px;
    }

        .boxFiltriScroll::-webkit-scrollbar-thumb:hover {
            background: #888;
        }

.headerOverlay {
    position: sticky;
    top: 0;
    background: white;
    z-index: 1000;
    padding: 20px 0;
    border-bottom: 1px solid #ddd;
}

#Prodotto {
    min-height: 320px;
    max-height: 320px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
    padding: 10px;
    border-bottom: 1px solid #ddd;
    border-right: 1px solid #ddd;
}

    #Prodotto .Corpo100:nth-child(2) {
        font-size: 15px;
        line-height: 1.2em;
        max-height: 3.6em; /* massimo 3 righe */
        overflow: hidden;
        text-overflow: ellipsis;
    }

.spinner {
    border: 6px solid #f3f3f3;
    border-top: 6px solid #3d55a4;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 0.8s linear infinite;
    margin: 30px auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

