The world's largest retailer is preparing to open a smaller box in a densely packed neighborhood in Los Angeles.

Under the name Neighborhood Market — essentially a small supermarket — Wal-Mart Stores (WMT) will offer the only traditional-style grocery store in the city's Chinatown neighborhood.

Wal-Mart isn't alone in following consumers back into urban cores. Target (TGT) is rolling out several CityTarget small, urban-format stores in Los Angeles, Seattle and Chicago.

Those downsized big-box retailers are only a piece of the competition hammering away at markets traditionally held by supermarket chains such as Safeway (SWY) and Kroger (KR).

High-end independent gourmet grocers tap wealthier shoppers looking for organic and other pricey fare. Dollar stores have bulked up with coolers and freezer cases to sell milk, meats and other food offerings to the most budget-conscious.

Even drugstore chains have found their fastest-growing sales categories are consumables such as chips and beer.

"So many retailers have learned that it's fun to put up a little bit of a food display or snack display," said Chuck Cerankosky, a supermarkets analyst with Northcoast Research. "So you see Home Depot (HD) even taking a little bit of share from the traditional food market channel.

The fragmenting market has made the 22 companies in IBD's super- and mini-markets retail group a study in adaptation. Traditional grocery chains have reacted by closing underperforming stores, revamping their inventories and better tailoring stores to local markets.

"Kroger does a marvelous job in being really all over the map in how they present the merchandise to the customer," Cerankosky said of the nation's largest grocery chain.

Kroger owns the Ralphs, City Market and Food 4 Less names, as well as the Kroger chain. Overall, sales at stores open at least a year climbed 4.2% in the most recent quarter. It was the Cincinnati-based chain's 34th straight quarter of same-store growth.

Story continues

"Several years ago, we took a hard look at who we were really competing against," said Kroger CEO David Dillon during last quarter's earnings conference call. "That helped us realize we're competing against more than just traditional grocery retailers.

The super/mini-market industry group ranked No. 57 in Friday's issue among the 197 industries tracked by IBD. Much of the recent strength has come from companies targeting high-end grocery customers.

Fresh Market (TFM), a chain of small upscale European-style markets, boasts a best-possible Composite Rating of 99. It reported 8.2% same-store sales growth in the past quarter.

Another upscale grocer, Whole Foods (WFM), is close behind with a 94 Composite Rating. It also posted 8.2% same-store sales growth, and typically leads its peers in that metric.

Grocers mostly guided higher results for the year.

"In an economic environment that is proving difficult for many retailers, we are thriving," Whole Foods' co-CEO Walter Robb said after the last quarter's earnings.

While upper-income consumers have fared well through the economy's fumbling recovery, other consumers are still pinched. And grocery stores now face rising costs. Most said inflation moderated in the last quarter, but the summer's severe drought points to higher prices across much of the food chain.

The USDA forecasts food prices rising 2.5% to 3.5% this year, and 3% to 4% more next year.

It sees poultry prices up 3.5% to 4.5% this year, and 3% to 4% next year. Beef and veal prices are seen climbing 4% to 5% next year.

Sales Brackets Whole Foods voluntarily narrowed its margins in the last quarter as it lowered some of its prices to lure in customers. The chain is fighting to shake the reputation for high prices that led to the "Whole Paycheck" nickname among many consumers.

"Poor people need low prices. Rich people love low prices," said Todd Hale, senior vice president for Consumer & Shopper Insights at market research firm Nielsen.

The strategy seems to be working. The company noted a "meaningful increase" in the number of $50-plus baskets.

Supermarkets across the spectrum are also broadening the shopping experience.

Tuck-in Starbucks (SBUX) shops are on the rise, largely replacing the old dry cleaners or bank branches inside the market. Increasingly, chains are adding fresh-cooked food, and more extensive food and salad bars. Smarter ones still are adding cooking classes, wine-tastings and other elements that Hale calls "retail-tainment.

He points out Wegmans Food Markets, a privately held upstate New York chain, among the more deft players. When it opened its first New England store, in Northborough, Mass., in October, "they had 2,000 people outside waiting at 7 a.m. to get in," he said.

Interlopers The competition only promises to get hotter.

Dollar Tree (DLTR) (in the No. 57-ranked discount and variety store retail group) has coolers and freezers in about half of its 4,500 stores and plans to install them at 300 more stores this year. It reported second-quarter results Thursday, with food and beverages among its top four performing sales categories.

Rival Dollar General (DG) is expanding into California with its Dollar General Market format, which is a smaller box, with more groceries than its traditional stores.

Drugstores led by Walgreen (WAG) and CVS Caremark (CVS) (both in the No. 1 20-ranked drugstore retailer group) are pumping more high-end liquors as well as food staples into their prime locations. The sector has come under pressure as a wave of big blockbuster drugs come off patents and are displaced by less-profitable generics. Food sales provide a lucrative alternative.

Restaurants are doing their best to coax consumers to cook less, nibbling away at another piece of traditional supermarket territory. The number of restaurant locations climbed 0.5% in the spring, the first uptick since 2009, according to the latest survey from NPD, with both traffic and average spending up. The industry tracker said quick-service chains grew the most.

That competition prompts grocers to invest more in their own pre-cooked meals that customers can heat up at home.

When done right, these are profit centers, Hale said. But they're also labor-intensive and can poach sales from the aisles in the center of the store too.

Weather Patterns Barbecue briquettes and bug spray sales picked up sooner than usual in the spring as customers spent more time outside, Hale said.

He forecasts more unusual, drought-skewed buying patterns through this year.

Supermarkets could get a bounce too as the economy improves. During the last recession, some customers traded down from beef to chicken. Those confident about their paychecks may move back to the pricier cuts of meat. This shift could be damped, however, as drought-related price increases make their way to the meat counters.

A better economy could also ease some of the competition from those big-box players, Cerankosky says. Most expanded their grocery offerings to compensate for the sluggish sales of patio sets, and new seasonal clothing sales.

If and when consumers move back to those high-margin products, Cerankosky expects big-box retailers to rededicate some of their food aisles.