US apparel maker VF Corporation has announced plans to close three factories in Costa Rica and dismiss 400 workers amid falling sales to the US.