Quality, distance and trade: A strategic approach