Marta very sorry to hear of your loss.
Generally there is no guarantees on amphibians.
Frogs are fragile creatures and losses can be expected.
You had the opportunity to look over the frogs in person before you purchased. if the frogs looked sick why did you buy them?
Agreed, sadly, frogs do not handle stress/shock well so if they already appeared in poor condition then exposure to extreme temperatures, even briefly, and transportation could have been enough.
Going forward, if you question an animal's health, would recommend not purchasing it then, doing some research, and feel comfortable identifying a healthy specimen.