Views and CSS : how to exclude the exposed filters from CSS?
You could use the "Exposed form in block" setting under Advanced settings to get the exposed filter out of the masonry markup and put it a region above or beneath your masonry view.