* Warehouses to be same size as two major centers in Germany
* Investment in logistics, technology has weighed on profits
* Earnings margin seen at lower end of 5-6 percent range
* Sales growth seen at upper end of 20-25 percent range
* Shares up 0.7 pct in weaker market (Adds comments from co-CEO)
BERLIN, Aug 10 (Reuters) - German online fashion retailer Zalando is planning to build two giant warehouses in Poland and Italy to help boost annual sales to 10 billion euros ($11.7 billion) as it tries to fend off an assault by Amazon .
Europe's biggest online-only fashion retailer said last month that capacity constraints were slowing its growth and it is investing heavily in logistics and technology as U.S. giant Amazon makes a big push into fashion.
Zalando wants to start work on large centers in Italy and Poland in the next six months to lift its sales capacity to 10 billion euros eventually from the 8 billion covered by current projects, co-chief executive Rubin Ritter said on Thursday.
Zalando's shares, which fell in June when Amazon launched a test fashion program called Prime Wardrobe, were up 0.7 percent by 0854 GMT while the European retail sector was down 0.5 percent.
Zalando, which delivers 2,000 brands in 15 countries, had sales of 3.6 billion in 2016 and has said it wants to double in size by 2020. Ritter said Zalando, which has not launched in any countries since 2013, was starting to consider the possibility of new markets and categories in the coming years.
Zalando said full-year sales growth should be in the upper half of its forecast range of 20 percent to 25 percent, while its adjusted earnings before interest and taxation (EBIT) margin should be in the lower half of its 5 percent to 6 percent range.
"Specification of full-year 2017 targets does not come as a big surprise to us," said DZ Bank analyst Thomas Maul, who rates Zalando "hold." "However, the activities of Amazon in the European fashion market could limit the medium-term margin potential of Zalando."
British rival ASOS said this week it would spend $40 million on a second U.S. distribution center to support strong sales growth in what it hopes will become a major market.
Zalando, which initially shipped to the rest of the continent from big warehouses in Germany, has been investing in new centers in Italy, France, Poland and Sweden in a bid to expand capacity and speed up deliveries and returns.
Ritter said the two warehouses in Poland and Italy would be of a similar size and cost to its main centers in Germany, each about the size of 18 soccer pitches, but the projects would not affect planned capital spending this year of 250 million euros.
Zalando's second-quarter sales rose 20 percent to 1.1 billion euros while adjusted EBIT came in at 82 million, in line with average analyst forecasts.
The number of active customers rose by 800,000 to 21.1 million, which Maul noted was the strongest growth in 18 months. ($1 = 0.8528 euros) (Reporting by Emma Thomasson; editing by Jason Neely and David Clarke)