The holidays didn't go well for Costco Wholesale, whose profit during the period missed analysts' projections by the most in at least a decade. But there was something to raise a glass to: booze.

Alcohol sales have surged at the warehouse-club chain, lifted in part by the cult status of Costco's Kirkland Signature-branded liquors. Many customers swear by the private-label products, and some are even convinced that the spirits are actually top-shelf liquors such as Grey Goose and Tanqueray hidden behind Costco packaging.

That's helped set Costco's beverages apart from other private-label fare, said David Schick, lead retail analyst at Consumer Edge Research.

"They use very high-end producers -- premium all the way up to super-premium and beyond," he said.

Alcohol brought in $3.8 billion for Costco in its latest fiscal year, with wine sales accounting for almost half of the total. The category has grown 46 percent during the past five years, outpacing the company's broader food and sundries segment, according to Chief Financial Officer Richard Galanti.

Kirkland Signature has been key to its success. The retailer began selling wine under the brand in 2003, followed by spirits in 2007. It also has a line of craft beers. Emphasizing private-label products has lowered Costco's average retail prices, but surging demand has offset that impact on sales, Galanti said.

"Private label continues to grow as a dominant strategy in retail -- especially when it migrates from being a 'label' to more of a 'brand,' which Kirkland has done," said David Bassuk, managing director at consulting firm AlixPartners in New York. "Now it's a well-known name and gives the consumer a perception of value and a good deal."

The sources of the beverages remain a mystery. Kirkland Signature items are produced by "various manufacturers," said Annette Alvarez-Peters, who manages Costco's beverage alcohol division, without naming providers.

Schick and other analysts calculate that Costco's markup on its alcohol is in the range of 10 percent to 14 percent -- extremely low by industry standards. In contrast, most retail liquor stores add from 25 percent to as much as 45 percent, especially for premium items, according to Schick.

"They're doing the opposite of looking to cut corners," he said. "They're looking for maximum quality and minimum markup to drive value for the member."

It's a bright spot at a challenging time for Costco. The company posted earnings of $1.17 a share last quarter, far short of analysts' projections for $1.36. Industrywide food deflation and higher gas prices have brought a double-whammy to the retailer. Gross margin, another closely followed benchmark, missed estimates by the most in more than four years. Even a highly anticipated membership fee increase did little to placate investors, with the shares tumbling after the results were released.

Of Costco's 508 locations in the U.S. and Puerto Rico, it can sell beer and wine in more than 80 percent of them, according to Alvarez-Peters. Hard alcohol is less common, due to tougher local restrictions. About 60 percent of the stores offer spirits. By comparison, Wal-Mart Stores Inc., the world's largest retailer, sells wine and/or spirits in about two-thirds of its 4,700 stores.

While Wal-Mart doesn't break out those sales in its quarterly results, Piper Jaffray Cos. senior retail analyst Sean Naughton said he'd be surprised if Costco wasn't the leader. "They're taking share away from everyone because they can offer the lowest price."

Other retailers and grocers are trying to mimic Costco's success. In 2003, Target Corp. introduced a private label -- Target Wine Cube -- to tap into premium boxed wines, and it's currently exploring private label opportunities in other alcohol categories. Adult beverage was the fastest-growing division at the company last year.

Whole Foods Market Inc. launched its Criterion Collection wines in 2015 and now has 10 varieties of reds and whites. To boost the brand, the company brought Devon Broglie on as a global beverage buyer. He is one of 236 experts around the globe with the designation of "master sommelier."

While alcohol laws vary by state, Issaquah, Washington-based Costco has faced some of its toughest liquor legal battles in its own backyard. The retailer was the largest backer of an almost $23 million initiative to privatize Washington state liquor stores in 2011. That ballot measure succeeded, after revisions were made to a previous initiative that failed, and inspired grocers in other states to oppose state-run alcohol sales.

"There's a lot of politics involved for each state," Naughton said. Even so, "there's a very consistent demand that doesn't fluctuate that much as we believe alcohol is a nondiscretionary purchase for many consumers -- regardless of economic conditions."

With an average of 250 items across the three alcoholic beverage categories, Costco is selective in what it chooses to stock. It rotates items in and out of the system in what it calls a treasure hunt. "With the limited-item assortment, we constantly evaluate," Alvarez-Peters said. "Every item must perform in volume."

The treasure hunt -- along with the economics of bulk purchasing -- are what keeps Costco members happy, Schick said.

"When they buy something, they buy a lot," he said. "This becomes quite powerful in alcohol."

With assistance from Lauren Coleman-Lochner