# Stone-Geary utility function, derivation of Marshallian demand

I am reading a paper on structural change. It has three sectors and it features non homothetic utility function, namely a CES with some thresholds for the consumption of the three goods. The UMP is as follows: $$\max_{C_k; k=1,2,3} \left(\sum_{k}\omega^{\frac{1}{\epsilon}}_k\left(C_k-\bar{C}_k\right)^{\frac{\epsilon-1}{\epsilon}}\right)^\frac{\epsilon}{\epsilon-1}$$ Subject to the budget constraint $$\sum_{K}\left(P_k C_k\right)=W$$ with $\omega_k$ summing up to 1. What I find online is mainly a derivation of the log-utility case, which is not that suitable for my case. Also, in the paper authors use a price index which is really close to the one of the Dixit-Stiglitz case.

I'm currently stuck at the level of the FOC, and I wonder what are the steps to derive a proper demand function from these premises. Can anyone show me how to find this demand function?