Mercedes-Benz sales overtook BMW last year for the first time in more than a decade after focusing on making stylish high-tech cars.