/* ==========================================================================
   PROSTBEM — Landing page (React)

   Este arquivo é compilado no próprio navegador pelo Babel (js/babel.min.js),
   por isso o index.html precisa ser aberto por um servidor local
   (ex.: extensão Live Server do VS Code), e não com duplo clique.

   As bibliotecas (React, ReactDOM e os ícones lucide-react) vêm do CDN
   esm.sh, definido no <script type="importmap"> do index.html.

   Estrutura:
     1. Imports
     2. Utilitários
     3. Seções da página (na ordem em que aparecem)
     4. App (monta a página) e renderização

   Dica: textos, preços, links de checkout e imagens ficam em listas
   (arrays) no início de cada seção — normalmente é só editar ali.

   Cores da marca: ver js/tailwind.config.js. A cor de destaque
   (brand-accent) muda sozinha conforme o fundo: seções claras levam a
   classe "on-light" e cards escuros dentro delas levam "on-dark".
   ========================================================================== */

/* 1. IMPORTS */
import React, { useState, useEffect, useRef } from 'react';
import ReactDOM from 'react-dom/client';
import {
  Phone, Mail, FileText, ShieldCheck, Lock, CreditCard,
  Plus, ShoppingCart, Truck, Play, CheckCircle,
  Droplet, Leaf, Shield, Zap, Heart, Activity, RotateCw,
  Pipette, GlassWater, Check, CheckCircle2,
  Wallet,
  FlaskConical, Award, ThumbsUp, HelpCircle, Minus, ExternalLink, Star, ChevronLeft, ChevronRight
} from 'lucide-react';

/* --------------------------------------------------------------------------
   2. UTILITÁRIOS
   Rola a página suavemente até a seção de preços (#pricing).
   Usado por todos os botões "Comprar / Quero iniciar o tratamento".
   -------------------------------------------------------------------------- */
const scrollToPricing = () => {
  document.getElementById('pricing')?.scrollIntoView({ behavior: 'smooth' });
};

/* --------------------------------------------------------------------------
   3. SEÇÕES DA PÁGINA
   
   Header — barra fixa no topo com o logo e o botão "Comprar agora".
   -------------------------------------------------------------------------- */
const Header = () => {
  return (
    <header className="fixed top-0 left-0 w-full z-50 bg-brand-navy/80 backdrop-blur-md border-b border-white/5 transition-all duration-300">
      <div className="container mx-auto px-6 md:px-12 lg:px-24 h-[80px] flex items-center justify-between gap-4">
        <div className="flex items-center select-none cursor-pointer shrink-0">
          {/* Logo preto do Figma; "brightness-0 invert" deixa branco no fundo escuro */}
          <img src="images/prostbem-logo.svg" alt="ProstBem" className="w-[150px] md:w-[190px] brightness-0 invert" />
        </div>
        <button onClick={scrollToPricing} className="btn-cta bg-brand-blue hover:bg-brand-blue-light text-white font-extrabold py-2 px-4 md:py-3 md:px-8 rounded-full shadow-[0_4px_14px_0_rgba(31,41,214,0.39)] uppercase tracking-wide text-[10px] sm:text-xs md:text-sm flex items-center justify-center text-center leading-tight">
          COMPRAR AGORA <br className="block sm:hidden" />
        </button>
      </div>
    </header>
  );
};

/* --------------------------------------------------------------------------
   Hero — primeira dobra
   Título, lista de benefícios, imagem do produto flutuando e texto
   girando ao fundo. Benefícios com "Título: texto" ficam com o título em negrito.
   -------------------------------------------------------------------------- */
const Hero = () => {
  const benefits = [
    "Eгеçôеs firmes, potentes e prolongadas",
    "Sistema urinário equilibrado",
    "Aumenta o desejo sехuаl",
    "Menos interrupções noturnas",
    "Saúde da ргóstаtа",
    "Aumento do рênis",
    "Apetite sехuаl elevado"
  ];

  return (
    <section className="relative w-full min-h-[90vh] bg-brand-navy overflow-hidden flex items-center pt-[130px] pb-12 lg:py-32">
      <div className="absolute top-0 right-0 w-1/2 h-full bg-gray-800/10 blur-3xl rounded-full -translate-y-1/2 translate-x-1/4 pointer-events-none" />
      <div className="container mx-auto px-4 md:px-12 lg:px-24 relative z-10">
        <div className="grid grid-cols-1 lg:grid-cols-2 gap-y-10 lg:gap-y-6 lg:gap-x-16 items-center">
          <div className="space-y-4 max-w-2xl mx-auto lg:mx-0 text-center lg:text-left lg:col-start-1 lg:row-start-1">
            <h1 className="text-[26px] md:text-[40px] lg:text-[44px] font-extrabold leading-tight tracking-tight text-brand-accent">
              A Solução Definitiva para a Saúde Prostática e a Performance Masculina
            </h1>
            <p className="text-base md:text-xl text-gray-200 font-medium leading-relaxed">
              O protocolo natural de tripla ação que regenera a próstata, estabiliza o sistema urinário e restaura a virilidade plena.
            </p>
          </div>
          <div className="relative flex justify-center items-center min-h-[400px] lg:col-start-2 lg:row-start-1 lg:row-span-3 lg:h-full">
            <div className="absolute inset-0 flex items-center justify-center pointer-events-none opacity-20 lg:opacity-30">
              <div className="w-[900px] h-[900px] animate-spin-slow">
                <svg viewBox="0 0 100 100" className="w-full h-full">
                  <path id="circlePath" d="M 50, 50 m -37, 0 a 37,37 0 1,1 74,0 a 37,37 0 1,1 -74,0" fill="transparent" />
                  <text className="text-[5px] font-bold fill-brand-accent uppercase tracking-[2px]">
                    <textPath href="#circlePath">
                      ProstBem . ProstBem . ProstBem . ProstBem . ProstBem . ProstBem . ProstBem . ProstBem . ProstBem . ProstBem . ProstBem . ProstBem . ProstBem . ProstBem . ProstBem . ProstBem . ProstBem . ProstBem . ProstBem . ProstBem . ProstBem . ProstBem . ProstBem . ProstBem . ProstBem . ProstBem . ProstBem . ProstBem . ProstBem . ProstBem . ProstBem . ProstBem . ProstBem . ProstBem . ProstBem . ProstBem . ProstBem . ProstBem . ProstBem . ProstBem . ProstBem . ProstBem . ProstBem . ProstBem . ProstBem . ProstBem . ProstBem . ProstBem . ProstBem . ProstBem . ProstBem . ProstBem . ProstBem . ProstBem . ProstBem . ProstBem .
                    </textPath>
                  </text>
                </svg>
              </div>
            </div>
            <div className="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[120%] h-24 bg-gray-800/40 rotate-[-25deg] blur-xl pointer-events-none z-0"></div>
            <div className="relative z-10 animate-float">
              <img decoding="async"
                src="images/prostbem-frasco-caixa.png"
                alt="Frasco e caixa do ProstBem Semente de Abóbora, suplemento alimentar líquido 30 mL"
                width="759"
                height="955"
                className="w-[240px] md:w-[340px] lg:w-[390px] max-w-full h-auto object-contain drop-shadow-[0_20px_50px_rgba(0,0,0,0.5)] transform hover:scale-105 transition-transform duration-500"
              />
            </div>
          </div>
          <ul className="space-y-4 max-w-2xl lg:col-start-1 lg:row-start-2">
            {benefits.map((benefit, index) => {
              const parts = benefit.split(':');
              return (
                <li key={index} className="flex items-start gap-4">
                  <div className="shrink-0 mt-0.5">
                    <div className="bg-brand-accent/20 border border-brand-accent rounded-sm p-0.5 w-6 h-6 flex items-center justify-center">
                      <Plus className="w-4 h-4 text-brand-accent stroke-[3]" />
                    </div>
                  </div>
                  <span className="text-base md:text-lg text-white font-medium leading-tight">
                    {parts.length > 1 ? (
                      <>
                        <strong className="text-white">{parts[0]}:</strong> <span className="text-gray-200">{parts[1]}</span>
                      </>
                    ) : (
                      benefit
                    )}
                  </span>
                </li>
              );
            })}
          </ul>
          <div className="pt-6 max-w-2xl lg:col-start-1 lg:row-start-3 flex flex-col items-center lg:items-start">
            <button onClick={scrollToPricing} className="btn-cta w-full md:w-auto bg-brand-blue hover:bg-brand-blue-light text-white font-extrabold text-sm md:text-lg py-4 px-6 md:py-5 md:px-8 rounded-full shadow-[0_0_20px_rgba(31,41,214,0.4)] flex items-center justify-center gap-3 md:gap-4 uppercase tracking-wide">
              <span className="relative z-10 text-center leading-tight">
                Quero iniciar o tratamento
              </span>
            </button>
            <div className="mt-4 flex items-center gap-2 text-sm text-gray-400 justify-center">
              <ShieldCheck className="w-5 h-5 text-green-500 shrink-0" />
              <span className="font-medium">Compra 100% Segura e Discreta</span>
            </div>
          </div>
        </div>
      </div>
    </section>
  );
};

