
// Comprehensive Services Configuration for Quote2Contract Platform

export interface ServiceCategory {
  id: string;
  name: string;
  icon: string;
  description: string;
  subcategories: ServiceSubcategory[];
}

export interface ServiceSubcategory {
  id: string;
  name: string;
  services: string[];
}

// South Africa - Full Service Catalog
export const SOUTH_AFRICA_SERVICES: ServiceCategory[] = [
  {
    id: 'roofing',
    name: '🏠 Roofing Solutions',
    icon: 'Home',
    description: 'Installation, Repair, Maintenance, Protection',
    subcategories: [
      {
        id: 'new-installations',
        name: 'New Roof Installations',
        services: [
          'Concrete / Clay Tile Roofing',
          'Slate Roofing',
          'Metal Sheet Roofing (IBR / Corrugated)',
          'Standing Seam Metal Roofing',
          'Asphalt Shingle Roofing',
          'Chromadek Roofing',
          'Fibre Cement Roofing',
          'Light Steel Frame Roofing Systems',
          'Thatch Roofing'
        ]
      },
      {
        id: 'repairs-maintenance',
        name: 'Roof Repairs & Maintenance',
        services: [
          'Leak Detection & Repair',
          'Tile Replacement / Re-Bedding',
          'Cement Ridge Replacement',
          'Flashing Repairs / Replacements',
          'Valley Repairs / Replacement',
          'Structural Timber Repairs',
          'Roof Beam Reinforcement',
          'Roof Ceiling Damage Repairs'
        ]
      },
      {
        id: 'waterproofing',
        name: 'Roof Waterproofing',
        services: [
          'Torch-On Membrane Systems',
          'Liquid Rubber Waterproofing',
          'Acrylic Waterproofing Systems',
          'Flat Roof Waterproofing',
          'Parapet Wall Waterproofing',
          'Balcony / Concrete Slab Waterproofing'
        ]
      },
      {
        id: 'coatings-treatment',
        name: 'Roof Coatings & Treatment',
        services: [
          'UV Resistant Acrylic Coatings',
          'Thermal Reflective Coatings',
          'Anti-Fungal Treatments',
          'Metal Roof Rust-Proof Coating Systems'
        ]
      },
      {
        id: 'cleaning',
        name: 'Roof Cleaning',
        services: [
          'High-Pressure Washing',
          'Roof Fungus & Algae Removal',
          'Chemical Treatment',
          'Debris Removal & General Roof Sanitizing'
        ]
      },
      {
        id: 'resheeting',
        name: 'Roof Resheeting / Re-Roofing',
        services: [
          'Full Strip & Replace',
          'Timber / Batten Renewal',
          'Roof Bracing & Strengthening',
          'Roof Sheet Overlay Systems'
        ]
      },
      {
        id: 'insulation',
        name: 'Roof Insulation',
        services: [
          '30mm / 135mm / 145mm Isoboard Thermal Insulation',
          'Bulk Thermal Insulation Rolls',
          'Spray Foam Applications',
          'Fire-Resistant Insulation Upgrades'
        ]
      },
      {
        id: 'skylights-ventilation',
        name: 'Skylights & Ventilation',
        services: [
          'Tubular Skylight Installations',
          'Dome Skylights',
          'Whirlybirds / Roof Vent Turbines',
          'Attic Ventilation Systems'
        ]
      },
      {
        id: 'solar-prep',
        name: 'Solar Roof Preparation',
        services: [
          'Mounting Bracket Installations',
          'Waterproof Cable Penetrations',
          'Roof Reinforcement for PV Load Planning'
        ]
      },
      {
        id: 'emergency',
        name: 'Emergency Roof Services',
        services: [
          'Storm Damage Repairs',
          'Fallen Tree Damage Response',
          'Temporary Waterproofing & Tarping',
          'Insurance Claim Reporting Support'
        ]
      }
    ]
  },
  {
    id: 'gutters',
    name: '💧 Gutter & Rainwater Solutions',
    icon: 'Droplets',
    description: 'Complete gutter systems and rainwater management',
    subcategories: [
      {
        id: 'new-gutter-installations',
        name: 'New Gutter Installations',
        services: [
          'Aluminium Seamless Gutters',
          'PVC Gutters (Half-Round / K-Style)',
          'Box Gutters',
          'Galvanized Gutters',
          'Copper Gutters',
          'Galvalume Gutters'
        ]
      },
      {
        id: 'downpipes',
        name: 'Downpipes & Connections',
        services: [
          'Standard Downpipes',
          'Heavy-Duty Downpipes',
          'Water Diverter Installations',
          'Anti-Theft Downpipe Cages'
        ]
      },
      {
        id: 'gutter-repairs',
        name: 'Gutter Repairs & Maintenance',
        services: [
          'Seal Repairs',
          'Joint Repairs',
          'Sagging / Pulling Correction',
          'Bracket Replacement',
          'Re-Alignment for Proper Flow'
        ]
      },
      {
        id: 'gutter-cleaning',
        name: 'Gutter Cleaning Services',
        services: [
          'Internal Debris Removal',
          'Downpipe Flush Cleaning',
          'Leaf Clump Clearing',
          'Mold / Algae Chemical Treatment'
        ]
      },
      {
        id: 'gutter-accessories',
        name: 'Gutter Accessories & Protection',
        services: [
          'Leaf Guard Mesh Systems',
          'Bird-Proofing Netting',
          'Anti-Leaf Brush Fitted Systems',
          'Splash Blocks',
          'Rain Chains'
        ]
      },
      {
        id: 'rainwater-harvesting',
        name: 'Rainwater Harvesting',
        services: [
          'Gutter Connection to Tanks',
          'Leaf Filter Diverters',
          'First Flush Diverters',
          'Tank Base Installation'
        ]
      }
    ]
  },
  {
    id: 'solar',
    name: '☀️ Solar Panel Solutions',
    icon: 'Sun',
    description: 'Installation, Integration, Upgrades, Compliance',
    subcategories: [
      {
        id: 'solar-system-installations',
        name: 'Solar System Installations',
        services: [
          'Grid-Tied Solar Systems',
          'Hybrid Solar Systems (with battery backup)',
          'Off-Grid Solar Systems',
          'Solar Geyser Systems (Thermal)',
          'Solar Pool Heating Systems'
        ]
      },
      {
        id: 'solar-components',
        name: 'Solar Panel Components',
        services: [
          'PV Panel Installation (Various kW Sizes)',
          'Lithium Battery Storage Systems',
          'Inverter Installations',
          'Charge Controllers & Monitoring Equipment'
        ]
      },
      {
        id: 'integration-services',
        name: 'Integration Services',
        services: [
          'DB Board Integration & Compliance',
          'Home & Commercial Load Management',
          'Generator Integration',
          'UPS Hybrid Integration'
        ]
      },
      {
        id: 'mounting-structural',
        name: 'Mounting / Structural',
        services: [
          'Roof Mount Systems',
          'Ground Mount Structures',
          'Carport Solar Structures',
          'Reinforcement for High-Wind Zones'
        ]
      },
      {
        id: 'solar-maintenance-repairs',
        name: 'Maintenance & Repairs',
        services: [
          'System Performance Diagnostics',
          'Faulty Panel Replacement',
          'Inverter Repairs / Swaps',
          'Battery Health & Cycle Assessments'
        ]
      },
      {
        id: 'solar-cleaning',
        name: 'Cleaning & Optimization',
        services: [
          'Panel Cleaning (Dirt, Dust, Bird Droppings)',
          'Cable Management Retrofitting',
          'Efficiency Optimization'
        ]
      },
      {
        id: 'solar-compliance',
        name: 'Compliance & Reporting',
        services: [
          'Electrical COC Certification',
          'SSEG Application Support (where applicable)',
          'Insurance Claim Reporting'
        ]
      }
    ]
  },
  {
    id: 'pools',
    name: '🏊 Pool Solutions',
    icon: 'Waves',
    description: 'Build, Fix, Resurface, Maintain',
    subcategories: [
      {
        id: 'pool-construction',
        name: 'Pool Construction',
        services: [
          'Concrete Shell Pools',
          'Fiberglass Pool Installations',
          'Splash Pools & Plunge Pools',
          'Rim-Flow / Infinity Edge Design',
          'Custom Water Features'
        ]
      },
      {
        id: 'pool-repairs',
        name: 'Pool Repairs',
        services: [
          'Crack Repair & Leak Fixing',
          'Structural Reinforcement',
          'Coping & Pool Edge Repairs'
        ]
      },
      {
        id: 'pool-resurfacing',
        name: 'Pool Resurfacing',
        services: [
          'Fiberglass Resurfacing',
          'Marbelite Resurfacing',
          'Tile Relining'
        ]
      },
      {
        id: 'filtration-pump-systems',
        name: 'Filtration & Pump Systems',
        services: [
          'Pump Replacements / Upgrades',
          'Sand Filter Installs',
          'Cartridge Filter Systems',
          'Variable Speed Pump Installation'
        ]
      },
      {
        id: 'pool-heating',
        name: 'Pool Heating Products',
        services: [
          'Solar Heating Panels',
          'Heat Pump Systems',
          'Thermal Blanket Covers'
        ]
      },
      {
        id: 'pool-maintenance',
        name: 'Maintenance Services',
        services: [
          'Weekly / Monthly Pool Maintenance',
          'pH Balancing & Chemical Management',
          'Algae Treatment & Shock Treatment'
        ]
      },
      {
        id: 'pool-safety',
        name: 'Pool Safety & Compliance',
        services: [
          'Safety Net Installations',
          'Pool Covers',
          'Safety Fencing',
          'Non-Slip Surrounds'
        ]
      }
    ]
  },
  {
    id: 'irrigation',
    name: '💧🌱 Irrigation Solutions',
    icon: 'Droplets',
    description: 'Design, Installation, Pumping, Smart Control',
    subcategories: [
      {
        id: 'irrigation-design',
        name: 'New Irrigation System Design',
        services: [
          'Home Garden Systems',
          'Commercial Landscape Systems',
          'Agricultural Drip & Sprinkler Layout'
        ]
      },
      {
        id: 'irrigation-installations',
        name: 'Irrigation Installations',
        services: [
          'Dripline / Micro Spray Systems',
          'Pop-Up Sprinklers',
          'Mist Cooling Systems',
          'Borehole Integration'
        ]
      },
      {
        id: 'smart-irrigation',
        name: 'Smart Irrigation',
        services: [
          'WiFi App Controllers',
          'Soil Moisture Sensors',
          'Weather-Responsive Scheduling'
        ]
      },
      {
        id: 'water-supply',
        name: 'Water Supply Integration',
        services: [
          'Booster Pump Installations',
          'Filtration Systems',
          'Tank & Rainwater Connection'
        ]
      },
      {
        id: 'irrigation-repairs',
        name: 'Repairs & Upgrades',
        services: [
          'Sprinkler Head Replacement',
          'Leak Detection & Repair',
          'Zone Valve Replacement',
          'Pressure Balancing'
        ]
      },
      {
        id: 'seasonal-services',
        name: 'Seasonal Services',
        services: [
          'Winter Shut-Down / Blow-Out',
          'Spring Start-Up & Zone Testing'
        ]
      }
    ]
  },
  {
    id: 'paving',
    name: '🚧 Paving Solutions',
    icon: 'Construction',
    description: 'Driveways, Paths, Patios, Hardscaping',
    subcategories: [
      {
        id: 'paving-installations',
        name: 'Paving Installations',
        services: [
          'Driveway Paving',
          'Walkway / Path Paving',
          'Patio Paving',
          'Pool Surround Paving',
          'Entertainment Areas'
        ]
      },
      {
        id: 'surface-options',
        name: 'Surface Options',
        services: [
          'Clay Brick Pavers',
          'Concrete Pavers',
          'Cobblestone',
          'Exposed Aggregate',
          'Permeable Pavers',
          'Flagstone Slabs'
        ]
      },
      {
        id: 'commercial-hardscape',
        name: 'Commercial Hardscape',
        services: [
          'Parking Lot Paving',
          'Factory Yard Surfacing',
          'Truck-Rated Road Infrastructure'
        ]
      },
      {
        id: 'edging-finishing',
        name: 'Edging and Finishing',
        services: [
          'Kerb Edging',
          'Garden Bordering',
          'Drainage Channels'
        ]
      },
      {
        id: 'paving-repairs',
        name: 'Repairs & Maintenance',
        services: [
          'Re-Leveling Sunken Paving',
          'Joint Sand Replacement',
          'Weed Growth Treatment',
          'Broken Paver Replacement'
        ]
      }
    ]
  },
  {
    id: 'fencing',
    name: '🛡️ Fencing & Wall Solutions',
    icon: 'Fence',
    description: 'Security, Privacy, Boundary Control',
    subcategories: [
      {
        id: 'fence-installations',
        name: 'Fence Installations',
        services: [
          'Palisade Fencing',
          'ClearVu Security Fencing',
          'Wire Mesh Fencing',
          'Electric Fencing',
          'Timber Fencing',
          'PVC Fencing',
          'Bar Fencing'
        ]
      },
      {
        id: 'perimeter-walls',
        name: 'Perimeter Walls',
        services: [
          'Brick Boundary Walls',
          'Concrete Precast Walls',
          'Vibracrete Walls',
          'Retaining Walls'
        ]
      },
      {
        id: 'security-upgrades',
        name: 'Security Upgrades',
        services: [
          'Anti-Climb Spikes',
          'Razor Wire',
          'Motion Gate Sensors',
          'Electric Fence Energizer Integration'
        ]
      },
      {
        id: 'gate-solutions',
        name: 'Gate Solutions',
        services: [
          'Swing Gates',
          'Sliding Gates',
          'Gate Motor Installations',
          'Access Control Systems'
        ]
      },
      {
        id: 'fence-repairs',
        name: 'Repairs & Maintenance',
        services: [
          'Wall Crack Repairs',
          'Gate Motor Servicing',
          'Fence Panel Replacements'
        ]
      }
    ]
  },
  {
    id: 'renovations',
    name: '🏚️🔧 Renovations',
    icon: 'Building',
    description: 'Home, Office, Retail, Structural Upgrades',
    subcategories: [
      {
        id: 'general-renovation',
        name: 'General Renovation Works',
        services: [
          'Interior & Exterior Refurbishment',
          'Room-By-Room Renovation',
          'Garage Conversion',
          'Granny Flat Conversion',
          'Open-Plan Wall Removal'
        ]
      },
      {
        id: 'kitchen-renovations',
        name: 'Kitchen Renovations',
        services: [
          'Cupboard Design & Installation',
          'Countertop Upgrades',
          'Plumbing & Gas Fitment',
          'Lighting Upgrades'
        ]
      },
      {
        id: 'bathroom-renovations',
        name: 'Bathroom Renovations',
        services: [
          'Shower & Bath Upgrades',
          'Vanity & Basin Installations',
          'Tiling & Waterproofing',
          'Toilet Replacement'
        ]
      },
      {
        id: 'flooring',
        name: 'Flooring',
        services: [
          'Laminate Flooring',
          'Vinyl Flooring',
          'Porcelain & Ceramic Tiling',
          'Screeding & Epoxy Flooring'
        ]
      },
      {
        id: 'painting-plastering',
        name: 'Painting & Plastering',
        services: [
          'Interior Painting',
          'Roof Painting',
          'Waterproof Plastering',
          'Textured Wall Finishes'
        ]
      },
      {
        id: 'ceilings-drywall',
        name: 'Ceilings & Drywall',
        services: [
          'Ceiling Installations',
          'Ceiling Repair',
          'Bulkheads & Lighting Features',
          'Drywall Partitioning'
        ]
      },
      {
        id: 'structural-upgrades',
        name: 'Structural Upgrades',
        services: [
          'Engineer Sign-Off Modifications',
          'Beam Reinforcements',
          'Load-Bearing Wall Removal'
        ]
      },
      {
        id: 'doors-windows',
        name: 'Doors & Windows',
        services: [
          'Aluminium Window Replacement',
          'Timber Door Installation',
          'Sliding & Stacking Doors',
          'Burglar Bars & Security Gates'
        ]
      }
    ]
  }
];

