We run a React-based P2P auction marketplace and want the product page to show live bidding, not a static price. Please build a self-contained bidding widget that displays the current highest bid and a countdown to the auction end, and updates in real time via our Firebase Realtime Database. Buyers should be able to place a bid and see an immediate (optimistic) UI response while the request is confirmed. The widget must reject bids that aren’t higher than the current amount and clearly communicate states like 'placing bid', 'bid accepted', 'error', and 'outbid'. Use React hooks and a lightweight state machine to manage the flow and keep the experience smooth and trustworthy.