HONG KONG, Aug 23 (Reuters) - China stocks fell on Wednesday as fears of contagion risks in the country's struggling real estate sector rise, triggering a sell-off by foreign investors.

Hong Kong stocks edged up, helped by earnings surprises by some internet and consumer companies.

** China's blue-chip CSI 300 Index declined 1.64%, while the Shanghai Composite Index fell 1.34%.

** Hong Kong's Hang Seng Index rose 0.31% and the Hang Seng China Enterprises Index climbed 0.32%.

** A growing number of Chinese listed companies and asset managers have announced plans to repurchase their own shares or fund products following calls from regulators to revitalise the market and boost investor confidence.

** Yet the move failed to impress investors as they await bigger stimulus to address economic problems.

** Northbound trading in Shanghai and Shenzhen-listed shares via stock connect suffered a rare 13th straight session of outflow with offshore investors pulling out a total of 78 billion yuan ($10.70 billion).

** "Foreign investors are leaving. They are increasingly worried about the property problems spreading to systemic financial risks," said Redmond Wong, Greater China market strategist at Saxo Markets.

** Property downturn means Chinese interest rates and the currency remain tilted to the downside unless a much firmer fiscal response is implemented, Goldman Sachs analysts said, adding corporates face risks of further broad earnings downgrades.

** In Hong Kong, Xiaomi Corp rose over 2% after Reuters reported it has won the approval of China's state planner to manufacture electric vehicles, citing sources.

** Anta Sports surged 10% after first-half net profit jumped 32% year-on-year.

** Baidu Inc rose 4.4% after the internet giant posted second-quarter revenue above estimates, driven by a post-pandemic recovery in advertising spending, and said it would intensify its efforts on generative artificial intelligence.

** The Hang Seng Tech Index went up 0.2%. ($1 = 7.2902 Chinese yuan renminbi) (Reporting by Summer Zhen; Editing by Subhranshu Sahu)