It’s not just for foodies anymore.

Shoppers at The Bowery Whole Foods, Manhattan’s largest supermarket, can browse craft brews in a beer room, choose from an array of artisanal products in the cheese-finishing emporium and buy meat and fish from the in-house smoker. The walls are adorned with arty photographs, paintings and drawings from local artists.

But on the second floor behind the pricey gluten-free soaps, lotions and organic sheets and shoes, the rows of tables, chairs and benches are often filled with a variety of vagrants.

Substance abusers, drug dealers and homeless people are turning the sunny cafe area, where shoppers can dine on pulled pork or Vietnamese sandwiches, into their own private social club for the cost of a cup of coffee or nothing at all.

‘The de Blasio administration has not done enough to find shelter for these unfortunate people.’

During five visits to the store in recent weeks, a reporter saw a modern-day Bowery bum sleeping in the fetal position, another nodding out in an obvious drug-induced haze, a few who appeared to be drunk, and one smearing toothpaste on his face and mumbling to himself.

As the city’s homeless population surges, and heads indoors in recent wet and cold weather, retailers, even high-end ones, cannot escape the deluge.

The vagrants take full advantage of free wireless and a microwave at Whole Foods and relieve themselves in sparkling restroom facilities. They pool their change to buy a beverage at the coffee bar in order to get a receipt with the day’s keypad code to the locked restrooms.

“The problem with homeless people and junkies is frequent,” said a Whole Foods cashier while ringing up cave-aged cheese and an assortment of organic produce. “Every once in a while security will go upstairs and shoo them away.”

The 71,000-square-foot store opened in 2007 to much fanfare. The gourmet market, the length of a city block, imposingly sits between Bowery and Chrystie streets and employs more than 600 workers.

But what was once the province of hipsters is now a refuge for the city’s growing homeless population, and others.

Last week, one bum in the grocery area picked items from the hot-food bar with his fingers and popped them in his mouth. Upstairs, a man reeking of booze drank from a dark bottle and argued with those in the cafe. Another man alternated between panhandling in front of the store and sitting in the cafe, talking to himself.

“No one wants to have lunch next to a foul-smelling bum, or a drunk or a junkie nodding out next to you. It’s not very appetizing. At the same time, Whole Foods displaced these people. These were the original Bowery denizens,” said Sean Sweeney, head of the Soho Alliance. “Gentrification took place and displaced them. Where are they supposed to go? The de Blasio administration has not done enough to find shelter for these unfortunate people.”

The number of homeless in city shelters reached a record high last year, with others using ATM vestibules or transit hubs like Penn Station as makeshift shelters.

The supermarket is particularly attractive to the homeless bunking at the Bowery Mission, which is a block and a half away and requires residents to leave during the day.

“It’s easy to come here. It’s nice and clean and warm and it closes at 11 p.m. So it’s open pretty late, which is good,” said Adrian Bey, 42, who said he was staying at the mission while working and saving for an apartment.

Sam, who is 35 and homeless, said he suspects addicts sometimes use the restrooms. “I see people come in here and they are straight. They walk with one foot in front of the other into the bathroom. They come out and two minutes later they pass out,” he said. “I’ve seen ambulances come because people have passed out after coming out of the bathroom.”

One Whole Foods employee concurred that “drug users are definitely in the building.

“The homeless problem gets worse in the winter, but nothing can be done about it,” said the worker at a second-floor barbeque food stand.

Whole Foods officials declined comment.