Target (TGT -0.73%) has been the top student in the class of retail over the past few years. The company has grown sales in the double digits -- and at certain points, digital sales rose in the triple digits. It's also progressively grown measures like free cash flow and return on invested capital -- until recently.

Inflation and general economic woes have weighed on Target in recent quarters. And the third quarter showed even more of a slowdown. After the earnings report, Target stock fell 13% in one trading session. Now, the stock is heading for a 30% drop this year.

In spite of today's problems, though, Target offered clues the future may be bright. So, after this crash, is it time to buy?

The latest shopping trends

First, let's take a look at the bad news. Target's comparable sales increased 2.7% in the third quarter -- about the same as the second quarter. But what's different this time around has to do with shopping trends toward the end of the quarter.

Target noted a slowdown in sales growth -- and by October, comparable sales growth slowed to less than 1%. Shoppers have been hit hard by inflation. That means they're watching their budgets, and, worried about the future, have focused on buying essentials and items on sale.

All of this means profit came in lower than Target expected. In addition, the company originally predicted operating margin of 6% toward the end of the year. It's now cut that figure in half.

At the same time, Target itself faces higher costs that weigh on earnings, such as for fuel. These costs have come down somewhat. But they're still double what Target paid back in 2019.

These pressures won't disappear overnight. And even the usually strong holiday shopping season probably won't be enough to make 2022 a great year for Target. But one year usually doesn't define a company -- especially one with a strong earnings track record and future growth potential.

Managing difficult times

At the same time, Target is making efforts to manage in the difficult environment. The company is working on a plan to become as efficient as possible. It expects the efforts to save $2 billion to $3 billion over the next three years. Target also is opening more sortation centers and revamping stores to support long-term growth.

Now let's consider some of the positive points in Target's report. The quarter was Target's 22nd straight quarter of comparable sales growth. Traffic and basket size both grew more than 1%. And Target gained market share in all five of its merchandise categories.

Target's portfolio of owned brands was the star of the quarter. These brands grew at double the rate of the total enterprise. Target's owned brands total 45 and include everything from popular kids label Cat & Jack to its All in Motion activewear line.

Owned brands are developed in house, so they cost Target less than national brands. That means they can be more profitable for Target. And the company still can pass on savings to customers -- a big plus these days.

Shoppers are choosing Target

All of this means shoppers still are choosing Target -- even if they have less money to spend. This is important because it suggests that once the economic environment improves and people have more to spend, Target will benefit.

As for valuation, Target is trading at about 20 times forward earnings estimates. That's compared to more than 30 earlier this year.

This looks cheap if we consider the long-term picture. Target continues to invest in growth, yet has a plan to cut costs where needed. Shoppers keep coming back to this retailer. And the company continues to gain market share even in tough times.

So, is Target a buy right now? The answer is yes. The stock is on sale -- and it could deliver big over time.