Investors pushed shares of lululemon athletica (NASDAQ:LULU) down by more than 16% last week amid concerns over the athletic apparel company's shrinking margins. The massacre followed Lululemon's second-quarter results, which left a lot to be desired. While Lululemon's earnings came in slightly ahead of Wall Street's expectations, it was rising inventories and deteriorating margins that sent investors running for the hills.

Mixed results
The yoga apparel maker's net revenue climbed 16% to $453 million in the quarter, up from $390.7 million during the same period a year ago. Lululemon's second-quarter earnings were slightly better than the year-ago quarter coming in at $0.34 per share, compared to $0.33 per share in fiscal 2014. The company raised its full-year outlook to between $2.025 billion and $2.055 billion, with earnings per share in the range of $1.87 to $1.92 in fiscal 2015. Nevertheless, ballooning inventories were to blame for shaking investor confidence in the quarter.

Inventory soared 55% to $280.6 million at the end of the second quarter, up from just $180.5 million in the year-ago period. This is worrisome because it could force the retailer to discount merchandise in the quarters ahead, thereby further reducing margins. Despite these mixed results, I believe the recent pullback in the stock creates a buying opportunity for patient investors. Let me explain.

An attractive valuation
For starters, Lululemon's stock finally appears fairly valued. In fact, shares look cheap trading at around $53 apiece, or around just 1.68 times earnings growth. For comparison, that is significantly below the industry average price-to-earnings growth rate of 2.06 today. Not to mention, analysts' average price target for the stock is currently $64 a share -- a meaningful improvement from where the stock currently trades. Following the recent sell-off, the risk to reward for investors looks attractive.

Additionally, investors shouldn't overlook the fact that Lululemon's comparable sales are on the rise. In the latest quarter, for example, sales at stores open at least a year increased 6%. This is important because it is the first positive comps figure the company has posted in the past four quarters.

The luxury fitness retailer is also selling more merchandise through its e-commerce channel. During the second-quarter, direct-to-consumer sales increased 35% on a constant dollar basis. Moreover, online sales now account for more than 18% of total revenue, up from 16% a year ago. There is also the men's business that is gaining steam these days. What was once a women's brand is now evolving into a brand that both female and male athletes gravitate toward. To be sure, Lululemon's men's business grew 31% on a combined comparable sales basis in the second quarter. Together, these things signal that the fundamentals of the company are anything but broken.

More reasons to take the contrarian view on Lululemon
The shift toward athleisure wear and international expansion offer investors two more reasons to be bullish about the stock long term. Not only does Lululemon operate in the fast-growing athletic apparel industry, but it also helped pioneer the "athleisure wear" category.

Competition has certainly intensified in this space recently, with everyone from Gap and Victoria's Secret to celebrities such as Carrie Underwood getting into the athletic wear. However, there is room for more than one key player in this market today. Andrew Burns, an analyst at D.A. Davison & Co., says consumers are spending more of their annual apparel budget on athletic wear. Burns and other analysts expect this trend to stick around.

Not only is Lululemon well positioned to capitalize on this trend, but it also stands to benefit from increased sales overseas. The company is extremely regimented in its approach to new store openings. Before entering a new market, for example, Lululemon tests the demand for its products in that region by opening showrooms. The company then hires local fitness experts as Lululemon brand ambassadors as part of its "grassroots" approach to building brand awareness in new markets.

Screen Shot

Red: Lululemon stores. Black: Lululemon showrooms. Source: Lululemon Athletica.

This means that, while Lululemon takes longer than rivals such as Gap's Athleta brand to open new locations, these fresh retail stores tend to perform exceptionally well even in unfamiliar territory. On the quarterly conference call, Lululemon chief executive Laurent Potdevin said: "Within Asia, we've seen all of our new stores exceed initial plans. Our first store in Hong Kong, which opened this past quarter at IFC Mall, is in contention to be the most productive store in the Company on a per square foot basis."

Screen Shot

Lululemon showrooms in Europe and Asia today. Source: Lululemon Athletica.

The bulk of Lululemon's 336-store base is currently located in the United States and Canada. However, the company is aggressively expanding into Europe and Asia today with dozens of showrooms slated to open in the quarters ahead. This should create another lucrative revenue stream for Lululemon outside of North America.

The good, the bad, and the takeaway
There is no doubt that Lululemon has considerable inventory to sell in the second half of the year. However, this is a near-term challenge that shouldn't hinder long-term investors' interest in the stock. Ultimately, Lululemon's positioning in the fast-growing "athleisure wear" category and expansion opportunities overseas should help fuel revenue growth over the long haul. This coupled with the stock's reasonable valuation make Lululemon Athletica a no-brainer for long-term investors.

Tamara Walsh owns shares of Lululemon Athletica. The Motley Fool owns and recommends Lululemon Athletica. Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.