Why is 12... d4 a blunder? I recently played a game featuring the Old Sicilian with a bit of a branch-off. White played 3. Bc4 after 2. Nf3 Nc6, which I don't deal well with. I ended up playing 12... d4, attacking the White knight, which the analysis later marked as a blunder. I'm not an advanced chess player, and I can't find out why this would be so.
[FEN &quot;&quot;]
[startply &quot;23&quot;]

1. e4 c5 2. Nf3 Nc6 3. Bc4 d6 4. O-O Nf6 5. d3 g6 6. Nc3 Bg7 7. b3 O-O 8. Bb2 Bg4 9. h3 Bxf3 10. gxf3 e6 11. f4 d5 12. Bb5 d4 13. Bxc6 dxc3 14. Bxb7 cxb2 15. Rb1 Rb8 16. Ba6 Nh5 17. Rxb2 Nxf4 18. Qf3 Qg5+ 19. Kh1 Bxb2 20. Rg1 Qe5 21. Rb1 Ba3 22. Qg3 c4 23. dxc4 Bd6 24. a3 Rb6 25. Bb5 Bxa3 26. Ra1 Bd6 27. Rxa7 Ne2 28. Qe3 Qh2#

Can anybody please can clue me in to how 12... d4 was a blunder?
Because black can play 12...Nd4 instead. The threat is to catch the bishop b5 with ...a6 and ...b5 and eventually ...c4. I do not see how white can prevent this. White loses a piece.