Mexico will legalize sales of marijuana-based medicines, foods, drinks, cosmetics and other products early next year, its health regulator said on Wednesday, bringing some forms of cannabis into legal commerce even as the country struggles with the illicit drug trade.