The company’s grocery business has undergone significant changes in the past few years, including trimming its brick-and-mortar store footprint.