And the eyes of them both were opened, and they knew that they were naked; and they sewed fig leaves together, and made themselves aprons. And they heard the voice of the LORD God walking in the garden in the cool of the day: and Adam and his wife hid themselves from the presence of the LORD God amongst the trees of the garden. And the LORD God called unto Adam, and said unto him, Where art thou? And he said, I heard thy voice in the garden, and I was afraid, because I was naked; and I hid myself.
The first shame in the Bible is about being seen rather than about being caught. They sew coverings, then hide among the trees, and the question "Where art thou" is put to people already hiding. Guilt over a deed and shame at exposure sit together here.