First of all im so sorry if the title of this is kinda confusing
So yesterday i decided that i will shower, and i have no intention to make ghusl, after i got inside the bathroom i suddenly think that i should make ghusl since i feel like i finished my period anymore. after i see my pads that it's just brown discharge, i decided that i will make ghusl so that i can fast tomorrow. now in a few minutes we will eat for suhoor. Is my ghusl valid? or should i make ghusl again?