In this experiment, the sorting of the items is done with JS and the CSS Grid order property. First, with JS we get the items of the selected food type (through the data-food attribute). Then we apply the order property to those items (through style property), to reorganize them.
source: BomSymbols