Nordstrom (NYSE:JWN) returned to earnings growth last quarter, as the reduced corporate tax rate helped the upscale retailer post a double-digit increase in earnings per share. Investors still dumped Nordstrom stock in after-hours trading on Thursday, punishing the company for weak comparable-store sales growth.

However, Nordstrom maintained its full-year comp sales guidance and even improved its EPS forecast (albeit just slightly). As a result, Nordstrom stock's 7% after-hours decline seems like a massive overreaction -- and a nice buying opportunity for long-term investors.

Sales momentum slows

In the first quarter, Nordstrom's revenue rose 6.2% to $3.56 billion, boosted by store openings, the timing of a promotional event, and rising credit card income. Comparable-store sales -- a metric that excludes these three factors -- rose 0.6%. This was made up of a 0.7% increase in the full-line segment and 0.4% growth in the Nordstrom Rack off-price business.

Investors were disappointed by this comp sales result. On average, Wall Street analysts had expected 1.1% comp sales growth. Additionally, the 0.6% increase marked a sharp slowdown relative to the fourth quarter, when Nordstrom posted a 2.6% comp sales gain.

The exterior of a Nordstrom Rack store, with a Nordstrom full-line store in the background

Nordstrom saw a sales slowdown in its Nordstrom Rack stores last quarter. Image source: Nordstrom.

On the other hand, Nordstrom's Q1 comp sales gain was roughly in line with its 0.8% full-year increase in fiscal 2017. During the company's earnings call, management attributed the modest slowdown to unseasonably cold weather during parts of the quarter and some changes to the company's marketing.

Profitability holds up nicely

Even if Nordstrom's sales performance was subpar, the company more than made up for it with solid profitability in the first quarter. Operating profit ticked up slightly to $153 million from $151 million a year earlier. A modest decline in gross margin and a modest increase in operating expenses were fully offset by higher sales and a greater than 20% jump in credit card income.

Thanks to the benefit of tax reform, EPS reached $0.51 last quarter. That was up from $0.37 a year earlier, or $0.43 excluding a special charge related to refinancing some debt.

Nordstrom's stable profitability and strong EPS growth was particularly impressive because the company opened its highly regarded flagship men's store in Manhattan last month. As a result, Nordstrom incurred substantial pre-opening costs during the first quarter.

Over the past several years, Nordstrom has experienced severe margin headwinds related to the long-term investments it has been making in its business. The fact that it was able to keep its profit margin roughly stable last quarter despite incurring pre-opening costs for the Manhattan men's store validates management's claim that Nordstrom is finally reaching an inflection point in terms of profitability.

The outlook remains solid

Despite its soft Q1 sales performance, Nordstrom maintained its full-year guidance for 0.5% to 1.5% comp sales growth. Additionally, the company's solid margin performance encouraged management to bump up the low end of the EPS guidance range by $0.05. Nordstrom's new forecast calls for EPS between $3.35 and $3.55 in fiscal 2018.

After falling 7% in after-hours trading on Thursday evening, Nordstrom stock trades for less than 14 times the midpoint of this updated EPS forecast. Furthermore, free cash flow has started to routinely outpace EPS as Nordstrom's capex has moderated, making the stock even cheaper than this earnings multiple would imply.

This makes Nordstrom stock a compelling bargain in light of its recent margin stabilization. As some of its recent investments start to pay off, the company has an opportunity to improve its profitability significantly.

Even if comp sales increases remain modest, a return to margin expansion would drive strong EPS growth, unlocking substantial upside for Nordstrom stock. As a result, I plan to hold on to all of my shares for the foreseeable future, while reinvesting the dividends to gradually add to my stake in Nordstorm.

Adam Levine-Weinberg owns shares of Nordstrom. The Motley Fool recommends Nordstrom. The Motley Fool has a disclosure policy.