Having a niche—once regarded as a key to ensuring success against the onslaught of the chains, price clubs, and mass merchandisers—is no longer a guarantee for booksellers. The number of women’s bookstores has gone from a high of 120 in 1994 to less than a dozen today. Fewer than 10 science fiction bookstores remain in the country, and a number of mystery bookstores have closed, most recently the 41-year-old Mystery & Imagination in Glendale, Calif., in July. However, some seasoned niche stores are continuing to thrive, while new stores such as the Ripped Bodice in Culver City, Calif., the country’s only romance bookstore, and the Troll Hole, a feminist bookstore/sex shop in a laundromat in Brooklyn, are opening. And older stores are changing hands, such as Seattle’s poetry bookstore, Open Books, which was sold last month.

“The advantage of running a specialty bookstore is running out,” said Alan Beatts, owner of 19-year-old Borderlands Books in San Francisco, which specializes in science fiction, fantasy, mystery, and horror. Even though his business is currently profitable (2014 was Borderlands’ best year ever), in February Beatts put out a call to customers for help. His concern was a problem that could soon engulf general and specialty bookstores alike: increased minimum wage. When voters in San Francisco called for wages to go to $15 per hour by 2018, Beatts calculated that his operating expenses would increase 18%, and he would need at least 20% more sales, more than he could meet.

After a heavy outpouring of support from the community, Beatts came up with a plan in February 2015. If, by the end of that March, 300 customers each signed up for a $100 annual sponsorship, the store would stay open for another year. He repeated it this year, and although the number of sponsorships fell off from 850 in 2015 to 650 in 2016, Borderlands seems to be on track for many more years. Beatts is planning other changes, including moving the store’s online sales from Biblio to Borderlands’ own website so that he can retain online customers, and creating a book subscription program.

In Gainesville, Fla., 400-sq.-ft. Wild Iris Books, one of the few remaining feminist bookstores in the country, has experienced financial pressures over the years, but not this summer. Sales have been up every month over 2015, according to co-owner Erica Rodriguez Merrell, who called it “the best summer ever.” Unlike Borderlands, the 24-year-old bookstore has no wage-increase woes. That’s because Wild Iris’s staff is entirely volunteer. In addition, because of Merrell’s increased visibility in the community as a spokesperson on feminist and social-justice issues, the bookstore is starting to get bulk orders and to attract interns from nearby universities to help with various aspects of bookselling, including graphic design and planning events.

Merrell, who worked in corporate bookselling for Borders and Books-A-Million, has looked into turning the store into a nonprofit to increase financial support. But some community members aren’t convinced that that’s the best way to go, and Wild Iris has been able to attract donations without the incentive of a tax break.

Natalie Sacco and her husband, Trevor Thomas, purchased then-25-year-old Mystery Lovers Bookshop in Oakmont, Pa., in May, 2015. “It’s going really well,” Sacco said of the store’s first year under their ownership. But that doesn’t mean the team didn’t have a few missteps. When Sacco and Thomas tried broadening the store’s inventory and adding more general-interest titles, “nobody cared,” Sacco said. They have since pared back to bestsellers such as Anthony Doerr’s All the Light We Cannot See, titles on the Indie Next List, and some children’s books. The latter has become one of their bestselling sections. “We decided rather than branch out to go deep” in certain categories, Sacco said. A new classics section featuring Agatha Christie, Jim Thompson, and Ross MacDonald has done particularly well. They have also significantly upgraded the store website to make it easier to shop.

At Houston’s Murder by the Book, owner McKenna Jordan had to negotiate a particularly difficult challenge a year after she bought the store in 2009—the sudden death of her husband, David Thompson, who was the assistant bookstore manager and founder of Busted Flush Press; “2011 through 2013 were not easy years for us,” Jordan said. “It is hard when people feel a person on the staff is their family.” Over the past two years, she’s seen customers slowly return and adjust to getting book recommendations from other booksellers.

Through it all, Jordan is quick to point out that “the store has continued to support itself.” It has strong foot traffic and does about 30% of its business through phone, mail, and online ordering. Not only that, but when the store was damaged by the city’s flooding this past spring, devoted customers bought gift cards to help pay for the renovations.

For sisters Bea and Leah Koch, who launched the Ripped Bodice in March, having a unique specialty has contributed to growth. “It gives people a reason to come here,” Bea Koch said. Last month the pair gave customers an additional reason to visit: books at lower price points. When the Kochs learned that a used bookstore in Costa Mesa was closing, they bought out its romance titles and turned their empty second floor into a used-book area.

The Kochs were well aware of the lure of genre e-books, particularly the 99¢ ones, when they opened the store. “We don’t shame anyone for reading on devices,” said Bea, who recommends her favorite books to customers when asked. Nevertheless, many customers want print copies of their e-books, Leah said. She and her sister are selling unique books as well as limited print editions of the fourth and fifth books in local author Jenn LeBlanc’s steamy Lords of Time series, of which the titles The Trouble with Grace and The Spare and the Heir were released as iBook exclusives earlier this month.

Two culinary bookstores have opened within the last 18 months. Chicago’s 1,950-sq.-ft. Read It and Eat turned one in May; Brooklyn’s Archestratus Books & Foods will be one in October. Both have taken a different approach to inventory. “Originally, I thought what I wanted to do was introduce a line of cooking tools,” said Read It and Eat founder Esther Dairiam. Instead she is looking for ways to highlight the store’s many cookbooks, possibly with a different product each month, such as olive oil.

“While the book side is growing, the events side is growing faster,” Dairiam said. Read It and Eat offers cooking classes, author demos, and cookbook clubs in which the participants each bring in a dish from a cookbook they read. For Dairiam, the biggest lesson has been “knowing when to adjust and be flexible.” She’s heading to the Frankfurt Book Fair to find more unique international cookbooks. When she returns, she plans to expand further with e-commerce at the store’s website.

At Archestratus, founder Paige Lipari tries to balance the store’s café, which has already had its cookies singled out as the best in New York City by New York Magazine, and the bookstore. “I view food as a way to see the world,” said Lipari, who sells cookbooks and other books about food in a variety of genres. In the coming year, she plans to hold many more events. Already the store does cooking demonstrations, hosts book clubs, and dinners every Thursday night, when the store turns into a restaurant.

As the retail environment evolves, at least one longtime specialty bookstore in Phoenix, Ariz. has changed course. “The most difficult task of the past 10 years has been to unbrand the Poisoned Pen so that it is no longer known as just a mystery bookstore. When I started this store in 1989, Phoenix was being encircled by Borders and Barnes & Noble,” said owner Barbara Peters. “The specialty has become confining rather than helpful.” Nowadays she likes to think of the store’s specialty as programming. The Pen is one of the few bookstores that will pay to bring in authors, or split the cost with the publisher.

Peters just signed a 10-year lease and is doubling down on programming and online sales, which account for 70% of store revenue. Last year she spent $90,000 upgrading the store’s website. Many online sales come from authors such as Diana Gabaldon, Clive Cussler, and Douglas Preston, who have made the Pen their “home” bookstore.

This article has been updated to correct misspellings.