Britain’s biggest bakery chain is back in the black.

Having made its first annual loss in 40 years in 2020 as coronavirus store closures hit home, Greggs has bounced back into profit in the first half of 2021. Total sales in the 26 weeks to 3 July reached £546.2m from £300.6m in the previous year, it reported today as it announced plans to hire 500 more staff.

Pre-tax profit was £55.5m, up from a £64.5m loss in the same period in 2020.

It wasn’t all good news, though. Because Greggs also became the latest food company to point to rising costs as a major threat to profitability in the year ahead.

Fmcg giants like Unilever, Nestlé, Heineken and Reckitt Benckiser have all have warned commodity cost pressures are putting the squeeze on margins in recent weeks. Fever-Tree, meanwhile, warned that gross margins had been “significantly” hit by elevated global logistics costs.

Indeed, the rise in transport costs, combined with oil price increases and problems in shipping, have caused a surge in global food prices in recent months.

In May, the UN FAO Food Price Index rose at its fastest monthly rate in more than a decade, hitting its highest value since September 2011. And while global food commodity prices fell in June for the first time in 12 months, they remained 33.9% higher than they were in 2020.

Shoppers are already feeling the pinch. According to the latest data from the ONS, the consumer prices index (CPI) rose by 2.5% in the 12 months leading up to June 2021 – the highest rate for nearly three years.

Food and non-alcoholic beverages were among the biggest drivers behind that increase, with only transport making a bigger contribution to the CPIH 12-month inflation rate. Prices rose by 0.2% from May to June this year, compared with a fall of 0.6% in the same two months a year ago.

And it’s only set to get worse for British households. Greggs reckons it can keep a lid on rising costs in 2021 thanks to forward purchasing. But others aren’t so confident. Heineken warned yesterday that higher commodity prices will “start affecting us in the second half of this year and have a material effect in 2022”.

Of course, manufacturers won’t be able to pass the full burden of higher costs on to consumers a situation causing investors obvious concern.

Just look at Reckitt Benckiser, whose shares fell by around 10% after it said it was looking at 8%-9% inflation on the cost of goods over the full year for 2021. Unilever’s shares also fell after it warned mounting costs would leave full-year margins flat despite strong sales growth.

“For years, the market has assumed that big consumer goods companies had such strong brands that it was easy to pass on any extra costs to the customer in the form of higher prices,” said AJ Bell. “Unilever recently showed that wasn’t quite the case, and now Reckitt has also poured cold water on that theory.”

Today, even Greggs’ shares dropped more than 2% (before recovering after lunch), despite the plethora of good sales news as focus shifted to the bottom line implications of these rising costs.

With the global pandemic, Brexit and the ongoing labour shortages adding further complexity to supply chains, costs will no doubt continue to rise in the coming months, putting a further squeeze on grocery businesses.

We’ve already had warnings of a turkey shortage this Christmas, while Arla says it is doing its best to avoid a “summer of disruption” as it battles to keep milk on shelves.

So, while fears of high street ruin are waning thanks to the remarkable recovery of businesses like Greggs, it’s not time to break out the celebratory sausage rolls just yet.