-- Migration: home_features + why choose us settings (run on existing DB: fizasie)

CREATE TABLE IF NOT EXISTS home_features (
    id INT AUTO_INCREMENT PRIMARY KEY,
    title VARCHAR(200) NOT NULL,
    description TEXT NOT NULL,
    icon_type VARCHAR(20) DEFAULT 'emoji',
    icon_value VARCHAR(255) DEFAULT NULL,
    sort_order INT DEFAULT 0,
    is_active TINYINT(1) DEFAULT 1,
    color_class VARCHAR(50) DEFAULT NULL,
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
INSERT IGNORE INTO home_features (title, description, icon_type, icon_value, sort_order, color_class) VALUES
('Quality Packaging', 'Single-wall & double-wall boxes that survive transit. ISO-aligned processes and consistent board grades.', 'emoji', '📦', 1, 'teal'),
('Custom Sizes', 'Standard cartons to made-to-measure specs—die-cut flaps, printed sleeves, and bulk orders on schedule.', 'emoji', '⚙️', 2, 'amber'),
('Sustainable', 'Recyclable kraft and responsible sourcing. Right-sized boxes mean less waste and lower freight.', 'emoji', '🌱', 3, 'violet');

INSERT INTO site_settings (setting_key, setting_value) VALUES
('features_section_title', 'Why businesses choose us'),
('features_section_sub', 'Quality corrugated solutions from one reliable partner.'),
('why_choose_title', 'Why choose us?'),
('why_choose_lead', 'Modern corrugators and finishing lines—straight, strong boxes every time.'),
('why_choose_list', "On-time delivery for bulk & recurring orders\nTechnology & quality checks at every stage\nDedicated enquiry & support team"),
('why_choose_btn_text', 'About us'),
('why_choose_btn_url', 'about.php')
ON DUPLICATE KEY UPDATE setting_key = setting_key;
