The CAPS community has turned bearish on apparel retailer Gap (NYSE: GPS), giving it a sad two-star rating. Debt is rising, margins are squeezed, and it just hasn't been performing up to par, says the CAPS community. Just skip paying dividends and work on getting the business right, they say.

But don't fall out with The Gap. Just to be contrarian, let's make a case that the company has hit the bottom.

The environment is finally turning in Gap's favor, with lower cotton prices and shoppers more willing to spend on candy-colored jeans for spring. More importantly, after several years of stumbling to get the right looks on the racks, it looks as though Gap's various divisions -- Old Navy, Gap, and Banana Republic -- are finally selling something people want to buy.

Thomson Reuters reported that apparel sales rose 8.5% year over year when the books for March were closed this week, better than the nearly 5% it had forecasted. March is an important period for apparel, because that's when stores first get a gauge on how spring fashion is doing. It's also a big sales opportunity, as shoppers buy clothes for Easter.

 And Gap's name keeps popping up as analysts look at who would benefit from a stronger apparel market. This week, Caris & Co. upgraded its rating on the stock and set a price target of $32 per share, while Janney Montgomery Scott raised it from "neutral" to "buy," with a price target from $29 to $33, and Piper Jaffray moved it from "neutral" to "overweight," with a target of $33.

The stock is trading near $27 per share lately, at a P/E of 16 to 17, which makes those targets quite doable, if sales continue to perk up and the all-important price of cotton holds. By contrast, Limited Brands (NYSE: LTD), another specialty clothing conglomerate, is selling at a slight premium to its valuation, as fool Anand Chokkavelu pointed out pointed out recently. And as for other competitors, American Eagle Outfitters (NYSE: AEO) just got a short recommendation from Fool Jacob Roche, and Abercrombie & Fitch (NYSE: ANF) is being talked about as private-equity bait -- bad news for buy-and-hold investors.

Investors looking at specialty retail are still enamored of lululemon athletica (Nasdaq: LULU), but while it's earned all the praise and then some, let's point out the obvious: It's still a small company serving a rather limited market. People will always wear jeans, even in a bad economy. They don't always spend on yoga pants. But that's also a market Gap has taken steps to tap into, by buying the Athleta brand in 2008 and now expanding its store footprint -- just like lululemon.

So the potential is there, but the execution has been lacking in recent years, and the macro trends had not been helping. Gap got clobbered in the past three years by rising cotton prices that were pushing up costs when recession-bound shoppers wouldn't accept rising prices. That kind of top-line pressure made it too difficult to fix bottom-line issues like the debt load, or take on projects to overhaul its brand image or stores. Lower costs will help margins, and rising sales will help -- well, everything.

Thomson Reuters pointed out Gap is finally getting fashion trends right with colored jeans in all its stores, the Diane von Furstenberg's children's line at Gap, and Banana Republic's Mad Men-inspired collection. And the new merchandise is priced right, which is still an issue with the post-recessionary shopper.

Investors tend to put their heads down over the financial statements and can fail to see the big picture: No matter how nice your balance sheet looks, you need to sell a product people want to buy. Now it looks as if Gap has learned its lesson.

If you don't want to fall into The Gap, try instead these three long-term stock plays for your portfolio. The report is free.