So is the issue just that sometimes the next row is spaced over? If so, then the problem lies in the inconsistent height of the text elements below the images. The easiest solution is to define a height for the container that displays the text equal to the largest possible height so that the overall size becomes consistent.
There are other more complex solutions like using javascript or classes identifying the position.
Now if you are trying to display the products in columns rather than rows, that becomes more complex and would almost definitely require javascript in a responsive layout.
Try adding this css to the page and see if that is all you need:
h6 {
height: 60px;
}