Is buying alcohol while prego illegal?

Angela • Baby due July 24, 2016
First, let me start by saying I have not had a taste of alcohol my whole pregnancy. However, today I went to the market and tried buying beer for my husband and father (they are working on our patio) and the cashier saw my belly and said "sorry I can't sell you beer because you are pregnant and I will get fired". I told her it was not for me but she did not care. I did not make a scene said okay and walked out. I  felt discriminated. As soon as I got in my car I tried looking for a California law that prohibited pregnant women of buying alcohol and did not find such thing. I called and spoke to the store manager and she did confirm that there was no law prohibiting pregnant women from buying alcohol in California but that it was a "store policy" not to sell to pregnant women. Isn't this discrimination? Stores can't just come up with policies that do not coincide with the state of California liquor laws? Or can they?