/* === Reset e Font === */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@400;700&display=swap');

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

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0,0,0,0.4)), 
                url('../immagini/sfondo.png') no-repeat center center fixed;
    background-size: cover;
    color: #fff;
    padding-bottom: 120px;
    min-width: 320px;
}

/* === Bottoni === */
.btn-pulsante {
    display: inline-block;
    background-color: #2e7d32;
    color: white;
    padding: 10px 18px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

.btn-pulsante:hover {
    background-color: #1b5e20;
}

.promemoria-lista {
    font-size: 0.9rem;
    color: #555;
    margin: 10px 0 15px 0;
    text-align: center;
    font-style: italic;
}

/* === Header === */
.header-ristorante {
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 20px 15px;
    border-radius: 12px;
    margin: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    overflow: hidden;
}

.header-ristorante img.logo-ristorante {
    max-width: 250px;
    width: 100%;
    height: auto;
    margin: 15px auto;
    display: block;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.header-ristorante h1.nome-ristorante {
    font-size: 2rem;
    color: #2e7d32;
    margin-bottom: 5px;
    word-wrap: break-word;
}

.header-ristorante p.frase-breve {
    font-size: 1rem;
    color: #555;
    word-wrap: break-word;
}

/* === Titoli === */
h2.titolo-categoria {
    text-align: center;
    font-size: 2.2rem;
    color: #ffffff;
    font-family: 'Dancing Script', cursive;
    margin: 25px 0;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.4);
    word-wrap: break-word;
}

.titolo-divisore {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: bold;
    text-align: center;
    margin: 30px 0 15px;
    padding-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: white;
    border-bottom: 2px solid white;
}

.titolo-divisore::before,
.titolo-divisore::after {
    content: "";
    flex: 1;
    border-top: 1px dashed white;
    margin: 0 10px;
}

.titolo-divisore i {
    margin-right: 8px;
    color: white;
}

/* === Categorie === */
.categorie {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 15px;
    padding: 0 15px;
}

.categoria-card {
    min-height: 200px;
    background: #00000;
    border: 1px solid #c49900;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-radius: 12px;
}

.categoria-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.categoria-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
    border-radius: 12px 12px 0 0;
    margin: 0;
}

.categoria-card h3 {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    padding: 8px 5px;
    font-size: 1.1rem;
    text-align: center;
}

/* === Piatti === */
.piatti {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 15px;
}

.card-piatto {
    display: flex;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    flex-wrap: wrap;
}

.card-piatto:hover {
    transform: scale(1.01);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.card-piatto .immagine-piatto {
    width: 120px;
    height: 120px;
    overflow: hidden;
    margin: 0;
}

.card-piatto .immagine-piatto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    margin: 0;
    display: block;
}

.contenuto-piatto {
    flex: 1;
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 200px;
}

.contenuto-piatto h3 {
    color: #333;
    font-size: 1.2rem;
    margin-bottom: 5px;
    word-wrap: break-word;
}

.contenuto-piatto p {
    margin-right: 8px;
    line-height: 1.4;
    color: #555;
    word-wrap: break-word;
}

.prezzo-e-azione {
    display: flex;
    flex-direction: column;      /* prezzo sopra, bottone sotto */
    align-items: flex-end;       /* bottone allineato a destra */
    row-gap: 8px;
    margin-top: 10px;
}
.prezzo-e-azione .prezzo {
    color: #2e7d32;
    font-weight: 800;
    font-size: 1.25rem;   /* leggermente più grande */
}


.prezzo-e-azione .aggiungi {     /* il bottone resta a destra */
    align-self: flex-end;
}


.prezzo-e-azione .prezzo {
    color: #2e7d32;
    font-weight: bold;
    font-size: 1.1rem;
}

.prezzo-e-azione .aggiungi,
.card-piatto .aggiungi {
    background: linear-gradient(90deg, #c49900 60%, #ffe082 100%);
    color: #3b2f05;
    border: none;
    border-radius: 20px;
    padding: 8px 18px;
    font-size: 1rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(196, 153, 0, 0.15);
    cursor: pointer;
    text-align: center;
    width: auto;
    transition: background 0.3s, box-shadow 0.3s, color 0.2s;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.prezzo-e-azione .aggiungi:hover,
.card-piatto .aggiungi:hover {
    background: linear-gradient(90deg, #ffe082 10%, #c49900 90%);
    color: #231b01;
    box-shadow: 0 4px 16px rgba(196, 153, 0, 0.25);
}

/* === Azioni Menu === */
.azioni-menu {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin: 20px auto;
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    max-width: 95%;
    flex-wrap: wrap;
}

.azioni-menu a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #2e7d32;
    color: #fff !important;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 25px;
    font-size: 0.9rem;
    white-space: nowrap;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: background 0.3s ease, transform 0.2s ease;
}

.azioni-menu a:hover {
    background: #1b5e20;
    transform: scale(1.03);
}

/* === Lista Ordini === */
#lista-ordini-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#lista-ordini-pannello {
    background: #fff;
    color: #333;
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    overflow-y: auto;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.6);
    position: relative;
    margin: 0 auto;
    box-sizing: border-box;
}

#lista-ordini-pannello h3 {
    color: #2e7d32;
    text-align: center;
    margin-bottom: 10px;
}

#lista-ordini-pannello ul {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}

#lista-ordini-pannello li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f4f4f4;
    padding: 8px 10px;
    border-radius: 5px;
    margin-bottom: 5px;
}

