Filtering a dataset from a lightbox

I currently have a catalog page that displays my products. I made buttons that will filter the dataset by product. I have 30 or so different kinds of products that I need to filter by. Having 30 buttons on a page doesn’t look very visually appealing, so I wanted to put them in a lightbox. I then realized that the lightbox is a separate page and won’t interact with the dataset the same way. Is there any way to have buttons in my lightbox that will filter the page behind it?