You have used the clauses of unreal condition perfectly well.
Don't worry about "hadn't had" at all It's widely used to indicate that something hasn't happened in the long run.
E.g.If she hadn't gone there earlier, she would have missed the train. (but, luckily,she got there on time, thus, got on the train and was off)
All the best,
- For Teachers