Ulta Beauty (NASDAQ:ULTA) has been one of the most consistent and best performing retail stocks of the past decade. Even as brick-and-mortar retail is threatened by e-commerce, and malls are closing left and right, Ulta has been able to execute on a growth strategy.

But some of the excitement has worn off in recent months. The stock has pulled back by as much as 35% in the wake of softer growth numbers. Is this a buying opportunity or has something fundamentally changed?

A slowing market for beauty products

At a glance, Ulta's recent financials don't look too shabby. The company grew sales and earnings per share by 12% year over year in the second quarter. But a closer look reveals that operating margins dipped from 13% to 12.5%, and comparable-store sales fell to 6.2% from 6.5% year over year. In fact, Ulta's comps have been steadily decelerating after peaking at 15.8% in 2016.

Metrics Q2 2019 Q2 2018 Change
Revenue $1.67 billion $1.49 billion 12%
Operating income $208 million $194 million 7%
Diluted earnings per share $2.76 $2.46 12%

Data source: Ulta Beauty.

The primary culprit is slowing category growth. On the company's Q2 2019 earnings call, management noted that the U.S. cosmetics market, which represents roughly half of Ulta's revenue, has seen growth slow to a low-single-digit pace and has turned negative in some product categories.

It is hard to understand what is driving the decline in beauty spending given the overall strength of the economy. Brands simply may not have impressed customers with this year's lines. It is also possible that spending has shifted toward online-only beauty brands that are not tracked by conventional channels. This latter explanation has some investors worried that a version of the e-commerce threat which hangs over other industries is starting to materialize in beauty.

Taking market share

The good news is that Ulta has been winning market share, as implied by the fact that its sales have grown faster than the industry's sales. With so many department stores closing, this may have been easy. At the end of the day, most people still buy their beauty products in a physical store.

To Ulta's credit, it has been proactive in e-commerce. The company has doubled its warehouse distribution space since 2015 and has acquired digital upstarts GlamST and QM Scientific to improve its online shopping experience. In 2018, Ulta rolled out its "buy online, pick up in store" and "store 2 door" programs, which give customers added convenience.

Ulta also has a few tricks to keep its customers coming into stores. Its robust loyalty program has over 30 million active members (the company defines "active" customers as those who have made at lease one purchase in the last year). It has used the loyalty program to drive targeted promotions to loyal shoppers -- helping it avoid an over-reliance on other forms of advertising.

The company also has several exclusive brand partnerships with celebrities likes Kim Kardashian and popular online-only beauty brands. Ulta is in the process of identifying the most promising brands in the online-only space and introducing them to customers in its store -- often with exclusive arrangements.

All these efforts should enable Ulta to continue taking market share from less-focused retail competitors, and lead to a nice resurgence if the beauty market as a whole heats up again.

woman applying make-up

Image source: Getty Images.

A bet on omnichannel retail

In the past, the reason to own Ulta stock was its better in-store shopping experience, wide variety of merchandise, and its in-store salons. While its stores continue to elevate the beauty shopping experience, the company has shifted to more of an omnichannel strategy to compete with e-commerce players.

It has made massive investments into its distribution capabilities and its loyalty program. As a result, Ulta is better able to drive traffic to its stores and its online shop than many of its peers.

This all points to its stock being a potentially interesting buy after this recent sell-off. Amid an uncertain future, the company appears well positioned for success.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.