Why use a cookie? You can use non persistent entity or store the last chosen product in your database?
This way you can also add a class to the div which should be highlighted?
I think this widget might be useful to you. It selects one or more records in a grid based on the output of a microflow: