By Victoria Waldersee

BERLIN (Reuters) -Mercedes-Benz struck a slightly more optimistic tone alongside its first quarter results on Friday, saying demand in China and the United States was showing signs of picking up as markets recover from inflationary and supply chain shocks.

Demand in Europe was still sluggish, but the German automaker expects that to improve too in the coming months as consumer confidence rebuilds.

The company warned in February it expected lower earnings this year, even with sales remaining stable, as high costs and inflationary pressure were likely to weigh on margins.

But on Friday it lifted guidance for the annual adjusted return on sales at its vans division to 11%-13% from 9-11%, and said it expected to hit the higher end of its 12%-14% forecast for returns in the cars division.

That came after it reported group earnings of 5.5 billion euros ($6.06 billion) for the first quarter, and adjusted return on sales for its cars division of 14.8%, above expectations but below last year’s 16.4% margin.

Sales of top-end vehicles were up 18%, and those of its high performance AMG brand up 44%, boosting profitability.

The vans division saw an adjusted margin of 15.6%, up from last year’s 12.6%, boosted by improved deliveries and pricing.

The company’s shares were little changed in early trading.

Its decision to move towards a direct sales model is underway, with the transition in Germany taking place in the second half of the year and 80% of the European market to be migrated to the new system by 2025, Chief Financial Officer Harald Wilhelm said on an analyst call.

The company hopes the move will help to boost margins.

Overall, global growth is likely to remain subdued, but inflation is gradually declining, energy prices are expected to be less volatile, and raw material prices are improving, it said.

($1 = 0.9082 euros)

(Reporting by Victoria Waldersee, Editing by Uttaresh Venkateshwaran and Mark Potter)