when I buy rice that was transported thousands of miles before it got to me.
People like to complain about container ships, but they're ridiculously efficient at transporting cargo, because they transport so much in one go. If you use a container ship to transport only rice, you could probably transport something like 200 million kilograms.
Road transport produces something like 70% of emissions generated by freight transport globally. Sea is only 20%.
That means it's often less polluting to buy something made on the other side of the world, than from a few hundred miles away, depending on how close you live to the sea/port or a railway station.
local politics and co-operative food production
Meh. The benefits of scale drive down prices, but one of the ways they do that is also by lowering fuel consumption. If you're producing everything on small farms, it's likely you'll use more fuel and create more emissions, than larger farms which can produce at scale and are hyper-efficient. For example, bigger farms use drones and nutrient maps, which allow them to be very targetted in where they sow seeds and spread fertiliser, which means they use much less fertiliser, which means less fuel used.
Farming efficiently also really isn't something for amateurs. Plenty of large scale farmers have engineering degrees for that very reason, or employ people who do.