New York (CNN Business) Retailers around the world are radically reshaping their strategies to contend with Amazon. Costco has a different tactic: Perfect what's been working for four decades.

"Costco wants to be the last to have to raise prices and the first to lower them," said Mark Cohen, the director of retail studies at Columbia Business School.

Costco has a sizable customer overlap with Amazon, especially among wealthier shoppers. It's a looming danger for Costco if those shoppers decide they don't want to pay for both.

But the company has defended against its Washington State neighbor through low prices, offering fresh food and gas, and creating a treasure hunt buying experience that can't be copied online.

"Shoppers will use Amazon to replace physical shopping experiences that are chores or that they don't enjoy," said Kantar Retail senior analyst Timothy Campbell. "Even as many shoppers consolidate their trips into fewer retailers or go online, Costco isn't one retailer they consider cutting from their list."

Throwback business

Costco gets roughly three-quarters of its profit from $60 to $120 annual subscription fees. It's the world's second largest retailer by sales, though Amazon's overall revenue -- including its cloud business -- is higher than Costco's.

Members pony up for the subscription because they believe they can make it back over the year by buying cheap stuff in bulk, like giant jugs of ketchup and mayonnaise.

Costco's 93 million members are exceedingly loyal: As of June, Costco reported 90% of its members renew their subscriptions.

The company pours the subscription proceeds into driving prices down. Unlike Walmart ( WMT ) or Kroger ( KR ), the company has invested mainly in prices: Warehouses are "no frills," and Costco has mostly eschewed costly digital acquisitions to fuel growth.

"Costco is one of the most productive retailers in the industry," Cohen said. "They waste no money on features that their customer does not require or expect from them."

The company makes $1,200 per square foot —double its competitors' hauls — through its self-serve format. Store employees focus on improving shoppers' trips with free food samples, instead of stocking shelves or working in the back of warehouses.

Costco has strong partnerships with suppliers and can negotiate with them for the best deals, even when inflation rises, because brands trust Costco will use the cost savings to keep price tags in stores down. Vendors are happy to oblige because it boosts their sales.

A sharp focus on creating value for customers helped Costco report another stellar month of US sales in July, growing 6.6%, excluding rising gas prices, from a year ago. Costco's same-store sales growth has outpaced Walmart, Kroger, and Target in recent years.

Kirkland Signature

Although big-box retailers like Walmart often sell more than 100,000 items at one of their superstore, Costco stocks an average of 3,800 national brands and Kirkland Signature private label products.

Despite offering fewer choices, Costco consistently injects a range of items into warehouses — everything from toilet paper and wine to flat screen TVs and jewelry.

"Costco's product mix continues to resonate with a broad buying base [and] is a distinct competitive advantage," Moody's lead retail analyst Charlie O'Shea wrote in a May report.

Costco generates high sales volumes on its products, turning over inventory faster than competitors by supplying customers with fewer brands that go off the shelves quickly. That helps Costco absorb its lower profit margins.

"The average item at Costco turns through the warehouse multiple times more rapidly than at other retailers," Campbell said.

Even BJ's Wholesale Club ( BJ ), which recently went public for a second time, offers more than 7,000 products, hurting its ability to compete with Costco on value, he noted.

In addition, Costco relies heavily on Kirkland, which analysts believe is one of the most popular white labels across retail.

Costco looks for high-priced categories to enter to offer cheaper alternatives than big brands. For example, it recently introduced a Kirkland Signature triple-blade razor to compete with Gillette.

Groceries and gas

Costco's offering has helped it blow past Sam's Club, its top warehouse rival, which has been dragged down by parent company Walmart cannibalizing a chunk of its sales, Campbell said.

Groceries have positioned Costco to stay ahead of the field. Stifel surveys have found that 93% of Costco members shop at the club for grocery, but only 18% use Amazon to stock up on food.

That helps explain why Costco has been trying to strengthen its fresh foods, recently announcing a partnership with startup Zest Labs to make sure produce stays fresh longer. It has also rolled out two-day dry grocery delivery and same-day fresh delivery through Instacart.

The company is getting a boost from its digital business, too. Sales grew 21% in July compared to a year ago.

Costco sells 10,000 products on its website and app, including expensive items like furniture that weren't always available in stores. In the past, Costco has sold furniture at stores for around eight weeks a year.

It offers buy online, pickup in-store on items like jewelry and laptops, and Costco noted that more than half of shoppers who choose click-and-collect wind up making additional purchases when they get to a warehouse.

"Costco's online capability remains a nice complement to the brick-and-mortar business," O'Shea said.

Clarification: This story has been updated to clarify that Costco is a larger retailer than Amazon, though Amazon generates more overall revenue than Costco.