/* --------------------------------------------------------------------------
   FeaturesBar — faixa branca com selos rolando infinitamente
   A lista é repetida para o loop da animação "scroll" não ter buraco.
   -------------------------------------------------------------------------- */
const FeaturesBar = () => {
  const features = [
    { icon: ShieldCheck, text: "Satisfação 100% Garantida" },
    { icon: CreditCard, text: "Parcelamento em até 12X" },
    { icon: ShieldCheck, text: "Compra 100% Segura" },
    { icon: Truck, text: "Envio para todo o Brasil" }
  ];
  const FeatureList = () => (
    <div className="flex items-center gap-12 md:gap-24 px-6 md:px-12 shrink-0 animate-scroll min-w-full">
      {features.map((item, index) => (
        <div key={index} className="flex items-center gap-3 whitespace-nowrap">
          <item.icon className="w-6 h-6 md:w-8 md:h-8 text-brand-accent shrink-0" strokeWidth={1.5} />
          <span className="text-sm md:text-lg font-semibold text-brand-navy uppercase tracking-wide">
            {item.text}
          </span>
        </div>
      ))}
      {features.map((item, index) => (
        <div key={`dup-${index}`} className="flex items-center gap-3 whitespace-nowrap">
          <item.icon className="w-6 h-6 md:w-8 md:h-8 text-brand-accent shrink-0" strokeWidth={1.5} />
          <span className="text-sm md:text-lg font-semibold text-brand-navy uppercase tracking-wide">
            {item.text}
          </span>
        </div>
      ))}
    </div>
  );
  return (
    <div className="on-light w-full bg-white border-y border-gray-200 py-5 overflow-hidden flex select-none relative z-20 shadow-lg">
      <FeatureList />
      <FeatureList />
    </div>
  );
};

/* --------------------------------------------------------------------------
   VSLSection — vídeo de vendas (YouTube)
   Mostra só a capa; o iframe do YouTube só carrega depois do clique
   (deixa a página mais leve).
   -------------------------------------------------------------------------- */
const VSLSection = () => {
  const [isPlaying, setIsPlaying] = useState(false);

  return (
    <section className="w-full py-16 md:py-24 bg-brand-navy text-center">
      <div className="container mx-auto px-6 md:px-12 lg:px-24">
        <div className="mb-10 md:mb-14 space-y-4">
          <h2 className="text-3xl md:text-4xl lg:text-5xl font-bold text-brand-accent leading-tight">
            Aprovado por Especialistas<br className="hidden md:block" /> em Saúde Masculina
          </h2>
          <p className="text-lg md:text-xl text-gray-200">
            Conheça a solução definitiva para recuperar sua <span className="font-bold text-white">potência e vitalidade.</span>
          </p>
        </div>

        {/* VIDEO EMBEDDED - YouTube com Capa Interativa */}
        <div className="relative w-full max-w-5xl mx-auto rounded-2xl overflow-hidden shadow-[0_20px_60px_rgba(0,0,0,0.6)] border border-white/10 bg-black aspect-video group">
          {isPlaying ? (
            <iframe
              className="w-full h-full"
              src="https://www.youtube-nocookie.com/embed/tXVokdSZaVo?autoplay=1&rel=0&modestbranding=1"
              title="Vídeo ProstBem"
              frameBorder="0"
              allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
              referrerPolicy="strict-origin-when-cross-origin"
              allowFullScreen
            ></iframe>
          ) : (
            <div 
              onClick={() => setIsPlaying(true)}
              className="relative w-full h-full cursor-pointer flex items-center justify-center bg-gray-900 overflow-hidden"
            >
              <img 
                src="https://i.ytimg.com/vi/tXVokdSZaVo/hqdefault.jpg" 
                alt="Vídeo ProstBem" 
                className="w-full h-full object-cover opacity-85 group-hover:opacity-100 group-hover:scale-105 transition-all duration-500"
              />
              <div className="absolute inset-0 bg-gradient-to-t from-black/80 via-black/40 to-black/30 flex items-center justify-center">
                <div className="flex flex-col items-center gap-3">
                  <div className="w-20 h-20 md:w-24 md:h-24 rounded-full bg-brand-blue text-white flex items-center justify-center shadow-[0_0_30px_rgba(31,41,214,0.8)] group-hover:scale-110 transition-transform duration-300">
                    <Play className="w-10 h-10 md:w-12 md:h-12 fill-white translate-x-1" />
                  </div>
                  <span className="text-white font-bold text-xs md:text-sm tracking-wider uppercase bg-black/60 px-4 py-1.5 rounded-full backdrop-blur-sm border border-white/10">Clique para Assistir</span>
                </div>
              </div>
            </div>
          )}
        </div>

        <p className="mt-8 text-sm text-gray-500 max-w-2xl mx-auto">
          Assista ao vídeo curto acima para entender como a fórmula funciona cientificamente no organismo masculino.
        </p>
      </div>
    </section>
  );
};

/* --------------------------------------------------------------------------
   BenefitsSection — "O Segredo de ProstBem"
   Cards de benefícios com imagem. Edite a lista `benefits`.
   -------------------------------------------------------------------------- */
const BenefitsSection = () => {
  const benefits = [
    {
      image: "https://i.ibb.co/JRZSPJ6x/Frame-2147223521.png",
      title: "Prazer máximo",
      description: "Relações mais intensas e duradouras. Volte a sentir prazer de verdade e surpreenda sua parceira, mesmo após os 50."
    },
    {
      image: "https://i.ibb.co/MD4Yzw3Z/Frame-2147223522.png",
      title: "Potência Masculina",
      description: "Uso diário que intensifica o desejo sexual, melhora a firmeza e devolve a confiança no desempenho."
    },
    {
      image: "https://i.ibb.co/b56RbNwv/Frame-2147223518.png",
      title: "Proteção e Saúde da Próstata",
      description: "Ativos naturais que auxiliam no cuidado da próstata e ajudam a reduzir desconfortos urinários ao longo do tempo."
    },
    {
      image: "https://i.ibb.co/C5fYZmKB/Frame-2147223519.png",
      title: "Adeus à Micção Frequente",
      description: "Redução da micção frequente durante o dia e à noite, trazendo mais tranquilidade e qualidade de vida."
    },
    {
      image: "images/beneficio-aumento.jpg",
      title: "Aumento Peniano",
      description: "Fórmula que estimula a circulação e a resposta do tecido peniano, promovendo maior presença e rigidez."
    },
    {
      image: "https://i.ibb.co/hJp72xbp/Frame-2147223520.png",
      title: "Energia e Disposição",
      description: "Além do desempenho sexual, mais vitalidade para o dia a dia, sem cansaço e sem limitações."
    }
  ];

  return (
    <section className="on-light py-20 md:py-28 bg-[#F8F9FA] text-gray-800">
      <div className="container mx-auto px-6 md:px-12 lg:px-24">
        <div className="text-center max-w-4xl mx-auto mb-16">
          <h2 className="text-3xl md:text-4xl lg:text-5xl font-extrabold text-brand-navy mb-4 leading-tight">
            O Segredo de <span className="text-brand-accent">ProstBem</span>
          </h2>
          <p className="text-xl md:text-2xl font-medium text-gray-600">
            Potência Inabalável e Saúde Prostática Blindada
          </p>
          <div className="w-24 h-1.5 bg-brand-accent mx-auto mt-6 rounded-full"></div>
        </div>
        <div className="grid grid-cols-1 lg:grid-cols-2 gap-6 lg:gap-8 mb-16">
          {benefits.map((benefit, index) => (
            <div key={index} className="group bg-white p-6 rounded-2xl shadow-[0_10px_40px_-10px_rgba(0,0,0,0.08)] hover:shadow-[0_20px_60px_-15px_rgba(31,41,214,0.15)] border border-gray-100 hover:border-brand-accent/30 transition-all duration-300 transform hover:-translate-y-1 flex flex-row items-center gap-5 md:gap-6">
              <div className="shrink-0 w-24 h-32 md:w-32 md:h-40 rounded-xl overflow-hidden shadow-md relative bg-gray-100">
                <div className="absolute inset-0 bg-brand-accent/10 mix-blend-multiply opacity-0 group-hover:opacity-100 transition-opacity duration-300 z-10"></div>
                <img src={benefit.image} alt={benefit.title} className="w-full h-full object-cover group-hover:scale-110 transition-transform duration-500" />
              </div>
              <div className="flex flex-col flex-1">
                <h3 className="text-lg md:text-xl font-bold text-brand-navy mb-2 group-hover:text-brand-accent transition-colors duration-300 leading-tight">
                  {benefit.title}
                </h3>
                <p className="text-sm md:text-base text-gray-600 leading-relaxed">
                  {benefit.description}
                </p>
              </div>
            </div>
          ))}
        </div>
        <div className="text-center flex justify-center">
          <button onClick={scrollToPricing} className="btn-cta w-full md:w-auto bg-brand-blue hover:bg-brand-blue-light text-white font-extrabold text-lg md:text-2xl py-5 px-10 md:px-16 rounded-full shadow-[0_10px_30px_rgba(31,41,214,0.4)] uppercase tracking-wide flex items-center justify-center gap-4">
            <CheckCircle className="w-7 h-7 md:w-8 md:h-8 shrink-0" strokeWidth={2} />
            <span className="leading-tight">Quero iniciar o tratamento</span>
          </button>
        </div>
        <p className="mt-4 text-center text-sm text-gray-500 font-medium">
          Satisfação garantida ou seu dinheiro de volta
        </p>
      </div>
    </section>
  );
};

