What CAN I say to a friend that experienced a miscarriage?

A friend of mine confided in me that she lost a baby early on and had to have a D&C last year. We always talk about her ttc, breastfeeding, etc. really openly and she just blurted it out. It broke my heart! I know that there are many things that aren't good to say ("You'll have another," "It's God's plan", etc.) so I hugged her and told her I was sorry. We talked about how blessed she is with her first born and she smiled again.
What is the right thing to say in this situation? I also want to get her a little something- maybe a butterfly piece of jewelry. Thoughts?