The smash hit “Barbie” recently crossed the $1 billion box-office line, joining the ranks of movies like “Titanic,” “Avatar” and “Harry Potter and the Deathly Hallows: Part 2.”

The film was directed by Greta Gerwig and stars Margot Robbie and Ryan Gosling. The success of “Barbie” means Gerwig is the first woman to have the sole directing credit on a billion-dollar film, according to The New York Times.

Ahead of its release, critics praised the film. For Entertainment Weekly, Devan Coggan wrote, “What actually was this movie, and could it possibly live up to all that hot pink buzz? The verdict? Never doubt Gerwig.”

Then, when it rolled out in theaters, “Barbie” sold out shows, per IndieWire. It quickly became a box-office smash. The feat of a film reaching $1 billion in revenue has only been achieved by 52 other films in history, People magazine reported.

So, what makes a film like “Barbie” a box-office smash? Here’s why “Barbie” could be so popular.

The whimsy and wit of ‘Barbie’
Opinion: Does ‘Barbie’ hate men? My dad doesn’t think so

Why is the Barbie movie so popular?

Barbie dolls are among the most popular toys. More than 1 billion dolls have been sold since the doll’s creation in 1959, per Time magazine.

This translates to people having a lot of experiences with Barbie dolls. Whether you played with Barbies as a child or wanted to play with them or didn’t like them, there’s a whole range of experiences associated with Barbie. And the film was self-aware of this.

The tagline of “Barbie” was “If you love Barbie, this movie is for you. If you hate Barbie, this movie is for you,” according to The New York Times.

“The brand has strong nostalgic value. It doesn’t matter how old people are — 30, 40, 60 — they all think the movie is targeted toward them,” Ayalla Ruvio, a professor of marketing at Michigan State University’s Broad College of Business, told ABC News.

The nostalgia, in combination with the universality of playing with Barbies, set the film up for success and led to something unique happening in theaters: people dressed up in pink to see the film.

“My wife just came back from taking my 86-year-old mother-in-law to the movie. She was sending me pictures of a sea of pink in the theater. It’s a way of being part of this really wonderful collective experience,” Warner Bros. president of global marketing Josh Goldstine told Variety.

It’s one way to get people to the theaters. It’s no longer just a trip to the cinema, it’s the experience of getting ready with your favorite gal pals and then greeting other pink-clad moviegoers.

Is ‘Barbie’ a family-friendly movie? A look at why the upcoming movie is rated PG-13

In some ways, it’s similar to the experience of attending Taylor Swift’s “Eras Tour.” For that concert, it’s custom to dress in the style of your favorite Swift era (or an outfit inspired by one of her albums) and to make friendship bracelets you’ll exchange with other Swifties. The experience of dressing up to see “Barbie” creates a similar experience.

It’s not just the organic nostalgia and universality around “Barbie” that contributed to its rocketing success — it was a savvy marketing campaign.

From the get-go, it was clear it would be the summer of pink as several brands collaborated with “Barbie” and ads flooded social media.

“... ‘Barbie’ also received a boost from its 100-plus brand collaborations, from Pinkberry frozen yogurt to a promotion with Airbnb that allowed the winners to stay in Barbie’s Malibu house. Go ahead. Google ‘Barbie’ right now, and watch your search page explode in pink fireworks. That costs money,” Amy Laskowski wrote for Boston University Today.

On top of its genius marketing campaign, the film was also loved by critics.

“‘Barbie’ is one of the most inventive, immaculately crafted and surprising mainstream films in recent memory — a testament to what can be achieved within even the deepest bowels of capitalism,” Claire Loughrey wrote for The Independent.

Can you stream the ‘Barbie’ movie?

“Barbie” is currently exclusively released in theaters.

Will ‘Barbie’ have a sequel?

“Barbie” has reportedly no sequel on the horizon. Robbie and Gosling didn’t have sequel options in their contracts, per The Hollywood Reporter.

The ongoing writers and actors strike means no contracts will be negotiated until after the end of the strike. So if there will be a sequel, it’ll likely be a while until that happens.