Just months ago, shoppers were camping out all night in front of Target to be the first to get their hands on limited edition Stanley Tumblers. However, a few years ago, Stanley -- founded in 1913 -- was just a stodgy brand from years gone by. But in 2020, the company brought in Terence Reilly as president, and it hasn't been the same since.

Stanley reportedly went from about $70 million in sales in 2019 to $750 million in 2023, riding the coattails of its tumbler cups' success. But the difference for Stanley was clearly Reilly, not the tumblers themselves.

Consider that Stanley Tumblers launched in 2016 and flopped. But under Reilly's leadership, the brand brought the cups back and used social media influence to market to an entirely new female demographic. This included swapping 100-year-old brand colors for new pastel colors. The plan clearly worked.

As it turns out, Stanley wasn't Reilly's first rodeo. Previously, he was one of the architects who turned clog-style shoe company Crocs (CROX -2.20%) into a popular brand. So clearly Reilly has a gift when it comes to marketing products. The good news for Crocs' shareholders is that he's now back with the company and tasked with leading what's perhaps the company's largest opportunity.

Crocs' virtuoso comes home

On April 16, Crocs announced that it had appointed Terence Reilly as its president for its HEYDUDE shoe brand. In the press release, CEO Andrew Rees said: "I am confident he is the right person to lead the HEYDUDE Brand into its next phase of growth."

Crocs acquired the HEYDUDE brand in February 2022 for $2.5 billion, taking on a $2 billion loan to do it. It hasn't necessarily been a bad acquisition per se, but it hasn't exactly been a resounding success either.

In 2021, HEYDUDE generated around $600 million in annual revenue. In 2023, the brand had revenue of $949 million. Therefore, it's grown under Crocs' umbrella. That said, HEYDUDE's revenue slipped 4% year over year in 2023 (on a pro forma basis), which is concerning.

The slip in HEYDUDE's revenue is concerning for another reason. One of the reasons Crocs stock is up more than 300% in the last five years is because the company has some of the best operating profit margins in the shoe business. In 2023, the adjusted operating margin for the Crocs brand took another step forward, from 33% in 2022 to over 36% in 2023. In contrast, HEYDUDE's adjusted operating margin fell from 31% to 25%.

Therefore, not only are sales falling for HEYDUDE, it's also getting less profitable. This could suggest that the brand is losing its place in the market, and it's consequently not able to price its products where it wants.

This is a huge opportunity for Crocs

There have been more devastating failed acquisitions than I can count among public companies during the last several years. Fortunately, Crocs' acquisition of HEYDUDE won't be that bad even in a worst-case scenario. In fact, the company repaid nearly $700 million of its debt in 2023 alone because it still generates tons of cash flow, even with the HEYDUDE headwind.

Therefore, HEYDUDE won't be an insurmountable setback for Crocs if things go wrong. But on the flip side, this could be an enormous opportunity if Reilly can reinvigorate the brand, as he did with Stanley.

Even after the huge gains for Crocs stock, it still trades firmly in value territory at less than 10 times its trailing earnings.

CROX PE Ratio Chart

CROX PE Ratio data by YCharts

The Crocs brand generates roughly three times as much annual revenue as HEYDUDE. If, hypothetically, Reilly can help grow HEYDUDE into something that rivals Crocs over the next five years or so, then the company's overall profits would be significantly higher.

Crocs has a cheap valuation today, which mitigates downside risk for investors right now. But the Crocs brand is still growing, and the HEYDUDE brand is now helmed by someone capable of orchestrating a viral-growth story. Both of these factors provide investors with ongoing upside opportunity.

This is exactly why I believe Crocs stock is still a buy today: The downside is likely limited, but the upside potential could very well be better than the average performance for the S&P 500.