/* --------------------------------------------------------------------------
   ProductDetailsSection — "Gotas Naturais"
   Foto do frasco + texto explicativo. A margem negativa (-mt-16)
   faz a borda arredondada sobrepor a seção anterior.
   -------------------------------------------------------------------------- */
const ProductDetailsSection = () => {
  return (
    <section className="relative w-full bg-brand-navy pb-20 pt-24 md:pt-32 rounded-t-[60px] md:rounded-t-[100px] -mt-16 z-20 shadow-[0_-20px_60px_rgba(0,0,0,0.5)] overflow-hidden">
      <div className="absolute top-0 left-0 w-full h-full overflow-hidden pointer-events-none">
        <div className="absolute top-0 right-0 w-[500px] h-[500px] bg-brand-accent/5 blur-[100px] rounded-full translate-x-1/2 -translate-y-1/2"></div>
        <div className="absolute bottom-0 left-0 w-[400px] h-[400px] bg-blue-900/10 blur-[80px] rounded-full -translate-x-1/4 translate-y-1/4"></div>
      </div>
      <div className="container mx-auto px-6 md:px-12 lg:px-24 relative z-10">
        <div className="grid grid-cols-1 lg:grid-cols-2 gap-12 lg:gap-16 items-center">
          <div className="relative group flex justify-center items-center">
            <div className="absolute inset-0 bg-brand-accent/20 blur-3xl rounded-full opacity-60 group-hover:opacity-80 transition-opacity duration-700 max-w-[320px] max-h-[320px] m-auto"></div>
            <img decoding="async"
              src="images/prostbem-frasco.png"
              alt="Frasco do ProstBem Semente de Abóbora, suplemento alimentar líquido 30 mL"
              width="336"
              height="1000"
              className="relative w-auto max-h-[380px] sm:max-h-[440px] md:max-h-[500px] object-contain drop-shadow-[0_20px_40px_rgba(0,0,0,0.6)] transform transition-transform duration-500 hover:scale-105"
            />
          </div>
          <div className="space-y-6 md:space-y-8">
            <h2 className="text-3xl md:text-4xl lg:text-5xl font-extrabold text-white leading-tight">
              Gotas Naturais: <br />
              <span className="text-brand-accent">Alívio Rápido</span> Para os Problemas da Próstata e da Potência Masculina
            </h2>
            <div className="space-y-4 text-base md:text-lg text-gray-300 leading-relaxed font-medium">
              <p>O <span className="text-white font-bold">ProstBem</span> combina ativos poderosos que desinflamam a próstata, aliviam o desconforto urinário e ainda recuperam sua energia sexual.</p>
              <p>Em poucas semanas você já sente a diferença: <span className="text-brand-accent font-bold">menos idas ao banheiro</span>, fluxo urinário mais forte e ereções firmes e prolongadas.</p>
              <p>Tudo isso de forma <span className="text-white font-bold">100% natural e segura</span>, sem efeitos colaterais.</p>
            </div>
            <div className="pt-4 flex justify-start">
              <button onClick={scrollToPricing} className="btn-cta w-full md:w-auto bg-brand-blue hover:bg-brand-blue-light text-white font-bold text-lg md:text-xl py-5 px-10 rounded-full shadow-[0_0_20px_rgba(31,41,214,0.4)] uppercase tracking-wide flex items-center justify-center gap-4">
                <span className="relative z-10 leading-tight">Quero iniciar o tratamento</span>
                <ShoppingCart className="w-7 h-7 relative z-10 shrink-0" strokeWidth={2} />
              </button>
            </div>
          </div>
        </div>
      </div>
    </section>
  );
};

/* --------------------------------------------------------------------------
   TestimonialsSection — depoimentos (cards brancos com avatar de iniciais)
   Desktop: grade de 3 colunas. Celular: carrossel com setas e
   arrastar com o dedo (swipe de mais de 50px troca o slide).
   -------------------------------------------------------------------------- */
const TestimonialsSection = () => {
  const testimonials = [
    { id: 1, name: "Carlos Henrique", verified: true, rating: 5, text: "Produto muito bom, comprei para meu pai ele já está usando há algum tempo e tem melhorado os sintomas.", context: "ProstBem - embalagem", image: "images/depoimento-carlos-embalagem.jpg" },
    { id: 2, name: "José Raimundo", verified: true, rating: 5, text: "Tinha vergonha de sair de casa porque vivia procurando banheiro. Depois que comecei o tratamento, isso acabou. Voltei até a caminhar com os amigos.", context: "Kit ProstBem", image: "images/depoimento-jose-kit.jpg" },
    { id: 3, name: "Luiz Alberto", verified: true, rating: 5, text: "No começo achei que era mais um desses produtos da internet, mas realmente funciona. Minha esposa até percebeu a diferença no meu humor.", context: "Frasco ProstBem", image: "images/depoimento-luiz-frascos.jpg" }
  ];
  // Iniciais para o avatar: primeira letra das duas primeiras palavras do nome
  const initials = (name) => name.split(' ').slice(0, 2).map((part) => part[0]).join('').toUpperCase();
  const [currentIndex, setCurrentIndex] = useState(0);
  const touchStartX = useRef(0);
  const touchEndX = useRef(0);
  const nextSlide = () => setCurrentIndex((prev) => (prev === testimonials.length - 1 ? 0 : prev + 1));
  const prevSlide = () => setCurrentIndex((prev) => (prev === 0 ? testimonials.length - 1 : prev - 1));
  const handleTouchStart = (e) => { touchStartX.current = e.targetTouches[0].clientX; };
  const handleTouchMove = (e) => { touchEndX.current = e.targetTouches[0].clientX; };
  const handleTouchEnd = () => { if (touchStartX.current - touchEndX.current > 50) nextSlide(); if (touchStartX.current - touchEndX.current < -50) prevSlide(); };

  return (
    <section className="bg-brand-navy py-16 md:py-24 overflow-hidden border-t border-white/5">
      <div className="container mx-auto px-6 md:px-12 lg:px-24">
        <div className="text-center max-w-3xl mx-auto mb-16">
          <h2 className="text-3xl md:text-4xl lg:text-5xl font-extrabold text-white leading-tight mb-4">
            Resultados que mudam a <span className="text-brand-accent">vida de nossos clientes</span>.
          </h2>
          <div className="w-20 h-1 bg-brand-accent mx-auto rounded-full"></div>
        </div>
        <div className="relative">
          <div className="flex transition-transform duration-500 ease-out md:grid md:grid-cols-3 md:gap-8 md:transform-none"
            style={{ transform: `translateX(-${currentIndex * 100}%)` }}
            onTouchStart={handleTouchStart} onTouchMove={handleTouchMove} onTouchEnd={handleTouchEnd}>
            {testimonials.map((item) => (
              <div key={item.id} className="min-w-full md:min-w-0 px-4 md:px-0">
                <div className="on-light bg-white border border-gray-100 rounded-3xl p-6 md:p-8 h-full flex flex-col relative group shadow-[0_10px_40px_rgba(0,0,0,0.25)] hover:border-brand-accent/30 transition-colors duration-300">
                  <div className="mb-6">
                    <div className="flex items-center gap-3 mb-3">
                      {/* Avatar com as iniciais do cliente (ex.: "Carlos Henrique" → CH) */}
                      <div className="shrink-0 w-12 h-12 rounded-full bg-brand-blue text-white font-bold text-base flex items-center justify-center ring-4 ring-brand-blue/15" aria-hidden="true">
                        {initials(item.name)}
                      </div>
                      <div>
                        <h3 className="text-xl font-bold text-brand-navy leading-tight">{item.name}</h3>
                      </div>
                    </div>
                    <div className="flex text-brand-accent">
                      {[...Array(item.rating)].map((_, i) => (
                        <Star key={i} className="w-4 h-4 fill-current" />
                      ))}
                    </div>
                  </div>
                  <p className="text-gray-700 text-base leading-relaxed mb-6 flex-grow italic">"{item.text}"</p>
                  <div className="mt-auto">
                    <div className="relative w-full aspect-[4/3] bg-gray-100 rounded-xl overflow-hidden border border-gray-200 flex flex-col items-center justify-center mb-3 group-hover:border-brand-accent/20 transition-colors">
                      <img src={item.image} alt={`Depoimento de ${item.name}`} className="w-full h-full object-cover transform transition-transform duration-700 group-hover:scale-110" />
                      <div className="absolute inset-0 ring-1 ring-inset ring-black/5 rounded-xl pointer-events-none"></div>
                    </div>
                    <div className="flex items-center justify-between border-t border-gray-100 pt-3">
                      <span className="text-xs font-bold text-brand-accent uppercase tracking-wide">ProstBem®</span>
                      <span className="text-xs text-gray-500">{item.context}</span>
                    </div>
                  </div>
                </div>
              </div>
            ))}
          </div>
          <div className="flex md:hidden justify-center items-center mt-8 gap-6">
            <button onClick={prevSlide} className="w-12 h-12 rounded-full border border-white/10 bg-white/5 flex items-center justify-center text-white active:bg-brand-accent active:text-brand-navy transition-colors"><ChevronLeft className="w-6 h-6" /></button>
            <div className="flex gap-2">
              {testimonials.map((_, idx) => (
                <div key={idx} className={`w-2 h-2 rounded-full transition-all duration-300 ${idx === currentIndex ? 'bg-brand-accent w-6' : 'bg-gray-600'}`} />
              ))}
            </div>
            <button onClick={nextSlide} className="w-12 h-12 rounded-full border border-white/10 bg-white/5 flex items-center justify-center text-white active:bg-brand-accent active:text-brand-navy transition-colors"><ChevronRight className="w-6 h-6" /></button>
          </div>
        </div>
      </div>
    </section>
  );
};

