A country can have an absolute advantage in the production of a good without having a comparative advantage. Comparative advantage is what determines whether it pays to produce a good or import it. Assume that there are only two goods, cars and computers, and one productive resource which is some composite of land, labor, and capital. It may seem that Americans can realize no gain by trading with Brazilians. Because it costs more to produce computers in the United States than in Brazil.
All costs are opportunity costs.
The cost of producing computers is the cars that could have been produced. Using the three units of PR required to produce 1,000 computers in the United States requires sacrificing the production of 150 cars. Using the four units of PR required to produce 1,000 computers in Brazil requires sacrificing only 100 cars. So even though Americans have an absolute advantage in producing computers, Brazilians have a comparative advantage. Compared to what has to be sacrificed, Brazil produces computers for only two-thirds as much as it costs in the United States.