// shared.jsx — Shared components for Ultra Dry Touch site
// Exports: THEMES, Nav, Footer, WAFloat, CTABanner, ServiceHero, ServiceFeatures, RelatedServices, Stars

const THEMES = {
  blue: { navy: '#0c1f45', navyDark: '#081430', accent: '#1a7dc4', accentHover: '#1568a8', accentLight: '#e8f3fb', cta: '#0097d6', ctaText: '#fff', star: '#f5a623' },
  teal: { navy: '#0d2f2f', navyDark: '#071e1e', accent: '#00a887', accentHover: '#008a6f', accentLight: '#e0f5f1', cta: '#00c49a', ctaText: '#fff', star: '#f5a623' },
  slate: { navy: '#1e2c44', navyDark: '#111b2c', accent: '#4f6af0', accentHover: '#3a55e8', accentLight: '#eef0fe', cta: '#4f6af0', ctaText: '#fff', star: '#f5a623' }
};

function Stars({ color = '#f5a623', size = 16 }) {
  return (
    <span style={{ display: 'inline-flex', gap: 2 }}>
      {[...Array(5)].map((_, i) => (
        <svg key={i} width={size} height={size} viewBox="0 0 24 24" fill={color}>
          <path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"/>
        </svg>
      ))}
    </span>
  );
}

