What happens to rankings when products go out of stock?
It depends whether the product is coming back. Temporarily unavailable products usually stay live with clear stock messaging. Discontinued ones are redirected to the closest alternative or category, so you keep the value those pages have built.