// USA - Adapted Services
export const USA_SERVICES: ServiceCategory[] = [
  {
    id: 'roofing',
    name: '🏠 Roofing Solutions',
    icon: 'Home',
    description: 'Installation, Repair, Maintenance, Protection',
    subcategories: [
      {
        id: 'new-installations',
        name: 'New Roof Installations',
        services: [
          'Asphalt Shingle Roofing',
          'Architectural Shingles',
          'Metal Roofing (Standing Seam)',
          'Slate Roofing',
          'Clay & Concrete Tile Roofing',
          'Flat/Low-Slope Roofing (TPO/EPDM)',
          'Wood Shake Roofing'
        ]
      },
      {
        id: 'repairs-maintenance',
        name: 'Roof Repairs & Maintenance',
        services: [
          'Leak Detection & Repair',
          'Shingle Replacement',
          'Flashing Repairs',
          'Valley Repairs',
          'Emergency Storm Repairs',
          'Ice Dam Removal',
          'Structural Timber Repairs'
        ]
      },
      {
        id: 'waterproofing',
        name: 'Roof Waterproofing',
        services: [
          'TPO Membrane Systems',
          'EPDM Rubber Roofing',
          'Modified Bitumen Systems',
          'Liquid-Applied Waterproofing'
        ]
      },
      {
        id: 'coatings-treatment',
        name: 'Roof Coatings & Treatment',
        services: [
          'Elastomeric Roof Coatings',
          'Reflective Roof Coatings',
          'Moss & Algae Treatment',
          'Rust Prevention Coatings'
        ]
      },
      {
        id: 'solar-roofing',
        name: 'Solar Roof Preparation',
        services: [
          'Solar Panel Mounting Systems',
          'Tesla Solar Roof Installation',
          'Roof Reinforcement for Solar',
          'Waterproof Cable Penetrations'
        ]
      },
      {
        id: 'insulation-ventilation',
        name: 'Insulation & Ventilation',
        services: [
          'Attic Insulation (Spray Foam/Blown-In)',
          'Ridge Vents',
          'Soffit Vents',
          'Attic Fans',
          'Radiant Barriers'
        ]
      },
      {
        id: 'inspections',
        name: 'Roof Inspections',
        services: [
          'Pre-Purchase Inspections',
          'Annual Maintenance Inspections',
          'Storm Damage Assessments',
          'Insurance Claim Inspections'
        ]
      }
    ]
  },
  {
    id: 'gutters',
    name: '💧 Gutter & Rainwater Solutions',
    icon: 'Droplets',
    description: 'Complete gutter systems and rainwater management',
    subcategories: [
      {
        id: 'gutter-installations',
        name: 'New Gutter Installations',
        services: [
          'Seamless Aluminum Gutters',
          'Copper Gutters',
          'K-Style Gutters',
          'Half-Round Gutters',
          'Box Gutters',
          'Galvanized Steel Gutters'
        ]
      },
      {
        id: 'downspouts',
        name: 'Downspouts & Drainage',
        services: [
          'Standard Downspouts',
          'Decorative Downspouts',
          'Underground Drainage Systems',
          'Splash Blocks & Extensions'
        ]
      },
      {
        id: 'gutter-protection',
        name: 'Gutter Protection',
        services: [
          'Leaf Guard Systems',
          'Gutter Screens',
          'Micro-Mesh Guards',
          'Foam Gutter Guards'
        ]
      },
      {
        id: 'gutter-repairs',
        name: 'Gutter Repairs & Maintenance',
        services: [
          'Seal & Joint Repairs',
          'Sagging Gutter Correction',
          'Bracket Replacement',
          'Re-Alignment Services'
        ]
      },
      {
        id: 'gutter-cleaning',
        name: 'Gutter Cleaning',
        services: [
          'Debris Removal',
          'Downspout Flushing',
          'Pressure Washing'
        ]
      },
      {
        id: 'rainwater-harvesting',
        name: 'Rainwater Harvesting',
        services: [
          'Rain Barrel Installations',
          'Cistern Systems',
          'First Flush Diverters',
          'Filtration Systems'
        ]
      }
    ]
  },
  {
    id: 'solar',
    name: '☀️ Solar Panel Solutions',
    icon: 'Sun',
    description: 'Installation, Integration, Upgrades, Compliance',
    subcategories: [
      {
        id: 'solar-installations',
        name: 'Solar System Installations',
        services: [
          'Grid-Tied Solar Systems',
          'Off-Grid Solar Systems',
          'Hybrid Solar with Battery Backup',
          'Solar Water Heaters',
          'Solar Pool Heating'
        ]
      },
      {
        id: 'solar-components',
        name: 'Solar Components',
        services: [
          'Monocrystalline Panel Installation',
          'Polycrystalline Panel Installation',
          'Tesla Powerwall Installation',
          'Inverter Systems',
          'Charge Controllers'
        ]
      },
      {
        id: 'mounting-systems',
        name: 'Mounting Systems',
        services: [
          'Roof-Mounted Systems',
          'Ground-Mounted Arrays',
          'Solar Carports',
          'Tracking Systems'
        ]
      },
      {
        id: 'solar-maintenance',
        name: 'Maintenance & Repairs',
        services: [
          'System Performance Diagnostics',
          'Panel Cleaning',
          'Inverter Repairs',
          'Battery Maintenance'
        ]
      },
      {
        id: 'solar-compliance',
        name: 'Compliance & Incentives',
        services: [
          'Permit & Inspection Services',
          'Federal Tax Credit Assistance',
          'Net Metering Setup',
          'HOA Approval Support'
        ]
      }
    ]
  },
  {
    id: 'pools',
    name: '🏊 Pool Solutions',
    icon: 'Waves',
    description: 'Build, Fix, Resurface, Maintain',
    subcategories: [
      {
        id: 'pool-construction',
        name: 'Pool Construction',
        services: [
          'Gunite/Concrete Pools',
          'Fiberglass Pool Installation',
          'Vinyl Liner Pools',
          'Infinity/Vanishing Edge Pools',
          'Natural/Eco Pools'
        ]
      },
      {
        id: 'pool-repairs',
        name: 'Pool Repairs',
        services: [
          'Leak Detection & Repair',
          'Structural Crack Repair',
          'Coping Repairs',
          'Tile Repair & Replacement'
        ]
      },
      {
        id: 'pool-resurfacing',
        name: 'Pool Resurfacing',
        services: [
          'Plaster Resurfacing',
          'Pebble Tec Finishes',
          'Vinyl Liner Replacement',
          'Fiberglass Refinishing'
        ]
      },
      {
        id: 'equipment',
        name: 'Pool Equipment',
        services: [
          'Pump Installation & Replacement',
          'Filter Systems (Sand/Cartridge/DE)',
          'Variable Speed Pumps',
          'Pool Heaters (Gas/Electric/Solar)',
          'Salt Chlorine Generators'
        ]
      },
      {
        id: 'pool-maintenance',
        name: 'Pool Maintenance',
        services: [
          'Weekly/Monthly Service Plans',
          'Chemical Balancing',
          'Acid Washing',
          'Filter Cleaning'
        ]
      },
      {
        id: 'pool-safety',
        name: 'Pool Safety',
        services: [
          'Safety Fencing',
          'Pool Covers (Automatic/Manual)',
          'Pool Alarms',
          'Non-Slip Deck Coatings'
        ]
      }
    ]
  },
  {
    id: 'irrigation',
    name: '💧🌱 Irrigation Solutions',
    icon: 'Droplets',
    description: 'Design, Installation, Smart Control',
    subcategories: [
      {
        id: 'irrigation-design',
        name: 'Irrigation Design',
        services: [
          'Residential Landscape Design',
          'Commercial Irrigation Layout',
          'Athletic Field Systems'
        ]
      },
      {
        id: 'irrigation-installations',
        name: 'Irrigation Installations',
        services: [
          'Sprinkler Systems',
          'Drip Irrigation',
          'Micro-Spray Systems',
          'Rotor & Spray Head Installation'
        ]
      },
      {
        id: 'smart-irrigation',
        name: 'Smart Irrigation',
        services: [
          'WiFi Controllers (Rachio/RainMachine)',
          'Weather-Based Controllers',
          'Soil Moisture Sensors',
          'Flow Meters'
        ]
      },
      {
        id: 'irrigation-repairs',
        name: 'Repairs & Maintenance',
        services: [
          'Sprinkler Head Replacement',
          'Valve Repairs',
          'Leak Detection',
          'Winterization Services',
          'Spring Start-Up'
        ]
      }
    ]
  },
  {
    id: 'paving',
    name: '🚧 Paving & Hardscaping',
    icon: 'Construction',
    description: 'Driveways, Patios, Walkways',
    subcategories: [
      {
        id: 'paving-installations',
        name: 'Paving Installations',
        services: [
          'Asphalt Driveways',
          'Concrete Driveways',
          'Paver Patios',
          'Walkways & Paths',
          'Pool Decks'
        ]
      },
      {
        id: 'paving-materials',
        name: 'Paving Materials',
        services: [
          'Concrete Pavers',
          'Brick Pavers',
          'Natural Stone',
          'Stamped Concrete',
          'Exposed Aggregate',
          'Permeable Pavers'
        ]
      },
      {
        id: 'hardscaping',
        name: 'Hardscaping',
        services: [
          'Retaining Walls',
          'Outdoor Kitchens',
          'Fire Pits & Fireplaces',
          'Seating Walls'
        ]
      },
      {
        id: 'paving-repairs',
        name: 'Repairs & Maintenance',
        services: [
          'Crack Filling',
          'Sealcoating',
          'Paver Releveling',
          'Joint Sand Replacement'
        ]
      }
    ]
  },
  {
    id: 'fencing',
    name: '🛡️ Fencing Solutions',
    icon: 'Fence',
    description: 'Privacy, Security, Boundary',
    subcategories: [
      {
        id: 'fence-installations',
        name: 'Fence Installations',
        services: [
          'Wood Privacy Fencing',
          'Vinyl Fencing',
          'Chain Link Fencing',
          'Aluminum Ornamental Fencing',
          'Wrought Iron Fencing',
          'Split Rail Fencing'
        ]
      },
      {
        id: 'gates',
        name: 'Gates & Operators',
        services: [
          'Driveway Gates',
          'Automatic Gate Operators',
          'Pedestrian Gates',
          'Access Control Systems'
        ]
      },
      {
        id: 'fence-repairs',
        name: 'Fence Repairs',
        services: [
          'Post Replacement',
          'Panel Repairs',
          'Gate Repairs',
          'Staining & Sealing'
        ]
      }
    ]
  },
  {
    id: 'renovations',
    name: '🏚️🔧 Renovations',
    icon: 'Building',
    description: 'Home, Office, Structural Upgrades',
    subcategories: [
      {
        id: 'general-renovation',
        name: 'General Renovations',
        services: [
          'Full Home Remodels',
          'Room Additions',
          'Garage Conversions',
          'Basement Finishing',
          'Open Floor Plan Conversions'
        ]
      },
      {
        id: 'kitchen-bath',
        name: 'Kitchen & Bath',
        services: [
          'Kitchen Remodeling',
          'Bathroom Remodeling',
          'Cabinet Installation',
          'Countertop Installation'
        ]
      },
      {
        id: 'flooring',
        name: 'Flooring',
        services: [
          'Hardwood Flooring',
          'Laminate Flooring',
          'Tile Installation',
          'Carpet Installation',
          'Vinyl Plank Flooring'
        ]
      },
      {
        id: 'painting',
        name: 'Painting & Finishing',
        services: [
          'Interior Painting',
          'Exterior Painting',
          'Cabinet Refinishing',
          'Texture & Drywall Repair'
        ]
      },
      {
        id: 'structural',
        name: 'Structural Work',
        services: [
          'Load-Bearing Wall Removal',
          'Beam Installation',
          'Foundation Repairs',
          'Structural Engineering Services'
        ]
      }
    ]
  }
];

