USE ecommerce;

-- Password: admin123 (bcrypt hash)
INSERT INTO users (name, email, password, phone, is_admin, is_active, address, city, state, pincode) VALUES
('Admin', 'admin@shopnow.com', '$2y$10$r7deU55fvtQdrVk2zEfnTuXDrkW2bbJYpwdcNibs8Fba0.WIQuDNe', '9876543210', 1, 1, '123 Admin Street', 'Mumbai', 'Maharashtra', '400001'),
('Rahul Sharma', 'rahul@example.com', '$2y$10$vKkkLnLVjY2KEJYugDiQZe.G/LnPftMRtTDSS4hgJ5A5BiPEiSZqK', '9876543211', 0, 1, '456 Customer Lane', 'Delhi', 'Delhi', '110001');

-- Categories
INSERT INTO categories (name, slug, description, sort_order, tax_rate) VALUES
('Electronics', 'electronics', 'Gadgets, devices & accessories', 1, 18.00),
('Clothing', 'clothing', 'Fashion for men, women & kids', 2, 12.00),
('Home & Kitchen', 'home-kitchen', 'Furniture, decor & kitchen appliances', 3, 12.00),
('Books', 'books', 'Books, ebooks & magazines', 4, 5.00),
('Sports & Fitness', 'sports-fitness', 'Sports equipment, gym gear & activewear', 5, 12.00),
('Beauty & Personal Care', 'beauty-care', 'Skincare, makeup & grooming', 6, 18.00);

-- Subcategories
INSERT INTO categories (name, slug, description, parent_id, sort_order, tax_rate) VALUES
('Mobile Phones', 'mobile-phones', 'Smartphones & accessories', 1, 1, 18.00),
('Laptops', 'laptops', 'Laptops & computers', 1, 2, 18.00),
('Men', 'men-clothing', 'Men''s clothing', 2, 1, 12.00),
('Women', 'women-clothing', 'Women''s clothing', 2, 2, 12.00);

-- Products
INSERT INTO products (name, slug, description, short_description, price, compare_price, stock_quantity, sku, category_id, is_featured) VALUES
('Wireless Bluetooth Headphones', 'wireless-bluetooth-headphones', 'Premium wireless headphones with noise cancellation. 30-hour battery life, comfortable over-ear design, crystal clear audio.', 'Premium wireless headphones with ANC', 2499.00, 3999.00, 50, 'ELEC-HP-001', 1, 1),
('Smart Watch Pro', 'smart-watch-pro', 'Advanced smartwatch with health tracking, GPS, heart rate monitor, sleep tracking, and 7-day battery life.', 'Advanced health tracking smartwatch', 3999.00, 5999.00, 35, 'ELEC-SW-001', 1, 1),
('Cotton Casual Shirt', 'cotton-casual-shirt', 'Premium cotton casual shirt. Breathable fabric, perfect for daily wear.', 'Premium cotton shirt for daily wear', 899.00, 1499.00, 100, 'CLOTH-SH-001', 2, 1),
('Stainless Steel Water Bottle', 'stainless-steel-bottle', 'Double-wall insulated water bottle. Keeps drinks cold for 24hrs or hot for 12hrs. 750ml capacity.', 'Insulated bottle, 750ml', 599.00, 999.00, 80, 'HOME-BT-001', 3, 1),
('Yoga Mat Premium', 'yoga-mat-premium', 'Extra thick, non-slip yoga mat. Perfect for yoga, pilates, and floor exercises.', 'Extra thick non-slip yoga mat', 1299.00, 1999.00, 60, 'SPRT-YM-001', 5, 1),
('Organic Face Serum', 'organic-face-serum', 'Vitamin C face serum with hyaluronic acid. Natural ingredients, suitable for all skin types.', 'Vitamin C serum for glowing skin', 449.00, 699.00, 90, 'BEAU-SR-001', 6, 0),
('USB-C Fast Charger', 'usb-c-fast-charger', '65W GaN fast charger. Compatible with laptops, phones, and tablets. Compact design.', '65W GaN fast charger', 1499.00, 2499.00, 45, 'ELEC-CH-001', 1, 0),
('Leather Wallet', 'leather-wallet', 'Genuine leather wallet with RFID blocking. Multiple card slots, coin pocket, and note compartment.', 'Genuine leather RFID wallet', 699.00, 1299.00, 70, 'CLOTH-WL-001', 2, 0),
('Non-Stick Cookware Set', 'non-stick-cookware-set', '5-piece non-stick cookware set. Includes frying pan, sauce pan, and cooking utensils. Dishwasher safe.', '5-piece non-stick cookware set', 2499.00, 3999.00, 25, 'HOME-CK-001', 3, 0),
('Running Shoes Ultra', 'running-shoes-ultra', 'Lightweight running shoes with responsive cushioning. Breathable mesh upper, durable rubber outsole.', 'Lightweight running shoes', 2999.00, 4999.00, 40, 'SPRT-SH-001', 5, 0);

