All of this is very nice--and irrelevant to the point under discussion.
Under the scenario that the Maryland law is outlawing, the richer customer who is being charged the higher price by the grocery store still finds the product to be worth it to them at the higher price. And since their time has value, and they're just grocery shopping, and they're rich and not trying to pinch pennies, they'll just buy the thing at the price the store is asking. There will be less consumer surplus for them, as I said, than there would be if the store were charging them the same price as the average middle class person--but it's highly doubtful that it will be worth their time to try to extract that extra consumer surplus from the store. That's why stores want to price discriminate in the first place--because they know the richer customers won't bother trying to haggle over price.
So if the rich people don't want to bother haggling, why does the government feel there is a need for this law?