NEW YORK (AP) — Holiday shoppers flocked online during the critical holiday shopping season, but overall sales in November and December were disappointing.

Sales rose 3 percent to about $626.14 billion, according to The National Retail Federation. That's below the forecast for a 3.7 percent gain the group had expected.

The group blamed the shortfall on unusually warm weather that led to bigger-than-planned discounts on clothing and other cold-weather items. It also pointed out that stores don't have the ability to raise prices in a still tough spending environment, leading to worse-than-expected deflation in electronics like TVs and other categories.

A bright spot was online, though it represents just about 15 percent of total holiday sales. Online sales, which are included in the figure, rose 9 percent to $105 billion. That's higher than the group's original forecast of 6 percent to 8 percent growth.

"Make no mistake about it, this was a tough holiday season for the industry," said Matthew Shay, National Retail Federation's CEO.

The holiday season is a crucial period of retailers because it accounts for as much as 40 percent of retailer's annual sales. But the season has exposed the balance retailers have to strike between satisfying customers' shopping needs online, while also trying to get them into their physical stores.

While many retailers have said online sales surged during the holiday season, there are trade-offs. Online shoppers tend to be more targeted when they buy, and typically buy only what they need on their list. Stores still need shoppers in the store because there's a big opportunity for them to buy other items.

Moreover, as an increasing number of stores offer free returns to make online shopping more convenient, they are dealing with higher costs in processing those returns from customers. In fact, Kurt Salmon, a retail consulting firm, estimates that as much as 30 percent of online orders are returned.

"There are big costs in servicing an online customer," said Steve Osburn, supply chain strategist at Kurt Salmon.

And retailers still need shoppers in the store because there's a big opportunity for them to buy other items. Analysts estimate that the conversion rate — the percentage of shoppers at physical stores that end up buying there— is 30 percent, compared to 3 percent online.

At the same time, the shift online is forcing stores to rethink the size of their stores and how big their entire fleet should be. In response to heavy competition from online leader Amazon.com, major stores have been investing in bigger distribution centers to speed up online deliveries and push free shipping. They've also been expand services like allowing online shoppers to pick up their orders at the store.

Against this background, several major stores have announced they are closing stores. Wal-Mart Stores Inc., the world's largest retailer, said it is closing 269 stores globally, including 159 in the U.S. as it looks to retool its business. The closures are a fraction of its more than 11,000 stores globally.

Macy's Inc., which had long been a stellar performer in the department store arena, last week slashed its profit outlook and said it is cutting 4,800 jobs. About 2,700 job cuts will come from about 40 store closings. Macy's operates about 800 stores.

In addition to cost-cutting measures, Ken Perkins, president of Retail Metrics, a retail research firm, said retailers are going to have to do more to get customers into stores.

"Retailers have a heavy challenge in 2016 to drive traffic," he said. "They are going to have to find ways to differentiate themselves with more special events, entertainment."