Show Product Categories in Query Loop of Products

I want to show product category in product card. I applied query loop on product card for showing products data. Product Card contains following elements.

Featured Image
Product Title
Product Price
Product Rating

I also want to show product parent category. So I used heading element with dynamic data and enter this {post_terms_product_cat} but this shows subcategories also. I only want to show Parent Category.

Screenshots:

image

Query loop Screen Shots


What if you put 0 in the Parent field in the Query loop menu. Does that work?