Where was the margarita invented?

It’s sort of the grande dame of cocktails, particularly in America.