html {
    /* Colori principali */
    --bgColor: #fafafa;
    --textColor: #333;
    --primaryColor: #2c3e50;
    --primaryLight: #f0f0f0;
    
    /* Colori funzionali */
    --allergenColor: #f32122;
    --priceColor: #333;
    --borderColor: #e0e0e0;
    --textSecondary: #555;
    --textLight: #888;
    --textInverse: #fff;
    --confirmButtonColor: #2c3e50;

    /* Colori di sfondo */
    --white: #fff;
    --modalOverlay: rgba(0, 0, 0, 0.5);
    
    /* Ombre */
    --shadowLight: rgba(0, 0, 0, 0.05);
    --shadowMedium: rgba(0, 0, 0, 0.1);
    --shadowDark: rgba(0, 0, 0, 0.15);
}
        
        
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
            margin: 0;
            padding: 6px;
            background-color: var(--bgColor);
            color: var(--textColor);
            line-height: 1.5;
        }

        h1 {
            font-size: 1.8rem;
            text-align: center;
            margin-bottom: 20px;
            color: var(--primaryColor);
        }

        /* Filtri dieta (visibili nella pagina principale) */
        .diet-filters {
            display: flex;
            justify-content: center;
            gap: 10px;
            margin-bottom: 16px;
            flex-wrap: nowrap;
        }

        .diet-filters button {
            padding: 10px 16px;
            border: none;
            border-radius: 20px;
            background-color: var(--primaryLight);
            color: var(--primaryColor);
            font-size: clamp(0.75rem, 0.95rem, 0.95rem);
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
            white-space: nowrap;
            min-width: 0;
        }

        .diet-filters button.active {
            background-color: var(--primaryColor);
            color: var(--textInverse);
        }

        .diet-icon {
            width: 16px;
            height: 16px;
            margin-left: 8px;
            vertical-align: middle;
        }

        .diet-filter-icon {
                width: 14px;
                height: 14px;
                margin-right: 4px;
                vertical-align: middle;
            }
            
        /* Filtri allergeni attivi (visibili nella pagina principale) */
        .active-allergen-filters {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-bottom: 16px;
            justify-content: center;
        }

        .active-allergen-filters span {
            padding: 6px 10px;
            background-color: var(--allergenColor);
            color: var(--textInverse);
            border-radius: 16px;
            font-size: 0.85rem;
            display: flex;
            align-items: center;
        }

        .active-allergen-filters span .remove {
            margin-left: 6px;
            cursor: pointer;
            font-weight: bold;
        }

        /* Pulsante per aprire il popup allergeni */
        .allergen-toggle {
            display: block;
            width: 100%;
            padding: 12px;
            margin-bottom: 16px;
            border: none;
            border-radius: 8px;
            background-color: var(--allergenColor);
            color: var(--textInverse);
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            text-align: center;
            box-shadow: 0 2px 4px var(--shadowMedium);
        }

        /* Popup per gli allergeni (inizialmente nascosto) */
        .allergen-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: var(--modalOverlay);
            z-index: 1000;
            overflow-y: auto;
        }

        .allergen-modal.active {
            display: block;
        }

        .modal-content {
            background-color: var(--white);
            margin: 16px;
            padding: 20px;
            border-radius: 8px;
            box-shadow: 0 4px 12px var(--shadowDark);
        }

        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 16px;
        }

        .modal-header h2 {
            margin: 0;
            font-size: 1.3rem;
            color: var(--primaryColor);
        }

        .close-button {
            background: none;
            border: none;
            font-size: 1.5rem;
            cursor: pointer;
            color: var(--textLight);
        }

        .confirm-button {
            padding: 10px 24px;
            background-color: var(--confirmButtonColor);
            color: white;
            border: none;
            border-radius: 20px;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
        }

        /* Bottoni allergeni nel popup */
        .allergen-filters {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }

        .allergen-filters button {
            padding: 8px 12px;
            border: 1px solid var(--borderColor);
            border-radius: 20px;
            background-color: var(--white);
            color: var(--textSecondary);
            font-size: 0.85rem;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .allergen-filters button.active {
            background-color: var(--allergenColor);
            color: var(--textInverse);
            border-color: var(--allergenColor);
        }

        /* Popup per la lingua (inizialmente nascosto) */
        .language-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: var(--modalOverlay);
            z-index: 1000;
            overflow-y: auto;
        }

        .language-modal.active {
            display: block;
        }

        /* Bottoni lingua nel popup */
        .language-filters {
            display: flex;
            flex-wrap: wrap;
            gap: 12px;
            justify-content: center;
        }

        .language-filters button {
            padding: 0;
            border: none;
            border-radius: 4px;
            background-color: var(--white);
            cursor: pointer;
            transition: all 0.2s ease;
            box-shadow: 0 2px 4px var(--shadowLight);
        }

        .language-filters button:hover {
            transform: scale(1.05);
            box-shadow: 0 4px 8px var(--shadowMedium);
        }

        .language-filters button img {
            width: 40px;
            height: 30px;
            border-radius: 3px;
        }

        .lang-toggle {
            padding: 0;
            background: none;
            border: none;
            cursor: pointer;
        }

        .lang-toggle:hover {
            opacity: 0.8;
        }

        /* Container principale */
        .main-container {
            max-width: 1024px;
            margin: 0 auto;
            width: 100%;
        }

        /* Piatti */
        .section {
            margin-bottom: 24px;
        }

        .section h2 {
            font-size: 1.3rem;
            border-bottom: 1px solid var(--borderColor);
            padding-bottom: 8px;
            margin-bottom: 12px;
            color: var(--primaryColor);
        }

        .product {
            margin-bottom: 16px;
            padding: 16px;
            border: 1px solid var(--borderColor);
            border-radius: 8px;
            background-color: var(--white);
            box-shadow: 0 1px 3px var(--shadowLight);
        }

        .product-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 8px;
        }

        .product h3 {
            margin: 0;
            font-size: 1.1rem;
            color: var(--primaryColor);
        }

        .product .price {
            color: var(--priceColor);
            font-weight: 600;
            font-size: 1rem;
        }

        .product p {
            margin: 6px 0 0 0;
            color: var(--textSecondary);
            font-size: 0.95rem;
            white-space: pre-line;
        }

        .product .allergens-list {
            color: var(--textLight);
            font-style: italic;
            font-size: 0.9rem;
            margin-top: 4px;
        }