// UK - Adapted Services
export const UK_SERVICES: ServiceCategory[] = [
  {
    id: 'roofing',
    name: '🏠 Roofing Solutions',
    icon: 'Home',
    description: 'Installation, Repair, Maintenance, Protection',
    subcategories: [
      {
        id: 'new-installations',
        name: 'New Roof Installations',
        services: [
          'Slate Roofing',
          'Clay Tile Roofing',
          'Concrete Tile Roofing',
          'Flat Roofing Systems',
          'EPDM Rubber Roofing',
          'GRP Fibreglass Roofing',
          'Green/Living Roofs'
        ]
      },
      {
        id: 'repairs-maintenance',
        name: 'Roof Repairs & Maintenance',
        services: [
          'Leak Detection & Repair',
          'Tile Replacement',
          'Lead Flashing Repairs',
          'Chimney Repairs',
          'Ridge Tile Replacement',
          'Valley Repairs',
          'Storm Damage Repairs'
        ]
      },
      {
        id: 'fascia-soffit',
        name: 'Fascia & Soffit',
        services: [
          'UPVC Fascia Installation',
          'UPVC Soffit Installation',
          'Timber Fascia Repairs',
          'Ventilation Installation',
          'Fascia Board Replacement'
        ]
      },
      {
        id: 'insulation',
        name: 'Roof Insulation',
        services: [
          'Loft Insulation',
          'Spray Foam Insulation',
          'Insulated Plasterboard',
          'Roof Space Insulation',
          'Warm Roof Systems'
        ]
      },
      {
        id: 'flat-roofing',
        name: 'Flat Roofing',
        services: [
          'Single Ply Membrane',
          'Felt Roofing',
          'Liquid Roofing Systems',
          'Green Roof Installation'
        ]
      }
    ]
  },
  {
    id: 'gutters',
    name: '💧 Gutter & Rainwater Solutions',
    icon: 'Droplets',
    description: 'Complete gutter systems',
    subcategories: [
      {
        id: 'gutter-installations',
        name: 'Gutter Installations',
        services: [
          'UPVC Guttering',
          'Cast Iron Guttering',
          'Aluminium Guttering',
          'Half-Round Gutters',
          'Box Gutters'
        ]
      },
      {
        id: 'gutter-repairs',
        name: 'Gutter Repairs & Maintenance',
        services: [
          'Gutter Cleaning',
          'Downpipe Repairs',
          'Joint Sealing',
          'Bracket Replacement'
        ]
      },
      {
        id: 'gutter-protection',
        name: 'Gutter Protection',
        services: [
          'Gutter Guards',
          'Leaf Guards',
          'Bird Protection'
        ]
      }
    ]
  },
  {
    id: 'solar',
    name: '☀️ Solar Panel Solutions',
    icon: 'Sun',
    description: 'Installation, Integration, Compliance',
    subcategories: [
      {
        id: 'solar-installations',
        name: 'Solar Installations',
        services: [
          'Roof-Mounted Solar Panels',
          'Ground-Mounted Solar Arrays',
          'Solar Thermal Systems',
          'Battery Storage Systems (Tesla Powerwall)'
        ]
      },
      {
        id: 'solar-compliance',
        name: 'Compliance & Certification',
        services: [
          'MCS Certification',
          'DNO Application Support',
          'Smart Export Guarantee Setup',
          'Planning Permission Support'
        ]
      },
      {
        id: 'solar-maintenance',
        name: 'Maintenance & Repairs',
        services: [
          'Panel Cleaning',
          'System Diagnostics',
          'Inverter Repairs',
          'Performance Monitoring'
        ]
      }
    ]
  },
  {
    id: 'pools',
    name: '🏊 Pool Solutions',
    icon: 'Waves',
    description: 'Build, Fix, Resurface, Maintain',
    subcategories: [
      {
        id: 'pool-construction',
        name: 'Pool Construction',
        services: [
          'Concrete Pools',
          'Fibreglass Pools',
          'Natural Swimming Pools',
          'Indoor Pools',
          'Plunge Pools'
        ]
      },
      {
        id: 'pool-enclosures',
        name: 'Pool Enclosures',
        services: [
          'Retractable Pool Enclosures',
          'Fixed Pool Buildings',
          'Swimming Pool Houses'
        ]
      },
      {
        id: 'pool-heating',
        name: 'Pool Heating',
        services: [
          'Heat Pumps',
          'Solar Pool Heating',
          'Electric Heaters',
          'Pool Covers'
        ]
      },
      {
        id: 'pool-maintenance',
        name: 'Pool Maintenance',
        services: [
          'Regular Service Plans',
          'Chemical Balancing',
          'Filter Maintenance',
          'Winterization Services'
        ]
      }
    ]
  },
  {
    id: 'irrigation',
    name: '💧🌱 Irrigation Solutions',
    icon: 'Droplets',
    description: 'Garden Watering Systems',
    subcategories: [
      {
        id: 'irrigation-systems',
        name: 'Irrigation Systems',
        services: [
          'Garden Sprinkler Systems',
          'Drip Irrigation',
          'Soaker Hoses',
          'Automated Watering Systems'
        ]
      },
      {
        id: 'smart-control',
        name: 'Smart Control',
        services: [
          'WiFi Controllers',
          'Rain Sensors',
          'Moisture Sensors',
          'Timer Systems'
        ]
      }
    ]
  },
  {
    id: 'paving',
    name: '🚧 Paving & Driveways',
    icon: 'Construction',
    description: 'Driveways, Patios, Paths',
    subcategories: [
      {
        id: 'paving-installations',
        name: 'Paving Installations',
        services: [
          'Block Paving Driveways',
          'Tarmac Driveways',
          'Resin Bound Driveways',
          'Gravel Driveways',
          'Pattern Imprinted Concrete'
        ]
      },
      {
        id: 'patio-services',
        name: 'Patio Services',
        services: [
          'Indian Sandstone Patios',
          'Porcelain Paving',
          'Natural Stone Patios',
          'Decking Installation'
        ]
      },
      {
        id: 'paving-repairs',
        name: 'Repairs & Maintenance',
        services: [
          'Block Paving Cleaning',
          'Re-sanding',
          'Sealant Application',
          'Pothole Repairs'
        ]
      }
    ]
  },
  {
    id: 'fencing',
    name: '🛡️ Fencing & Gates',
    icon: 'Fence',
    description: 'Garden Fencing & Security',
    subcategories: [
      {
        id: 'fence-installations',
        name: 'Fence Installations',
        services: [
          'Close Board Fencing',
          'Panel Fencing',
          'Picket Fencing',
          'Trellis Fencing',
          'Post & Rail Fencing'
        ]
      },
      {
        id: 'gates',
        name: 'Gates',
        services: [
          'Wooden Garden Gates',
          'Metal Gates',
          'Electric Gates',
          'Automated Gate Systems'
        ]
      },
      {
        id: 'fence-repairs',
        name: 'Repairs & Maintenance',
        services: [
          'Fence Panel Replacement',
          'Post Repairs',
          'Gate Repairs',
          'Fence Painting & Treatment'
        ]
      }
    ]
  },
  {
    id: 'renovations',
    name: '🏚️🔧 Renovations',
    icon: 'Building',
    description: 'Home Improvements & Extensions',
    subcategories: [
      {
        id: 'extensions',
        name: 'Extensions',
        services: [
          'Single-Storey Extensions',
          'Double-Storey Extensions',
          'Conservatories',
          'Orangeries',
          'Loft Conversions'
        ]
      },
      {
        id: 'kitchen-bath',
        name: 'Kitchen & Bathroom',
        services: [
          'Kitchen Fitting',
          'Bathroom Installation',
          'Wet Rooms',
          'En-Suite Installations'
        ]
      },
      {
        id: 'internal-work',
        name: 'Internal Work',
        services: [
          'Plastering',
          'Painting & Decorating',
          'Flooring Installation',
          'Partition Walls'
        ]
      },
      {
        id: 'external-work',
        name: 'External Work',
        services: [
          'Rendering',
          'External Insulation',
          'Window Replacement',
          'Door Installation'
        ]
      }
    ]
  }
];

