(Reuters) -Gap Inc beat revenue estimates on Thursday on strong sales at its Banana Republic division, but withdrew its annual forecasts as the apparel chain struggles with an inventory build-up and tepid demand for outdated Old Navy items.

People have been opting for suits, dresses and skirts over casual wear as they venture out for social events, to offices, and travel more, with demand for affordable luxury which Banana Republic specializes in staying firm.

Gap said sales trends improved in July and into August, coinciding with a drop in gas prices, sending its shares up 6% in extended trading.

Second-quarter net sales of $3.86 billion topped Wall Street expectations of $3.82 billion, buoyed by a 9% jump in sales at Banana Republic, even as Gap struggled to sell out-of-fashion clothes at Old Navy.

U.S. apparel retailers including Kohl’s and Abercrombie & Fitch have warned of steep discounts to offload excess inventory of casual wear, which were popular during the height of the pandemic.

“Our elevated inventory and pressured margins are current realities against unsettled market conditions,” Gap Executive Chairman Bob Martin said.

The company, which recorded an inventory impairment charge of $58 million, said stocks at the end of the second quarter were 37% higher from a year earlier.

The owner of Athleta brand, which is in the midst of a CEO transition after Sonia Syngal stepped down last month, said it would open up to 30 Old Navy stores this year, compared with a prior expectation of up to 40 new stores.

Gap in May had forecast fiscal 2022 adjusted earnings per share between 30 cents and 60 cents and revenue to decline in low- to mid-single digit percentage.

(Reporting by Praveen Paramasivam in Bengaluru; Editing by Vinay Dwivedi)