Macy’s Inc.: hammered. J.C. Penney Co.: crushed. Nordstrom Inc.: clobbered.

Retail giants across the spectrum ailed this week following a spate of underwhelming earnings reports and depressed sales projections for the rest of the year. But in all that malaise, a surprising reality was hidden: Consumers have been on a retail spending tear.

Numbers released by the Commerce Department on Friday showed a 1.3 percent gain in retail spending by consumers in March, exceeding analyst expectations of a modest 0.8 percent gain, with grocery stores and online vendors doing their most brisk business in two years. The news was bright enough to bring some retailers’ stock back into the green Friday.

If consumers are still spending, why are brick-and-mortar department stores still suffering?

Analysts recite a familiar story: Consumers continue to migrate online, and storefront retailers have been too slow to respond. In calls with investors this week, executives at Macy’s, Kohl’s and Nordstrom all cited pressure from online forces, along with initiatives to boost their web offerings.

But those efforts offer no certain solution. “It's not as profitable, and I think everybody is coming around to that,” Kohl’s Chief Financial Officer Wesley McDonald told investors this week, calling himself a “realist on e-comm[erce] versus brick and mortar.” Quarterly profit at Kohl’s fell 87 percent from the same period a year earlier.

“Apparel is fighting an uphill battle,” Cowen analyst Oliver Chen wrote in a note to investors this week.

Despite shifts in consumer behavior — including a precipitous drop in mall traffic — the robust consumer spending environment is expected to make up some of the difference for retailers. That’s why the massive sales declines came as such a surprise.

“We're frankly scratching our heads. We see the same economic data you all see, and it would point to a customer that would be spending more,” Macy's Chief Financial Officer Karen M. Hoguet told investors. Macy's saw its worst sales since the Great Recession in the first three months of the year. “I would say that we too are somewhat puzzled by the data that we're seeing on the consumer and the traffic we're seeing in the stores and on the site.”

There’s one player in the retail space, however, that wasn’t all that puzzled: Amazon. The e-commerce giant left analyst estimates in the dust, posted a 28 percent increase in sales in the first quarter.

On Thursday, Morgan Stanley analysts published estimates showing Amazon had secured the second-highest spot in U.S. apparel sales, behind only Wal-Mart, with an estimated 6.7 percent of the market share. Cowen analysts put that number twice as high, at 14 percent of the retail market.

According to the major brick-and-mortar retailers, however, Amazon was far from the only culprit. A warm winter meant less demand for clothing during a season that typically brings solid sales.

“They are not buying apparel,” Kohl’s CFO McDonald said. “That’s the simple answer.”