/* ------------------------------------------------------------------------- */
/* 1. RESET E STILI BASE */
/* ------------------------------------------------------------------------- */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    color: #333;
    line-height: 1.6;
    background-color: #f8f8f8;
    padding-bottom: 80px;
}

main {
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
}

h2, h3, h4 {
    font-family: 'Bebas Neue', cursive;
    color: #c0392b; /* Rosso "burger" */
    margin-top: 20px;
    margin-bottom: 10px;
}

h2 {
    font-size: 2.5em;
    border-bottom: 3px solid #e74c3c;
    padding-bottom: 5px;
}

h3 {
    font-size: 1.8em;
    color: #2c3e50;
}

h4 {
    font-size: 1.2em;
    margin-top: 5px;
    margin-bottom: 5px;
    color: #333;
    /* Impedisce che il titolo del prodotto vada a capo al centro (tranne per gli allergeni) */
    white-space: nowrap; 
    overflow: hidden;
    text-overflow: ellipsis; 
}

p {
    margin-bottom: 10px;
    /* Giustifica il testo per un aspetto più pulito e ordinato */
    text-align: justify; 
}

ul {
    list-style: none;
}

/* ------------------------------------------------------------------------- */
/* 2. HEADER E LOGO */
/* ------------------------------------------------------------------------- */

header {
    text-align: center;
    padding: 20px 0 10px;
    background-color: #ffffff;
    border-bottom: 1px solid #eee;
}

.logo {
    max-width: 200px;
    height: auto;
}

/* ------------------------------------------------------------------------- */
/* 3. NAVIGAZIONE (Mobile First) */
/* ------------------------------------------------------------------------- */

nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: #6c757d; /* MODIFICATO: Grigio più scuro */
    color: white;
}

.nav-toggle {
    display: flex;
    justify-content: flex-end; /* Sposta il blocco a destra */
    gap: 15px; /* Spazio tra il testo e le barrette */
    align-items: center;
    padding: 15px 20px;
    cursor: pointer;
}
.menu-label {
    font-family: 'Bebas Neue', cursive;
    font-size: 1.5em;
    letter-spacing: 1px;
}

.bars {
    display: block;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 4px 0;
    transition: 0.4s;
}

.nav-links {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.nav-links.open {
    max-height: 500px;
}

.nav-links li a {
    display: block;
    padding: 10px 20px;
    text-decoration: none;
    color: white;
    border-top: 1px solid #5a6268; /* Aggiornato il bordo per il nuovo sfondo */
    transition: background-color 0.2s;
}

.nav-links li a:hover {
    background-color: #495057; /* Sfondo scuro al passaggio del mouse */
}

/* ------------------------------------------------------------------------- */
/* 4. SEZIONI MENU E DETTAGLI PRODOTTI */
/* ------------------------------------------------------------------------- */

.menu-section {
    padding: 20px 0;
    border-bottom: 1px dashed #ccc;
}

.menu-section:last-of-type {
    border-bottom: none;
}

.menu-section ul li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
    padding-right: 5px;
    position: relative;
}

.dettagli-prodotto {
    flex-grow: 1;
    min-width: 0;
    margin-right: 10px;
}

/* Rimuove la giustificazione per i paragrafi brevi, come le descrizioni */
.dettagli-prodotto p {
    text-align: left; 
    margin-bottom: 5px;
}

.prezzo, .prezzo-incluso {
    flex-shrink: 0;
    margin-left: auto; /* Spinge il prezzo completamente a destra */
    font-family: 'Bebas Neue', cursive;
    font-size: 1.5em;
    color: #c0392b;
    align-self: flex-start;
}

.prezzo-incluso {
    font-size: 1.2em;
    color: #27ae60; 
}

/* Stile per gli allergeni posizionati sotto la descrizione */
.allergeni {
    font-size: 0.8em !important;
    color: #95a5a6;
    margin-top: 5px !important;
    margin-bottom: 0 !important;
    font-style: italic;
    text-align: left !important; 
}

.nota-patatine {
    font-style: italic;
    color: #2c3e50;
    padding: 5px;
    border-left: 3px solid #e67e22;
    margin-bottom: 20px;
    text-align: left !important;
}

/* ------------------------------------------------------------------------- */
/* 5. STILI IMMAGINI */
/* ------------------------------------------------------------------------- */