/* --------------------------------------------------------------------------
   IngredientsSection — ingredientes da fórmula
   3 cards à esquerda, imagem no centro e 3 cards à direita.
   No celular a imagem vem primeiro (classes order-*).
   -------------------------------------------------------------------------- */
const IngredientsSection = () => {
  const Card = ({ item, align }) => (
    <div className={`on-dark relative bg-brand-navy p-6 md:p-8 rounded-2xl shadow-[0_10px_30px_rgba(0,0,0,0.15)] border-b-4 lg:border-b-0 ${align === 'right' ? 'lg:border-r-4' : 'lg:border-l-4'} border-brand-accent flex flex-col ${align === 'right' ? 'lg:items-end lg:text-right' : 'lg:items-start lg:text-left'} items-center text-center group hover:-translate-y-2 transition-transform duration-300 z-10`}>
      <div className="mb-4 bg-brand-accent/20 p-3 rounded-full text-brand-accent group-hover:bg-brand-accent group-hover:text-brand-navy transition-colors duration-300">
        <item.icon className="w-8 h-8" strokeWidth={1.5} />
      </div>
      <h3 className="text-xl font-bold text-white mb-3 tracking-wide">{item.title}</h3>
      <p className="text-gray-300 text-sm md:text-base leading-relaxed font-medium">{item.description}</p>
    </div>
  );
  const leftIngredients = [
    { icon: Droplet, title: "Óleo de Abóbora", description: "Reduz o inchaço da próstata e melhora o fluxo urinário, trazendo alívio imediato e mais conforto no dia a dia." },
    { icon: Leaf, title: "Óleo de Abacate", description: "Ajuda a equilibrar os hormônios masculinos, evitando o crescimento da próstata e favorecendo a produção natural de testosterona." },
    { icon: Shield, title: "Zinco", description: "Mineral essencial para manter a fertilidade, a produção de testosterona e ereções firmes. Sua falta está ligada à impotência sexual." }
  ];
  const rightIngredients = [
    { icon: Zap, title: "Coenzima Q10", description: "Aumenta a energia celular, melhora a circulação sanguínea e fortalece as ereções, além de proteger a próstata." },
    { icon: Heart, title: "Licopeno de Tomate", description: "Poderoso antioxidante que reduz inflamações, melhora a função prostática e contribui para uma vida sexual mais saudável." },
    { icon: Activity, title: "Magnésio", description: "Equilibra os hormônios, combate inflamações e garante mais disposição e vitalidade para aproveitar a vida sexual." }
  ];

  return (
    <section className="on-light py-20 md:py-28 bg-brand-gray relative overflow-hidden">
      <div className="absolute top-0 left-0 w-full h-full overflow-hidden pointer-events-none">
        <div className="absolute top-0 left-1/2 -translate-x-1/2 w-full h-full bg-[radial-gradient(circle_at_center,_var(--tw-gradient-stops))] from-white via-transparent to-transparent opacity-60"></div>
      </div>
      <div className="container mx-auto px-6 md:px-12 lg:px-24 relative z-10">
        <div className="text-center max-w-4xl mx-auto mb-16 md:mb-24">
          <h2 className="text-3xl md:text-4xl lg:text-5xl font-extrabold text-brand-navy mb-6 leading-tight">
            Fórmula Natural Que Devolve Sua <br />
            <span className="text-brand-accent">Virilidade e Saúde da Próstata</span>
          </h2>
          <p className="text-lg md:text-xl text-gray-600 font-medium max-w-2xl mx-auto">
            Ingredientes 100% naturais, aprovados pela ANVISA, escolhidos para devolver energia, confiança e potência masculina.
          </p>
        </div>
        <div className="grid grid-cols-1 lg:grid-cols-3 gap-8 lg:gap-12 items-center">
          <div className="space-y-6 lg:space-y-12 order-2 lg:order-1">
            {leftIngredients.map((item, index) => <Card key={index} item={item} align="right" />)}
          </div>
          <div className="relative order-1 lg:order-2 mb-12 lg:mb-0 flex justify-center">
            <div className="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[120%] h-[120%] bg-brand-accent/20 blur-[60px] rounded-full"></div>
            <img decoding="async" src="https://i.ibb.co/SDB3B3p7/Frame-2147223517.png" alt="Gota Concentrada ProstBem" className="relative w-48 md:w-64 lg:w-[400px] object-contain animate-float drop-shadow-2xl z-10" />
          </div>
          <div className="space-y-6 lg:space-y-12 order-3 lg:order-3">
            {rightIngredients.map((item, index) => <Card key={index} item={item} align="left" />)}
          </div>
        </div>
        <div className="mt-16 md:mt-24 text-center">
          <div className="inline-flex items-center gap-3 bg-white px-8 py-4 rounded-full shadow-md border border-gray-200">
            <div className="w-3 h-3 bg-green-500 rounded-full animate-pulse"></div>
            <span className="text-sm md:text-base font-bold text-brand-navy uppercase tracking-wider">Tecnologia de Alta Absorção</span>
          </div>
        </div>
      </div>
    </section>
  );
};

/* --------------------------------------------------------------------------
   HowToUseSection — "Como Usar" (3 passos)
   A linha dourada enche conforme a seção passa pela tela
   (scrollProgress de 0 a 100) e acende cada passo ao chegar nele.
   -------------------------------------------------------------------------- */
