To have any desire, idea, or plan that is unlikely to be realized; to imagine visionary projects or schemes; to have an idle fancy or a pipe dream; to daydream.
How often have the words be lost in thought and build castles in the air occurred in a corpus of books? (source: Google Ngram Viewer )