We sold something we didn't have
Stock is counted in the shop, the warehouse and the online store, and each channel finds out about the others' sales later.
One stock record across the shop, the warehouse, the web store and each marketplace, updated as every order or sale lands, with a listing paused as soon as an item runs out.