(Bloomberg Opinion) -- Whatever U.S.-China trade war fallout may be looming for the retail industry, Target Corp. is doing all it can to ensure that its turnaround – now nearly complete – will remain on track.

The big-box giant reported on Wednesday that comparable sales rose 3.4% in the second quarter from a year earlier, powered by strong foot traffic in its stores and a 34% increase in online sales.

Target also raised its full-year earnings guidance, sending a message that it sees its run of healthy growth continuing even if the consumer environment gets more challenging when tariffs get slapped on $300 billion worth of goods from China. Target shares soared more than 16% in early trading, putting the stock on track to open at an all-time high.

The details of the report underscored that Target’s approach to grabbing digital business – which heavily emphasizes using its stores as fulfillment centers – is working. Nearly three-quarters of its online comparable sales growth in the quarter was driven by its same-day services such as curbside or in-store pickup. This is important, because that type of online order tends to be more profitable than those that include free shipping for customers or require Target to foot the bill for last-mile delivery.

Growth in curbside and in-store pickup is a balm for Target’s gross margin, which improved to 30.6% in the quarter from 30.3% last year. Several other factors also contributed to the gains on this measure, including cost-control initiatives and pricing. The improvement is an encouraging sign for investors who have worried about the chain’s ability to pad profitability, particularly now that the liquidation of Toys R Us and Babies R Us have made Target even more of a go-to for low-margin items such as toys.

Target gave us tea leaves to read earlier this week for how it plans to keep capturing more foot traffic. It announced that in September it will launch a new private grocery brand called Good & Gather. The line will eventually contain more than 2,000 products and will focus on items that don’t contain artificial flavors and sweeteners. At the same time, it will phase out stalwart private food brands Archer Farms and Simply Balanced. This game plan in food sounds a lot like what Target has done with great success in its apparel section, where it axed tired labels such as Merona and Mossimo in favor of more current, trend-focused ones. If it can replicate that in food, it bodes well for a chain that could stand to grab more market share in a category that is essential in driving store trips. Coupled with its continuing store remodeling project, which includes updates to the grocery department, the revamp may  help Target drive more customers to the food section.

It’s almost eerie how similarly the quarter shaped up for Target and Walmart Inc. Both had solid comparable sales growth that was notched despite a difficult comparison to last year, a period when both retailing giants recorded their best quarterly sales results in over a decade. Both also delivered upbeat e-commerce growth that relied heavily on their brick-and-mortar fleets. And both raised their guidance for the year, showing at least near-term confidence in the health of the U.S. consumer.

In fact, in a series of earnings reports over the course of the last week, the giants of retail have given us little reason to worry that the U.S. consumer is flinching in the face of trade and economic uncertainty. Lowe’s Cos. reported a solid increase in comparable sales on Wednesday, showing strength in the most important quarter of the year for the home-improvement business. While Home Depot Inc. said yesterday that part of the reason for lowering its guidance was concerns about the impact of tariffs, executives said they were doing that out of “conservatism,” not because they were currently seeing caution from consumers.

Tariff pressure may change that view if it drags on for a long time. For now, though, the environment is positive one for Target and its ilk. As long as they deliver what shoppers want, there’s no reason to think customers won’t keep coming.  

To contact the author of this story: Sarah Halzack at shalzack@bloomberg.net

To contact the editor responsible for this story: Beth Williams at bewilliams@bloomberg.net

This column does not necessarily reflect the opinion of the editorial board or Bloomberg LP and its owners.

Sarah Halzack is a Bloomberg Opinion columnist covering the consumer and retail industries. She was previously a national retail reporter for the Washington Post.

©2019 Bloomberg L.P.