If you think restaurants have a handle on their food costs after years of managing inflation, think again.

Food expenses just pulled the rug from under Chipotle Mexican Grill's (CMG 1.07%) profits this quarter, leading the burrito chain to roll back expectations. Analysts had forecast $2.09 in earnings, but Chipotle says that, since food costs rose to 33.5 % of sales, profits will be closer to $1.95.

If food prices are set for a repeat performance as spoilers in restaurants' 2013 earnings, what's that mean for the fast-growing casual dining sector?

Wing and a prayer
Buffalo Wild Wings (BWLD) is the poster child for sensitivity to food costs. B-Dubs buys its chicken wings at market prices, and in any given period they could make up 18% or, heck, 27% of the cost of sales. The company just doesn't know. As B-Dubs explains in financial filings, "the cost of goods sold is difficult to predict." Last quarter, for example, wings cost $1.97 a pound, which was 70% higher than the year-ago quarter.

Those surging costs helped fuel a roller-coaster ride for the stock in 2012. Shares bounced from a low of $63 to a high of $94 before ending the year not far from where they started, at about $70. Investors should expect more of that kind of volatility, especially with food costs on the move.

Plenty of dough
But if you're hunting for a casual dining business that has a good handle on commodity costs, consider Panera Bread (PNRA). Last quarter, food costs at the baker actually fell, from 30.1% to 29.9% of sales. Food expenses also fell year over year in the quarter before that.

Of course, it helps that Panera has complete control over the supply of its main ingredient, dough. The company's 24 bakeries, spread out across the country, deliver tons of fresh dough to franchisees every day. That cozy setup makes Panera's costs a lot more predictable. 

Check, please
Still, Chipotle's weak earnings might put some pressure on Panera's shares. After all, both companies are now valued at a pricey 30 times earnings. But I think it would be a mistake to dump Panera on cost inflation worries now. Instead, I'd consider any reactionary sell-off as a fine opportunity to pick up shares.