// Australia - Adapted Services
export const AUSTRALIA_SERVICES: ServiceCategory[] = [
  {
    id: 'roofing',
    name: '🏠 Roofing Solutions',
    icon: 'Home',
    description: 'Installation, Repair, Maintenance, Protection',
    subcategories: [
      {
        id: 'new-installations',
        name: 'New Roof Installations',
        services: [
          'Colorbond Steel Roofing',
          'Terracotta Tile Roofing',
          'Concrete Tile Roofing',
          'Metal Deck Roofing',
          'Zinc & Aluminum Roofing',
          'Kliplok & Trimdek Roofing'
        ]
      },
      {
        id: 'repairs-maintenance',
        name: 'Roof Repairs & Maintenance',
        services: [
          'Leak Detection & Repair',
          'Tile Replacement & Re-Bedding',
          'Ridge Capping Repairs',
          'Flashing Repairs',
          'Valley Repairs',
          'Storm Damage Repairs',
          'Pointing Repairs'
        ]
      },
      {
        id: 'restoration',
        name: 'Roof Restoration',
        services: [
          'High-Pressure Cleaning',
          'Roof Painting & Coating',
          'Re-Pointing & Re-Bedding',
          'Roof Sealing',
          'Tile Re-Coating'
        ]
      },
      {
        id: 'solar-prep',
        name: 'Solar Roof Preparation',
        services: [
          'Solar Panel Mounting',
          'Roof Reinforcement',
          'Penetration Sealing',
          'Cable Management'
        ]
      },
      {
        id: 'ventilation',
        name: 'Roof Ventilation',
        services: [
          'Whirlybird Installation',
          'Ridge Ventilation',
          'Solar Powered Vents',
          'Sarking Installation',
          'Exhaust Fans'
        ]
      },
      {
        id: 'insulation',
        name: 'Roof Insulation',
        services: [
          'Ceiling Insulation Batts',
          'Reflective Foil Insulation',
          'Spray Foam Insulation',
          'Bulk Insulation'
        ]
      }
    ]
  },
  {
    id: 'gutters',
    name: '💧 Gutter & Rainwater Solutions',
    icon: 'Droplets',
    description: 'Complete gutter systems',
    subcategories: [
      {
        id: 'gutter-installations',
        name: 'Gutter Installations',
        services: [
          'Colorbond Gutters',
          'Zincalume Gutters',
          'Quad Gutter Systems',
          'Box Gutters',
          'Half-Round Gutters'
        ]
      },
      {
        id: 'downpipes',
        name: 'Downpipes & Drainage',
        services: [
          'Standard Downpipes',
          'Leafbeater Downpipes',
          'Underground Drainage',
          'Stormwater Systems'
        ]
      },
      {
        id: 'gutter-protection',
        name: 'Gutter Protection',
        services: [
          'Gutter Guard Mesh',
          'Leaf Guard Systems',
          'Valley Guards',
          'Bird Proofing'
        ]
      },
      {
        id: 'gutter-repairs',
        name: 'Gutter Repairs',
        services: [
          'Leak Repairs',
          'Gutter Realignment',
          'Bracket Replacement',
          'Joint Sealing'
        ]
      },
      {
        id: 'rainwater-tanks',
        name: 'Rainwater Tanks',
        services: [
          'Tank Installation',
          'Tank Cleaning',
          'Pump Installation',
          'First Flush Diverters'
        ]
      }
    ]
  },
  {
    id: 'solar',
    name: '☀️ Solar Panel Solutions',
    icon: 'Sun',
    description: 'Installation, Integration, Compliance',
    subcategories: [
      {
        id: 'solar-installations',
        name: 'Solar Installations',
        services: [
          'Grid-Connected Solar Systems',
          'Off-Grid Solar Systems',
          'Hybrid Solar Systems',
          'Solar Hot Water Systems',
          'Solar Pool Heating'
        ]
      },
      {
        id: 'solar-components',
        name: 'Solar Components',
        services: [
          'Solar Panel Installation (Tier 1)',
          'Battery Storage (Tesla Powerwall)',
          'Inverter Systems',
          'Monitoring Systems'
        ]
      },
      {
        id: 'mounting',
        name: 'Mounting Systems',
        services: [
          'Tile Roof Mounting',
          'Tin Roof Mounting',
          'Ground-Mounted Systems',
          'Solar Carports'
        ]
      },
      {
        id: 'solar-maintenance',
        name: 'Maintenance & Repairs',
        services: [
          'System Performance Checks',
          'Panel Cleaning',
          'Inverter Repairs',
          'Battery Servicing'
        ]
      },
      {
        id: 'solar-compliance',
        name: 'Compliance & Rebates',
        services: [
          'CEC Accredited Installation',
          'STC Processing',
          'Council Approvals',
          'Network Connection'
        ]
      }
    ]
  },
  {
    id: 'pools',
    name: '🏊 Pool Solutions',
    icon: 'Waves',
    description: 'Build, Fix, Resurface, Maintain',
    subcategories: [
      {
        id: 'pool-construction',
        name: 'Pool Construction',
        services: [
          'Concrete In-Ground Pools',
          'Fibreglass Pools',
          'Plunge Pools',
          'Lap Pools',
          'Infinity Edge Pools'
        ]
      },
      {
        id: 'pool-repairs',
        name: 'Pool Repairs',
        services: [
          'Leak Detection & Repair',
          'Crack Repairs',
          'Structural Repairs',
          'Tile & Coping Repairs'
        ]
      },
      {
        id: 'pool-resurfacing',
        name: 'Pool Resurfacing',
        services: [
          'Pebblecrete Finishes',
          'Fibreglass Resurfacing',
          'Vinyl Liner Replacement',
          'Glass Bead Finishes'
        ]
      },
      {
        id: 'pool-equipment',
        name: 'Pool Equipment',
        services: [
          'Pool Pumps & Filters',
          'Chlorinators & Salt Systems',
          'Pool Heaters (Gas/Electric/Solar)',
          'Automated Pool Cleaners'
        ]
      },
      {
        id: 'pool-maintenance',
        name: 'Pool Maintenance',
        services: [
          'Regular Service Plans',
          'Chemical Balancing',
          'Equipment Servicing',
          'Green Pool Recovery'
        ]
      },
      {
        id: 'pool-safety',
        name: 'Pool Safety & Compliance',
        services: [
          'Pool Fencing (Glass/Aluminium)',
          'Pool Safety Inspections',
          'Pool Covers & Blankets',
          'Safety Compliance Certificates'
        ]
      }
    ]
  },
  {
    id: 'irrigation',
    name: '💧🌱 Irrigation Solutions',
    icon: 'Droplets',
    description: 'Design, Installation, Smart Control',
    subcategories: [
      {
        id: 'irrigation-design',
        name: 'Irrigation Design',
        services: [
          'Residential Garden Systems',
          'Commercial Landscape Design',
          'Sports Field Irrigation'
        ]
      },
      {
        id: 'irrigation-installations',
        name: 'Irrigation Installations',
        services: [
          'Pop-Up Sprinkler Systems',
          'Drip Irrigation',
          'Micro-Spray Systems',
          'Garden Bed Irrigation'
        ]
      },
      {
        id: 'smart-systems',
        name: 'Smart Irrigation',
        services: [
          'WiFi Controllers',
          'Weather Stations',
          'Soil Moisture Sensors',
          'Automated Scheduling'
        ]
      },
      {
        id: 'irrigation-repairs',
        name: 'Repairs & Maintenance',
        services: [
          'Sprinkler Head Replacement',
          'Solenoid Valve Repairs',
          'Leak Detection',
          'System Testing & Adjustments'
        ]
      }
    ]
  },
  {
    id: 'paving',
    name: '🚧 Paving & Landscaping',
    icon: 'Construction',
    description: 'Driveways, Patios, Outdoor Areas',
    subcategories: [
      {
        id: 'paving-installations',
        name: 'Paving Installations',
        services: [
          'Concrete Driveways',
          'Paver Driveways',
          'Exposed Aggregate',
          'Stamped Concrete',
          'Liquid Limestone'
        ]
      },
      {
        id: 'outdoor-areas',
        name: 'Outdoor Areas',
        services: [
          'Alfresco Paving',
          'Patio Construction',
          'Pool Surrounds',
          'Garden Paths'
        ]
      },
      {
        id: 'paving-materials',
        name: 'Paving Materials',
        services: [
          'Natural Stone Pavers',
          'Travertine',
          'Bluestone',
          'Granite Pavers',
          'Sandstone'
        ]
      },
      {
        id: 'paving-repairs',
        name: 'Repairs & Maintenance',
        services: [
          'Crack Repairs',
          'Re-Leveling',
          'Paver Replacement',
          'Sealing & Cleaning'
        ]
      }
    ]
  },
  {
    id: 'fencing',
    name: '🛡️ Fencing Solutions',
    icon: 'Fence',
    description: 'Privacy, Security, Boundary',
    subcategories: [
      {
        id: 'fence-installations',
        name: 'Fence Installations',
        services: [
          'Colorbond Fencing',
          'Timber Fencing (Treated Pine)',
          'Glass Pool Fencing',
          'Aluminium Slat Fencing',
          'Tubular Steel Fencing'
        ]
      },
      {
        id: 'gates',
        name: 'Gates & Automation',
        services: [
          'Sliding Gates',
          'Swing Gates',
          'Automatic Gate Motors',
          'Intercom Systems'
        ]
      },
      {
        id: 'retaining-walls',
        name: 'Retaining Walls',
        services: [
          'Besser Block Walls',
          'Sleeper Retaining Walls',
          'Stone Retaining Walls',
          'Gabion Walls'
        ]
      },
      {
        id: 'fence-repairs',
        name: 'Repairs & Maintenance',
        services: [
          'Panel Replacement',
          'Post Repairs',
          'Gate Repairs',
          'Fence Restaining'
        ]
      }
    ]
  },
  {
    id: 'renovations',
    name: '🏚️🔧 Renovations',
    icon: 'Building',
    description: 'Home Extensions & Upgrades',
    subcategories: [
      {
        id: 'extensions',
        name: 'Extensions & Additions',
        services: [
          'Home Extensions',
          'Second Storey Additions',
          'Granny Flats',
          'Alfresco Areas',
          'Carports & Garages'
        ]
      },
      {
        id: 'kitchen-bath',
        name: 'Kitchen & Bathroom',
        services: [
          'Kitchen Renovations',
          'Bathroom Renovations',
          'Laundry Renovations',
          'Cabinet Making'
        ]
      },
      {
        id: 'internal-work',
        name: 'Internal Work',
        services: [
          'Painting & Decorating',
          'Flooring (Timber/Tiles/Carpet)',
          'Plasterboard & Cornicing',
          'Built-In Wardrobes'
        ]
      },
      {
        id: 'external-work',
        name: 'External Work',
        services: [
          'Rendering & Cladding',
          'Deck Construction',
          'Pergolas & Verandahs',
          'Window & Door Replacement'
        ]
      }
    ]
  }
];