// ─── Nav ──────────────────────────────────────────────────────────────────────
function SharedNav({ theme, currentPage }) {
  const [open, setOpen] = React.useState(false);
  const [scrolled, setScrolled] = React.useState(false);
  const [svcOpen, setSvcOpen] = React.useState(false);

  React.useEffect(() => {
    const onScroll = () => setScrolled(window.scrollY > 40);
    window.addEventListener('scroll', onScroll);
    return () => window.removeEventListener('scroll', onScroll);
  }, []);

  const services = [
    { label: 'Dry Carpet Cleaning', href: '/carpetcleaning' },
    { label: 'Hard Floor Cleaning', href: '/hardfloorcleaning' },
    { label: 'Upholstery Cleaning', href: '/upholsterycleaning' },
    { label: 'Leather Cleaning', href: '/leathercleaning' },
    { label: 'Mattress Cleaning', href: '/mattresscleaning' },
    { label: 'Commercial Cleaning', href: '/commercialcleaning' },
    { label: 'End of Tenancy Clean', href: '/endoftenancyclean' },
  ];

  const navStyle = {
    position: 'fixed', top: 0, left: 0, right: 0, zIndex: 100,
    background: scrolled ? 'rgba(255,255,255,0.97)' : '#fff',
    borderBottom: scrolled ? '1px solid #e8ecf2' : '1px solid transparent',
    backdropFilter: 'blur(12px)', transition: 'all 0.3s ease',
    boxShadow: scrolled ? '0 2px 20px rgba(0,0,0,0.08)' : 'none',
  };

  const navLink = (label, href, active) => (
    <a key={label} href={href}
      style={{ padding: '8px 14px', borderRadius: 8, color: active ? theme.accent : '#3a4a60', fontWeight: active ? 700 : 500, fontSize: 15, transition: 'all 0.2s', background: active ? theme.accentLight : 'transparent' }}
      onMouseEnter={e => { if (!active) { e.target.style.background = theme.accentLight; e.target.style.color = theme.accent; } }}
      onMouseLeave={e => { if (!active) { e.target.style.background = 'transparent'; e.target.style.color = '#3a4a60'; } }}>
      {label}
    </a>
  );

  return (
    <header style={navStyle}>
      <div style={{ maxWidth: 1200, margin: '0 auto', padding: '0 24px', display: 'flex', alignItems: 'center', justifyContent: 'space-between', height: 72 }}>
        <a href="/" style={{ display: 'flex', alignItems: 'center', gap: 12 }}>
          <img src="/img/logo.png" alt="Ultra Dry Touch" style={{ width: 48, height: 48, borderRadius: 8, objectFit: 'contain' }} />
          <div>
            <div style={{ fontFamily: 'Sora', fontWeight: 700, fontSize: 15, color: theme.navy, lineHeight: 1.2, letterSpacing: '-0.02em' }}>Ultra Dry Touch LTD.</div>
            <div style={{ fontSize: 12, color: '#7a8ba0', fontWeight: 500 }}>North &amp; West Yorkshire</div>
          </div>
        </a>
        <nav style={{ display: 'flex', alignItems: 'center', gap: 4 }} className="desktop-nav">
          {navLink('Home', '/', currentPage === 'home')}
          <div style={{ position: 'relative' }} onMouseEnter={() => setSvcOpen(true)} onMouseLeave={() => setSvcOpen(false)}>
            <a href="#" style={{ padding: '8px 14px', borderRadius: 8, color: currentPage === 'service' ? theme.accent : '#3a4a60', fontWeight: currentPage === 'service' ? 700 : 500, fontSize: 15, display: 'flex', alignItems: 'center', gap: 6, transition: 'all 0.2s', background: currentPage === 'service' ? theme.accentLight : 'transparent' }}
              onMouseEnter={e => { e.currentTarget.style.background = theme.accentLight; e.currentTarget.style.color = theme.accent; }}
              onMouseLeave={e => { if (currentPage !== 'service') { e.currentTarget.style.background = 'transparent'; e.currentTarget.style.color = '#3a4a60'; } }}>
              Services <svg width="12" height="12" viewBox="0 0 12 12" fill="currentColor"><path d="M6 8L2 4h8z"/></svg>
            </a>
            {svcOpen && (
              <div style={{ position: 'absolute', top: '100%', left: 0, background: '#fff', border: '1px solid #e8ecf2', borderRadius: 12, boxShadow: '0 16px 40px rgba(0,0,0,0.12)', minWidth: 220, padding: 8, zIndex: 200 }}>
                {services.map(s => (
                  <a key={s.label} href={s.href} style={{ display: 'block', padding: '10px 14px', color: '#3a4a60', fontWeight: 500, fontSize: 14, borderRadius: 8, transition: 'all 0.2s' }}
                    onMouseEnter={e => { e.target.style.background = theme.accentLight; e.target.style.color = theme.accent; }}
                    onMouseLeave={e => { e.target.style.background = 'transparent'; e.target.style.color = '#3a4a60'; }}>
                    {s.label}
                  </a>
                ))}
              </div>
            )}
          </div>
          {navLink('About', '/#about', currentPage === 'about')}
          {navLink('Contact', '/#contact', currentPage === 'contact')}
        </nav>
        <div style={{ display: 'flex', alignItems: 'center', gap: 12 }}>
          <a href="tel:08001932026" style={{ display: 'flex', alignItems: 'center', gap: 8, color: theme.navy, fontWeight: 700, fontSize: 15, fontFamily: 'Sora' }}>
            <div style={{ width: 32, height: 32, borderRadius: '50%', background: theme.accentLight, display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
              <svg width="15" height="15" viewBox="0 0 24 24" fill={theme.accent}><path d="M6.6 10.8c1.4 2.8 3.8 5.1 6.6 6.6l2.2-2.2c.3-.3.7-.4 1-.2 1.1.4 2.3.6 3.6.6.6 0 1 .4 1 1V20c0 .6-.4 1-1 1-9.4 0-17-7.6-17-17 0-.6.4-1 1-1h3.5c.6 0 1 .4 1 1 0 1.3.2 2.5.6 3.6.1.3 0 .7-.2 1L6.6 10.8z"/></svg>
            </div>
            <span className="phone-text">0800 193 2026</span>
          </a>
          <button onClick={() => setOpen(!open)} style={{ display: 'none', background: 'transparent', border: '1px solid #dde3ed', borderRadius: 8, padding: '8px 12px', color: '#3a4a60' }} className="hamburger">
            <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2"><path d="M3 12h18M3 6h18M3 18h18"/></svg>
          </button>
        </div>
      </div>
      {open && (
        <div style={{ background: '#fff', borderTop: '1px solid #e8ecf2', padding: 16 }}>
          {['Home', 'Services', 'About', 'Contact'].map(label => (
            <a key={label} href={label === 'Home' ? '/' : `/#${label.toLowerCase()}`}
              onClick={() => setOpen(false)}
              style={{ display: 'block', padding: '12px 16px', color: '#3a4a60', fontWeight: 600, fontSize: 15, borderRadius: 8 }}>{label}</a>
          ))}
        </div>
      )}
      <style>{`@media(max-width:768px){.desktop-nav{display:none!important;}.phone-text{display:none;}.hamburger{display:flex!important;}}`}</style>
    </header>
  );
}

// ─── Service Hero ────────────────────────────────────────────────────────────
function ServiceHero({ theme, title, subtitle, image }) {
  return (
    <section style={{ position: 'relative', minHeight: 480, display: 'flex', alignItems: 'center', overflow: 'hidden' }}>
      <div style={{ position: 'absolute', inset: 0, backgroundImage: `url(${image})`, backgroundSize: 'cover', backgroundPosition: 'center' }} />
      <div style={{ position: 'absolute', inset: 0, background: `linear-gradient(105deg, ${theme.navyDark}ee 0%, ${theme.navyDark}bb 50%, ${theme.navyDark}55 100%)` }} />
      <div style={{ position: 'relative', zIndex: 2, maxWidth: 1200, margin: '0 auto', padding: '120px 24px 72px', width: '100%' }}>
        <div style={{ maxWidth: 640 }}>
          <a href="/" style={{ display: 'inline-flex', alignItems: 'center', gap: 6, color: 'rgba(255,255,255,0.7)', fontSize: 14, fontWeight: 500, marginBottom: 20 }}>
            <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2"><path d="M19 12H5m7-7-7 7 7 7"/></svg>
            Back to Home
          </a>
          <h1 style={{ fontFamily: 'Sora', fontWeight: 800, fontSize: 'clamp(2rem, 5vw, 3.2rem)', color: '#fff', lineHeight: 1.1, letterSpacing: '-0.03em', marginBottom: 16, textWrap: 'balance' }}>{title}</h1>
          <p style={{ fontSize: 'clamp(1rem, 2vw, 1.15rem)', color: 'rgba(255,255,255,0.8)', maxWidth: 520, lineHeight: 1.65, marginBottom: 28 }}>{subtitle}</p>
          <div style={{ display: 'flex', gap: 14, flexWrap: 'wrap' }}>
            <a href="tel:08001932026" style={{ background: theme.cta, color: '#fff', padding: '14px 28px', borderRadius: 12, fontWeight: 700, fontSize: 15, fontFamily: 'Sora', display: 'inline-flex', alignItems: 'center', gap: 8, boxShadow: `0 8px 24px ${theme.cta}55` }}>
              Get a Free Quote
              <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5"><path d="M5 12h14m-7-7 7 7-7 7"/></svg>
            </a>
            <a href="tel:08001932026" style={{ background: 'rgba(255,255,255,0.15)', color: '#fff', padding: '14px 28px', borderRadius: 12, fontWeight: 700, fontSize: 15, fontFamily: 'Sora', border: '1px solid rgba(255,255,255,0.3)' }}>
              0800 193 2026
            </a>
          </div>
        </div>
      </div>
    </section>
  );
}

// ─── Service Content Section ─────────────────────────────────────────────────
function ServiceContent({ theme, heading, text, features, image }) {
  return (
    <section style={{ background: '#fff', padding: '96px 24px' }}>
      <div style={{ maxWidth: 1200, margin: '0 auto', display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 72, alignItems: 'center' }}>
        <div>
          <h2 style={{ fontFamily: 'Sora', fontWeight: 800, fontSize: 'clamp(1.6rem, 3vw, 2.4rem)', color: theme.navy, letterSpacing: '-0.02em', lineHeight: 1.15, marginBottom: 16 }}>{heading}</h2>
          <p style={{ color: '#6b7d99', fontSize: '1rem', lineHeight: 1.7, marginBottom: 28 }}>{text}</p>
          <div style={{ display: 'grid', gap: 14 }}>
            {features.map((f, i) => (
              <div key={i} style={{ display: 'flex', gap: 14, alignItems: 'flex-start' }}>
                <div style={{ width: 28, height: 28, borderRadius: 8, background: theme.accentLight, display: 'flex', alignItems: 'center', justifyContent: 'center', flexShrink: 0, marginTop: 2 }}>
                  <svg width="14" height="14" viewBox="0 0 24 24" fill={theme.accent}><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"/></svg>
                </div>
                <span style={{ color: '#3a4a60', fontSize: 15, lineHeight: 1.55, fontWeight: 500 }}>{f}</span>
              </div>
            ))}
          </div>
        </div>
        <div>
          <img src={image} alt={heading} style={{ borderRadius: 20, width: '100%', height: 440, objectFit: 'cover', boxShadow: '0 24px 60px rgba(0,0,0,0.12)' }} />
        </div>
      </div>
      <style>{`@media(max-width:768px){section > div{grid-template-columns:1fr!important;}}`}</style>
    </section>
  );
}

// ─── Service FAQ ──────────────────────────────────────────────────────────────
function ServiceFAQ({ theme, faqs }) {
  const [open, setOpen] = React.useState(null);
  return (
    <section style={{ background: '#f5f8fc', padding: '80px 24px' }}>
      <div style={{ maxWidth: 800, margin: '0 auto' }}>
        <h2 style={{ fontFamily: 'Sora', fontWeight: 800, fontSize: 'clamp(1.6rem, 3vw, 2.2rem)', color: theme.navy, letterSpacing: '-0.02em', textAlign: 'center', marginBottom: 40 }}>Frequently Asked Questions</h2>
        <div style={{ display: 'grid', gap: 10 }}>
          {faqs.map((item, i) => (
            <div key={i} style={{ border: `1px solid ${open === i ? theme.accent + '50' : '#e2e8f0'}`, borderRadius: 14, overflow: 'hidden', background: open === i ? theme.accentLight : '#fff', transition: 'all 0.25s' }}>
              <button onClick={() => setOpen(open === i ? null : i)} style={{ width: '100%', background: 'none', border: 'none', padding: '18px 22px', display: 'flex', justifyContent: 'space-between', alignItems: 'center', gap: 16, textAlign: 'left', cursor: 'pointer' }}>
                <span style={{ fontFamily: 'Sora', fontWeight: 700, fontSize: 15, color: theme.navy }}>{item.q}</span>
                <span style={{ width: 24, height: 24, borderRadius: '50%', background: open === i ? theme.accent : '#eaeef4', display: 'flex', alignItems: 'center', justifyContent: 'center', flexShrink: 0, transition: 'all 0.25s' }}>
                  <svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke={open === i ? '#fff' : '#6b7d99'} strokeWidth="2.5" style={{ transform: open === i ? 'rotate(180deg)' : 'none', transition: 'transform 0.25s' }}><path d="M6 9l6 6 6-6"/></svg>
                </span>
              </button>
              {open === i && <div style={{ padding: '0 22px 18px', color: '#6b7d99', fontSize: 14, lineHeight: 1.7 }}>{item.a}</div>}
            </div>
          ))}
        </div>
      </div>
    </section>
  );
}

// ─── CTA Banner (shared) ─────────────────────────────────────────────────────
function SharedCTABanner({ theme }) {
  return (
    <section style={{ background: theme.accent, padding: '72px 24px', position: 'relative', overflow: 'hidden' }}>
      <div style={{ position: 'relative', maxWidth: 700, margin: '0 auto', textAlign: 'center' }}>
        <h2 style={{ fontFamily: 'Sora', fontWeight: 800, fontSize: 'clamp(1.6rem, 3.5vw, 2.6rem)', color: '#fff', letterSpacing: '-0.02em', lineHeight: 1.15, marginBottom: 14 }}>Ready for cleaner floors?</h2>
        <p style={{ color: 'rgba(255,255,255,0.85)', fontSize: '1.05rem', lineHeight: 1.6, marginBottom: 28 }}>Call us for a fast, friendly quote. Mon–Sat, 8am–6pm.</p>
        <div style={{ display: 'flex', gap: 14, justifyContent: 'center', flexWrap: 'wrap' }}>
          <a href="tel:08001932026" style={{ background: '#fff', color: theme.accent, padding: '14px 32px', borderRadius: 12, fontWeight: 800, fontSize: 16, fontFamily: 'Sora', display: 'inline-flex', alignItems: 'center', gap: 10, boxShadow: '0 8px 30px rgba(0,0,0,0.2)' }}>
            <svg width="16" height="16" viewBox="0 0 24 24" fill={theme.accent}><path d="M6.6 10.8c1.4 2.8 3.8 5.1 6.6 6.6l2.2-2.2c.3-.3.7-.4 1-.2 1.1.4 2.3.6 3.6.6.6 0 1 .4 1 1V20c0 .6-.4 1-1 1-9.4 0-17-7.6-17-17 0-.6.4-1 1-1h3.5c.6 0 1 .4 1 1 0 1.3.2 2.5.6 3.6.1.3 0 .7-.2 1L6.6 10.8z"/></svg>
            0800 193 2026
          </a>
          <a href="mailto:info@udtouch.co.uk" style={{ background: 'rgba(255,255,255,0.15)', color: '#fff', padding: '14px 32px', borderRadius: 12, fontWeight: 700, fontSize: 15, border: '1px solid rgba(255,255,255,0.3)' }}>Email Us</a>
        </div>
      </div>
    </section>
  );
}

// ─── Related Services ────────────────────────────────────────────────────────
function RelatedServices({ theme, exclude }) {
    const all = [
    { title: 'Dry Carpet Cleaning', img: '/img/svc-carpet.jpg', href: '/carpetcleaning' },
    { title: 'Hard Floor Cleaning', img: '/img/svc-hardfloor.jpg', href: '/hardfloorcleaning' },
    { title: 'Upholstery Cleaning', img: '/img/svc-upholstery.jpg', href: '/upholsterycleaning' },
    { title: 'Leather Cleaning', img: '/img/service-leather.jpg', href: '/leathercleaning' },
    { title: 'Mattress Cleaning', img: '/img/service-mattress.jpg', href: '/mattresscleaning' },
    { title: 'Commercial Cleaning', img: '/img/service-commercial.jpg', href: '/commercialcleaning' },
    { title: 'End of Tenancy Clean', img: '/img/end_of_tenancy_clean.webp', href: '/endoftenancyclean' },
  ];
  const filtered = all.filter(s => s.title !== exclude).slice(0, 3);

  return (
    <section style={{ background: '#fff', padding: '80px 24px' }}>
      <div style={{ maxWidth: 1200, margin: '0 auto' }}>
        <h2 style={{ fontFamily: 'Sora', fontWeight: 800, fontSize: 'clamp(1.6rem, 3vw, 2.2rem)', color: theme.navy, letterSpacing: '-0.02em', textAlign: 'center', marginBottom: 40 }}>Other Services</h2>
        <div style={{ display: 'grid', gridTemplateColumns: 'repeat(3, 1fr)', gap: 24 }}>
          {filtered.map(s => (
            <a key={s.title} href={s.href} style={{ background: '#fff', borderRadius: 16, overflow: 'hidden', border: '1px solid #eaeef4', boxShadow: '0 2px 12px rgba(0,0,0,0.06)', transition: 'all 0.3s', display: 'block' }}
              onMouseEnter={e => { e.currentTarget.style.transform = 'translateY(-4px)'; e.currentTarget.style.boxShadow = '0 16px 40px rgba(0,0,0,0.12)'; }}
              onMouseLeave={e => { e.currentTarget.style.transform = 'none'; e.currentTarget.style.boxShadow = '0 2px 12px rgba(0,0,0,0.06)'; }}>
              <img src={s.img} alt={s.title} style={{ width: '100%', height: 180, objectFit: 'cover', borderRadius: 0 }} />
              <div style={{ padding: '18px 20px', display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
                <span style={{ fontFamily: 'Sora', fontWeight: 700, fontSize: 15, color: theme.navy }}>{s.title}</span>
                <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke={theme.accent} strokeWidth="2.5"><path d="M5 12h14m-7-7 7 7-7 7"/></svg>
              </div>
            </a>
          ))}
        </div>
        <style>{`@media(max-width:768px){section > div > div{grid-template-columns:1fr!important;}}`}</style>
      </div>
    </section>
  );
}

// ─── Footer ──────────────────────────────────────────────────────────────────
function SharedFooter({ theme }) {
  return (
    <footer style={{ background: theme.navyDark, borderTop: `3px solid ${theme.accent}`, padding: '56px 24px 28px' }}>
      <div style={{ maxWidth: 1200, margin: '0 auto' }}>
        <div style={{ display: 'grid', gridTemplateColumns: '2fr 1fr 1fr 1fr', gap: 36, marginBottom: 40 }}>
          <div>
            <div style={{ display: 'flex', alignItems: 'center', gap: 12, marginBottom: 14 }}>
              <img src="/img/logo.png" alt="Ultra Dry Touch" style={{ width: 44, height: 44, borderRadius: 8, objectFit: 'contain' }} />
              <div>
                <div style={{ fontFamily: 'Sora', fontWeight: 800, fontSize: 14, color: '#fff' }}>Ultra Dry Touch LTD.</div>
                <div style={{ fontSize: 11, color: 'rgba(255,255,255,0.45)' }}>Carpet &amp; Upholstery Specialists</div>
              </div>
            </div>
            <p style={{ color: 'rgba(255,255,255,0.5)', fontSize: 13, lineHeight: 1.7, maxWidth: 260 }}>Fast-drying, high-quality carpet and upholstery cleaning across North Yorkshire. Fully insured.</p>
          </div>
          <div>
            <div style={{ fontFamily: 'Sora', fontWeight: 700, fontSize: 12, color: '#fff', textTransform: 'uppercase', letterSpacing: '0.08em', marginBottom: 14 }}>Services</div>
            {[['Carpet Cleaning','/carpetcleaning'],['Hard Floor','/hardfloorcleaning'],['Upholstery','/upholsterycleaning'],['Leather','/leathercleaning'],['Commercial','/commercialcleaning'],['End of Tenancy','/endoftenancyclean']].map(([l,h]) => (
              <a key={l} href={h} style={{ display: 'block', color: 'rgba(255,255,255,0.5)', fontSize: 13, marginBottom: 7, transition: 'color 0.2s' }}
                onMouseEnter={e => e.target.style.color = '#fff'} onMouseLeave={e => e.target.style.color = 'rgba(255,255,255,0.5)'}>{l}</a>
            ))}
          </div>
          <div>
            <div style={{ fontFamily: 'Sora', fontWeight: 700, fontSize: 12, color: '#fff', textTransform: 'uppercase', letterSpacing: '0.08em', marginBottom: 14 }}>Areas</div>
            {['Scarborough','Whitby','Filey','York','Hull','Beverley','Leeds'].map(a => (
              <div key={a} style={{ color: 'rgba(255,255,255,0.5)', fontSize: 13, marginBottom: 7 }}>{a}</div>
            ))}
          </div>
          <div>
            <div style={{ fontFamily: 'Sora', fontWeight: 700, fontSize: 12, color: '#fff', textTransform: 'uppercase', letterSpacing: '0.08em', marginBottom: 14 }}>Contact</div>
            <a href="tel:08001932026" style={{ display: 'block', color: 'rgba(255,255,255,0.7)', fontSize: 13, marginBottom: 8 }}>0800 193 2026</a>
            <a href="tel:+447771919307" style={{ display: 'block', color: 'rgba(255,255,255,0.7)', fontSize: 13, marginBottom: 8 }}>07771 919307</a>
            <a href="mailto:info@udtouch.co.uk" style={{ display: 'block', color: 'rgba(255,255,255,0.7)', fontSize: 13, marginBottom: 8 }}>info@udtouch.co.uk</a>
            <div style={{ color: 'rgba(255,255,255,0.4)', fontSize: 12, marginTop: 8 }}>Mon–Sat · 8am–6pm</div>
          </div>
        </div>
        <div style={{ borderTop: '1px solid rgba(255,255,255,0.08)', paddingTop: 20, color: 'rgba(255,255,255,0.3)', fontSize: 12, textAlign: 'center' }}>
          © 2025 Ultra Dry Touch LTD. All rights reserved.
        </div>
      </div>
      <style>{`@media(max-width:768px){footer > div > div:first-child{grid-template-columns:1fr 1fr!important;}}`}</style>
    </footer>
  );
}

// ─── WhatsApp Float ──────────────────────────────────────────────────────────
function WAFloat() {
  return (
    <a href="https://wa.me/447771919307" target="_blank" rel="noopener noreferrer" aria-label="Message Ultra Dry Touch on WhatsApp"
      style={{ position: 'fixed', bottom: 24, right: 24, width: 56, height: 56, borderRadius: '50%', background: '#25d366', display: 'flex', alignItems: 'center', justifyContent: 'center', boxShadow: '0 8px 24px rgba(37,211,102,0.4)', zIndex: 999, transition: 'transform 0.2s' }}
      onMouseEnter={e => e.currentTarget.style.transform = 'scale(1.1)'}
      onMouseLeave={e => e.currentTarget.style.transform = 'scale(1)'}>
      <svg width="29" height="29" viewBox="0 0 32 32" fill="none" aria-hidden="true">
        <path fill="#fff" d="M16 4.8c-6.18 0-11.2 5.02-11.2 11.2 0 2.03.55 4 1.58 5.72L4.8 27.2l5.62-1.48A11.12 11.12 0 0 0 16 27.2c6.18 0 11.2-5.02 11.2-11.2S22.18 4.8 16 4.8Zm0 20.5c-1.73 0-3.43-.48-4.9-1.39l-.35-.21-3.32.87.89-3.22-.23-.37A9.25 9.25 0 0 1 6.7 16c0-5.12 4.18-9.3 9.3-9.3s9.3 4.18 9.3 9.3-4.18 9.3-9.3 9.3Zm5.1-6.96c-.28-.14-1.66-.82-1.92-.91-.26-.1-.45-.14-.64.14-.19.28-.74.91-.9 1.1-.17.19-.33.21-.61.07-.28-.14-1.18-.44-2.25-1.39-.83-.74-1.39-1.66-1.55-1.94-.16-.28-.02-.43.12-.57.13-.12.28-.33.42-.49.14-.16.19-.28.28-.47.09-.19.05-.35-.02-.49-.07-.14-.64-1.54-.88-2.11-.23-.55-.47-.47-.64-.48h-.55c-.19 0-.49.07-.75.35-.26.28-.99.97-.99 2.37s1.02 2.75 1.16 2.94c.14.19 2.01 3.07 4.87 4.3.68.29 1.21.47 1.63.6.68.22 1.3.19 1.79.12.55-.08 1.66-.68 1.9-1.34.23-.65.23-1.22.16-1.34-.07-.12-.26-.19-.54-.33Z"/>
      </svg>
    </a>
  );
}

// Export all to window
Object.assign(window, {
  THEMES, Stars, SharedNav, ServiceHero, ServiceContent, ServiceFAQ,
  SharedCTABanner, RelatedServices, SharedFooter, WAFloat
});
