I was carded for buying a plain ordinary bottle of cough syrup. No decongestant. Just cough suppressant and expectorant. Is this legal?

Legal ; required. Yes. In many states, you must be 18 to purchase an otc product that contains dextromethorphan, a common ingredient in many cough syrups. Google robo-tripping to find out why, and be thankful your kids and their friends are being kept safe.