Pakistan’s military has struck deeper into Afghanistan as border fighting intensifies and both sides claimed to have inflicted heavy losses.