Consumer prices edged higher in July, with the Bureau of Labor Statistics reporting a 0.1% monthly increase in the Consumer Price Index, a modest rebound after prices fell 0.4% in June. On an annual basis, inflation cooled slightly, with prices up 3.4% over the past 12 months, down from 3.5% in the year-over-year reading through June.

Shelter costs remained the dominant driver of the monthly increase, rising 0.1% and accounting for roughly two-thirds of July’s overall gain. Both rent and owners’ equivalent rent climbed 0.3% for the month, even as shelter’s yearly increase slowed to 3.2%.

Energy prices provided some relief, falling 1.5% in July as gasoline costs dropped nearly 3%. Still, energy remains a major source of annual inflation pressure, up 14.7% over the past year — largely due to a 24.6% surge in gasoline prices since last July.

Food prices rose a modest 0.1%. Grocery prices actually slipped slightly, pulled down by falling meat, poultry, egg and produce costs, including a 16.4% drop in lettuce prices due to a foodborne illness outbreak linked to cyclospora.

Stripping out volatile food and energy costs, so-called core inflation rose 0.2% in July after holding flat in June, bringing the annual core rate to 2.5%. Medical care costs increased 0.4% for the month, driven by higher hospital and physician charges, even as prescription drug prices fell.

The report offers a mixed bag for policymakers: Overall inflation is cooling on a year-over-year basis, but sticky costs in shelter, medical care and travel suggest price pressures haven’t fully faded.