/* Stili generali per i menu */
.restaurant-menu-bevande, .menu-food {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Titoli principali */
.menu-bevande::before, .menu-food::before {
    content: attr(data-title);
    display: block;
    font-size: 42px;
    font-weight: bold;
    color: #333;
    margin-bottom: 30px;
    text-align: center;
}

.menu-bevande::before {
    content: "Bevande";
}

.menu-food::before {
    content: "Food";
}

/* Stili per le categorie */
.categoria-bevande, .categoria-food {
    margin-bottom: 40px;
}

.categoria-titolo {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 40px 0 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.categoria-food .categoria-titolo {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 30px;
    color: #222;
    border-bottom: 2px solid #ddd;
    padding-bottom: 10px;
}

/* Stili per gli elementi */
.elemento-item {
    display: flex;
    padding: 15px;
    border: 1px solid #ddd;
    margin-bottom: -1px;
    background-color: #fff;
    gap: 20px;
}

/* Stili per il food */
.menu-food .elemento-item {
    display: flex;
    align-items: flex-start;
}

.menu-food .elemento-foto {
    flex: 0 0 25%;
    cursor: pointer;
}

.menu-food .elemento-foto img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.menu-food .elemento-foto img:hover {
    transform: scale(1.05);
}

.menu-food .elemento-contenuto {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Stili per il testo */
.elemento-nome {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
    flex: 1;
}

.elemento-prezzo {
    font-size: 18px;
    font-weight: bold;
    color: #8b0e0e;
    margin-left: auto;
}

.elemento-ingredienti {
    font-size: 12px;
    font-variant: initial;
    color: #666;
    margin-top: 5px;
}

/* Stili per gli allergeni nel backend */
.allergeni-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 15px 0;
    max-width: 40px;
}

.allergene-checkbox {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.allergene-checkbox:hover {
    background-color: #f0f0f0;
    border-color: #bbb;
}

.allergene-checkbox img {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    order: 1;
}

.allergene-checkbox label {
    font-size: 13px;
    margin-right: 8px;
}

.allergene-checkbox input[type="checkbox"] {
    order: 3;
    margin: 0;
}

/* Stili per gli allergeni nel frontend */
.elemento-allergeni {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 5px;
}

.elemento-allergeni img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 5px;
}

/* Modal per le immagini */
.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    cursor: pointer;
}

.image-modal img {
    max-width: 90vw;
    max-height: 90vh;
    margin: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    object-fit: contain;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 24px;
    cursor: pointer;
    z-index: 1001;
}

.close-modal:hover {
    color: #ff0000;
}

/* Responsive */
@media (max-width: 768px) {
    .menu-food .elemento-item {
        flex-direction: row; /* Mantiene il layout orizzontale */
        align-items: flex-start;
        gap: 15px;
    }
    
    .menu-food .elemento-foto { 
        flex: 0 0 25%; /* Mantiene la larghezza del 25% */
    }
    
    .menu-food .elemento-contenuto {
        flex: 1;
    }
    
    .elemento-nome {
        font-size: 16px;
    }
    
    .elemento-prezzo {
        font-size: 16px;
    }
    
    .elemento-ingredienti {
        font-size: 11px;
    }
    
    .elemento-allergeni img {
        width: 16px;
        height: 16px;
    }
    
    .allergeni-checkboxes {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

.categoria-food .elementi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin: 0 auto;
}

.elemento-food {
    display: flex;
    flex-direction: column;
    gap: 05px;
    margin-bottom: 0;
    width: 100%;
}

.elemento-food .elemento-immagine {
    width: 100%;
    aspect-ratio: 1/1;
    overflow: hidden;
    cursor: pointer;
    border-radius: 1px;
    position: relative;
}

.elemento-food .elemento-immagine img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.elemento-food .elemento-immagine:hover img {
    transform: scale(1.05);
}

.elemento-food .elemento-dettagli {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.elemento-food .elemento-titolo-prezzo {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
}

.elemento-food .elemento-titolo {
    font-size: 24px;
    font-weight: bold;
    text-transform: initial;
    color: #000;
    margin-left: 05px;
    flex: 1;
}

.elemento-food .elemento-prezzo {
    font-size: 24px;
    font-weight: bold;
    color: #E31E24;
    margin-right: 0px;
    white-space: nowrap;
}

.elemento-food .elemento-ingredienti {
    font-size: 14px;
    color: #333;
    margin-left: 05px;
    text-transform: initial;
    line-height: 1.1;
  
}

.elemento-allergeni {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;

}

.elemento-allergeni img {
    width: 25px;
    height: 25px;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 5px;
}

@media (max-width: 768px) {
    .categoria-food .elementi-grid {
        grid-template-columns: 1fr; /* Una sola colonna su mobile */
        gap: 30px; /* Mantengo lo stesso gap verticale del desktop */
    }

    .elemento-food .elemento-titolo,
    .elemento-food .elemento-prezzo {
        font-size: 17px;
    }
    
    .elemento-food .elemento-ingredienti {
        font-size: 14px;
    }

    .categoria-food .categoria-titolo {
        font-size: 21px;
        margin-bottom: 20px;
    }
}
.elemento-food {    padding:0px 0px 10px 0px ;

border: 1px solid #666;
border-radius: 10px;}

/* Stili generali per il menu */
.menu-food {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Grid per gli elementi */
.elementi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

/* Card del piatto */
.elemento-food {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.elemento-food:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

/* Contenitore immagine */
.elemento-immagine {
    position: relative;
    padding-top: 75%;
    overflow: hidden;
}

.elemento-immagine img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.elemento-food:hover .elemento-immagine img {
    transform: scale(1.05);
}

/* Dettagli del piatto */
.elemento-dettagli {
    padding: 20px;
}

.elemento-titolo-prezzo {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.elemento-titolo {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
    flex: 1;
    padding-right: 15px;
}

.elemento-prezzo {
    font-size: 18px;
    font-weight: 700;
    color: #2ecc71;
    white-space: nowrap;
}

.elemento-ingredienti {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
    margin-bottom: 15px;
}

/* Allergeni */
.elemento-allergeni {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.elemento-allergeni img {
    width: 20px;
    height: 20px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.elemento-allergeni img:hover {
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .elementi-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .categoria-titolo {
        font-size: 24px;
        margin: 30px 0 20px;
    }
    
    .elemento-dettagli {
        padding: 15px;
    }
    
    .elemento-titolo {
        font-size: 18px;
    }
    
    .elemento-prezzo {
        font-size: 16px;
    }
    
    .elemento-ingredienti {
        font-size: 13px;
    }
}

/* Stili per le tab delle categorie */
.categoria-food {
    margin-bottom: 30px;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
}

.categoria-header {
    padding: 15px 20px;
    background: #f8f8f8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color 0.2s ease;
}

.categoria-header:hover {
    background: #f0f0f0;
}

.categoria-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.categoria-header .toggle-icon {
    transition: transform 0.2s ease;
}

.categoria-header.active .toggle-icon {
    transform: rotate(180deg);
}

.categoria-content {
    display: none;
    padding: 20px;
    background: #fff;
}

.categoria-content.active {
    display: block;
}

/* Stili per le tab */
.categorie-tabs {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    display: flex;
    overflow-x: auto;
    gap: 5px;
    margin-bottom: 30px;
    padding: 15px 0;
    border-bottom: 2px solid #f0f0f0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.categorie-tabs::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.categoria-tab {
    padding: 10px 16px;
    background: #f8f8f8;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: #666;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.categoria-tab:hover {
    background: #f0f0f0;
    color: #333;
    transform: translateY(-2px);
}

.categoria-tab.active {
    background: #d84c4e;
    color: rgb(0, 0, 0);
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.2);
}

.categoria-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 2px;
}

/* Aggiungo un effetto di ombra quando si fa scroll */
.categorie-tabs.scrolled {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Stili per il frontend del menu */
.restaurant-menu-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.menu-section {
    margin-bottom: 40px;
}

.menu-section-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #333;
}

.menu-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.menu-item-title {
    font-weight: 600;
    color: #222;
    flex: 1;
}

.menu-item-price {
    color: #666;
    margin-left: 20px;
}

.menu-item-description {
    color: #777;
    font-size: 0.9em;
    margin-top: 5px;
}

.menu-item-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 5px;
    margin-right: 15px;
}

.allergeni-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 5px;
}

.allergene-icon {
    width: 20px;
    height: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .menu-item {
        flex-direction: column;
    }
    
    .menu-item-price {
        margin-left: 0;
        margin-top: 5px;
    }
    
    .menu-item-image {
        width: 100%;
        height: 200px;
        margin-right: 0;
        margin-bottom: 10px;
    }
}