const HowToUseSection = () => {
  const [scrollProgress, setScrollProgress] = useState(0);
  const sectionRef = useRef(null);
  const steps = [
    { icon: RotateCw, title: "PASSO 1", description: "Agite bem antes de usar. Certifique-se de que o frasco esteja bem misturado." },
    { icon: Pipette, title: "PASSO 2", description: "Tome 12 gotas do produto 1 vez ao dia, de preferência antes de dormir." },
    { icon: GlassWater, title: "PASSO 3", description: "Pode ser tomado puro ou misturado em sucos e outras bebidas para um sabor mais agradável." }
  ];
  useEffect(() => {
    const handleScroll = () => {
      if (!sectionRef.current) return;
      const rect = sectionRef.current.getBoundingClientRect();
      const windowHeight = window.innerHeight;
      const startOffset = windowHeight * 0.85;
      const endOffset = - (windowHeight * 0.25);
      const totalDistance = startOffset - endOffset;
      const currentPos = startOffset - rect.top;
      let percentage = (currentPos / totalDistance) * 100;
      percentage = Math.min(Math.max(percentage, 0), 100);
      setScrollProgress(percentage);
    };
    window.addEventListener('scroll', handleScroll);
    handleScroll();
    return () => window.removeEventListener('scroll', handleScroll);
  }, []);

  return (
    <section ref={sectionRef} className="on-light py-20 md:py-28 bg-white text-brand-navy overflow-hidden">
      <div className="container mx-auto px-6 md:px-12 lg:px-24">
        <div className="text-center max-w-3xl mx-auto mb-16 md:mb-20">
          <h2 className="text-3xl md:text-4xl lg:text-5xl font-extrabold mb-6 text-brand-navy">
            Como Usar o <span className="text-brand-accent">ProstBem</span>
          </h2>
          <p className="text-lg md:text-xl text-gray-600 font-medium">Siga o tratamento corretamente para garantir a absorção máxima dos nutrientes e resultados rápidos.</p>
        </div>
        <div className="grid grid-cols-1 md:grid-cols-3 gap-12 md:gap-10 lg:gap-14 relative">
          <div className="hidden md:block absolute top-12 left-[16.66%] right-[16.66%] h-1 bg-gray-100 -z-0 rounded-full overflow-hidden">
            <div className="h-full bg-brand-accent transition-all duration-300 ease-out shadow-[0_0_10px_#1F29D6]" style={{ width: `${scrollProgress}%` }}></div>
          </div>
          <div className="md:hidden absolute top-12 bottom-24 left-[3rem] w-1 bg-gray-100 -translate-x-1/2 -z-0 rounded-full overflow-hidden">
            <div className="w-full bg-brand-accent transition-all duration-300 ease-out shadow-[0_0_10px_#1F29D6]" style={{ height: `${scrollProgress}%` }}></div>
          </div>
          {steps.map((step, index) => {
            const isActive = index === 0 ? scrollProgress > 5 : index === 1 ? scrollProgress > 50 : scrollProgress > 95;
            return (
              <div key={index} className="flex flex-row md:flex-col items-start md:items-center text-left md:text-center gap-6 md:gap-0 group relative z-10">
                <div className={`shrink-0 w-24 h-24 rounded-2xl flex items-center justify-center md:mb-8 shadow-[0_10px_30px_rgba(0,1,25,0.25)] transform transition-all duration-500 relative ${isActive ? 'bg-brand-accent scale-110 rotate-0 ring-4 ring-brand-accent/30' : 'bg-brand-navy rotate-3'}`}>
                  <step.icon className={`w-10 h-10 transition-colors duration-500 ${isActive ? 'text-brand-navy' : 'text-white'}`} strokeWidth={1.5} />
                  <div className={`absolute -top-3 -right-3 w-8 h-8 rounded-full flex items-center justify-center font-bold text-sm shadow-md border-2 border-white transition-colors duration-500 ${isActive ? 'bg-brand-navy text-brand-accent' : 'bg-brand-accent text-brand-navy'}`}>{index + 1}</div>
                </div>
                <div className="pt-2 md:pt-0">
                  <h3 className={`text-xl font-bold mb-2 md:mb-3 uppercase tracking-wider transition-colors duration-500 ${isActive ? 'text-brand-accent' : 'text-brand-navy'}`}>{step.title}</h3>
                  <p className="text-gray-600 font-medium leading-relaxed max-w-[280px]">{step.description}</p>
                </div>
              </div>
            );
          })}
        </div>
      </div>
    </section>
  );
};

/* --------------------------------------------------------------------------
   SublingualSection — "Fórmula Sublingual"
   Texto sobre a absorção + lista de resultados + imagem ilustrativa.
   -------------------------------------------------------------------------- */
const SublingualSection = () => {
  const benefits = ["Menos idas ao banheiro à noite", "Fluxo urinário fortalecido", "Ereções firmes e duradouras", "Mais energia e confiança"];
  return (
    <section className="py-20 md:py-28 bg-brand-navy relative overflow-hidden">
      <div className="absolute top-0 right-0 w-1/2 h-full bg-brand-accent/5 blur-[120px] rounded-full translate-x-1/3 pointer-events-none"></div>
      <div className="container mx-auto px-6 md:px-12 lg:px-24 relative z-10">
        <div className="grid grid-cols-1 lg:grid-cols-2 gap-12 lg:gap-20 items-center">
          <div className="order-1 lg:order-1 space-y-8">
            <div className="space-y-4">
              <h2 className="text-3xl md:text-4xl lg:text-5xl font-extrabold text-white leading-tight">
                O Segredo da Nossa <br />
                <span className="text-brand-accent">Fórmula Sublingual</span>
              </h2>
              <p className="text-lg md:text-xl text-gray-300 font-medium">O ProstBem é diferente de tudo o que você já viu.</p>
            </div>
            <div className="bg-white/5 border border-white/10 rounded-2xl p-6 md:p-8 backdrop-blur-sm">
              <p className="text-gray-300 leading-relaxed text-base md:text-lg mb-6">
                Com aplicação <strong className="text-white">sublingual</strong>, suas gotas são absorvidas em segundos pela corrente sanguínea, garantindo até <strong className="text-brand-accent text-xl">97% de aproveitamento</strong> dos ativos.
                <br /><br />
                Isso significa resultados mais rápidos:
              </p>
              <ul className="space-y-4">
                {benefits.map((benefit, index) => (
                  <li key={index} className="flex items-start gap-3">
                    <div className="flex-shrink-0 w-6 h-6 mt-0.5 rounded-full bg-green-500/20 flex items-center justify-center">
                      <Check className="w-4 h-4 text-green-500 stroke-[3]" />
                    </div>
                    <span className="text-white font-semibold text-lg leading-tight">{benefit}</span>
                  </li>
                ))}
              </ul>
            </div>
            <p className="text-gray-400 italic">Uma forma simples, natural e extremamente eficaz de recuperar a saúde da próstata e a potência sexual.</p>
            <div className="pt-4 flex justify-start">
              <button onClick={scrollToPricing} className="btn-cta w-full md:w-auto bg-brand-blue hover:bg-brand-blue-light text-white font-extrabold text-sm md:text-lg py-4 px-6 md:py-5 md:px-8 rounded-full shadow-[0_4px_20px_rgba(31,41,214,0.4)] flex items-center justify-center gap-3 md:gap-4 uppercase tracking-wide">
                <ShieldCheck className="w-5 h-5 md:w-7 md:h-7 flex-shrink-0" strokeWidth={2} />
                <span className="text-center leading-tight">COMPRA 100% <br className="md:hidden block" /> SEGURA E GARANTIDA</span>
              </button>
            </div>
          </div>
          <div className="order-2 lg:order-2 flex justify-center lg:justify-end relative">
            <div className="absolute inset-0 bg-gradient-to-tr from-brand-accent/10 to-transparent rounded-full blur-3xl transform scale-90"></div>
            {/* Moldura com cantos arredondados (a regra .app img do CSS tira o arredondamento da própria imagem) */}
            <div className="relative z-10 w-full max-w-[500px] lg:max-w-[600px] rounded-3xl overflow-hidden border border-white/10 shadow-[0_20px_60px_rgba(0,0,0,0.5)]">
              <img decoding="async" src="images/sublingual-homem-gotas.jpg" alt="Homem pingando as gotas de ProstBem embaixo da língua, no quarto" width="1200" height="1078" className="block w-full hover:scale-[1.03] transition-transform duration-700" />
            </div>
          </div>
        </div>
      </div>
    </section>
  );
};

/* --------------------------------------------------------------------------
   PricingSection — ofertas / preços (id="pricing")
   Edite a lista `offers`: preços, parcelas, imagem e link de checkout (Yampi).
   A oferta com highlight: true recebe o destaque azul.
   -------------------------------------------------------------------------- */
