Hey guys question i have a 2014 corolla s cvt transmission.

I live in jamaica where there is alot mountains i was driving to the country lastnight where i stoped and parked on a hill to grab a bite when i was ready to leave the car woudnt go up the hill it just lost power. I tried switching to manual that didnt work . A guy was passing buy saw what was happening and just gave the car a slight push while it was in drive and i was floori g the gas pedal , it start moving fwd very slow until it regained power. Was very scary have any one had the experience? Is there a problem with the trasmission help please?
Did the RPM's increase as you pressed the accelerator? If so, and the car didn't increase speed it sounds like the transmission is slipping. If not, then I would suspect a fuel system problem. Either way, I'd definitely get it checked out by a mechanic.