High street giant Next has warned of possible store closures after losing a landmark legal case over equal pay.