The Gap is in the fight of its life.

You remember that TV commercial jingle that entered the American consciousness in the 1970s, right?

It went like this: "Fall into the Gap" - and it featured a good-looking, 20-something couple dressed from head-to-toe in Gap clothes.

It became an image for American cool.

Now, it seems that the Gap is shrinking. On July 26, it closed the first 20 of 175 stores, including two in northeastern Pennsylvania and one in North Jersey, marking the second retrenchment since 2011.

The retail perfect storm has nipped its dominance, thanks to the rise of online shopping and a core of trendy retailers, such as H&M and Forever 21, that now dominate the junior apparel market.

Some say Gap peaked when teens had the money to buy such trendy duds, priced mid-point and higher. But now, with a 24 percent unemployment rate among teens, and their priorities having shifted to such things as iPhones, the landscape turned on the Gap. It didn't help that many Gaps were set in mediocre malls.

Experts say Gap's downsizing from 700 to just over 500 stores reflects online's ongoing battering of brick-and-mortar stores - where suddenly a vast retail footprint no longer matters as much.

It used to be that a retailer's biggest competitor was next door at the mall. Now, it's Web pop-ups and e-commerce, and that change is why traditional mall stalwarts, such as Sears, J.C. Penney, and J Crew, have also closed stores.

"This isn't about what went wrong. So much of it is about right-sizing for a changing marketplace," said retail analyst Garrick Brown of real estate consulting firm DTZ. "Most of what [Gap] will be closing are locations in class B or C malls."

Gap global president Jeff Kirwan said in June that the downsizing "reflects the shift in the way customers now shop" and that moving to online "allows us to build for the future."

Gap Inc., the parent of mid-to higher-priced Gap, mid-priced Banana Republic, and cheaper-priced Old Navy (along with two other brands: Athleta and Intermix), reported net sales of $1.54 billion for the five-week period ending July 4, which is flat compared with the same time last year.

Generally, retailers try to recapture 25 percent to 30 percent of lost store sales online.

In 2013, the company began rolling out Reserve in Store, an integrated shopping experience designed to make it easier for customers to shop online, from any device, put their favorite styles on hold, and pick them up in Gap and Banana Republic stores. Wish List, an online tool for consumers to share holiday wants from five company brands, was introduced last November.

While store sales have stalled at the Gap and Banana Republic, online sales have shot up at both, last quarter's earnings show. "They have done an excellent job in building up their e-commerce platform to grow sales for both of those concepts," Brown said.

In July, the company also sent an e-mail blast to loyal customers proclaiming that 300 Gap Factory outlet stores are now online, and offered a 20 percent discount on such a purchase.

"Even those retailers you would consider best in class, like the Gap, are still finding out that they don't need as much of a retail footprint for brick-and-mortar," Brown of DTZ said. The store closings should strengthen Gap in the long term, he said.

"This is the new world of retail," he added. "Most concepts are in contraction, or flat growth mode."

One of the first two Gaps to close in Pennsylvania was at the Promenade Shops at Saucon Valley in Center Valley, near Allentown, last Sunday.

There was a bit of irony with Juan Garcia, 37, a middle school teacher from Coopersburg, Pa., standing in front of that Gap after lunch with his daughter, Isabel, 6.

The two never entered the Gap that day. "We're more online shoppers," Garcia said of himself and his wife, Stephanie. "We do 90 percent of our shopping online. It's more convenient, and we get better sales online."

Their top Web picks are Amazon, Groupon, eBay, and Etsy. They have a prime membership for Amazon so they get free two-day shipping.

"Our children's birthdays are coming up, so we have been buying a lot of birthday party decorations on Amazon," he said. "We always look for promo codes prior to the purchase. Sometimes we save 20 percent, other times 40 to 50 percent."

And for what? "Pretty much anything," he said. "We haven't been in a real mall in years."

Garcia said the last time they visited an enclosed mall was two years ago, to check out an Apple store.

At the Center Valley mall, the Gap closing has left a dark spot between Pandora and Lucky Brand Jeans, and Susan Bezas, 44, of Bethlehem, was sad.

"I like how the clothes last a long time and stay in style," she said while hunting for sales at that Gap one last time. "They're trendy."

As for outfitting her daughter, Alanna, 14, Bezas said that although Gap doesn't come cheap, "they're not as risque" as other brands, either.

That wholesome, all-American image made Gap a household name.

But "uniformity is no longer 'cool,' " said Simeon Siegel, senior retail analyst at Nomura Securities International Inc. in New York. And "the environment we're in is very competitive."