const PricingSection = () => {
  const offers = [
    { id: 1, bottles: 1, headerTop: "COMPRE 1", headerMain: "1 FRASCO", subtitle: "1 Mês de tratamento", badge: null, oldPrice: "227,00", installments: "12x", installmentValue: "18,79", totalValue: "197,00", image: "images/kit-1-frasco.jpg", highlight: false, link: "https://seguro.prumoprodutos.online/r/25Z3CN6K3L" },
    { id: 2, bottles: 3, headerTop: "COMPRE 2", headerMain: "LEVE 3", subtitle: "3 Meses de tratamento", badge: null, oldPrice: "681,00", installments: "12x", installmentValue: "29,82", totalValue: "297,00", image: "images/kit-compre-2-leve-3.jpg", highlight: false, link: "https://seguro.prumoprodutos.online/r/Q2GR9C2FZS" },
    { id: 3, bottles: 5, headerTop: "COMPRE 3", headerMain: "LEVE 5", subtitle: "5 Meses de tratamento", badge: "O MAIS VENDIDO", oldPrice: "1.135,00", installments: "12x", installmentValue: "39,86", totalValue: "397,00", image: "images/kit-compre-3-leve-5.jpg", highlight: false, link: "https://seguro.prumoprodutos.online/r/5RB0JKCQR0" },
    { id: 4, bottles: 10, headerTop: "COMPRE 5", headerMain: "LEVE 10", subtitle: "10 Meses de tratamento", badge: "MAIS ECONÔMICO!", oldPrice: "2.227,00", installments: "12x", installmentValue: "59,94", totalValue: "597,00", image: "images/kit-compre-5-leve-10.jpg", highlight: true, link: "https://seguro.prumoprodutos.online/r/NT0BRL051M" },
  ];

  return (
    <section id="pricing" className="on-light py-12 md:py-20 bg-brand-gray border-t border-gray-200 overflow-hidden">
      <div className="container mx-auto px-4 sm:px-6 md:px-8 lg:px-16">
        <div className="text-center mb-8 md:mb-12 space-y-3 md:space-y-4">
          <h2 className="text-2xl sm:text-3xl md:text-4xl lg:text-5xl font-extrabold text-brand-navy leading-tight">
            Comece a Tratar Sua Vida Sехuаl <br className="hidden md:block" />
            <span className="text-brand-accent">Hoje Mesmo</span>
          </h2>
          <div className="inline-block bg-red-100 border border-red-200 rounded-full px-4 sm:px-6 py-2 animate-pulse">
            <p className="no-fade text-xs sm:text-sm md:text-lg font-bold text-[#D00000] uppercase tracking-wide flex items-center justify-center gap-2">
              <span className="w-2 h-2 rounded-full bg-[#D00000]"></span>
              Últimas 200 unidades com desconto e frete grátis hoje
            </p>
          </div>
        </div>
        <div className="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-4 gap-6 md:gap-8 xl:gap-6 items-end max-w-4xl xl:max-w-7xl mx-auto">
          {offers.map((offer) => (
            <div key={offer.id} className={`relative rounded-3xl overflow-hidden transition-all duration-300 transform hover:-translate-y-2 flex flex-col ${offer.highlight ? 'bg-white shadow-[0_20px_60px_rgba(31,41,214,0.25)] border-2 border-brand-accent z-10 md:scale-105' : 'bg-white shadow-xl border border-gray-100'}`}>
              {offer.badge ? (
                <div className={`text-center py-2 font-bold text-white uppercase tracking-wider text-xs md:text-sm ${offer.highlight ? 'bg-brand-accent text-white' : 'bg-brand-navy'}`}>{offer.badge}</div>
              ) : <div className="h-4"></div>}
              <div className="p-5 sm:p-6 flex flex-col items-center flex-grow text-center pb-6 sm:pb-8">
                <div className="flex flex-col items-center w-full mb-[10px]">
                  <span className={`text-sm sm:text-base md:text-lg font-extrabold uppercase tracking-tight mb-1 ${offer.highlight ? 'text-brand-navy' : 'text-gray-500'}`}>{offer.headerTop}</span>
                  <div className="w-full py-2 sm:py-2.5 rounded-lg text-white shadow-md flex items-center justify-center mb-1.5" style={{ backgroundColor: offer.highlight ? '#1F29D6' : '#000119' }}>
                    <span className="text-xl sm:text-2xl md:text-3xl font-black uppercase tracking-tighter drop-shadow-sm">{offer.headerMain}</span>
                  </div>
                  <p className="text-gray-500 font-semibold text-xs sm:text-sm">{offer.subtitle}</p>
                </div>
                {/* Altura fixa para os 4 cards ficarem alinhados (fotos têm proporções diferentes) */}
                <div className="relative w-full max-w-[320px] h-[200px] md:h-[240px] mx-auto mb-[10px] flex items-center justify-center">
                  <div className="absolute inset-0 bg-radial-gradient from-gray-100 to-transparent opacity-50 blur-xl"></div>
                  <img src={offer.image} alt={`Kit ${offer.bottles} Frascos`} loading="lazy" className="relative z-10 w-full max-h-[200px] md:max-h-[240px] object-contain mx-auto transform hover:scale-105 transition-transform duration-500" />
                </div>
                <div className="mb-[10px] flex items-center justify-center gap-2 text-green-600 font-bold bg-green-50 px-3 sm:px-4 py-1 rounded-full text-xs sm:text-sm">
                  <Truck className="w-4 h-4 shrink-0" /><span>+ Frete GRÁTIS</span>
                </div>
                <div className="flex flex-col items-center justify-center mb-[10px] space-y-0.5">
                  <p className="text-gray-400 text-xs sm:text-sm line-through decoration-gray-300">de R$ {offer.oldPrice}</p>
                  <p className="no-fade text-brand-navy font-bold text-xs sm:text-sm uppercase">POR APENAS {offer.installments}</p>
                  <p className={`no-fade text-5xl sm:text-6xl md:text-7xl xl:text-6xl font-black tracking-tighter leading-none ${offer.highlight ? 'text-brand-accent' : 'text-brand-navy'}`}>
                    <span className="text-xl sm:text-2xl align-top font-bold mr-1">R$</span>{offer.installmentValue}
                  </p>
                  <p className="no-fade text-black text-xs sm:text-sm font-medium">ou R$ {offer.totalValue} à vista</p>
                </div>
                <a href={offer.link} className="btn-cta w-full py-3.5 sm:py-4 px-4 rounded-full font-extrabold text-xs sm:text-sm uppercase tracking-wide text-white shadow-lg flex items-center justify-center gap-2 bg-brand-blue hover:bg-brand-blue-light text-center leading-tight">
                  <ShoppingCart className="w-4 sm:w-5 h-4 sm:h-5 shrink-0" />
                  COMPRAR AGORA
                </a>
              </div>
            </div>
          ))}
        </div>
        {/* Formas de pagamento: uma vez só, abaixo dos cards */}
        <div className="mt-8 md:mt-10 flex justify-center">
          <img decoding="async" src="https://i.ibb.co/xK86pnZS/visa-abaixo-do-checkout.png" alt="Formas de Pagamento Seguras" className="opacity-80 hover:opacity-100 transition-opacity duration-300" />
        </div>
      </div>
    </section>
  );
};

/* --------------------------------------------------------------------------
   QualitySection — selos de qualidade
   Lista de garantias de qualidade + imagem do selo.
   -------------------------------------------------------------------------- */
const QualitySection = () => {
  const items = [
    { icon: FlaskConical, text: "Produzido em laboratórios certificados" },
    { icon: Award, text: "Ingredientes premium com laudos de pureza" },
    { icon: ShieldCheck, text: "Produto notificado pela Anvisa" },
    { icon: Truck, text: "Envio discreto e rápido" }
  ];
  return (
    <section className="py-20 md:py-28 bg-brand-navy text-white relative overflow-hidden border-t border-white/5">
      <div className="absolute top-0 right-0 w-[600px] h-[600px] bg-brand-accent/5 blur-[120px] rounded-full translate-x-1/2 -translate-y-1/2 pointer-events-none"></div>
      <div className="container mx-auto px-6 md:px-12 lg:px-24 relative z-10">
        <div className="grid grid-cols-1 lg:grid-cols-2 gap-12 lg:gap-20 items-center">
          <div className="order-1">
            <h2 className="text-3xl md:text-4xl lg:text-5xl font-extrabold mb-10 leading-tight">
              Qualidade, Segurança e <br />
              <span className="text-brand-accent">Confiança em Cada Frasco</span>
            </h2>
            <div className="grid gap-6 mb-10">
              {items.map((item, index) => (
                <div key={index} className="flex items-center gap-4 p-4 rounded-xl bg-white/5 border border-white/10 hover:border-brand-accent/40 transition-all duration-300 group">
                  <div className="shrink-0 bg-brand-accent/10 p-3 rounded-lg text-brand-accent group-hover:bg-brand-accent group-hover:text-brand-navy transition-colors">
                    <item.icon className="w-6 h-6" strokeWidth={2} />
                  </div>
                  <h3 className="font-bold text-lg md:text-xl text-gray-100">{item.text}</h3>
                </div>
              ))}
            </div>
            <button onClick={scrollToPricing} className="btn-cta w-full md:w-auto bg-brand-blue hover:bg-brand-blue-light text-white font-extrabold text-sm md:text-lg py-4 px-6 md:py-5 md:px-10 rounded-full shadow-[0_0_30px_rgba(31,41,214,0.3)] flex items-center justify-center gap-3 md:gap-3 uppercase tracking-wide">
              <span className="text-xl md:text-2xl">📦</span>
              <span className="text-center leading-tight">
                GARANTA JÁ O SEU COM FRETE GRÁTIS<br className="block md:hidden" />
              </span>
            </button>
          </div>
          <div className="order-2 flex justify-center items-center relative">
            <div className="absolute inset-0 bg-gradient-to-br from-green-500/10 to-transparent rounded-full blur-3xl"></div>
            <img decoding="async" src="https://i.ibb.co/r2y2cmnC/image-722.png" alt="Selo Anvisa e Qualidade Garantida" className="relative z-10 w-full max-w-[450px] lg:max-w-full h-auto object-contain drop-shadow-2xl transform hover:scale-105 transition-transform duration-500" />
          </div>
        </div>
      </div>
    </section>
  );
};

