Storefront retail has become a dreary landscape, and even more littered with dismal news after a trying holiday season. Holiday-quarter reports showed weak foot traffic and soft, if not declining, same-store sales. Consumers aren’t buying less, but it has become the conventional wisdom that Amazon.com (AMZN) is murdering all but the best malls, and that young people prefer experiences to tangible products (not great for stores that sell, you know, stuff).

Among the 18 retail industry groups tracked by IBD, nearly all rank near the weak end of the scale, with Department Stores dead last — No. 197 among 197 industries.  But amid all that brick-and-mortar rubble, a rising number of brands reported hefty online sales growth for the holidays and fourth-quarter.

Does that point out possible future leadership in a sector being muscled out by Amazon and other e-commerce pure-plays? Or has the entire industry become untouchable?

Retail Hiring Vs. Layoffs As Models Shift

For storefront retailers, the holidays were decidedly not merry. But the web lit up like a Christmas tree.

During the crucial quarter, Macy’s (M) online sales grew at a double-digit pace even as comps at company-owned stores fell 2.7%, said the department store chain. J.C. Penney‘s (JCP) holiday quarter saw “record” online sales while comps dipped 0.7%. And Kohl’s (KSS) pointed to online demand as partly offsetting weakness in brick-and-mortar traffic.

Department stores weren’t the only ones that fit this pattern. Target‘s (TGT) digital sales popped 34% as same-store sales dropped 1.5%. And Wal-Mart (WMT) e-commerce revenue in the U.S. leapt 29%, including Jet.com and online grocery sales. The latter, however, posted comp growth of 1.8%, an estimate-beating figure that marked its biggest same-store sales gain in four years.

The bump in e-commerce sales looks promising, but the growth rates appear large because the revenue generally remains quite small. Wal-Mart has been a clear leader, but even though its digital sales topped $14 billion in fiscal 2016, that was less than 3% of the company’s overall take. Target reported its online sales at about $3.1 billion in 2016 — less than 5% of total sales.

The small percentages reflect a yearslong scramble to catch up to a digital-first consumer environment.

“You’d think that most of these retailers would be further along in the development of their e-commerce (capabilities),” said Retail Metrics President Ken Perkins, adding that stores were “not as quick to do it as they should’ve been.”

Companies are in the midst of figuring out what works, attacking the challenge from multiple angles and with varying degrees of success. Target plans to roll out more small-format locations and, following a strategy pioneered by Macy’s, use local stores as hybrid distribution centers from which to ship more online orders. Kohl’s has added popular athletic brand Under Armour (UAA) to its brand assortment to lure attention. Wal-Mart acquired e-commerce outfit Jet.com in September for $3 billion in cash, some of which will be paid over time, plus an additional $300 million in Walmart shares.

Shopping centers, as a whole, are drawing on get-out-of-the-house offerings, like restaurants and movie theaters, to breed a new generation of mall rats.

Not all shoppers, however, can be enticed off their sofas. Over Black Friday and the holidays, more “doorbuster” deals were offered online instead of purely in stores. But that’s not necessarily a sign of defeat, according to some analysts.

“We also do not believe that ‘cannibalization’ with respect to online versus brick-and-mortar is a negative, especially when the alternative seems to be just foregoing the online sale altogether,” wrote Charlie O’Shea, a senior credit officer at Moody’s. “It takes time to make the shift, and we note that while the online shift is important, retailers cannot ignore their stores.”

Retail Metrics’ Perkins points to several things retailers can do, including more supply chain and in-store service investments (such as order-online, pickup in store), beefed-up mobile commerce platforms and a focus on differentiated, perhaps exclusive brand offerings that can drive up traffic.

Regardless, store closures appear to be an unavoidable part of the “right-sizing” of America’s retail landscape. J.C. Penney announced in late February the closure of 13%-14% of its 1,000-or-so store base. Macy’s is in the midst of shuttering 100 locations.

Overall, U.S. retailers announced 11,889 layoffs in February, bringing the two-month total to 34,380, according to consultant Challenger, Gray & Christmas. That was more than six times the number of workers idled by the energy industry, which has so far posted the year’s second-largest number of layoffs.

