The retail market as a complex system