"Ay Mami" Is something said when a man passes by a woman who he thinks is sexy or cute. It would be like "hey cutie", the term we american men use. It is nothing disrespectful or anything, it just shows that he thinks your cute or sexy. If you would have said "Ay Poppy" it would have meant you think that he is cute. He probaly would have smiled and tried to flirt with you.
"Mamma" is a term Puerto ricans and Dominicans use when they talk with women. "lil mamma" is used when they talk to younger females."Mami" has more flirtatious overtones, than "mamma" or "lil mamma" which are more formal.
I hope that answers your question, peace ma.