At the same time, Challenger noted that retailers had announced plans to hire 33,000 new workers through February as the focus of operations shifts. In January, the Bureau of Labor Statistics reported that retail saw the most job gains among sectors, with 46,000 new jobs.

“As traffic continues to shift online, at arguably rates faster than these companies expected, there does become a question of the reality of shrinking your physical store base,” Cowen analyst Oliver Chen told Investor’s Business Daily.

The shift is painful, but necessary.  Of the traditional broadline players, Wal-Mart gets a call-out from Cowen for its “renewed consistency” in traffic, inventory levels and U.S. consumer demand.

“We are pleased to see WMT’s e-commerce investments begin to pay off in top-line growth as the retailer has now become the second biggest U.S. online retailer by revenue, top three in traffic, with a #3 app in retail,” noted Chen in late February after the big-box retailer’s earnings results.

Ulta, Home Depot, Lowe’s: Pockets Of Strength

A sector-wide turnaround could take a while, and not everyone will survive.  Sports Authority, Sports Chalet, The Limited, BCBG Max Azria, and Wet Seal all filed for bankruptcy protection over the past year, joined most recently by electronics retailer HHGregg.

But all is not lost. Several outperforming segments in brick-and-mortar retail continue to shine, including off-price, specialty beauty and home improvement stores.

Home improvement led the way as the best-performing retail segment in Q4, according to Retail Metrics.

“Home Depot has done an unbelievable job,” said Marshal Cohen, NPD Group’s chief retail analyst, praising the chain’s strategy of recognizing that what works in-store doesn’t necessarily work online.

“Anything that sells really well in the store, they’ve zeroed in on it and expanded on it,” he said, adding that the same goes for its wide online assortment.

For the quarter, the company handily beat estimates and logged 5.8% growth in comparable sales, well above analyst expectations for a 3.5% gain.

For investors, Home Depot bumped up its dividend by 29%, to 89 cents a share, and OK’d a $15 billion share buyback. Plus, shares have risen steadily, and on Friday traded up 9.8% year-to-date, with a 17% gain over the last 12 months.

Rival Lowe’s (LOW) also toppled forecasts and reported same-store sales figures of 5.1% vs. views for 2.2%. The stock gapped up out of an eight-month cup-with-handle base on March 1, after reporting its strongest combined sales and earnings growth in at least five years.

Credit Suisse recently named the two as “top picks” in the hard-line retail segment, “with LOW offering some of the best value in our group currently if it can sustain the current momentum.”

Analysts at the firm also wrote positively about auto parts companies, adding that AutoZone (AZO) and O’Reilly (ORLY) are likely best-positioned for the near term.

Meanwhile, specialty shops such as Ulta Beauty (ULTA) and LVMH-owned Sephora are still enjoying impressive growth as beauty products remain hot — not to mention difficult to match against one’s complexion online, meaning that in many cases, sampling in store is a must.

Ulta Beauty’s same-store sales growth is unicornlike, consistently in the double-digit range as other retailers struggle to stay in positive territory. Ulta’s fourth-quarter report late Thursday extended the trend, with retail comparable sales up 12.8% and e-commerce sales surging 63.4% to $154.9 million.

The stock bounced to a 4% gain in massive trade Friday morning, leaving it still in buy range above a 274.09 buy point.

And off-price stores remain the bright spot in apparel, as the bargain-hunt environment of TJX (TJX), Ross Stores (ROST) and Burlington Stores (BURL) means that shoppers have to set foot in-store to track down discounted designer brands.

As retailers emerge from this forced evolution, the future of shopping might look quite different. NPD’s Cohen said big broad-line stores will need to “become more of a showcase,” and while online sales appear set to continue to grow, they are unlikely to entirely replace the revenue currently generated by foot traffic.

“It certainly could happen,” said Retail Metrics’ Perkins. Williams-Sonoma (WSM), he pointed out, already gets over 50% of its revenue from e-commerce sales. “(But) I think it’s more likely to come from store closures and less brick-and-mortar sales, as opposed to a rapid expansion that drives up numbers on the online side.”

RELATED:

Ulta Beauty Earnings, Sales Strong, But Guidance Isn’t Pretty

The Era Of New Retail: The End Of Online Vs. Offline Shopping?