-- Banners
INSERT INTO banners (title, subtitle, image, link, btn_text, sort_order, is_active) VALUES
('Summer Sale', 'Up to 50% off on trending items', 'assets/uploads/banners/placeholder.svg', 'catalog.php', 'Shop Now', 1, 1),
('New Arrivals', 'Check out our latest collection', 'assets/uploads/banners/placeholder.svg', 'catalog.php?sort=newest', 'Explore', 2, 1);

-- Pincodes
INSERT INTO pincodes (pincode, city, state, cod_available, delivery_days) VALUES
('400001', 'Mumbai', 'Maharashtra', 1, 2),
('400002', 'Mumbai', 'Maharashtra', 1, 2),
('110001', 'New Delhi', 'Delhi', 1, 3),
('110002', 'New Delhi', 'Delhi', 1, 3),
('700001', 'Kolkata', 'West Bengal', 1, 4),
('600001', 'Chennai', 'Tamil Nadu', 1, 3),
('500001', 'Hyderabad', 'Telangana', 1, 3),
('560001', 'Bangalore', 'Karnataka', 1, 3),
('380001', 'Ahmedabad', 'Gujarat', 1, 4),
('201301', 'Noida', 'Uttar Pradesh', 1, 3),
('122001', 'Gurugram', 'Haryana', 1, 3),
('302001', 'Jaipur', 'Rajasthan', 1, 4),
('452001', 'Indore', 'Madhya Pradesh', 1, 4),
('682001', 'Kochi', 'Kerala', 1, 4),
('695001', 'Thiruvananthapuram', 'Kerala', 1, 4);

-- Pages
INSERT INTO pages (title, slug, content, is_published, sort_order) VALUES
('About Us', 'about', 'Welcome to ShopNow!\n\nWe are your one-stop destination for quality products at the best prices. Our mission is to provide a seamless shopping experience with the widest selection of products, fastest delivery, and the best customer service.', 1, 1),
('Contact Us', 'contact', 'Get in touch with us:\n\n📍 Address: 123 Main Street, Mumbai, Maharashtra - 400001\n📞 Phone: +91 9876543210\n📧 Email: support@shopnow.com', 1, 2),
('Shipping Policy', 'shipping', 'We offer free shipping on orders above ₹500. For orders below ₹500, a flat shipping fee of ₹50 applies. Orders are processed within 24 hours and delivered within 3-7 business days across India.', 1, 3),
('Returns Policy', 'returns', 'We offer a 7-day easy return policy. Items must be unused and in their original packaging. Refunds are processed within 5-7 business days after we receive the returned item.', 1, 4);

-- Coupons
INSERT INTO coupons (code, type, value, min_order_amount, max_discount_amount, max_uses, is_active, description) VALUES
('WELCOME10', 'percentage', 10, 500, 200, 100, 1, '10% off for new customers (max ₹200 off)'),
('SAVE500', 'fixed', 500, 2500, NULL, 50, 1, '₹500 off on orders above ₹2500'),
('FREESHIP', 'fixed', 50, 0, NULL, 200, 1, 'Free shipping (₹50 off)');

-- Settings
INSERT INTO settings (`key`, `value`, `type`, `group`, `label`) VALUES
('store_name', 'ShopNow', 'text', 'general', 'Store Name'),
('store_email', 'support@shopnow.com', 'email', 'general', 'Store Email'),
('store_phone', '+91 9876543210', 'text', 'general', 'Store Phone'),
('store_address', '123 Main Street, Mumbai, Maharashtra - 400001', 'textarea', 'general', 'Store Address'),
('currency', 'INR', 'select', 'general', 'Currency'),
('store_state', 'Kerala', 'text', 'shipping', 'Store State'),
('shipping_in_state_rate', '50', 'number', 'shipping', 'In-State Shipping Rate'),
('shipping_out_state_rate', '100', 'number', 'shipping', 'Out-of-State Shipping Rate'),
('shipping_free_min_amount', '500', 'number', 'shipping', 'Free Shipping Min Amount');
