-- EN kurumsal sayfalar: about-us + contact minimum içerik (idempotent)
USE faunamix;

SET @has_locale = (
  SELECT COUNT(*) FROM information_schema.COLUMNS
  WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'site_pages' AND COLUMN_NAME = 'locale'
);

SET @sql = IF(
  @has_locale > 0,
  "UPDATE site_pages SET
     title = 'About us',
     short_title = 'Corporate',
     excerpt = 'Feed additives and livestock solutions from Muğla / Fethiye, Turkey.',
     body_html = '<p>At Faunamix we combine science-based formulations with quality ingredients to support herd health and performance. Explore our <a href=\"/en/listing\">product catalog</a> or <a href=\"/en/contact\">contact us</a> for advice.</p>',
     meta_title = 'About us | Faunamix',
     meta_description = 'Faunamix — feed additives and livestock solutions based in Muğla / Fethiye, Turkey.'
   WHERE locale = 'en' AND path = '/about-us'
     AND (TRIM(COALESCE(title, '')) = '' OR TRIM(COALESCE(body_html, '')) = '')",
  'SELECT 1'
);
PREPARE stmt FROM @sql;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;

SET @sql = IF(
  @has_locale > 0,
  "UPDATE site_pages SET
     title = 'Contact',
     short_title = 'Get in touch',
     excerpt = 'Send a message or use the details below. We aim to respond on business days.',
     body_html = '',
     meta_title = 'Contact | Faunamix',
     meta_description = 'Contact Faunamix — questions about feed additives and orders.'
   WHERE locale = 'en' AND path = '/contact'
     AND (TRIM(COALESCE(title, '')) = '' OR TRIM(COALESCE(title, '')) = 'İletişim')",
  'SELECT 1'
);
PREPARE stmt FROM @sql;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
