Melding is incredibly simple to break down:

1. chose (or look up) your stat prioritity. You have done that and it's correct. RDM/ SMN both have Crit > DH > Det
2. with that priority in mind, fill all materia slots with VIII materia while avoiding red numbers. You get a warning if you wouldn't get the full value.
3. if a piece can be overmelded, use VIII materia for the first overmeld slot and VII for all remaining slots. If you're really short on money, VI for the first slot is also acceptable and often a lot cheaper. Escpecially for your weakest stat, which would be Det

Although you can try to optimize in order to hit certain stat tiers, it's generally not worth the hassle and money while still gearing up. You will have to frequently switch around materia and you only have a 40% chance to get back VIII materia once melded.
There's really not much to it. Unfortunately.