McCormick (MKC -0.19%) had some unappetizing news for investors in its most recent earnings report. Sure, the spice and sauce giant's sales continued growing at a solid pace. And profitability held up well despite historic inflation. But McCormick noted a worrying decline in sales volumes as consumers scaled back following its latest round of price increases.

Let's take a closer look at the company's latest trends, and why they confirm that the stock is still on the right track.

Market share growth

For the third quarter (ended August 31), McCormick's revenue expanded by 6% after accounting for currency exchange rate shifts. This marks a nice acceleration compared to the flat result in the prior quarter. Look behind the headline number and you'll see even more reason for optimism.

Yes, sales volumes fell about 2%, reflecting more caution on the part of consumers seeking to save money during this inflationary period. But that modest decline came as McCormick's prices rose 10%. In other words, the company didn't struggle to pass along a portion of higher costs from the last few quarters of rising expenses.

CEO Lawrence Kurzius in a press release highlighted that result as an "effective execution of our strategies against the backdrop of a volatile operating environment."

Margins and cash flow

Yet, higher costs and supply chain challenges are still hurting the business. You can see evidence of this pressure in adjusted gross profit margin, which fell to 35.5% of sales from 38.7% a year ago. Those challenges trickled right down to the bottom line, where adjusted operating profit fell 12% year over year.

But the company might be through the worst of these profit issues. Supply chain bottlenecks are easing right now. McCormick just divested a few of its lowest-margin products, leaving the rest of the portfolio more focused on premium spices, sauces, and condiments.

But the best news could be the pricing power evident in McCormick's latest results. Modest volume declines in the context of a double-digit price increase imply strong customer loyalty. And that bullish reading is supported by the fact that McCormick is still winning market share in its packaged foods niche.

Looking ahead

2022 is still set to look worse than the past few fiscal years. Sales should only grow by about 5% while operating income falls by as much as 10%. Investors had been used to seeing revenue rise by closer to 7% while operating profit steadily jumps by about 10%.

Yet, the slump seems temporary and doesn't reflect a weakening competitive posture. Instead, McCormick continues to dominate an attractive industry niche that's likely to expand at a solid pace over the next several years as more people prepare meals at home.

Add in the fact that McCormick's stock is down almost 40% this year, and you have many of the ingredients you need to make a solid, long-term investment. The next few quarters do involve plenty of risks, particularly around a possible recession on the way.

But McCormick is a successful, dividend paying business with many avenues for strengthening earnings over time. Picking up stocks like this during today's bear market might seem like a great move when you look back a year or two from now.