The vast majority of products at grocery stores are not imported from overseas. And even when they are, the cost of the good is only a part of the total cost to the store. For example no tariff would change the price of intra-USA transport of imported goods (well besides oil…). Labor and real estate need to taken out as well.
Obviously if you increase a cost the price is going to go up, but it’s not anywhere near 27% for groceries specifically.
Now pure imports, like most of the crap on Amazon or Temu, is another story.