#lista-ordini-pannello .btn-rimuovi {
    background: #d32f2f;
    color: white;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 0.85rem;
    cursor: pointer;
}

#btn-svuota-lista {
    display: block;
    width: 100%;
    background: #a6840a;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 8px;
    margin-top: 10px;
    cursor: pointer;
}

#btn-chiudi-lista {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ccc;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    font-size: 1rem;
    cursor: pointer;
}

#btn-chiudi-lista:hover {
    background: #bbb;
}

/* === Footer === */
.footer-ristorante {
    background: rgba(0, 0, 0, 0.3);
    color: #f0f0f0;
    padding: 30px 20px;
    text-align: center;
    font-size: 1rem;
    border-top: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.3);
    margin-top: 40px;
    border-radius: 8px 8px 0 0;
}

.footer-columns {
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
    max-width: 1100px;
    margin: 0 auto 1.2rem auto;
}

.footer-col {
    flex: 1 1 260px;
    min-width: 220px;
    max-width: 350px;
    padding: 0 1rem;
}

.footer-ristorante i {
    margin-right: 8px;
    color: #f9a825;
}

.footer-ristorante a {
    color: #f9a825;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-ristorante a:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-container {
    margin-bottom: 10px;
}

.footer-container p {
    margin: 5px 0;
    font-size: 0.95rem;
}

.crediti-sito {
    text-align: center;
    color: #888;
    font-size: 0.98rem;
    margin-top: 1.2rem;
}

.crediti-sito a {
    color: #2e7d32;
    text-decoration: underline;
}

/* === Media Queries === */
@media (max-width: 768px) {
    body {
        padding-bottom: 100px;
    }
    
    .header-ristorante {
        padding: 15px 10px;
        margin: 10px;
    }
    
    .header-ristorante img.logo-ristorante {
        max-width: 180px;
    }
    
    .header-ristorante h1.nome-ristorante {
        font-size: 1.6rem;
    }
    
    .header-ristorante p.frase-breve {
        font-size: 0.9rem;
    }
    
    h2.titolo-categoria {
        font-size: 1.8rem;
        margin: 20px 0;
    }
    
    .categorie {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 12px;
    }
    
    .categoria-card {
        min-height: 180px;
    }
 
    
    .categoria-card h3 {
        font-size: 1rem;
        padding: 6px 5px;
    }
    
    .card-piatto {
        flex-direction: column;
        align-items: center;
    }
    
    .card-piatto .immagine-piatto {
        width: 100%;
        height: 150px;
    }
    
    .card-piatto .immagine-piatto img {
        border-radius: 12px 12px 0 0;
    }
    
    .contenuto-piatto {
        width: 100%;
        padding: 15px;
    }
    
    .prezzo-e-azione {
        margin-top: 10px;
    }
    
    .azioni-menu {
        gap: 10px;
        padding: 8px 12px;
    }
    
    .azioni-menu a {
        padding: 7px 12px;
        font-size: 0.85rem;
    }
    
    .titolo-divisore {
        font-size: 1.3rem;
        margin: 25px 0 12px;
    }
    
    .footer-columns {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    
    .footer-col {
        max-width: 95%;
    }
}

@media (max-width: 480px) {
    body {
        padding-bottom: 80px;
    }
    
    .header-ristorante img.logo-ristorante {
        max-width: 150px;
    }
    
    .header-ristorante h1.nome-ristorante {
        font-size: 1.4rem;
    }
    
    h2.titolo-categoria {
        font-size: 1.5rem;
        margin: 15px 0;
    }
    
    .categorie {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 10px;
        padding: 0 10px;
    }
    
    .categoria-card {
        min-height: 160px;
    }
    
      
    .categoria-card h3 {
        font-size: 0.9rem;
        padding: 5px;
    }
    
    .card-piatto .immagine-piatto {
        height: 120px;
    }
    
    .contenuto-piatto h3 {
        font-size: 1.1rem;
    }
    
    .contenuto-piatto p {
        font-size: 0.9rem;
    }
    
    .prezzo-e-azione .prezzo {
        font-size: 1rem;
    }
    
    .prezzo-e-azione .aggiungi,
    .card-piatto .aggiungi {
        padding: 6px 14px;
        font-size: 0.9rem;
    }
    
    .azioni-menu {
        gap: 8px;
        padding: 6px 10px;
    }
    
    .azioni-menu a {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    
    .titolo-divisore {
        font-size: 1.1rem;
        margin: 20px 0 10px;
        flex-direction: column;
    }
    
    .titolo-divisore::before,
    .titolo-divisore::after {
        display: none;
    }
    
    #lista-ordini-pannello {
        width: 95%;
        padding: 15px;
    }
    
    .footer-ristorante {
        padding: 1.3rem 0;
    }
    
    .footer-col {
        padding: 0;
        font-size: 1rem;
    }
}

@media screen and (orientation: landscape) {
    .header-ristorante {
        padding: 15px;
        margin: 10px;
    }
    
    .header-ristorante img.logo-ristorante {
        max-width: 180px;
    }
    
    .categorie {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
    
    .card-piatto {
        flex-direction: row;
    }
    
    .card-piatto .immagine-piatto {
        width: 100px;
        height: 100px;
    }
    
    .card-piatto .immagine-piatto img {
        border-radius: 0;
    }
    
    .contenuto-piatto {
        padding: 10px;
    }
    
    .azioni-menu {
        padding: 8px 12px;
    }
    
    .azioni-menu a {
        padding: 6px 12px;
    }
}