On my way home from work a few weeks ago, I stopped in at a Safeway (NYSE:SWY) I hadn't been to in a while. My first thought when I went to the produce section was that it looked very similar to a Whole Foods (NASDAQ:WFMI) store. There was a plethora of organic fruits and vegetables, a faux wood floor, and an overall atmosphere unlike I'd seen in any other Safeway. I later found out this was because I had entered one of its newly designed Lifestyle stores.

It's well known that Safeway and other typical grocers, including Albertsons (NYSE:ABS) and Kroger (NYSE:KR), are being forced to update their image to compete with the newer stores. Of course, it can't lean too far toward that segment because that would entail a complete restructuring and it likely wouldn't be able to compete playing catchup.

Of course, that's not all Safeway has to contend with. On the opposite end of the spectrum, large discounters such as Wal-Mart (NYSE:WMT) and Costco (NASDAQ:COST) continue to breathe down its neck.

So, what's Safeway to do? Actually, I think it's doing pretty much what it needs to do. It's keeping its core business in place, while also appealing to both the discount and more selective shoppers.

Based on its latest earnings, Safeway seems to be handling the dual-front battle fairly well, but not great. For the third quarter, it posted earnings of $122.5 million, or $0.27 per share. That's down from the $159.2 million, or $0.35 per share, it earned last year. However, sales climbed 7.2% to $8.9 billion on the strength of fuel sales, improved marketing, and its new Lifestyle stores.

Comparable store sales were up 5.7%, while identical store sales, which exclude new or remodeled stores, increased 5.4% (3.4% excluding fuel). Gross profit was down just under 100 basis points to 28.58%. Fuel sales, which have lower margins, accounted for more than two-thirds of the decrease. The remaining third was due to the opening of 79 Lifestyle stores, increased advertising, and higher energy costs.

Looking ahead, Safeway expects to post identical store sales at the upper end of its previously announced range of 2.5% to 2.8%. It's also satisfied with the current earnings projections of $1.44 per share for the year.

Overall, I think Safeway has proven it's capable of modifying its business as needed. In the midst of recovering from the strikes in California, it's performed reasonably well in an environment with intense competition. Its pile of cash and recently initiated dividend make it an appealing option, but I'd like to see how its margins and earnings hold up before proceeding to the checkout.

Feel free to shop some other grocers here:

Whole Foods and Costco are Motley Fool Stock Advisor selections.

The Motley Fool has kicked off its ninth annual Foolanthropy campaign! Nominate your favorite charities on our Foolanthropy discussion board through Nov. 1. For guidelines on what makes a charity Foolish, visit www.foolanthropy.com .

Fool contributor Mike Cianciolo welcomes feedback and doesn't own shares of any of the companies in this article.