The stock market surged last Friday, but shares of Costco Wholesale (NASDAQ:COST) were left behind, falling 0.6% for the day. This was a clear indication that investors weren't satisfied with the company's third-quarter earnings report, which came out on Thursday afternoon.

It's true that Costco faced some gross margin pressure last quarter -- and that gross margin could continue to decline in the next few quarters. The company also plans to raise employees' wages, which will increase its operating expenses. Nevertheless, Costco Wholesale remains a solid choice for long-term investors, due to its stellar sales trajectory and the overall strength of its business model.

Solid sales and earnings growth

Revenue surged 12.1% year over year at Costco Wholesale last quarter. The main driver of this revenue growth was Costco's impressive comparable-store sales momentum. Comp sales rose 7% in the third quarter, excluding the impact of gasoline price inflation and exchange rate fluctuations. Rising gasoline prices and a weaker dollar added more than 3 percentage points of incremental growth.

Meanwhile, membership fees surged 14.4% year over year, boosted by a 9% membership fee hike that Costco implemented in the U.S. and Canada last June. Membership fees represent Costco's primary earnings driver, so this increase was definitely good for the bottom line.

Operating income reached $1.07 billion, up 11% year over year. Excluding $14 million in one-time legal costs incurred during last year's third quarter, operating income would have increased 9.4% year over year.

The front entrance of a Costco warehouse

Costco achieved a solid increase in operating income last quarter. Image source: Costco Wholesale.

Earnings per share reached $1.70 last quarter, beating the average analyst estimate by $0.01. That was up from adjusted EPS of $1.40 a year earlier. A lower ongoing tax rate drove about half of the year-over-year increase, with organic earnings growth accounting for most of the rest.

Margin pressure shouldn't be a complete surprise

The one noteworthy negative datapoint in Costco's earnings report was a 28-basis-point (or 0.28 percentage point) decrease in its core gross margin (excluding gasoline price inflation). The vast majority of that margin pressure came from changes in the mix of merchandise sold relative to the prior-year period. Adjusting for that mix shift, the gross margin decline for Costco's core merchandise categories was a measly 4 basis points, according to CFO Richard Galanti.

Galanti emphasized that Costco plans to continue "investing in price" to drive more traffic to its warehouses. It is also moving very slowly to recoup rising freight costs, which could lead to further gross margin pressure going forward.

Furthermore, while operating expenses declined as a percentage of sales last quarter, Costco Wholesale will raise wages for its U.S. warehouse employees next week by anywhere from $0.25 per hour to $1.00 per hour, depending on seniority and location. On a pre-tax basis, that will add $110 million to $120 million of incremental costs annually.

For the most part, Costco's recent gross margin pressure and the upcoming wage increases fit in with the company's plan for allocating its tax reform savings. Management had previously stated that some of the savings would be used for price investments, some would be used to increase wages, and some would fall directly to the bottom line. Obviously, this will lead to somewhat lower pre-tax margins, but on an after-tax basis, Costco is still coming out ahead.

This is a strategy -- and it's working

There's nothing groundbreaking about Costco Wholesale's current strategy. It has been paying above-average wages and reducing prices at the expense of gross margin for decades. Costco's high wages limit employee turnover, improving productivity and customer service. Meanwhile, its rock-bottom prices have driven steady market share gains over time.

Costco has demonstrated in the past that it has ample pricing power. As the retailer with the lowest cost structure, it has the luxury of choosing when to protect its gross margin and when it makes sense to give up a little margin to drive sales. Over long periods of time, Costco has shown that it can hold its profit margin roughly steady while achieving strong growth.

During the past 15 months or so, Costco's comp sales growth has been as strong as ever, while its EPS growth has been impressive. This suggests that shareholders have no reason to worry about the company's third-quarter results or its fourth-quarter outlook.

Adam Levine-Weinberg has no position in any of the stocks mentioned. The Motley Fool recommends Costco Wholesale. The Motley Fool has a disclosure policy.