Hi, sorry to hear about your piggie. She could've been depressed as she was on her own. They shut down, get upset and can stop eating.
Pigs need to eat essentially all the time to keep their gut moving, if they stop, so does their gut (GI Stasis) which can cause bloating and is very painful. Piggies don't sleep like we think.
They have quick naps because of the fact they're prey animals so need to keep watch for predators.
Also, if you got her from a pet shop, it's likely she was bred for money and not for health. Which is very sad but a reality.
I'm so sorry this happened to you. Have comfort knowing that you did your best considering.
Of you do want to get piggies in the future, feel free to ask me any questions, if I don't know then we will learn together.