BERLIN - Germany's main carmakers' association is optimistic about the outlook for global sales of trucks and vans, with a booming online retail sector in Europe boosting demand even as the motor industry faces growing trade barriers.

The VDA association said sales of heavy-duty trucks in western European rose by 2 percent in January-July, and forecast a 2 percent increase in sales of light-duty trucks in that market for the whole of 2018, to almost 2 million vehicles.

A growing shift to online sales of goods is creating more demand for trucks and vans to deliver goods, and that was notable in Germany and elsewhere in Europe, VDA said.

"The international market for commercial vehicles finds itself in good shape for this year's IAA," VDA President Bernhard Mattes said at a news conference at the bi-annual IAA commercial vehicles fair in Hanover, Germany, on Tuesday, according to a prepared speech.

"But we can't ignore the political risks that we see around the world. Especially in the transport sector where international supply chains are closely intertwined, trends towards more protectionism, tariffs and trade barriers benefit no one."

Outside of Europe, sales of heavy-duty trucks rose 8 percent in China and 18 percent in the United States in the January-July period. In Brazil, where demand has been hit by economic recession in recent years, sales jumped by more than 50 percent, while the Indian market grew by 45 percent, the VDA said.

Mattes said the European Union's proposals to introduce a C02 reduction target of at least 30 percent for CO2 emissions from trucks by 2030, and 15 percent by 2025, were unrealistic given longer product development cycles for trucks and vans.

"A massive CO2 reduction for heavy commercial vehicles which should apply for the whole EU and be carried out within a few years, is anything but easy to implement," he said.

Cutting CO2 emissions by even 7 percent by 2025 would require major technological advancements for the industry, he said, adding the automotive sector viewed a 16 percent CO2 reduction by 2030 as realistic although still extremely demanding.

(Reporting by Jan Schwartz and Caroline Copley; Editing by Susan Fenton) ((Caroline.Copley@thomsonreuters.com; +49 30 2888 5214; Reuters Messaging: caroline.copley.thomsonreuters.com@reuters.net))