The world of retail is getting beat up this year by inflation and shifting consumer spending habits in response. But Lululemon Athletica (LULU 1.74%) customers are apparently asking: What inflation?

Shares of the athletic wear company rallied by a double-digit percentage after its second quarter earnings update (though the stock remains 27% off all-time highs). Management had predicted sales would be as high as $1.78 billion in the quarter, but the actual result was $1.87 billion -- a 29% year-over-year increase. Additionally, Lululemon was able to maintain its healthy profit margin.  

In a world that is gripped with fear over slowing economic growth, inflation, and rising interest rates, Lululemon just might be able to help jolt your portfolio back into growth. Here's why this top consumer goods stock is a buy.

A popular product with a winning strategy

Lululemon is defying the odds right now. When times get tough, consumers tend to buckle down on spending and opt for value instead of paying for a premium item -- especially one selling at full price. But Lululemon has long avoided using clearances, with the goal of maintaining its quality image, a strategy being put to the test lately. But this brand is passing said test with flying colors.  

Besides beating expectations for Q2, Lululemon's management team anticipates revenue making another sequential increase to as much as $1.805 billion in Q3, or up about 24% from a year ago. But the company's success doesn't just show up in the strong revenue results. Operating profit margin was 21.5% in Q2 (20.1% last year). For the full-year period, CFO Meghan Frank said on the earnings call that the operating margin is tracking toward being the same or slightly higher than 2021. Not bad at all for an inflationary business environment.  

As has been the case for years, Lululemon's high-quality athletic wear is getting a boost from younger generations favoring utility and comfort in their ensembles. But there's clearly more to the story here. From the get go, Lululemon has striven to build as direct a relationship with its customer as possible, and it's doing a stellar job. In-store and e-commerce traffic increased by over 30% and 40%, respectively, last quarter. First-time customer transaction totals rose 20%.  

Besides a fantastic e-commerce business that it operates in-house, Lululemon has been taking a measured approach to expansion. Its store footprint remains small (just 600 locations worldwide), and that's not changing anytime soon as it slowly builds new locations where it makes sense to do so. And the gradual rollout of new product categories also continues at a prudent pace as the company releases a couple items, collects data, and then pushes out new offerings. It's been a winning strategy for years, and all signs point toward this approach continuing to work for the foreseeable future.  

Why the stock is a buy

Business strategy is all well and good, but I believe Lululemon's stock is also pretty great. Operating income is growing at a faster pace than revenue, and the company is repurchasing stock ($125 million worth in Q2). As a result, adjusted earnings per share rose 33%. The stock currently trades for 39 times trailing 12-month adjusted earnings per share.

Of course, that's a premium price tag. If you're interested in this stock, I'd suggest using dollar-cost averaging to build a desired position over time because Lululemon can be volatile. But I think it's worth the premium to match the premium brand. First, the company has proven its ability to maintain a high level of growth for years, and it's handily exceeding long-term guidance for low-teens-percentage annual revenue growth it laid out a few years back. That kind of consistent performance is worth paying up for today.

And second, Lululemon has a stellar balance sheet: virtually no debt and $499 million in cash and equivalents. Capital expenditures to support future expansion have lowered cash on hand this year, as has higher inventory (again, to support expansion and to meet current demand from shoppers) and those share repurchases. Nevertheless, with the company's bottom line on the rise, it will eventually restock its coffers.  

If Lululemon can do this well with the world on the brink of (or maybe already in?) a recession, where will it go when the cloudy skies clear up? After finally starting to nibble on this top apparel brand last quarter, I plan on buying some more after this fantastic Q2 update.