The old political stereotype that Democrats in Congress mostly represent hard-hatted union members is long since obsolete. The percentage of Democrats coming from districts with lots of manufacturing workers has dropped by nearly half in two decades.

But that doesn’t mean they are becoming more supportive of foreign trade deals. A majority of congressional Democrats continue to oppose the Trans-Pacific Partnership (TPP) being negotiated by the Obama administration, the largest trade deal in over 20 years.

And that’s partly because, like the Democratic electoral map, trade deals themselves are becoming less tethered to manufacturing.

The TPP would join America with 11 other countries — including Mexico, Australia, Japan and Singapore (but excluding China) — in an agreement on manufacturing, services and agricultural trade. Together, these 12 countries represent 40 percent of global trade, making the TPP, if it passes, the largest trade deal since the North American Free Trade Agreement (NAFTA) was passed in 1993.

Unlike the NAFTA talks, however, the TPP trade negotiations go beyond issues affecting manufacturing — such as tariffs on specific goods — and add a new focus on issues like intellectual property rights, labor protections and environmental safeguards. Congressional Democrats are unhappy with the leaked details from the negotiations on these issues, and that is costing the proposal many votes in Congress, despite the advocacy of President Obama and the support of most Democratic voters.

“It is not only a trade agreement, it’s a grab-bag of special favors for multinational corporations,” said Rep. Alan Grayson, a Florida Democrat who is adamantly opposed to the TPP.

Along with 150 other House Democrats, Grayson co-signed a letter to Obama expressing concern over the TPP negotiations, especially when it came to issues like environmental protections overseas, agricultural standards, patents and copyrights, and land use.

The U.S. Trade Representative has tried to assuage these concerns, but most Democrats remain unpersuaded.

Grayson and other members of his party are also concerned about the widening of the U.S. trade deficit — when a country imports more goods and services than it exports — which they blame for job losses and wage stagnation. The trade deficit has quadrupled over the last 20 years, and Grayson says that is NAFTA’s fault, making him far less likely to support another pact. NAFTA was especially contentious among House Democrats, who voted 102-155 against the deal, despite President Clinton’s lobbying for it. Obama has encountered comparable opposition: In 2011, a similar proportion of House Democrats voted against a trade agreement with South Korea.

The NAFTA argument echoes the concern of unions, which remain fiercely opposed to the pact. Even service-sector and government unions oppose it out of solidarity, though it will have less of a direct impact on them. And unions of all kinds represent a cornerstone of the Democratic Party’s base in terms of both fundraising and voter support.

But for all his vehemence, Grayson does not represent a district that is directly exposed to international trade. In his district, Florida’s 9th, which includes Orlando, less than 3 percent of jobs are in manufacturing; of all the districts represented by Democrats, his has one of the smallest manufacturing footprints. In the typical congressional district — held by either party — 8.4 percent of the workforce is employed in manufacturing.

Classifying congressional districts by their share of manufacturing employment shows how the Democratic base has steadily migrated away from manufacturing-intensive areas. In 1993, when Congress was considering NAFTA, Democrats controlled 61 percent of districts in the top quartile of manufacturing employment, but by 2015 they held only 25 percent of those districts. Those hard-hat workers are less likely to have a Democrat as their representative today.

In 1993, Democratic seats were nearly perfectly distributed among the four quartiles of manufacturing job concentration — about 25 percent in each. But now only 15 percent of Democratic seats are in the highest-concentration manufacturing quartile, while 36 percent are in the lowest-concentration quartile. Democrats have also extended their advantage in the least manufacturing-intensive districts (those in the bottom quartile): In 2015, they held 64 percent of them, whereas in 1993, they held 61 percent — despite having many more seats in Congress then. Some of the Democrats’ advantage in low-manufacturing areas is due to their seats being increasingly clustered in more urban areas, where many factories have closed. But the broader phenomenon is driven by voters in manufacturing areas shunning Democrats.

The structural shift in the Democratic base coincides with a long-term decline in manufacturing jobs nationwide. In 1993, 16.9 percent of jobs in the median congressional district were in manufacturing, but by 2013, it was 8.4 percent. In addition, there has been a steady drop in private-sector unionization. Capitalizing on this decline, Republicans increasingly win over manufacturing-intense areas — they control 18 of the top 20 most manufacturing-heavy districts in the current Congress, for example.

At the same time, Democratic voters are warming to trade. As this chart of Gallup poll data shows, more self-identified Democrats view foreign trade as an opportunity for the U.S. than do Republicans:

Since Obama was elected in 2008, the share of Democrats who view trade as an opportunity has risen from 36 percent to 61 percent, according to Gallup. As for the TPP specifically, Democrats were more supportive (59 percent) than Republicans (49 percent), according to a 2014 Pew survey. But much of this Democratic support may be due to the TPP being one of Obama’s top policy priorities in his last term.

That hasn’t changed the minds of many congressional Democrats, however. The economic landscape may be different, but this year’s intra-party fight over trade is likely to be as intense as ever.

Ben Casselman contributed reporting.