The South lost because the North outmanned and outclassed it at almost every point, militarily.
The South was way outclassed industrially. There was probably never any chance of it winning without European recognition and military aid. And we can now see in retrospect what some, like Jefferson Davis, even saw at the time, which was that there was never any real hope of Europe intervening. It just never was in England or France's interests to get involved in a North American war that would inevitably have wound up doing great damage, especially to England's maritime trade.
Industrially the South couldn't keep up in output and in manpower. By the end of the war, the South had, more or less, plenty of weaponry still, but it just didn't have enough men to use the guns.