Chipotle Mexican Grill (CMG 0.55%) shares are down 12.8% year to date, which is slightly worse than the S&P 500's loss of 10.1% at the time of this writing. That's despite reporting year-over-year sales growth of 16% for the first quarter. 

Many companies are battling higher costs due to inflationary pressures in the supply chain. Chipotle felt some of these headwinds last quarter with higher costs of beef, avocados, and paper -- which it has partially offset through higher menu prices

The restaurant chain is clearly taking the inflation headwinds in stride. Its 9% increase in comparable sales in this environment reflects a high level of customer satisfaction with the menu offering and service, and investors are taking notice. The stock is up about 5% since the earnings report. 

Here's why the sell-off might be a good buying opportunity.

Digital is an advantage

Investors had to be pleased with the company's digital sales momentum. In-store sales grew 33% year over year while digital sales still represented 42% of food and beverage revenue. This compares to 45% for 2021 and 46% in 2020. 

Digital orders represent Chipotle's highest-margin transactions, so momentum on the digital side positions the business well for continued growth in profits over the long term, which is what investors care about most.

"Our digital sales remain a big part of our business due to it being a convenient, frictionless experience that has been enhanced by continuous technology investments to improve operational execution," CEO Brian Niccol said during the first-quarter earnings call. 

Niccol added that it only takes 10 minutes from the time an order is placed until it is ready for pickup. This reflects a well-oiled machine. Management's focus on investing in employee training, providing attractive wages and benefits, and putting incentives in place for restaurant-level efficiency might be an overlooked advantage for the company. 

Two people eating outside at a restaurant.

Image source: Getty Images.

More restaurant openings = more profits

The investments Chipotle has made in digital ordering are a key reason shareholders should expect further gains. Chipotlanes, which is what the company calls the drive-thru format for digital order pickup, became a key advantage during the pandemic. Management still sees room to open more restaurants, which means more Chipotlanes and opportunities to push margins higher.

"We're not even halfway to our goal of reaching 7,000 restaurants in North America and are building a real estate pipeline that will accelerate new unit growth in the range of 8% to 10% per year," Niccol said. 

Following the food safety incidents that caused restaurant traffic and profits to plunge in 2016, Chipotle has seen its profit margin gradually recover to previous levels. This is leading to rising returns on invested capital (ROIC), which reached a high of nearly 30% over the last year.

CMG Return on Invested Capital Chart

CMG Return on Invested Capital data by YCharts

The improvement in ROIC means Chipotle is getting more efficient and finding ways to squeeze more profit out of its restaurants.

Given the company's performance over the past five years and in the recent quarter, investors should remain patient with the stock. Instead of following the herd and selling, investors should look for opportunities to add shares during the market sell-off. This top restaurant stock has more upside to offer as the company continues to expand.