Last week, Target (NYSE:TGT) revealed that sales continued rising rapidly last quarter. However, despite the strong sales result, the company's operating margin contracted, and earnings per share missed the analyst consensus.

As a result, Target joined the general rout that has affected most retail stocks this month. Indeed, the stock has lost more than 20% of its value since the second week of November. Considering Target's growing sales momentum, this seems like a great buying opportunity for long-term investors.

TGT Chart

Target Stock Performance. Data by YCharts.

Digging into the numbers

In the third quarter, Target posted a 5.1% comp-sales gain, driven by a 5.3% increase in comparable traffic. Digital sales surged 49%, accounting for 1.9 percentage points of Target's comp-sales growth. New stores -- primarily smaller-format locations in dense urban areas and near college campuses -- added to Target's growth. Total sales rose 5.7% to $17.6 billion.

That said, Target's strong sales growth came at a price. Most notably, supply chain costs rose, partially because of the timing of when holiday merchandise arrived but also due to the cost of fulfilling online orders as e-commerce becomes a bigger chunk of Target's business.

As a result, gross margin fell to 28.7% from 29.6% a year earlier, more than offsetting a modest decline in depreciation and amortization expense. This caused Target's operating margin to slip to 4.6% from 5% in the third quarter of fiscal 2017. Adjusted EPS still surged 20% to $1.09, as tax reform led to a significantly lower effective tax rate. However, analysts had been expecting Target to post EPS of $1.12.

Investors were hoping for more

As strong as Target's third-quarter sales performance was, many investors were hoping for even better results. After all, comp sales surged 6.5% in the second quarter, allowing the cheap-chic retailer to comfortably beat analysts' earnings estimates and raise its full-year guidance.

The exterior of a Target store.

Target's sales growth slowed last quarter but remained quite strong. Image source: Target.

Looking ahead to the fourth quarter, Target expects comp-sales growth of around 5%, which would be roughly in line with its year-to-date trend. Margin pressure is expected to moderate but not disappear. Target's full-year adjusted EPS guidance range of $5.30 to $5.50 is right in line with what analysts have been predicting.

Nevertheless, many investors were probably hoping for an even better holiday-quarter outlook. After all, Target is likely to be the biggest beneficiary of Toys R Us's disappearance from the U.S. retail scene due to its strength in the toy category. Furthermore, Target is investing heavily in initiatives to drive sales growth, such as offering free two-day shipping to all customers with no minimum purchase during the holiday season.

Sales growth is what matters right now

It's understandable that investors are worried about Target's declining operating margin, given that the company won't be able to rely on a falling tax rate to drive earnings growth next year. That said, the market seems to be focusing a little too much on the current margin pressure.

In the long run, Target is well positioned to stabilize and perhaps even improve its profit margin. For example, during the recent earnings call, CEO Brian Cornell talked about opportunities to automate tasks like inventory replenishment to reduce costs and improve labor efficiency over the next few years.

At the moment, Target isn't generating enough cost savings to offset rising fulfillment costs and other investments, but that should change within a year or two. Meanwhile, Target's mid-single-digit comp-sales growth indicates that the company's merchandise offerings are resonating with customers. If the company can maintain that pace of sales growth while capturing cost savings in the coming years, it should be able to achieve strong earnings growth.

In short, there are good reasons to believe that margin pressure is a temporary issue at Target. By contrast, Target's strong sales growth may have more staying power, even if it won't last forever. With Target stock currently trading for less than 13 times earnings, it may be a good time to scoop up shares of this long-term retail industry winner.

Adam Levine-Weinberg has no position in any of the stocks mentioned. The Motley Fool has no position in any of the stocks mentioned. The Motley Fool has a disclosure policy.