Last week, several retail stocks last week suffered hideously painful price smackdowns. The grim reality of rising commodity costs and tighter consumer budgets has begun to manifest in retailers' quarterly earnings reports.

Reality bites
Take Gap (NYSE: GPS), for instance. On Friday, the stock fell about 17.5%. Its first-quarter net income plunged 23%, to $233 million, or $0.40 per share. Revenue fell 1%, to $3.3 billion, and same-store sales fell 3%. The company named rising costs as the culprit, with sourcing cost inflation particularly dragging on its value channel.

Aeropostale (NYSE: ARO) joined Gap in the ranks of the reality-checked, as its share price fell about 14.3%. First-quarter net income dropped 64%, to $16.4 million, or $0.20 per share. Net sales increased 1% to $469.2 million, and same-store sales plunged 7%. Not surprisingly, Aeropostale named discounting and "industrywide cost increases" as its big problems.

Earlier last week, retailers including Coldwater Creek (Nasdaq: CWTR) and Buckle (NYSE: BKE) plunged, too. Retail's always competitive, but add in consumers who are struggling to pay for gas and food -- and therefore, can't put clothing in the budget -- and you'll get this kind of carnage in retail results.

Retailers won't have an easy time navigating this difficult environment. If you're hearing the same rumblings I am about "demand destruction" for gas and dairy, then you'd better believe there's going to be "demand destruction" for khakis, T-shirts, skirts, and blue jeans. At some point, prices get so high that people simply won't (or can't) pay up for all of these things.

Some bargains, some value traps
Investors can look for opportunities to invest in some of these beat-up retail stocks, as long as they're cautious in this precarious environment.

Take Buckle. Even though the stock plunged significantly, missing analysts' estimates, its quarter really wasn't that bad, especially compared to some of these other banged-up retailers. Buckle's first-quarter net income increased 11.3%, to $33.5 million, or $0.71 per share. Sales rose 12% and same-store sales jumped 8%. Cooler heads ought to prevail here, snapping up shares of this retailer during its current moment of weakness, because under the current economic circumstances, Buckle's quarter went pretty darn well.

Like Buckle, I've long liked Aeropostale -- it was my pick for our 11 O'Clock Stock series last summer. I remember fondly how well this retailer performed during recessionary times. Aeropostale and Buckle were both retail outliers, in fact, so I wouldn't rush to the exit on either one. Check out Aeropostale's performance in sales and earnings from fiscal 2007 through fiscal 2010. The impressive double-digit percentage growth it posted in both metrics makes for difficult comparisons now.

Aeropostale's price-to-earnings ratio of seven looks much cheaper than Buckle, which is trading at 14 times earnings. However, recent indications of slowing momentum make Aeropostale less appealing than Buckle right now.

If you welcome the possibility of getting caught in a real value trap, try on Coldwater Creek for size. It warned that it will report a first-quarter loss of $0.32 to $0.34 per share with revenue falling 26%. There are plenty of good reasons why investors should heed the warnings that it's not safe to go into that water.

As for Gap, it's been struggling to resonate with customers for so long that the last thing on earth it needs is to also grapple with rising costs. I'd call that one a value trap at this point, too.

Some stocks are on sale for a good reason
Rising costs are an industrywide problem in retail, making now a tricky time for these companies to excel. Investors should seek out the highest-quality retail companies, bolstered by solid brands and cash on their balance sheets. Some retail stocks will definitely turn out to be value traps, making it more important than ever for Fools to shop carefully.

Do you have an opinion on which retail stocks are post-bloodbath bargains, and which are value traps? Let us know in the comments box below.