// Simple list for backward compatibility (South Africa)
export const SA_SIMPLE_SERVICES = [
  'Roofing Solutions',
  'Gutter Solutions',
  'Solar Panels Solutions',
  'Pool Solutions',
  'Irrigation Solutions',
  'Paving Solutions',
  'Fencing/Wall Solutions',
  'Renovations'
];

// Function to get all services as flat list for chatbot
export function getAllServicesFlat(region: 'SA' | 'USA' | 'UK' | 'AU' = 'SA'): string[] {
  let services: ServiceCategory[] = [];
  
  switch (region) {
    case 'SA':
      services = SOUTH_AFRICA_SERVICES;
      break;
    case 'USA':
      services = USA_SERVICES;
      break;
    case 'UK':
      services = UK_SERVICES;
      break;
    case 'AU':
      services = AUSTRALIA_SERVICES;
      break;
  }

  const flatList: string[] = [];
  services.forEach(category => {
    category.subcategories.forEach(subcategory => {
      flatList.push(...subcategory.services);
    });
  });
  
  return flatList;
}

// Function to search services
export function searchServices(query: string, region: 'SA' | 'USA' | 'UK' | 'AU' = 'SA'): string[] {
  const allServices = getAllServicesFlat(region);
  const lowerQuery = query.toLowerCase();
  
  return allServices.filter(service => 
    service.toLowerCase().includes(lowerQuery)
  );
}
