Target will enhance team experiences with its new Workday solution.

Apparel turned out to be Target Corp.’s second-quarter silver lining.

Despite reporting a 1.1 percent drop in comparable sales — the discounter’s first quarterly decline in two years — Target said apparel sales picked up in the second quarter. That follows encouraging results from likes of Macy’s Inc. and Kohl’s Corp. last week and a full-throated declaration from Urban Outfitters Inc.’s Richard Hayne Tuesday that fashion is back, which should give additional comfort to those looking for green shoots in the beleaguered industry.

Target’s apparel lift was overshadowed by the impacts of slower store traffic and declining sales of Apple products. The retailer pinned its traffic decline on its pharmacy business’ shift to CVS and executives noted that traffic levels would resume once the transition was complete.

“Our number-one challenge was traffic, which affected sales in all our merchandise categories,” said chief executive officer Brian Cornell to analysts on a conference call.

Comparable sales were particularly hit by declines in the electronics area. “Notably, about one-third of this pressure was driven by Apple products, which were down more than 20 percent in the quarter,” he said.

While Cornell did not get into specifics, many iPhone owners are waiting for fresh models this fall before buying a new phone.

But women’s apparel saw a mid-single-digit comp increase in the quarter, driven by double-digit growth in Target’s own brands, such as Xhilaration and Who What Wear, which focuses on a young, style-savvy shopper. “We’re really pleased with the performance of Who What Wear, which is one of the most productive brands on the women’s floor pad,” Cornell said. As a result, the brand’s assortment will be expanded for fall.

After Cornell said the company’s market share in apparel grew, Citi Research analyst Kate McShane asked whether that growth came at the expense of department stores.

Target’s ceo was coy about just where the company’s apparel share was coming from, but did note that Target was “winning” in the space.

Target executives said the apparel category was also helped along by better displays with mannequins and a more on-trend fashion assortment. Cornell noted Target has invested in talent in order to maintain in-store experience year round.

The company’s been busy recharging its operations and updating its profile. In April, for instance, Target started allowing transgender employee and customers to use the facilities that match their preferred gender. Chief financial officer Cathy Smith said Target would spend $20 million to install gender neutral bathrooms in stores that don’t have them. All but 20 stores will have a unisex bathroom by November, with the remainder getting new restrooms by early next year.

It will take at least another quarter or two for the improvements in apparel to reverberate clearly in Target’s overall results, which in the second quarter strongly showed the impact of the slowdown in electronics and the traffic declines tied to changes in its pharmacy business.

The discounter’s net income for the quarter fell 9.7 percent to $680 million, or $1.16 per diluted share, down from $753 million, or $2.20, a year ago. Adjusted earnings per share were $1.23 and above the FactSet estimate for $1.13.

Sales for the three months ended July 30 decreased 7.2 percent to $16.16 billion from $17.4 billion a year earlier. This was basically in line with the FactSet estimate for $16.17 billion. E-commerce sales grew 16 percent, a steep slowdown from 30 percent expansion a year ago and was a far cry from the company’s goal of 40 percent growth. Plus, Target admitted that digital shipping costs had increased.

Moody’s lead retail analyst Charlie O’Shea said, “Target’s [second-quarter] performance was a mixed bag as we believe the company continues to be impacted by challenged consumers across multiple income demographics, as well as a food business that still needs to gain traction to drive additional traffic.”

The company’s second-quarter gross margin rate improved to 31.3 percent from 30.9 percent as a result of the sale of the pharmacy business and cost savings initiatives.

Target also warned that the second half of the year would be challenging.

The firm lowered guidance for the full year 2016 to a range $4.36 to $4.76 from the prior guidance of $4.76 to $4.96. Third-quarter EPS is projected to be in the range of 75 to 95 cents. This is below the FactSet estimate for 96 cents per share. Target stock fell more than 6 percent to $70.71 as investors were disappointed with the outlook.

O’Shea said, “The downward revision to its second half expectations recognizes that the back-to-school/college and holiday selling seasons may not provide meaningful sales ‘lift,’ and we also believe both seasons will be highly promotional.”

“While Target put up some nice numbers for the second quarter, we think this will be overshadowed by the reduction in 2016 guidance based on management’s expectation that flat to negative comp trends will persist for at least another two quarters,”McShane said.