Retail businesses have faced their share of challenges in recent years, from supply chain disruptions to rising inflation, and in more recent times, concerns about the impact of President Donald Trump's import tariffs. Any pressure on prices represents a headwind for these players in two ways: They face higher costs, and their customers may find themselves with less buying power.

This is a situation that arises during certain economic periods over time, and it can hurt even well-established companies. But the good news is some of these players have what it takes to surmount this challenge over the long run. Meanwhile, as they experience headwinds, they may see their valuations fall, and this offers investors a fantastic opportunity to get in on these players at a reasonable price.

With all of this in mind, let's check out my two favorite stocks to buy right now.

A person opens a box that was just delivered and pulls out a piece of clothing.

Image source: Getty Images.

1. Target

Target (TGT 0.01%) has struggled in recent years as economic factors have hurt consumers' buying power, and the difficulties continued into the most recent quarter as net sales slipped 2.8%. The company also has faced criticism from some groups for its diversity, equity, and inclusion program, then criticism from others as it toned down these initiatives. All of this has hurt sales growth too.

But it's important to consider some key positive points that could lead to long-term revenue growth and share-price performance. First of all, Target's sales soared during early pandemic days, with the company gaining more than $30 billion in just a few years -- and Target has kept its gains as you can see in the chart below.

TGT Revenue (Annual) Chart

TGT Revenue (Annual) data by YCharts.

The retailer, which built up its digital presence in those initial pandemic times, continues to see growth in that area. Even in the recent, difficult quarter, Target reported a 4.7% increase in digital comparable sales. And to address the overall slowdown in growth, Target just established its Enterprise Acceleration Office to drive efficiency.

Finally, something I really like about Target is the company's more than 40 "owned brands." One-quarter of them have become billion-dollar businesses, and since Target has more control over costs, these brands represent compelling growth opportunities. Gross margin is generally higher for these compared to national brands, the company has said.

On top of this, Target, as a Dividend King, has raised its dividend for more than 50 years and offers a dividend yield of 4.8%, superior to the S&P 500 dividend yield of 1.2%. All of this makes Target, trading at only 11x forward earnings estimates, a smart recovery story to buy right now.

2. Amazon

Amazon (AMZN -0.64%) has seen its stock slip this year amid concern about Trump's import tariff plan and the impact that could have on its two booming businesses -- e-commerce and cloud computing. In e-commerce, Amazon relies on imports from around the world. And in cloud computing, Amazon Web Services (AWS) customers, if dealing with tighter budgets due to rising prices, could cut their spending on cloud services.

Those elements made investors think twice before buying Amazon shares in recent weeks. But it's important to focus on the long-term picture, and by doing this, it's clear this market leader -- in both of those big businesses -- can manage such headwinds and has bright days ahead.

First, let's talk e-commerce. Amazon, after seeing profit shift to a loss amid higher inflation a few years ago, revamped its cost structure. This project not only helped the company quickly return to profit, but these efforts also should serve Amazon well during other difficult times. One key move was to develop regional centers for the management of inventory. So when you order a package from your home in Florida, for example, it won't come from across the country but instead from a nearby facility. This has helped Amazon become more efficient and reduce the costs associated with the sales and delivery of each product.

As for cloud computing, Amazon has gone all in on one of the highest-growth technologies around: artificial intelligence (AI). AWS offers a wide variety of products and services to its customers, and this has helped AWS reach a $117 billion annual-revenue run rate.

Now, let's consider Amazon's valuation. Today, it's trading for 32x forward earnings estimates, down from more than 40x early this year. This offers savvy, long-term investors a great entry point for a stock that could soar over the long run.