By David Randall

NEW YORK (Reuters) - Amazon's long shadow is falling on retailers previously thought immune to the threat of e-commerce, forcing U.S. fund managers to rethink their approach to consumer stocks by focusing on companies whose businesses cannot be upended by the online giant.

At the core of the problem: Amazon.com Inc, once thought of as a place to buy books and household goods, is on track to become the largest apparel retailer in the United States by 2017, according to estimates from Cowen and Co, displacing department store operator Macy's Inc.

Amazon's push into higher-end clothing over the last three years only adds to its dominance in e-commerce overall, with a nearly 40 percent market share, one that is larger than the next 21 retailers combined - a group that includes Wal-Mart Stores Inc and Best Buy Co Inc, according to research firm Slice Intelligence.

Amazon shares hit a record high on Monday, day ahead of its Prime Day sales event. By market value, the company surpassed Warren Buffett's Berkshire Hathaway Inc.

"Retail is a landmine and you just don’t know who is going to be disrupted by Amazon. You are seeing money rotate into names where people feel comfortable with companies that won’t be Amazon'ed away,” said Scott Moore, a portfolio manager at Buffalo Funds.

More has shifted his portfolio from traditional department stores and into companies such as Home Depot Inc, whose bulky, heavy items are hard to ship profitably, he said.

Overall, actively managed large-cap funds now hold more restaurant, home improvement, and leisure stocks - all sectors in which Amazon does not yet compete - than at any other time in the last five years, according to Morningstar data, while they have steadily cut holdings of apparel and department stores over the same period.

The number of large-cap funds that own shares of Amazon, meanwhile, has risen 15 percent over the last three years.

Susan Bao, a co-portfolio manager of the $9.9 billion JP Morgan Large-Cap Core fund, said she no longer holds traditional retailers such as Macy's or Target Corp, and does not expect to do so again. Instead, she is focusing on companies such as cruise-ship operator Carnival Corp, which should benefit from an improving jobs market.

"This is one of companies that's going to do better when the consumer is in better shape that's also Amazon-proof," she said.

Shares of Carnival are down 13.8 percent year to date, in part because of fears of the Zika virus, while Amazon's stock is up 10.8 percent over the same time.

Fund managers who are bullish on department stores say that Amazon will likely continue to dominate the retail industry even as Macy's and others expand their online businesses.

Lawrence Haverty, a portfolio manager at Gabelli Funds, said that he expects Sears Holding Corp to fold "within the next calendar year," sending more shoppers to rivals such as JC Penney Company Inc at a time when the company is in the middle of a corporate turnaround that has helped it produce solid same-store sales growth.

Should Sears close its doors, "You're going to see a very large amount of sales for others to pick up, and not all of it is going to Amazon," Haverty said.

(Reporting by David Randall; Editing by Linda Stern and Steve Orlofsky)