/* ================== SIDEBAR DIATEST – MENU IDENTICO A ELENCO ================== */

/* Container principale sidebar */
#diatest-sidebar {
    flex: 0 0 30%; 
    width: auto; 
    background-color: #ffffff; 
    padding: 10px;
    box-sizing: border-box;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    border-radius: 8px; 
    box-shadow: none; /* RIMOSSA OMBRA ALLA BASE */
    margin-top: 15px; 
	}

/* ================== Lista Prodotto – Menu a scomparsa ================== */

/* Wrapper per il contenuto dell'elenco */
#diatest-sidebar .collapsible-wrapper {
    background-color: #fff; 
    border-radius: 8px; 
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); 
}

/* Ombra quando il menu è aperto */
#diatest-sidebar .collapsible.active + .content {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2); 
}

/* Bottone principale che espande/collassa */
#diatest-sidebar .collapsible {
    background-color: #f1f1f1;
    color: #003366;
    cursor: pointer;
    padding: 10px 15px;
    width: 100%;
    text-align: left;
    border: none;
    font-size: 16px;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
	border: 1px solid #ccc;
}

#diatest-sidebar .collapsible:after {
    content: "\25BC"; 
    font-size: 12px;
}

#diatest-sidebar .collapsible.active:after {
    content: "\25B2"; 
}

/* Contenuto nascosto */
#diatest-sidebar .content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease-out;
    padding: 0 50px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); 
}

/* Aggiungi ombra anche quando il menu è aperto, sia su mobile che desktop */
#diatest-sidebar .content {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2); 
}

/* Lista dei prodotti */
#diatest-sidebar .sidebar-product-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Elementi della lista */
#diatest-sidebar .sidebar-product-list li {
    text-align: left;
    padding: 4px 8px;
    border-radius: 4px;

}

#diatest-sidebar .sidebar-product-list li:nth-child(odd) {
    background-color: #e6f0ff;
}

#diatest-sidebar .sidebar-product-list li:nth-child(even) {
    background-color: #ffffff;
}

#diatest-sidebar .sidebar-product-list li a {
    display: flex;
    align-items: center;
    color: black;
    text-decoration: none; 
}

/* ICONA BASE (vuota) */
#diatest-sidebar .icon-products {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 6px;
    background-size: contain;
    background-repeat: no-repeat;
    flex-shrink: 0;
}

/* Icona solo se presente */
#diatest-sidebar .icon-products.has-icon {
    background-image: url('https://www.grgsas.net/img/icona-diramazione.png');
}

/* TESTO DEL PRODOTTO */
#diatest-sidebar .descrizione-prodotto {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ================== Responsive: Su mobile, sidebar a 100% ================== */
@media (max-width: 768px) {
    #diatest-sidebar {
        flex: 0 0 100%; 
        width: 100%;
        margin: 0;      
        padding: 0;     
        margin-top: 15px;  
        box-shadow: none; /* RIMOSSA OMBRA ALLA BASE MOBILE */
    }

    #diatest-sidebar .collapsible-wrapper {
        width: 100%;
        padding: 0;  
    }

    #diatest-sidebar .sidebar-product-list {
        width: 100%;  
        padding: 0;   
    }

    #diatest-sidebar .sidebar-product-list li a {
        text-decoration: none; 
    }

    #diatest-sidebar .collapsible.active + .content {
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2); 
    }
}

.icon-products {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 6px;
    background-image: url('https://www.grgsas.net/img/icona-diramazione.png'); 
    background-size: contain;
    background-repeat: no-repeat;
}

@media (max-width: 768px) {
    #diatest-sidebar {
        position: relative;
        z-index: 2;
        margin-bottom: 20px; 
        box-shadow: none; /* RIMOSSA OMBRA ALLA BASE MOBILE */
    }

    #diatest-main-content {
        position: relative;
        z-index: 1;
    }
}

/* Padding a sinistra del contenuto centrale come richiesto */
#diatest-main-content {
    padding-left: 40px;
}