Denim has been fighting with leggings and “athleisure” for its share of the casual clothing market.

The iconic American apparel company, which patented the first pair of blue jeans in 1873, filed a plan for an initial public offering Monday that would raise as much as $587.2 million. The company would sell 36.7 million shares, priced at $14 to $16 apiece, according to the regulatory document.

Denim has been fighting with leggings and “athleisure” for its share of the casual clothing market. It’s been tough, with imports of elastic knit pants surpassing those of denim for the first time in 2017. But the one-time staple of American closets has recently staged the beginning of a comeback: The jeans category in the U.S. grew 2.2% to $16.7 billion in 2018 after four straight years of declines, according to data from Euromonitor.

The company had been slow to incorporate the comfort of yogawear into its styles by adding stretch, but those efforts eventually paid off, particularly in women’s clothing, which has grown in the double-digits for eight straight quarters and currently represents almost a third of total sales. Global revenue climbed 14% in fiscal 2018 from a year earlier.

Most of the stock will be sold by current shareholders and Levi Strauss expects to get about $106.6 million at the midpoint of the range for its own use. It plans to put the proceeds toward general corporate purposes, though some may be used for acquisitions or strategic investments, the company said in the filing.