June 29 (Reuters) - McCormick & Co raised its annual adjusted profit forecast on Thursday, betting on price hikes and steady demand for its condiments and spices as consumers choose to cook more at home amid stubborn inflationary pressures.

The Cholula hot sauce maker, like several other U.S. food companies, has been raising prices to weather surging input costs and other expenses due to supply chain disruptions.

The company now expects annual adjusted earnings per share between $2.60 and $2.65, compared with its previous forecast of $2.56 to $2.61 per share.

The price hikes aided McCormick's gross margins, which expanded 310 basis points in the second quarter ended May 31.

But higher prices pushed inflation-weary consumers to trade down to cheaper alternatives. The company's overall volumes declined 1% during the period.

McCormick's consumer segment, which comprises Cattlemen's BBQ Sauce and Billy Bee honey, saw a 2% drop in volumes in the quarter.

The company's overall net sales rose 8% to $1.66 billion in the quarter. Analysts on average expected $1.67 billion, according to Refinitiv data.

Excluding items, the company reported a profit of 60 cents per share, compared with analysts' expectations of 57 cents per share.

The company also reaffirmed its sales forecast for the year.

Separately, on Wednesday, McCormick said Chief Operating Officer Brendan Foley would take over as its chief executive officer in September, succeeding Lawrence Kurzius.

(Reporting by Juveria Tabassum in Bengaluru; Editing by Shilpi Majumdar)