/* --------------------------------------------------------------------------
   GuaranteeSection — garantia de 60 dias

   -------------------------------------------------------------------------- */
const GuaranteeSection = () => {
  return (
    <section className="on-light py-20 md:py-28 bg-[#F8F9FA] relative overflow-hidden">
      <div className="absolute top-0 left-0 w-full h-full opacity-30 pointer-events-none" style={{ backgroundImage: 'radial-gradient(#1F29D6 0.5px, transparent 0.5px)', backgroundSize: '24px 24px' }}></div>
      <div className="container mx-auto px-6 md:px-12 lg:px-24 relative z-10">
        <div className="max-w-4xl mx-auto">
          <div className="flex justify-center mb-10">
            <div className="relative">
              <div className="w-32 h-32 md:w-40 md:h-40 rounded-full bg-gradient-to-br from-brand-blue to-brand-navy shadow-[0_10px_40px_rgba(31,41,214,0.4)] flex items-center justify-center animate-pulse">
                <div className="w-[90%] h-[90%] rounded-full bg-white flex items-center justify-center border-4 border-dashed border-brand-accent">
                  <div className="text-center">
                    <span className="block text-3xl md:text-4xl font-black text-brand-navy leading-none">60</span>
                    <span className="block text-xs md:text-sm font-bold text-brand-accent uppercase tracking-wider">Dias de<br />Garantia</span>
                  </div>
                </div>
              </div>
              <div className="absolute -bottom-2 -right-2 bg-green-500 text-white p-2 rounded-full shadow-lg border-4 border-white"><ShieldCheck className="w-6 h-6 md:w-8 h-8" /></div>
            </div>
          </div>
          <div className="text-center space-y-8 bg-white p-8 md:p-12 rounded-3xl shadow-xl border border-gray-100">
            <h2 className="text-3xl md:text-4xl lg:text-5xl font-extrabold text-brand-navy leading-tight">
              Garantia Blindada de Satisfação: <br />
              <span className="text-brand-accent">60 Dias de Teste Sem Riscos</span>
            </h2>
            <div className="space-y-6 text-lg text-gray-600 leading-relaxed font-medium">
              <p>No <strong className="text-brand-navy">ProstBem</strong>, a sua segurança e satisfação vêm sempre em primeiro lugar. Nós temos tanta certeza da qualidade e eficácia da nossa fórmula que oferecemos uma garantia incondicional completa.</p>
              <p>Você tem <strong className="text-brand-navy underline decoration-brand-accent decoration-4 underline-offset-4">60 dias de garantia incondicional</strong>. Se durante esse período você achar que o produto não atendeu às suas expectativas, basta entrar em contato com nossa equipe e devolvemos 100% do seu investimento, sem burocracia.</p>
            </div>
            <div className="bg-green-50 border border-green-200 rounded-xl p-6 md:p-8 flex flex-col md:flex-row items-center gap-4 md:gap-6 shadow-sm">
              <div className="shrink-0 bg-green-500 text-white p-3 rounded-full"><ThumbsUp className="w-8 h-8" /></div>
              <p className="no-fade text-left text-green-800 font-bold text-lg md:text-xl">Risco ZERO para você: faça seu pedido com total segurança, receba na sua casa com discrição e comprove os resultados por 60 dias!</p>
            </div>
          </div>
          <div className="mt-12 flex flex-wrap justify-center gap-4 md:gap-8 text-green-600 font-semibold">
            <div className="flex items-center gap-2"><ShieldCheck className="w-5 h-5" /> <span>Compra Segura</span></div>
            <div className="flex items-center gap-2"><Wallet className="w-5 h-5" /> <span>Reembolso Garantido</span></div>
            <div className="flex items-center gap-2"><CheckCircle2 className="w-5 h-5" /> <span>Satisfação Comprovada</span></div>
          </div>
        </div>
      </div>
    </section>
  );
};

/* --------------------------------------------------------------------------
   FAQSection — perguntas frequentes (acordeão)
   Só uma pergunta fica aberta por vez; a primeira já começa aberta.
   A resposta pode ser texto simples ou JSX (com links, negrito etc.).
   -------------------------------------------------------------------------- */
