As you explore the medina you'll notice shops called herboristeries. It's a shop where men in lab coats dispense traditional medicine from indigenous herbs, salts, and various natural remedies. Their knowledge is impressive but not surprising as the craft is passed on from one generation to the next.
We had the most fascinating experience when we were engaged in conversation by a young man who worked at one of these shops while we were walking through the souks. We ended up staying at his shop for quite a bit as he demonstrated what he offered at his shop. You can get anything from cures for stomach ailments to natural dyes and even items for body hygiene. They also sell spices so you should at least buy Ras el Hanout.