I'd be interested to learn more about the economics of grocery stores and how the advertised prices on lost leaders work and how much they are losing and how they make it back on other items, etc.
It depends mightily on the store.
Costco is by FAR the best place to shop, in the conus they have a very simple approach to pricing: 13.5% margin.
Everything you buy has cost them 0.865 times what you pay.
Among regular stores walmart and target are the ones taking the smaller margins on average, 25-30%
To the surprise of no one, whole foods takes the highest margins, 45 to 50%.
The policy on deals also changes across the different banners.
Some will do what is called "penny for penny" meaning that if a certain product costs them $6 and they are selling it for $10, if the manufacturer gives them a $2 temporary discount they will reduce their price by $2. They will keep their margin fully intact.
Again to the surprise of no one this is what whole foods usually does.
Kroger also does the same.
Others will keep the same margin %, so using the figures of the above example a $2 temporary discount from the manufacturer would result in a $6.67 selling price. Walmart and target tend to fall in this category.
The above is a general rule, valid for items that move reasonable volumes without being uber brands with super high velocity on the shelf.
Coca cola products tend to be sold at very very low margins, sometimes even at a loss during a special.
Conversely, very slow moving items tend to have very high margins to compensate for the slower movement.