Target (TGT -0.54%) stock got hammered on Wednesday. The big-box retailer badly missed earnings expectations for its fiscal third quarter as demand weakened for discretionary products and it was forced to mark down prices in its effort to clear its excess inventory. The stock finished the trading session down 13%.

While its revenue rose 3% -- in line with estimates -- Target's adjusted earnings per share plunged from $3.03 in the year-ago quarter to $1.54 this time, well short of analysts' consensus estimate of $2.13. Gross margin fell by 330 basis points to 24.7% as the company said it's also struggling with theft. On the earnings call, CFO Michael Fiddelke said that theft -- or "shrinkage," as it's known in the industry -- was expected to wipe out $600 million in profit for the company this year. 

For the period, which ended Oct. 29, selling, general, and administrative costs also rose faster than sales due in part to higher wages and increased costs for benefits. As a result, Target's operating margin in the quarter was halved from 7.8% in the prior-year period to 3.9%.

Even worse, management expects the fourth quarter's results to be even weaker. It's guiding for comparable sales to decline by a low-single-digit percentage, compared to the 2.7% increase in the third quarter, and it foresees the company's operating margin slipping to just 3%.

It's not all bad

It's clear why Target's stock price fell by a double-digit percentage after investors saw the Q3 report. It missed both its own guidance and analysts' estimates by wide margins -- but Target is not a broken company. Most of the challenges it's facing are temporary, and there were even some bright spots in the quarter, including its execution on key strategic goals.

For example, Target said it gained unit share -- a measure of market share based on volume rather than dollar value -- in all five of its core merchandise categories. That shows it actually outperformed the retail industry even though its results were disappointing. It's also a sign that Target's challenges are primarily at the macroeconomic level, and not the results of poor execution in the business. Similarly, Amazon has forecast unusually slow growth for its fourth quarter, and Walmart reported declining sales in the general merchandise category.

Additionally, Target's comparable sales in its own brands increased by more than 5% -- twice the growth rate of the overall business. The retailer has at least 10 of its own brands that each produces at least $1 billion in annual sales, and management sees them as a strategic priority. That's because they deliver higher margins than name brands and help generate customer loyalty because they aren't available anywhere else.

Finally, the retailer continued to expand its shop-in-store partnerships with brands like Apple, Walt Disney, and Ulta Beauty. Those deals help it differentiate itself from its competitors and show that it's an attractive partner for top brands.

A temporary setback

If macroeconomic headwinds persist, the next few quarters are likely to be ugly for Target, but the competitive advantages that have made the stock an outperformer over the last few years haven't gone away.

It's one of only three national multi-category retailers in the U.S. -- along with Walmart and Costco Wholesale -- and it has carved out its brand with a focus on "cheap chic" products, a broad geographic footprint that covers urban, suburban, and rural areas, and a growing small-format store concept. It has also leveraged its stores to support its e-commerce business in a cost-effective way, and its owned brand portfolio has grown to more than $30 billion in annual revenue.

Analysts are likely to slash their earnings estimates for Target, but it reported adjusted earnings per share of $13.56 last year, giving it the equivalent of a price-to-earnings ratio of less than 12.

The company may not get back to that level of profitability for a couple of years, but even $10 in EPS next year would make the stock a good deal after this latest share price slide, especially for a Dividend Aristocrat that currently yields 2.8%.

Target expects to have its inventory levels fully normalized by the beginning of the next fiscal year, and demand for discretionary products will eventually rebound once the macroeconomic headwinds lift.

This company, and this stock, are still good bets to outperform over the long term.