Limited company: If I reinvest profits into more stock, do we still pay tax on it?

Hi all!

As in the title I am looking at starting an e-commerce company within a LTD. Initially I will not be taking any dividends.

One thing that I'm not 100% sure about is when it comes to the end of year tax, if we've spent all our profits and cash on more stock, which could be unsold when the bill is due, do we still pay corporation tax on those profits?

i.e. we get £1,000 profit, but then buy £1,000 more in stock. Is this then considered a non-taxable loss until the stock is sold?

Any help or guidance is appreciated!

Thanks!