CREATE TABLE IF NOT EXISTS faqs (
  id SERIAL PRIMARY KEY,
  question VARCHAR(255) NOT NULL,
  answer TEXT NOT NULL,
  sort_order INT DEFAULT 0
);

-- Insert sample FAQs
INSERT INTO faqs (question, answer, sort_order) VALUES
('How do I track my order?', 'You can track your order in real-time from the "Order Status" page. Once a driver is assigned, you will see their location on the map.', 1),
('What payment methods do you accept?', 'We accept all major credit cards, PayPal, and loyalty points.', 2),
('Can I order without creating an account?', 'Yes, you can place an order as a guest. However, creating an account allows you to save your delivery information and earn rewards points.', 3),
('How is the delivery fee calculated?', 'The delivery fee is based on the distance between the restaurant and your delivery location. The exact amount is calculated at checkout.', 4),
('Can I change my delivery pin after ordering?', 'Unfortunately, you cannot change your delivery pin after an order has been placed. Please double-check your location before confirming your order. If you need to make a change, please contact support immediately.', 5),
('What should I do if my food arrives late?', 'We are sorry for the delay! Please contact our support team through the chat or contact form, and we will investigate the issue with the driver and restaurant.', 6);