.burger-img {
    width: 100px; 
    height: 100px;
    object-fit: cover; 
    flex-shrink: 0; 
    margin-right: 15px;
    border-radius: 5px; 
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ------------------------------------------------------------------------- */
/* 6. FISARMONICA (DETTAGLI PER BIBITE/VINI) */
/* ------------------------------------------------------------------------- */

.menu-section details {
    margin-bottom: 5px;
    border-bottom: 1px solid #eee;
}
.menu-section summary {
    display: block; 
    padding: 10px 0;
    cursor: pointer;
    font-size: 1.2em; 
    font-family: 'Bebas Neue', cursive;
    color: #2c3e50;
    list-style: none; 
    position: relative;
    transition: color 0.2s;
}
.menu-section summary:hover {
    color: #c0392b;
}

.menu-section summary::after {
    content: '►'; 
    position: absolute;
    right: 5px;
    font-size: 0.8em;
    transition: transform 0.2s;
    color: #c0392b;
}

.menu-section details[open] > summary::after {
    transform: rotate(90deg);
}

.category-content ul {
    padding: 10px 0 10px 10px;
    list-style: none;
}
.category-content li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 5px;
    padding-right: 5px; 
}
.category-content li h4 {
    margin: 0;
    font-size: 1em;
    font-weight: 400; 
}

.category-sub summary {
    font-size: 1.1em;
    font-weight: 700;
    padding-left: 10px;
    border-top: 1px dashed #ddd;
    color: #333;
}
.category-sub .category-content {
    padding-left: 10px;
}


/* ------------------------------------------------------------------------- */
/* 7. FOOTER (Centrato, NON Fisso) */
/* ------------------------------------------------------------------------- */

footer {
    width: 100%;
    background-color: #6c757d; /* MODIFICATO: Grigio più scuro */
    color: white;
    text-align: center; 
    padding: 15px 10px;
    font-size: 0.9em;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
    margin-top: 40px; 
}

footer p {
    margin: 3px 0;
    text-align: center; 
}

.social-links {
    margin-top: 10px;
    display: flex;
    justify-content: center; 
    gap: 20px; 
}

.social-links a {
    color: white;
    text-decoration: none;
    font-size: 1.2em;
    transition: color 0.2s;
}

.social-links a:hover {
    color: #e74c3c;
}

/* ------------------------------------------------------------------------- */
/* 8. PAGINA ALLERGENI (ULTIMA REVISIONE PER LEGGIBILITÀ) */
/* ------------------------------------------------------------------------- */

#allergeni ul li {
    /* Mantiene la visualizzazione a blocco */
    display: block; 
    margin-bottom: 20px;
    padding-right: 0;
    border-bottom: none; 
    padding-bottom: 0;
}

#allergeni h4 {
    /* Stile per il NUMERO e il NOME dell'allergene */
    white-space: normal; 
    text-overflow: clip; 
    overflow: visible;
    color: #c0392b; /* Rosso "burger" per il titolo */
    background-color: #f0f0f0; 
    padding: 5px 10px;
    border-left: 5px solid #e74c3c; 
    margin-top: 0;
    margin-bottom: 5px; 
    font-size: 1.2em;
    font-weight: 700;
    text-align: left; 
}

#allergeni p {
    /* Stile per la DESCRIZIONE dell'allergene */
    text-align: left; 
    font-size: 0.95em;
    color: #333;
    margin: 0 0 10px 15px; 
    line-height: 1.4;
    padding: 0 5px;
}

/* ------------------------------------------------------------------------- */
/* 9. MEDIA QUERIES (OTTIMIZZAZIONE DESKTOP/TABLET) */
/* ------------------------------------------------------------------------- */

@media (min-width: 768px) {
    /* Navigazione su desktop: sempre visibile */
    .nav-toggle {
        display: none;
    }

    .nav-links {
        max-height: none !important;
        overflow: visible;
        display: flex; 
        justify-content: center;
        padding: 0 20px;
        border-top: none; 
    }
    
    .nav-links li {
        display: inline-block; 
    }

    .nav-links li a {
        border-top: none;
        padding: 15px 20px;
    }

    /* Centra il contenuto del menu */
    .menu-section ul {
        padding: 0 20px;
    }
}


/* ------------------------------------------------------------------------- */
/* 10. AVVISO COOKIE (FISSO in basso) */
/* ------------------------------------------------------------------------- */

.cookie-banner {
    position: fixed; /* Mantiene il banner fisso */
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #333; 
    color: white;
    padding: 15px 20px;
    text-align: center;
    z-index: 10000; /* Priorità massima */
    font-size: 0.9em;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
}

.cookie-banner p {
    margin: 0;
    text-align: center; 
    flex-grow: 1;
}

#cookie-accept-btn {
    background-color: #e74c3c; 
    color: white;
    border: none;
    padding: 8px 15px;
    cursor: pointer;
    border-radius: 4px;
    font-weight: bold;
    transition: background-color 0.2s;
    flex-shrink: 0;
}

#cookie-accept-btn:hover {
    background-color: #c0392b;
}

@media (max-width: 600px) {
    .cookie-banner {
        flex-direction: column;
        gap: 10px;
    }
    .cookie-banner p {
        padding-bottom: 5px;
    }
}