const { useState, useEffect, useRef, useMemo } = React;

function DetailsPanel({ product }) {
  if (!product || product.soon) return null;
  const list = product.ingredients.join(', ') + (product.real ? '.' : ' — végleges lista hamarosan.');
  return (
    <div style={{ padding: 'var(--sp-6) var(--gutter)', borderTop: '1px solid var(--line)', background: 'var(--bg-deep)' }}>
      <div style={{ maxWidth: 680, margin: '0 auto' }}>
        <Eyebrow gold style={{ marginBottom: 14 }}>TELJES ÖSSZETEVŐ-LISTA</Eyebrow>
        <p className="ps-body" style={{ color: 'var(--fg-2)', margin: '0 0 20px' }}>{list}</p>
        {product.age && (
          <p className="ps-small" style={{ margin: '0 0 8px' }}>
            <span className="ps-label" style={{ color: 'var(--fg-3)' }}>KOROSZTÁLY&nbsp;</span>{product.age}
          </p>
        )}
        {product.real && (
          <p className="ps-small" style={{ margin: 0, color: 'var(--fg-3)' }}>
            <span className="ps-label" style={{ color: 'var(--fg-3)' }}>ENGEDÉLYEZETT ÁLLÍTÁS HELYE&nbsp;</span>
            B6-vitamin, B12-vitamin, C-vitamin — tápanyagreferencia-érték szerinti jelölés.
          </p>
        )}
      </div>
    </div>
  );
}

function usePinProgress(ref, extra) {
  const [p, setP] = useState(0);
  useEffect(() => {
    const el = ref.current; if (!el) return;
    let raf = null;
    const compute = () => {
      const r = el.getBoundingClientRect();
      setP(Math.max(0, Math.min(1, -r.top / extra)));
    };
    const onScroll = () => { if (raf) return; raf = requestAnimationFrame(() => { compute(); raf = null; }); };
    window.addEventListener('scroll', onScroll, { passive: true });
    window.addEventListener('resize', onScroll);
    compute();
    return () => { window.removeEventListener('scroll', onScroll); window.removeEventListener('resize', onScroll); if (raf) cancelAnimationFrame(raf); };
  }, [extra]);
  return p;
}

function useElementWidth(ref) {
  const [w, setW] = useState(0);
  useEffect(() => {
    const el = ref.current; if (!el) return;
    const ro = new ResizeObserver((entries) => requestAnimationFrame(() => { for (const e of entries) setW(e.contentRect.width); }));
    ro.observe(el);
    setW(el.clientWidth);
    return () => ro.disconnect();
  }, []);
  return w;
}

function Drawer({ open, children }) {
  const innerRef = useRef();
  const [maxH, setMaxH] = useState(0);
  useEffect(() => {
    if (!open) { setMaxH(0); return; }
    const measure = () => { if (innerRef.current) setMaxH((prev) => { const next = innerRef.current.scrollHeight; return Math.abs(next - prev) > 1 ? next : prev; }); };
    measure();
    const ro = new ResizeObserver(() => requestAnimationFrame(measure));
    if (innerRef.current) ro.observe(innerRef.current);
    return () => ro.disconnect();
  }, [open]);
  return <div className="ps-drawer" style={{ maxHeight: maxH }}><div ref={innerRef}>{children}</div></div>;
}

function useIsMobile() {
  const [m, setM] = useState(false);
  useEffect(() => {
    const mq = window.matchMedia('(max-width: 820px)');
    const on = () => setM(mq.matches);
    on();
    mq.addEventListener('change', on);
    return () => mq.removeEventListener('change', on);
  }, []);
  return m;
}

function useAutoProgress(ref, run) {
  const [p, setP] = useState(0);
  useEffect(() => {
    if (!run) return;
    const el = ref.current; if (!el) return;
    let raf = null, start = null, playing = false;
    const step = (t) => {
      if (!start) start = t;
      const e = Math.min(1, (t - start) / 4200);
      setP(e);
      if (e < 1) raf = requestAnimationFrame(step);
    };
    const io = new IntersectionObserver((entries) => {
      entries.forEach((en) => { if (en.isIntersecting && !playing) { playing = true; raf = requestAnimationFrame(step); io.disconnect(); } });
    }, { threshold: 0.4 });
    io.observe(el);
    return () => { io.disconnect(); if (raf) cancelAnimationFrame(raf); };
  }, [run]);
  return p;
}

