Macy's Inc raised its annual profit forecast on Thursday, helped by strong demand for high-margin apparel from consumers returning to weddings and other social events, even as red-hot inflation saps consumer spending power.

The department store chain's shares rose 13.8% to $21.86 in premarket trading as the company joined rival Nordstrom Inc in bucking a trend of profit warnings from major retailers who are seeing consumers prioritize spending on household essentials.

Macy's, hit hard by store closures during the pandemic, said consumers were shifting back to in-store shopping from online faster than expected as they ditched casual and athleisure apparel for more expensive dresses, formal wear and shoes.

"(The shift in demand) contributed to an increase in store foot traffic as consumers are more likely to shop in person for occasion-based apparel," Macy's Chief Executive Officer Jeff Gennette said.

The company has also been stocking up on evening gowns, expecting to benefit from social events gathering steam and ahead of what is predicted to be the biggest U.S. wedding season since 1984.

Still, Macy's said it expects more mark downs in the second quarter to get rid of excess inventory of more casual apparel, which is seeing slowing demand.

High-end fashion has also been relatively insulated from the effects of inflation so far this year and companies including Macy's, Nordstrom and Ralph Lauren Corp see affluent consumers continuing to spend.

"From the results we've seen, high-end consumers are more resilient to inflation, while the average consumer is struggling a bit more," Jessica Ramirez, retail analyst at Jane Hali & Associates, said.

Comparable sales at Macy's luxury-focused Bloomingdale's stores rose nearly 27% in the first quarter.

Macy's expects fiscal 2022 adjusted earnings per share of $4.53 to $4.95, compared with its previous forecast of $4.13 to $4.52. It also beat first-quarter profit estimates.