President Donald Trump talked tough against Mexico, and then essentially agreed to renew the existing trade deal and called that a victory. If only the China spat could end the same way. It won’t.

That’s because the gulf between Beijing and Washington is not just caused by recent rhetoric and tariffs. It also goes beyond national security concerns. The inevitable clash stems from how the American and Chinese economies have evolved over decades.

Relative to China, Mexico hasn’t shifted much. It has been and remains mortgaged commercially, diplomatically and culturally to its northern neighbor.

The White House is fond of citing the merchandise trade deficit with China that America racks up each year. In 2017, it amounted to $375 billion. Sure, it’s big. But the fixation with that number misses the broader point.

China’s current account surplus, the broadest measure of goods and capital flowing to and from a country, is getting close to zero — as Chinese consumers earn more and shop differently and as the economy relies less on exports. That’s a huge transformation.

America, by contrast, runs a current account deficit that doesn’t show much sign of going away — borrowing from abroad and bringing in more products than it sends to the rest of the world. That deficit is only growing. Americans just aren’t great savers, and they have a huge appetite for imported goods.

China’s current account surplus, as a percentage of gross domestic product, was about 1.4 percent in 2017, according to the International Monetary Fund. That’s down from 2.2 percent in 2014 and about 10 percent in 2007. The trend is only going to progress: China is likely to have a current account deficit — no longer a surplus — by 2020, according to Deutsche Bank economists.

One of the broad themes of the past few years is that China’s economy is becoming less export-dependent and more tied to domestic consumption. That’s a big change; it used to export just about everything and import almost nothing. Trump is incidental to that. It’s a trend that has been years in the making.

The U.S. appetite for imported stuff, already great, is likely to be fueled by tax cuts and Congress’s opening of the fiscal floodgates. Those two things juiced the economy late in the economic cycle compared with the traditional timing of fiscal stimulus, which is when growth is in the doldrums.

Zooming out a bit further, China’s trade surpluses with the U.S. and, say, the European Union also reflect the Middle Kingdom’s role as the “factory of the world,” according to Deutsche Bank. It’s a legacy role.

China imports raw materials and industrial inputs from places like South Korea, Australia and Brazil. It then assembles stuff and sells the finished products to customers in the U.S. and Western Europe. Those markets remain large and lucrative, but they are not the heart of China’s future.

The factory legacy reflects corporate models and supply chains anchored largely by U.S.-based multinational corporations that have built up over the decades since China’s opening in the late 1970s. They aren’t easily upended.

Whether those multinationals ought to upend them anyway is a separate question. If you buy the idea that, almost incidental to Trump, there are broad forces at work that aren’t sympathetic to free trade, then companies have to be thinking about a new industrial model, though hardly any have said so publicly.

Short-term deals can be done that patch things up temporarily and allow China to continue to sate American demand. But while China weans itself from that role, there won’t be any painless path forward.