function ScrollBottleStage({ product, extra = 500, outerRef: extRef }) {
  const localRef = useRef();
  const outerRef = extRef || localRef;
  const laneRef = useRef();
  const isMobile = useIsMobile();
  const reduce = useMemo(() => window.matchMedia && window.matchMedia('(prefers-reduced-motion: reduce)').matches, []);
  const pinProgress = usePinProgress(outerRef, extra);
  const autoProgress = useAutoProgress(outerRef, isMobile && !reduce);
  const progress = reduce ? 1 : (isMobile ? autoProgress : pinProgress);
  const laneWidth = useElementWidth(laneRef);
  const list = product.ingredients || [];
  const colW = isMobile ? 84 : 118, gap = isMobile ? 14 : 22;  const rowWidth = list.length * colW + Math.max(0, list.length - 1) * gap;
  const startX = laneWidth || 900;
  const endX = -(rowWidth + 60);
  const tx = startX - progress * (startX - endX);
  const rotateY = reduce ? 0 : Math.sin(progress * Math.PI * 4) * 3;
  const center = (laneWidth || 900) / 2;
  let hit = 0;
  if (!reduce && list.length) {
    for (let i = 0; i < list.length; i++) {
      const cx = tx + i * (colW + gap) + colW / 2;
      const d = Math.abs(cx - center);
      const v = Math.exp(-(d * d) / (2 * 62 * 62));
      if (v > hit) hit = v;
    }
  }
  const shine = reduce ? 0 : Math.sin(progress * Math.PI * 2) * 34;
  const shadowScale = 0.9 + 0.06 * hit;
  return (
    <div ref={outerRef} id="products-stage" style={{ position: 'relative', height: isMobile ? 'auto' : `calc(100vh + ${extra}px)` }}>
      <div style={{ position: isMobile ? 'static' : 'sticky', top: 0, height: isMobile ? 'auto' : '100vh', display: 'flex', alignItems: 'center', justifyContent: 'center', overflow: 'hidden' }}>
        <div style={{ position: 'relative', width: '100%', maxWidth: 'var(--container)', maxHeight: isMobile ? 'none' : '100vh', margin: '0 auto', border: '1px solid var(--line-strong)', background: 'var(--bg-panel)', padding: 'var(--sp-6) var(--gutter)', overflow: 'hidden' }}>
          <CornerMarks inset={16} />
          <BlueprintGrid opacity={0.4} gap={44} />
          <div style={{ position: 'relative', textAlign: 'center' }}>
            <Eyebrow gold style={{ justifyContent: 'center', marginBottom: 18 }}>KIEMELT TERMÉK</Eyebrow>
            <div style={{ position: 'relative', height: 'clamp(280px, 58vh, 440px)', maxWidth: 760, margin: '0 auto' }}>
              {list.length > 0 && (
                <div ref={laneRef} aria-hidden="true" style={{
                  position: 'absolute', top: 'calc(50% - 70px)', left: 0, width: '100%', height: 140, zIndex: 2,
                  WebkitMaskImage: 'linear-gradient(90deg, transparent 0%, transparent 40%, black 52%, black 100%)',
                  maskImage: 'linear-gradient(90deg, transparent 0%, transparent 40%, black 52%, black 100%)',
                }}>
                  <div style={{ position: 'absolute', top: 0, left: 0, height: '100%', display: 'flex', alignItems: 'flex-start', paddingTop: isMobile ? 30 : 26, gap, transform: `translateX(${tx}px)`, willChange: 'transform' }}>
                    {list.map((t, i) => (
                      <div key={i} style={{ width: colW, flex: 'none', display: 'flex', flexDirection: 'column', alignItems: 'center', gap: 8 }}>
                        <span style={{ width: isMobile ? 46 : 64, height: isMobile ? 46 : 64, borderRadius: '50%', border: '1px solid var(--line-strong)', background: 'var(--bg-raised)', display: 'flex', alignItems: 'center', justifyContent: 'center', flex: 'none', overflow: 'hidden' }}>
                          {(window.PS_ING_IMAGES || {})[t]
                            ? <img src={window.PS_ING_IMAGES[t]} alt="" draggable={false} style={{ width: '100%', height: '100%', objectFit: 'cover', display: 'block' }} />
                            : <IconGlyph kind={window.ICON_CYCLE[i % window.ICON_CYCLE.length]} size={isMobile ? 20 : 26} />}
                        </span>
                        <span className="ps-tick" style={{ textAlign: 'center', color: 'var(--fg-2)', lineHeight: 1.3, fontSize: isMobile ? 8 : undefined }}>{t}</span>
                      </div>
                    ))}
                  </div>
                </div>
              )}
              <div style={{ position: 'absolute', inset: 0, display: 'flex', alignItems: 'center', justifyContent: 'center', perspective: 1000, zIndex: 3 }}>
                {product.img ? (
                  <div style={{ position: 'relative', height: '82%', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
                    <div aria-hidden="true" style={{ position: 'absolute', width: '68%', height: '78%', borderRadius: '50%', background: 'radial-gradient(ellipse at center, rgba(21,18,13,0.16) 0%, rgba(21,18,13,0.08) 45%, transparent 75%)' }} />
                    <div aria-hidden="true" style={{
                      position: 'absolute', width: '86%', height: '92%', borderRadius: '50%', pointerEvents: 'none',
                      background: 'radial-gradient(ellipse at center, rgba(201,168,106,0.32) 0%, rgba(201,168,106,0.12) 48%, transparent 74%)',
                      opacity: hit * 0.55, transition: 'opacity 120ms linear',
                    }} />
                    <img src={product.img} alt={product.name} draggable={false} style={{
                      position: 'relative', height: '100%', objectFit: 'contain', pointerEvents: 'none',
                      transform: `scale(${1 + hit * 0.022}) rotate(${rotateY}deg)`,
                      filter: `drop-shadow(0 30px 40px rgba(0,0,0,0.5)) drop-shadow(0 0 ${8 + hit * 22}px rgba(201,168,106,${hit * 0.42})) brightness(${1 + hit * 0.06})`,
                      transition: 'transform 140ms linear, filter 140ms linear',
                    }} />
                    <div aria-hidden="true" style={{
                      position: 'absolute', top: 0, bottom: 0, left: `calc(50% + ${shine}px)`, width: 28,
                      background: 'linear-gradient(90deg, transparent, var(--bone-100), transparent)',
                      opacity: 0.1 + hit * 0.12, mixBlendMode: 'overlay', pointerEvents: 'none', transform: 'translateX(-50%)',
                    }} />
                    <div aria-hidden="true" style={{
                      position: 'absolute', bottom: -14, left: '50%', width: 90, height: 16, borderRadius: '50%',
                      background: 'rgba(0,0,0,0.16)', transform: `translateX(-50%) scaleX(${shadowScale})`, filter: 'blur(3px)',
                    }} />
                  </div>
                ) : (
                  <div style={{ position: 'relative', width: 140, height: 200 }}>
                    <CornerMarks inset={6} />
                    <span className="ps-tick" style={{ position: 'absolute', top: '50%', left: '50%', transform: 'translate(-50%,-50%)', color: 'var(--fg-faint)' }}>HAMAROSAN</span>
                  </div>
                )}
              </div>
            </div>
            <h3 className="ps-h2" style={{ margin: '22px 0 10px' }}>{product.name}</h3>
            <p className="ps-body" style={{ margin: '0 0 4px', color: 'var(--fg-2)' }}>{product.role}</p>
            {!isMobile && (
              <button onClick={() => { const el = outerRef.current; if (el) window.scrollTo({ top: el.offsetTop + el.offsetHeight - window.innerHeight + 40, behavior: 'smooth' }); }}
                className="ps-tick" style={{ position: 'absolute', right: 0, bottom: -6, background: 'transparent', border: 'none', cursor: 'pointer', color: 'var(--fg-faint)', letterSpacing: '0.16em' }}>ÁTLÉPÉS ↓</button>
            )}
          </div>
        </div>
      </div>
    </div>
  );
}

function FeaturedStage({ products, activeId, onSelect }) {
  const stageRef = useRef();
  const [open, setOpen] = useState(false);
  const active = products.find((p) => p.id === activeId) || products[0];
  useEffect(() => { setOpen(false); }, [activeId]);
  const closeAndScroll = () => {
    setOpen(false);
    setTimeout(() => {
      const el = document.getElementById('products');
      if (el) window.scrollTo({ top: el.getBoundingClientRect().top + window.scrollY - 8, behavior: 'smooth' });
    }, 0);
  };
  return (
    <div>
      <ScrollBottleStage key={active.id} product={active} extra={500} outerRef={stageRef} />
      <div style={{ textAlign: 'center', marginTop: 'var(--sp-6)' }}>
        <button onClick={() => setOpen((o) => { const n = !o; if (!n) { setTimeout(() => { const el = document.getElementById('products'); if (el) window.scrollTo({ top: el.getBoundingClientRect().top + window.scrollY - 8, behavior: 'smooth' }); }, 0); } return n; })} className={`ps-details-cta ${open ? 'open' : ''}`}>
          {open ? 'Bezárás' : 'Nézd meg részletesen'}
        </button>
      </div>
      <Drawer open={open}>
        <ProductDetails product={active} />
        <div style={{ textAlign: 'center', padding: 'var(--sp-6) var(--gutter)', background: 'var(--bg-deep)' }}>
          <button onClick={closeAndScroll} className="ps-details-cta open">Bezárás</button>
        </div>
      </Drawer>
      <ProductStrip activeId={active.id} onPick={(id) => { onSelect(id); const el = document.getElementById('products'); if (el) window.scrollTo({ top: el.getBoundingClientRect().top + window.scrollY - 8, behavior: 'smooth' }); setTimeout(() => setOpen(true), 30); }} />
    </div>
  );
}

function ProductStrip({ activeId, onPick }) {
  const all = (window.AZ_ALAP_ORDER || []).concat(window.A_CELZAS_ORDER || []).map((id) => window.PS_PRODUCTS[id]).filter(Boolean);
  return (
    <div style={{ marginTop: 'var(--sp-8)', paddingTop: 'var(--sp-7)', borderTop: '1px solid var(--line)' }}>
      <div className="ps-tick" style={{ textAlign: 'center', color: 'var(--fg-3)', marginBottom: 'var(--sp-6)' }}>A TELJES TERMÉKCSALÁD — VÁLASSZ EGYET</div>
      <div className="ps-strip">
        {all.map((p) => (
          <button key={p.id} className={'ps-strip-item' + (p.id === activeId ? ' on' : '')} disabled={p.soon}
            onClick={() => !p.soon && onPick(p.id)}>
            <span className="ps-strip-shot">{p.img ? <img src={p.img} alt={p.name} /> : <span className="ps-tick" style={{ color: 'var(--fg-faint)' }}>HAMAROSAN</span>}</span>
            <span className="ps-strip-bar" style={{ background: p.sig || 'var(--accent)' }} />
            <span className="ps-strip-name">{p.name}</span>
            <span className="ps-strip-cta">{p.soon ? 'HAMAROSAN' : p.id === activeId ? 'RÉSZLETEK ↓' : 'MEGNÉZEM'}</span>
          </button>
        ))}
      </div>
    </div>
  );
}

function BottleRow({ products, onSelect }) {
  return (
    <div style={{ display: 'flex', alignItems: 'flex-end', justifyContent: 'center', gap: 'clamp(24px,4vw,56px)', flexWrap: 'wrap', padding: 'var(--sp-7) 0' }}>
      {products.map((p, i) => {
        const h = p.soon ? 96 : (i % 2 === 0 ? 190 : 148);
        return (
          <button key={p.id} onClick={() => !p.soon && onSelect(p.id)} disabled={p.soon} style={{
            background: 'transparent', border: 'none', cursor: p.soon ? 'default' : 'pointer', padding: 0,
            display: 'flex', flexDirection: 'column', alignItems: 'center', gap: 12, opacity: p.soon ? 0.45 : 1,
            transition: 'transform var(--dur-fast) var(--ease)',
          }} onMouseEnter={(e) => { if (!p.soon) e.currentTarget.style.transform = 'translateY(-5px)'; }} onMouseLeave={(e) => { e.currentTarget.style.transform = 'none'; }}>
            <div style={{ height: h, display: 'flex', alignItems: 'flex-end' }}>
              {p.img ? <img src={p.img} alt={p.name} style={{ height: '100%', objectFit: 'contain', filter: 'drop-shadow(0 14px 18px rgba(0,0,0,0.18))' }} />
                : <span className="ps-tick" style={{ color: 'var(--fg-faint)' }}>HAMAROSAN</span>}
            </div>
            <span className="ps-tick" style={{ color: 'var(--fg-3)' }}>{p.name}</span>
          </button>
        );
      })}
    </div>
  );
}

function CircleBrowser({ groups, activeGroup, onGroupChange, onSelect }) {
  const [angleOffset, setAngleOffset] = useState(0);
  const [paused, setPaused] = useState(false);
  const [hoverId, setHoverId] = useState(null);
  const [tappedId, setTappedId] = useState(null);
  const isMobile = useIsMobile();
  const touchX = useRef(null);
  useEffect(() => {
    const reduce = window.matchMedia && window.matchMedia('(prefers-reduced-motion: reduce)').matches;
    if (reduce || paused || isMobile) return;
    let raf; let last = performance.now();
    const tick = (t) => {
      const dt = t - last; last = t;
      setAngleOffset((a) => a - dt * 0.00006 * (activeGroup === 'celzott' ? -1 : 1));
      raf = requestAnimationFrame(tick);
    };
    raf = requestAnimationFrame(tick);
    return () => cancelAnimationFrame(raf);
  }, [paused, activeGroup, isMobile]);
  const toggleGroup = () => {
    const idx = groups.findIndex((g) => g.key === activeGroup);
    onGroupChange(groups[(idx + 1) % groups.length].key);
  };
  const onTouchStart = (e) => { touchX.current = e.touches[0].clientX; };
  const onTouchEnd = (e) => {
    if (touchX.current == null) return;
    const dx = e.changedTouches[0].clientX - touchX.current;
    if (Math.abs(dx) > 60) toggleGroup();
    touchX.current = null;
  };
  return (
    <div>
      {isMobile && (
        <div style={{ display: 'flex', justifyContent: 'center', marginBottom: 'var(--sp-5)' }}>
          <button onClick={toggleGroup} style={{ background: 'rgba(21,18,13,0.5)', border: '1px solid var(--line-gold)', cursor: 'pointer', padding: '10px 16px', display: 'flex', alignItems: 'center', gap: 10 }}>
            {groups.map((g, i) => (
              <React.Fragment key={g.key}>
                {i > 0 && <span className="ps-tick" style={{ color: 'rgba(243,236,218,0.4)' }}>/</span>}
                <span className="ps-tick" style={{
                  fontSize: g.key === activeGroup ? 13 : 11, letterSpacing: '0.1em',
                  color: g.key === activeGroup ? 'var(--accent)' : 'rgba(243,236,218,0.5)',
                  fontWeight: g.key === activeGroup ? 700 : 500,
                }}>{g.label}</span>
              </React.Fragment>
            ))}
          </button>
        </div>
      )}
      <div
        onMouseEnter={() => setPaused(true)} onMouseLeave={() => { setPaused(false); setHoverId(null); }}
        onTouchStart={onTouchStart} onTouchEnd={onTouchEnd}
        style={{ position: 'relative', width: '100%', maxWidth: 760, aspectRatio: '1 / 1', margin: '0 auto', touchAction: 'pan-y' }}>
        {!isMobile && (
          <div style={{
            position: 'absolute', top: '50%', left: '50%', transform: 'translate(-50%,-50%)', zIndex: 5,
            display: 'flex', flexDirection: 'column', alignItems: 'center', gap: 10, textAlign: 'center',
          }}>
            <button onClick={toggleGroup} style={{ background: 'transparent', border: 'none', cursor: 'pointer', padding: '10px 14px', display: 'flex', alignItems: 'center', gap: 12 }}>
              {groups.map((g, i) => (
                <React.Fragment key={g.key}>
                  {i > 0 && <span className="ps-tick" style={{ color: 'rgba(243,236,218,0.4)' }}>/</span>}
                  <span className="ps-tick" style={{
                    fontSize: g.key === activeGroup ? 20 : 15, letterSpacing: '0.14em',
                    color: g.key === activeGroup ? 'var(--accent)' : 'rgba(243,236,218,0.55)',
                    borderBottom: g.key === activeGroup ? '1px solid var(--line-gold)' : 'none', paddingBottom: 6,
                    fontWeight: g.key === activeGroup ? 700 : 500,
                  }}>{g.label}</span>
                </React.Fragment>
              ))}
            </button>
            <span className="ps-small" style={{ color: 'rgba(243,236,218,0.65)', fontSize: 14, letterSpacing: '0.08em', pointerEvents: 'none' }}>kattints a váltáshoz</span>
          </div>
        )}
        {isMobile && (
          <span className="ps-small" style={{ position: 'absolute', top: '50%', left: '50%', transform: 'translate(-50%,-50%)', color: 'rgba(243,236,218,0.5)', fontSize: 10, letterSpacing: '0.08em', pointerEvents: 'none', whiteSpace: 'nowrap' }}>húzd oldalra</span>
        )}
        {groups.map((g) => {
          const isActive = g.key === activeGroup;
          const n = g.products.length || 1;
          const radius = isMobile
            ? (isActive ? 'clamp(104px, 30vw, 140px)' : 'clamp(58px, 17vw, 88px)')
            : (isActive ? 'clamp(180px, 32vw, 330px)' : 'clamp(120px, 22vw, 220px)');
          return (
            <div key={g.key} aria-hidden={!isActive} style={{
              position: 'absolute', inset: 0, transition: 'opacity 600ms var(--ease-out), transform 600ms var(--ease-out), filter 600ms var(--ease-out)',
              opacity: isActive ? 1 : 0.24, filter: isActive ? 'none' : 'blur(1.5px)',
              transform: isActive ? 'scale(1)' : 'scale(0.86)', zIndex: isActive ? 2 : 1, pointerEvents: isActive ? 'auto' : 'none',
            }}>
              {g.products.map((p, i) => {
                const angle = (i / n) * Math.PI * 2 - Math.PI / 2 + (isActive ? angleOffset : 0);
                const size = isMobile ? (isActive ? 62 : 40) : (isActive ? 132 : 84);
                const glow = isActive && (hoverId === p.id || tappedId === p.id);
                return (
                  <button key={p.id} onClick={(e) => { e.stopPropagation(); if (isActive && !p.soon) { setTappedId(p.id); onSelect(p.id); } }} disabled={!isActive || p.soon}
                    onMouseEnter={() => { if (isActive) setHoverId(p.id); }}
                    onMouseLeave={() => setHoverId(null)}
                    style={{
                    position: 'absolute', top: '50%', left: '50%',
                    transform: `translate(-50%,-50%) translate(calc(cos(${angle}rad) * ${radius}), calc(sin(${angle}rad) * ${radius}))`,
                    background: 'transparent', border: 'none', cursor: isActive && !p.soon ? 'pointer' : 'default', padding: 0,
                    display: 'flex', flexDirection: 'column', alignItems: 'center', gap: isMobile ? 4 : 10, width: isMobile ? 80 : size + 20,
                  }}>
                    <span style={{
                      width: size, height: size, borderRadius: '50%', border: `1px solid ${glow ? 'var(--accent)' : (isActive ? 'var(--line-strong)' : 'var(--line)')}`,
                      background: 'var(--bg-raised)', display: 'flex', alignItems: 'center', justifyContent: 'center', overflow: 'hidden',
                      boxShadow: glow ? '0 0 0 6px rgba(201,168,106,0.16), 0 0 30px rgba(201,168,106,0.45)' : 'none',
                      transform: glow ? 'scale(1.06)' : 'scale(1)', transition: 'box-shadow 320ms var(--ease-out), border-color 320ms var(--ease-out), transform 320ms var(--ease-out)',
                    }}>
                      {p.img ? <img src={p.img} alt={p.name} style={{ height: '80%', objectFit: 'contain' }} /> : <span className="ps-tick" style={{ color: 'var(--fg-faint)', fontSize: 10 }}>SOON</span>}
                    </span>
                    {isActive && <span className="ps-tick" style={{ color: glow ? 'var(--accent)' : 'rgba(243,236,218,0.85)', textAlign: 'center', fontSize: isMobile ? 8 : undefined, lineHeight: 1.2 }}>{p.name}</span>}
                    {isActive && p.base && <span className="ps-tick" style={{ color: 'var(--accent)', fontSize: 9, letterSpacing: '0.2em', opacity: 0.9 }}>AZ ALAP</span>}
                  </button>
                );
              })}
            </div>
          );
        })}
      </div>
    </div>
  );
}

Object.assign(window, { DetailsPanel, Drawer, ScrollBottleStage, FeaturedStage, BottleRow, CircleBrowser, ProductStrip });