const FAQSection = () => {
  const [openIndex, setOpenIndex] = useState(0);
  const toggleFAQ = (index) => { setOpenIndex(openIndex === index ? null : index); };
  const faqs = [
    { question: "Como devo utilizar ProstBem?", answer: "Ingerir 12 gotas diárias antes do jantar. A aplicação sublingual garante absorção rápida e eficaz dos nutrientes." },
    { question: "Quem pode usar ProstBem? Existe contra indicação?", answer: "ProstBem apresenta fórmula natural e não apresenta efeitos colaterais. O produto é indicado para homens acima dos 30 anos com sintomas de próstata aumentada ou que desejam prevenir problemas futuros e cuidar da saúde masculina." },
    { question: "Os benefícios são comprovados?", answer: <>A fórmula do ProstBem foi desenvolvida por especialistas e comprovada no controle da saúde do corpo. Os ingredientes que compõem sua fórmula são testados e aprovados para produzir os efeitos de combate a produção de DHT sem causar efeitos colaterais.<br /><br /><strong>Pesquisas e Estudos Relacionados:</strong><ul className="mt-2 space-y-1"><li><a href="https://pubmed.ncbi.nlm.nih.gov/25196580" target="_blank" rel="noopener noreferrer" className="text-brand-accent hover:underline flex items-center gap-2"><ExternalLink className="w-4 h-4" /> Estudo NCBI 25196580</a></li><li><a href="https://pubmed.ncbi.nlm.nih.gov/24872936" target="_blank" rel="noopener noreferrer" className="text-brand-accent hover:underline flex items-center gap-2"><ExternalLink className="w-4 h-4" /> Estudo NCBI 24872936</a></li></ul></> },
    { question: "Qual o prazo de entrega do ProstBem?", answer: <>Após a compra, o prazo para que seus dados estejam no sistema é de até 72 horas. O prazo de entrega varia de 8 a 12 dias úteis.<br /><br />Para acompanhar o seu envio, <a href="paginas/rastrear-pedido.html" className="text-brand-accent font-bold hover:underline">clique aqui</a> e veja como acompanhar o rastreio.</> },
    { question: "Quanto tempo demora para fazer efeito?", answer: "Por ser um produto de uso sublingual com alta tecnologia de absorção, os resultados costumam ser perceptíveis já no primeiro dia de uso, com melhora progressiva ao longo do tratamento." },
    { question: "Qual sabor tem o ProstBem?", answer: "O ProstBem tem um sabor levemente adocicado com aroma suave de abacate, tornando a ingestão agradável." },
    { question: "O ProstBem é vendido no Mercado Livre, OLX ou Shopee?", answer: "NÃO! A venda do ProstBem® Original é estritamente proibida em plataformas como Mercado Livre, OLX, Shopee, Americanas ou farmácias de manipulação. O produto autêntico é vendido única e exclusivamente através deste site oficial ou pelos nossos canais autorizados de suporte no WhatsApp. Não nos responsabilizamos por falsificações compradas em outros sites." }
  ];

  return (
    <section className="py-20 md:py-28 bg-brand-navy text-white relative overflow-hidden border-t border-white/5">
      <div className="absolute top-0 left-0 w-full h-full overflow-hidden pointer-events-none">
        <div className="absolute bottom-0 left-0 w-[600px] h-[600px] bg-brand-accent/5 blur-[120px] rounded-full -translate-x-1/2 translate-y-1/2"></div>
      </div>
      <div className="container mx-auto px-6 md:px-12 lg:px-24 relative z-10">
        <div className="text-center max-w-3xl mx-auto mb-16">
          <div className="inline-flex items-center justify-center p-3 bg-brand-accent/10 rounded-full mb-6">
            <HelpCircle className="w-8 h-8 text-brand-accent" />
          </div>
          <h2 className="text-3xl md:text-4xl lg:text-5xl font-extrabold leading-tight mb-4">
            Dúvidas <span className="text-brand-accent">Frequentes</span>
          </h2>
          <p className="text-lg text-gray-400">Confira as respostas para as principais perguntas sobre o tratamento.</p>
        </div>
        <div className="max-w-4xl mx-auto space-y-4">
          {faqs.map((faq, index) => {
            const isOpen = openIndex === index;
            return (
              <div key={index} className={`rounded-2xl border transition-all duration-300 overflow-hidden ${isOpen ? 'bg-white/10 border-brand-accent/50 shadow-[0_0_30px_rgba(31,41,214,0.1)]' : 'bg-white/5 border-white/10 hover:border-white/20 hover:bg-white/[0.07]'}`}>
                <button onClick={() => toggleFAQ(index)} className="w-full flex items-center justify-between p-6 md:p-8 text-left focus:outline-none border-0">
                  <span className={`text-lg md:text-xl font-bold transition-colors ${isOpen ? 'text-brand-accent' : 'text-white'}`}>{faq.question}</span>
                  <div className={`shrink-0 ml-4 p-1 rounded-full border transition-all duration-300 ${isOpen ? 'bg-brand-accent border-brand-accent text-brand-navy' : 'border-white/20 text-white'}`}>
                    {isOpen ? <Minus className="w-5 h-5" /> : <Plus className="w-5 h-5" />}
                  </div>
                </button>
                <div className={`transition-all duration-300 ease-in-out overflow-hidden ${isOpen ? 'max-h-96 opacity-100' : 'max-h-0 opacity-0'}`}>
                  <div className="p-6 md:p-8 pt-0 text-gray-300 leading-relaxed border-t border-white/5 text-base md:text-lg">{faq.answer}</div>
                </div>
              </div>
            );
          })}
        </div>
        <div className="mt-16 text-center">
          <p className="text-gray-400 mb-6">Ainda tem dúvidas?</p>
          <a href="https://wa.me/5531990934779?text=Ol%C3%A1%2C%20gostaria%20de%20adquirir%20o%20tratamento%20PROSTBEM%20com%20desconto%21%20-%20DH" target="_blank" rel="noopener noreferrer" className="bg-green-600 hover:bg-green-700 text-white font-bold py-4 px-8 rounded-full transition-colors shadow-lg flex items-center justify-center gap-2 mx-auto max-w-fit">
            Falar com um Especialista no WhatsApp
          </a>
        </div>
      </div>
    </section>
  );
};

/* --------------------------------------------------------------------------
   Footer — rodapé
   Contato, links institucionais, pagamento, selos e avisos legais.
   -------------------------------------------------------------------------- */
const Footer = () => {
  return (
    <footer className="bg-black text-gray-400 py-16 border-t border-white/10 text-sm">
      <div className="container mx-auto px-6 md:px-12 lg:px-24">
        <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-10">
          <div>
            <h3 className="text-white font-bold text-lg mb-6 uppercase tracking-wider border-l-4 border-brand-accent pl-3">Central de Atendimento</h3>
            <ul className="space-y-4">
              <li className="flex items-center gap-3 group">
                <div className="p-2 bg-white/5 rounded-full text-brand-accent group-hover:bg-brand-accent group-hover:text-brand-navy transition-colors"><Phone className="w-4 h-4" /></div>
                <span className="group-hover:text-white transition-colors">(31) 99093-4779</span>
              </li>
              <li className="flex items-center gap-3 group">
                <div className="p-2 bg-white/5 rounded-full text-brand-accent group-hover:bg-brand-accent group-hover:text-brand-navy transition-colors"><Mail className="w-4 h-4" /></div>
                <span className="group-hover:text-white transition-colors break-all">suporte@naturalsaude.site</span>
              </li>
              <li className="flex items-center gap-3 group">
                <div className="p-2 bg-white/5 rounded-full text-brand-accent group-hover:bg-brand-accent group-hover:text-brand-navy transition-colors"><FileText className="w-4 h-4" /></div>
                <span className="group-hover:text-white transition-colors">CNPJ: 35.652.037/0001-89</span>
              </li>
            </ul>
            <div className="mt-6 text-xs text-gray-500 pl-2">Segunda a Sexta das 9:00 às 18:00</div>
          </div>
          <div>
            <h3 className="text-white font-bold text-lg mb-6 uppercase tracking-wider border-l-4 border-brand-accent pl-3">Informação</h3>
            <ul className="space-y-3 pl-2">
              <li><a href="paginas/politica-de-privacidade.html" className="hover:text-brand-accent hover:translate-x-1 transition-all block py-1">Política de Privacidade</a></li>
              <li><a href="paginas/termos-de-uso.html" className="hover:text-brand-accent hover:translate-x-1 transition-all block py-1">Termos de Uso</a></li>
              <li><a href="paginas/rastrear-pedido.html" className="hover:text-brand-accent hover:translate-x-1 transition-all block py-1">Rastrear Pedido</a></li>
              <li><a href="paginas/trocas-e-devolucoes.html" className="hover:text-brand-accent hover:translate-x-1 transition-all block py-1">Trocas e Devoluções</a></li>
            </ul>
          </div>
          <div>
            <h3 className="text-white font-bold text-lg mb-6 uppercase tracking-wider border-l-4 border-brand-accent pl-3">Formas de Pagamento</h3>
            <p className="mb-4 text-xs pl-2">Aceitamos as principais bandeiras no Cartão e PIX:</p>
            <div className="bg-white p-4 rounded-xl inline-block shadow-lg">
              <img decoding="async" src="https://i.ibb.co/xK86pnZS/visa-abaixo-do-checkout.png" alt="Bandeiras de Cartão" className="h-6 w-auto opacity-90" />
            </div>
            <div className="mt-4 pl-2 flex items-center gap-2 text-xs text-green-500 font-bold">
              <CreditCard className="w-4 h-4" /><span>Pagamento 100% Seguro</span>
            </div>
          </div>
          <div>
            <h3 className="text-white font-bold text-lg mb-6 uppercase tracking-wider border-l-4 border-brand-accent pl-3">Segurança</h3>
            <div className="flex flex-col gap-4 pl-2">
              <div className="flex items-center gap-3 p-3 bg-white/5 rounded-xl border border-white/5 hover:border-green-500/30 transition-colors">
                <ShieldCheck className="w-8 h-8 text-green-500" />
                <div><span className="block text-white font-bold">Site Seguro</span><span className="text-xs">Google Safe Browsing</span></div>
              </div>
              <div className="flex items-center gap-3 p-3 bg-white/5 rounded-xl border border-white/5 hover:border-brand-accent/30 transition-colors">
                <Lock className="w-8 h-8 text-brand-accent" />
                <div><span className="block text-white font-bold">Dados Protegidos</span><span className="text-xs">Certificado SSL 256-bit</span></div>
              </div>
            </div>
          </div>
        </div>
        <div className="mt-16 pt-8 border-t border-white/10 text-center flex flex-col items-center gap-4">
          <p className="text-xs opacity-60">© {new Date().getFullYear()} ProstBem. Todos os direitos reservados.</p>
        </div>
      </div>
    </footer>
  );
};

/* --------------------------------------------------------------------------
   4. APP — monta a página
   Para remover ou reordenar uma seção, é só mexer nesta lista.
   -------------------------------------------------------------------------- */
const App = () => {
  return (
    <main className="min-h-screen flex flex-col bg-brand-navy overflow-x-hidden w-full relative">
      <Header />
      <Hero />
      <FeaturesBar />
      <VSLSection />
      <BenefitsSection />
      <ProductDetailsSection />
      <TestimonialsSection />
      <IngredientsSection />
      <HowToUseSection />
      <SublingualSection />
      <PricingSection />
      <QualitySection />
      <GuaranteeSection />
      <FAQSection />
      <Footer />
    </main>
  );
};

// Renderiza o App dentro de <div id="root"> do index.html
const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(<App />);
