// shopify-mockups.jsx — Shopify Store variant

// PHASE 01 — DISCOVER: product catalog brief + moodboard
function ShopDiscoverMockup({ progress = 1 }) {
  const swatches = [
    { c: '#d4a574', l: 'Amber 01' },
    { c: '#c8b89a', l: 'Sand 02' },
    { c: '#8a7256', l: 'Bark 03' },
    { c: '#6fa37a', l: 'Moss 04' },
    { c: '#2a1f18', l: 'Ink 05' },
  ];
  return (
    <div style={{
      width: '100%', height: '100%',
      background: '#f3ede0',
      position: 'relative', padding: 32, boxSizing: 'border-box',
      fontFamily: DH.body,
    }}>
      <div style={{
        fontFamily: DH.mono, fontSize: 11, letterSpacing: '0.14em',
        color: DH.moss600, textTransform: 'uppercase', marginBottom: 18,
      }}>
        BRAND MOODBOARD · fragrance_house
      </div>

      {/* Left: catalog brief */}
      <div style={{
        position: 'absolute', left: 32, top: 72,
        width: 260, padding: 18,
        background: '#fff', borderRadius: 6,
        boxShadow: '0 6px 18px rgba(36,69,58,0.08)',
        opacity: clamp(progress * 3, 0, 1),
        transform: `translateY(${(1 - clamp(progress * 3, 0, 1)) * 12}px)`,
      }}>
        <div style={{ fontFamily: DH.serif, fontStyle: 'italic', fontSize: 22, color: DH.ink, marginBottom: 10 }}>
          Catalog · brief
        </div>
        <div style={{ fontSize: 11, color: DH.ink, opacity: 0.75, lineHeight: 1.6 }}>
          <div>— 24 SKUs, 4 ranges</div>
          <div>— Editorial product copy</div>
          <div>— Subscription + one-time</div>
          <div>— Lookbook hero</div>
          <div>— Ingredient stories</div>
        </div>
      </div>

      {/* Moodboard images */}
      {[
        { x: 320, y: 72, w: 180, h: 220, rot: -1.5, d: 0.1 },
        { x: 520, y: 92, w: 160, h: 200, rot: 2, d: 0.25 },
        { x: 700, y: 62, w: 200, h: 240, rot: -1, d: 0.4 },
      ].map((im, i) => {
        const p = clamp((progress - im.d) * 3, 0, 1);
        return (
          <div key={i} style={{
            position: 'absolute', left: im.x, top: im.y,
            width: im.w, height: im.h,
            transform: `rotate(${im.rot}deg) scale(${0.85 + 0.15 * p})`,
            opacity: p,
            boxShadow: '0 10px 24px rgba(36,69,58,0.15)',
          }}>
            <div style={{
              width: '100%', height: '100%',
              background: i === 0 ? 'linear-gradient(140deg, #e8d4b4, #c7a176)'
                : i === 1 ? 'linear-gradient(160deg, #d9c7a8, #a38760)'
                : 'linear-gradient(130deg, #f0e4cf, #b89668)',
              borderRadius: 3,
              position: 'relative',
            }}>
              {/* simple hint shapes */}
              {i === 1 && (
                <div style={{ position: 'absolute', left: '30%', top: '30%', width: '40%', height: '55%',
                  background: '#2a1f18', borderRadius: '50% 50% 35% 35%', opacity: 0.85 }}/>
              )}
              {i === 2 && (
                <>
                  <div style={{ position: 'absolute', inset: '20% 20% 30% 20%', background: 'rgba(42,31,24,0.2)', borderRadius: 4 }}/>
                  <div style={{ position: 'absolute', left: '30%', top: '45%', width: '40%', height: '35%',
                    background: '#fcf7ec', borderRadius: 2 }}/>
                </>
              )}
            </div>
          </div>
        );
      })}

      {/* Color swatches row */}
      <div style={{
        position: 'absolute', left: 32, bottom: 32,
        display: 'flex', gap: 10,
        opacity: clamp((progress - 0.5) * 3, 0, 1),
        transform: `translateY(${(1 - clamp((progress - 0.5) * 3, 0, 1)) * 10}px)`,
      }}>
        {swatches.map((s, i) => (
          <div key={i}>
            <div style={{ width: 64, height: 64, background: s.c, borderRadius: 4, boxShadow: '0 4px 10px rgba(0,0,0,0.08)' }}/>
            <div style={{ marginTop: 6, fontFamily: DH.mono, fontSize: 9, color: DH.ink, opacity: 0.6, letterSpacing: '0.06em' }}>
              {s.l}
            </div>
          </div>
        ))}
      </div>

      {/* Texture notes */}
      <div style={{
        position: 'absolute', right: 32, bottom: 32,
        width: 240, padding: 16,
        background: 'rgba(255,252,245,0.85)', borderRadius: 6,
        border: `1px solid ${DH.rule}`,
        opacity: clamp((progress - 0.4) * 3, 0, 1),
      }}>
        <div style={{ fontFamily: DH.mono, fontSize: 9, color: DH.moss600, letterSpacing: '0.12em', marginBottom: 6 }}>
          VOICE
        </div>
        <div style={{ fontFamily: DH.serif, fontStyle: 'italic', fontSize: 16, color: DH.ink, lineHeight: 1.35 }}>
          Quiet luxury. Letterforms that breathe. Editorial over salesy.
        </div>
      </div>
    </div>
  );
}

// PHASE 02 — DESIGN: Shopify theme editor
function ShopDesignMockup({ progress = 1 }) {
  return (
    <div style={{ width: '100%', height: '100%', background: '#fafaf8', fontFamily: DH.body, display: 'flex', flexDirection: 'column' }}>
      {/* Shopify top bar */}
      <div style={{
        height: 38, background: '#fafaf8', borderBottom: `1px solid ${DH.rule}`,
        display: 'flex', alignItems: 'center', padding: '0 16px', gap: 14,
        fontSize: 12,
      }}>
        <div style={{ width: 18, height: 18, borderRadius: 4, background: DH.moss600,
          display: 'flex', alignItems: 'center', justifyContent: 'center', color: '#fff', fontWeight: 700, fontSize: 10 }}>S</div>
        <div style={{ color: DH.ink, opacity: 0.7 }}>fragrance-house · Theme editor</div>
        <div style={{ marginLeft: 'auto', display: 'flex', gap: 10 }}>
          <div style={{ padding: '4px 10px', border: `1px solid ${DH.rule}`, borderRadius: 4, fontSize: 11 }}>Preview</div>
          <div style={{ padding: '4px 10px', background: DH.moss600, color: '#fff', borderRadius: 4, fontSize: 11 }}>Save</div>
        </div>
      </div>

      <div style={{ display: 'flex', flex: 1 }}>
        {/* Left panel: sections */}
        <div style={{
          width: 200, background: '#fff',
          borderRight: `1px solid ${DH.rule}`, padding: 14, fontSize: 11,
        }}>
          <div style={{ fontFamily: DH.mono, fontSize: 9, color: DH.moss600, letterSpacing: '0.12em', marginBottom: 10 }}>
            SECTIONS
          </div>
          {['Header', 'Hero — lookbook', 'Featured collection', 'Ingredient story', 'Press quotes', 'Footer'].map((s, i) => {
            const active = i === 1;
            const p = clamp(progress * 5 - i * 0.4, 0, 1);
            return (
              <div key={i} style={{
                padding: '7px 10px',
                background: active ? DH.bg : 'transparent',
                color: DH.ink,
                borderLeft: active ? `2px solid ${DH.moss600}` : '2px solid transparent',
                borderRadius: 3, marginBottom: 2,
                opacity: p,
                transform: `translateX(${(1 - p) * -10}px)`,
                fontSize: 11,
              }}>
                {s}
              </div>
            );
          })}
        </div>

        {/* Preview */}
        <div style={{ flex: 1, background: '#f2ede3', padding: 24, display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
          <div style={{
            width: '94%', height: '92%',
            background: '#fcf7ec', borderRadius: 4,
            boxShadow: '0 20px 50px rgba(36,69,58,0.12)',
            display: 'flex', flexDirection: 'column',
            overflow: 'hidden',
          }}>
            {/* Site header */}
            <div style={{ padding: '14px 24px', display: 'flex', alignItems: 'center', gap: 16, fontSize: 10, borderBottom: '1px solid rgba(42,31,24,0.08)' }}>
              <div style={{ fontFamily: DH.serif, fontStyle: 'italic', fontSize: 16, color: '#2a1f18' }}>maison</div>
              <div style={{ marginLeft: 'auto', display: 'flex', gap: 14, color: '#2a1f18', opacity: 0.7 }}>
                <span>Shop</span><span>Lookbook</span><span>Story</span>
              </div>
            </div>
            {/* Hero */}
            <div style={{ flex: 1, display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 0 }}>
              <div style={{ background: 'linear-gradient(145deg, #f0e4cf, #c9a878)', position: 'relative' }}>
                <div style={{ position: 'absolute', left: '50%', top: '50%', transform: 'translate(-50%,-50%)',
                  width: 100, height: 140, background: '#fcf7ec', borderRadius: 2,
                  boxShadow: '0 14px 32px rgba(42,31,24,0.2)' }}>
                  <div style={{ position: 'absolute', left: '50%', top: 14, transform: 'translateX(-50%)',
                    fontFamily: DH.serif, fontStyle: 'italic', fontSize: 12, color: '#6a4a28' }}>No. 04</div>
                </div>
              </div>
              <div style={{ padding: 24, display: 'flex', flexDirection: 'column', justifyContent: 'center', background: '#fcf7ec' }}>
                <div style={{ fontFamily: DH.mono, fontSize: 8, color: '#8a7256', letterSpacing: '0.18em', marginBottom: 10 }}>NEW · ATELIER EDITION</div>
                <div style={{ fontFamily: DH.serif, fontStyle: 'italic', fontSize: 32, color: '#2a1f18', lineHeight: 1.05 }}>
                  Amber<br/>Woodsmoke
                </div>
                <div style={{ fontSize: 10, color: '#5a4630', marginTop: 10, maxWidth: 180, lineHeight: 1.5 }}>
                  An editorial fragrance for the hours you don't explain.
                </div>
                <div style={{ marginTop: 14 }}>
                  <span style={{ background: '#2a1f18', color: '#fcf7ec', padding: '8px 16px', fontSize: 10, fontFamily: DH.body, letterSpacing: '0.08em' }}>
                    SHOP · €120
                  </span>
                </div>
              </div>
            </div>
          </div>
        </div>

        {/* Right inspector */}
        <div style={{ width: 180, background: '#fff', borderLeft: `1px solid ${DH.rule}`, padding: 14, fontSize: 11 }}>
          <div style={{ fontFamily: DH.mono, fontSize: 9, color: DH.moss600, letterSpacing: '0.12em', marginBottom: 10 }}>INSPECTOR</div>
          {[
            ['Layout', 'Split · 50/50'],
            ['Image', 'hero-04.jpg'],
            ['Heading font', 'Instrument Serif'],
            ['Eyebrow', 'NEW · ATELIER'],
          ].map(([k, v], i) => {
            const p = clamp(progress * 5 - i * 0.3, 0, 1);
            return (
              <div key={i} style={{ marginBottom: 8, opacity: p }}>
                <div style={{ fontSize: 9, color: DH.ink, opacity: 0.55, marginBottom: 3 }}>{k}</div>
                <div style={{
                  padding: '5px 8px', background: '#fafaf6', border: `1px solid ${DH.rule}`,
                  borderRadius: 3, fontSize: 10,
                }}>{v}</div>
              </div>
            );
          })}
        </div>
      </div>
    </div>
  );
}

// PHASE 03 — BUILD: Shopify admin, products importing
function ShopBuildMockup({ progress = 1 }) {
  const products = [
    { name: 'Amber Woodsmoke · EDP 50ml', price: '€120', inv: 240, state: 'ready' },
    { name: 'Green Fig · EDT 30ml', price: '€78', inv: 180, state: 'ready' },
    { name: 'Iris Oud · EDP 100ml', price: '€210', inv: 96, state: 'importing' },
    { name: 'Moss & Salt · Candle 220g', price: '€54', inv: 320, state: 'ready' },
    { name: 'Neroli Blanc · EDT 50ml', price: '€98', inv: 0, state: 'importing' },
    { name: 'Sandalwood · Travel 10ml', price: '€28', inv: 840, state: 'ready' },
  ];
  return (
    <div style={{ width: '100%', height: '100%', background: '#fafaf8', display: 'flex', fontFamily: DH.body, fontSize: 11 }}>
      {/* Sidebar */}
      <div style={{ width: 180, background: '#fcfaf4', borderRight: `1px solid ${DH.rule}`, padding: 14 }}>
        <div style={{ display: 'flex', alignItems: 'center', gap: 8, marginBottom: 16 }}>
          <div style={{ width: 20, height: 20, borderRadius: 4, background: DH.moss600, color: '#fff',
            display: 'flex', alignItems: 'center', justifyContent: 'center', fontWeight: 700, fontSize: 10 }}>S</div>
          <div style={{ fontWeight: 600, fontSize: 12, color: DH.ink }}>Admin</div>
        </div>
        {['Home', 'Orders', 'Products', 'Customers', 'Content', 'Analytics', 'Marketing'].map((n, i) => {
          const active = n === 'Products';
          return (
            <div key={i} style={{
              padding: '6px 10px', fontSize: 11,
              background: active ? DH.bg : 'transparent',
              color: DH.ink,
              fontWeight: active ? 500 : 400,
              borderRadius: 3, marginBottom: 1,
            }}>{n}</div>
          );
        })}
      </div>

      {/* Main */}
      <div style={{ flex: 1, padding: 24 }}>
        <div style={{ display: 'flex', alignItems: 'center', marginBottom: 16 }}>
          <div style={{ fontFamily: DH.display, fontWeight: 600, fontSize: 20, color: DH.ink }}>Products</div>
          <div style={{ marginLeft: 'auto', display: 'flex', gap: 8 }}>
            <div style={{ padding: '6px 12px', border: `1px solid ${DH.rule}`, borderRadius: 4, fontSize: 11 }}>Import CSV</div>
            <div style={{ padding: '6px 12px', background: DH.moss600, color: '#fff', borderRadius: 4, fontSize: 11 }}>+ Add product</div>
          </div>
        </div>

        {/* Import progress bar */}
        <div style={{
          background: '#fff', border: `1px solid ${DH.rule}`, borderRadius: 4, padding: 12,
          display: 'flex', alignItems: 'center', gap: 12, marginBottom: 14,
          opacity: clamp(progress * 3, 0, 1),
        }}>
          <div style={{ width: 22, height: 22, borderRadius: 4, background: DH.bg,
            display: 'flex', alignItems: 'center', justifyContent: 'center',
            fontSize: 11, color: DH.moss600 }}>↻</div>
          <div style={{ flex: 1 }}>
            <div style={{ fontSize: 11, color: DH.ink, marginBottom: 4 }}>
              Importing products · {Math.floor(progress * 24)}/24
            </div>
            <div style={{ height: 4, background: '#f0ede5', borderRadius: 2, overflow: 'hidden' }}>
              <div style={{ height: '100%', width: `${progress * 100}%`, background: DH.moss500, borderRadius: 2 }}/>
            </div>
          </div>
          <div style={{ fontFamily: DH.mono, fontSize: 10, color: DH.moss600 }}>
            {Math.floor(progress * 100)}%
          </div>
        </div>

        {/* Table */}
        <div style={{ background: '#fff', border: `1px solid ${DH.rule}`, borderRadius: 4 }}>
          <div style={{
            padding: '10px 14px', display: 'grid', gridTemplateColumns: '40px 2fr 1fr 1fr 90px',
            gap: 12, borderBottom: `1px solid ${DH.rule}`, fontSize: 10,
            color: DH.ink, opacity: 0.55, letterSpacing: '0.04em', textTransform: 'uppercase',
            fontFamily: DH.mono,
          }}>
            <div></div>
            <div>Product</div>
            <div>Price</div>
            <div>Inventory</div>
            <div>Status</div>
          </div>
          {products.map((p, i) => {
            const pr = clamp(progress * 3 - i * 0.25, 0, 1);
            return (
              <div key={i} style={{
                padding: '11px 14px', display: 'grid', gridTemplateColumns: '40px 2fr 1fr 1fr 90px',
                gap: 12, borderBottom: i === products.length - 1 ? 'none' : `1px solid ${DH.rule}`,
                alignItems: 'center', fontSize: 11,
                opacity: pr, transform: `translateY(${(1 - pr) * 6}px)`,
              }}>
                <div style={{ width: 30, height: 30, borderRadius: 3,
                  background: `linear-gradient(135deg, ${['#d4a574','#8fa880','#c8b89a','#6fa37a','#f0e4cf','#a38760'][i]}, #2a1f18)` }}/>
                <div style={{ color: DH.ink }}>{p.name}</div>
                <div style={{ color: DH.ink, fontFamily: DH.mono }}>{p.price}</div>
                <div style={{ color: DH.ink, fontFamily: DH.mono }}>{p.inv}</div>
                <div>
                  {p.state === 'ready' ? (
                    <span style={{ padding: '3px 8px', background: 'rgba(111,163,122,0.15)', color: DH.moss600, borderRadius: 10, fontSize: 9, fontFamily: DH.mono, letterSpacing: '0.06em' }}>● LIVE</span>
                  ) : (
                    <span style={{ padding: '3px 8px', background: 'rgba(205,138,75,0.15)', color: DH.amber, borderRadius: 10, fontSize: 9, fontFamily: DH.mono, letterSpacing: '0.06em' }}>◐ SYNCING</span>
                  )}
                </div>
              </div>
            );
          })}
        </div>
      </div>
    </div>
  );
}

// PHASE 04 — LAUNCH: live storefront, lookbook hero + product grid
function ShopLaunchMockup({ progress = 1 }) {
  const time = useTime();
  return (
    <div style={{ width: '100%', height: '100%', background: '#fcf7ec', position: 'relative', fontFamily: DH.body, overflow: 'hidden' }}>
      {/* Announcement */}
      <div style={{
        background: '#2a1f18', color: '#fcf7ec', textAlign: 'center',
        padding: '7px 0', fontSize: 10, fontFamily: DH.mono, letterSpacing: '0.16em',
      }}>
        COMPLIMENTARY EU SHIPPING · ORDERS €80+
      </div>
      {/* Nav */}
      <div style={{ padding: '18px 36px', display: 'flex', alignItems: 'center', gap: 18 }}>
        <div style={{ fontFamily: DH.serif, fontStyle: 'italic', fontSize: 28, color: '#2a1f18' }}>maison</div>
        <div style={{ marginLeft: 40, display: 'flex', gap: 22, fontSize: 11, color: '#2a1f18', textTransform: 'uppercase', letterSpacing: '0.12em' }}>
          <span>Shop</span><span>Lookbook</span><span>Atelier</span><span>Story</span>
        </div>
        <div style={{ marginLeft: 'auto', display: 'flex', gap: 14, fontSize: 12, color: '#2a1f18' }}>
          <span>Search</span><span>Account</span><span>Bag · 2</span>
        </div>
      </div>

      {/* Lookbook hero */}
      <div style={{
        margin: '6px 36px 0',
        height: 340,
        background: 'linear-gradient(135deg, #e8d4b4 0%, #c8a176 50%, #8a6a42 100%)',
        borderRadius: 3, position: 'relative', overflow: 'hidden',
      }}>
        {/* Model placeholder silhouette */}
        <div style={{ position: 'absolute', right: '15%', bottom: 0, width: 220, height: 320,
          background: 'linear-gradient(180deg, rgba(42,31,24,0.15), rgba(42,31,24,0.55))',
          borderRadius: '50% 50% 10% 10% / 30% 30% 10% 10%' }}/>
        {/* Product bottle */}
        <div style={{ position: 'absolute', left: '22%', top: '24%',
          width: 100, height: 170, background: 'rgba(252,247,236,0.92)',
          boxShadow: '0 16px 40px rgba(42,31,24,0.25)' }}>
          <div style={{ position: 'absolute', left: '50%', top: 18, transform: 'translateX(-50%)',
            fontFamily: DH.serif, fontStyle: 'italic', fontSize: 14, color: '#6a4a28' }}>No. 04</div>
          <div style={{ position: 'absolute', left: '50%', bottom: 18, transform: 'translateX(-50%)',
            fontFamily: DH.mono, fontSize: 7, color: '#6a4a28', letterSpacing: '0.15em' }}>50 ML</div>
        </div>
        {/* Text */}
        <div style={{ position: 'absolute', left: 36, bottom: 30, color: '#fcf7ec' }}>
          <div style={{ fontFamily: DH.mono, fontSize: 10, letterSpacing: '0.2em', marginBottom: 8 }}>
            ATELIER · SS26
          </div>
          <div style={{ fontFamily: DH.serif, fontStyle: 'italic', fontSize: 42, lineHeight: 1.0 }}>
            Amber,<br/>carried<br/>by smoke.
          </div>
        </div>

        {/* Shipped badge */}
        {progress > 0.2 && (
          <div style={{ position: 'absolute', top: 18, right: 18,
            display: 'flex', alignItems: 'center', gap: 6,
            fontFamily: DH.mono, fontSize: 10, color: '#fcf7ec', letterSpacing: '0.14em',
            opacity: clamp((progress - 0.2) * 3, 0, 1),
          }}>
            <span style={{ width: 8, height: 8, borderRadius: 4, background: '#fcf7ec',
              boxShadow: `0 0 ${8 + Math.sin(time * 6) * 4}px #fcf7ec` }}/>
            SHIPPED
          </div>
        )}
      </div>

      {/* Product grid */}
      <div style={{ margin: '24px 36px 0', display: 'grid', gridTemplateColumns: 'repeat(4, 1fr)', gap: 18 }}>
        {[
          { name: 'Green Fig', price: '€78', hue: '#8fa880' },
          { name: 'Iris Oud', price: '€210', hue: '#9a8fb5' },
          { name: 'Moss & Salt', price: '€54', hue: '#6fa37a' },
          { name: 'Neroli Blanc', price: '€98', hue: '#e8d4b4' },
        ].map((p, i) => {
          const pr = clamp(progress * 3 - i * 0.2, 0, 1);
          return (
            <div key={i} style={{ opacity: pr, transform: `translateY(${(1 - pr) * 14}px)` }}>
              <div style={{ aspectRatio: '3 / 4', background: `linear-gradient(160deg, ${p.hue}, ${p.hue}bb, #2a1f18 150%)`, borderRadius: 2, position: 'relative' }}>
                <div style={{ position: 'absolute', left: '50%', top: '50%', transform: 'translate(-50%,-50%)',
                  width: 48, height: 80, background: '#fcf7ec', boxShadow: '0 6px 14px rgba(42,31,24,0.2)' }}/>
              </div>
              <div style={{ marginTop: 10, display: 'flex', justifyContent: 'space-between', fontSize: 11, color: '#2a1f18' }}>
                <span style={{ fontFamily: DH.serif, fontStyle: 'italic', fontSize: 15 }}>{p.name}</span>
                <span style={{ fontFamily: DH.mono, opacity: 0.65 }}>{p.price}</span>
              </div>
            </div>
          );
        })}
      </div>
    </div>
  );
}

// PHASE 05 — OPTIMIZE: Shopify analytics
function ShopOptimizeMockup({ progress = 1 }) {
  const bars = [34, 48, 40, 62, 55, 78, 68, 88, 72, 95, 82, 110];
  return (
    <div style={{ width: '100%', height: '100%', background: '#fff', padding: 24, boxSizing: 'border-box', fontFamily: DH.body, position: 'relative' }}>
      <div style={{ display: 'flex', alignItems: 'center', marginBottom: 18 }}>
        <div>
          <div style={{ fontFamily: DH.mono, fontSize: 10, color: DH.moss600, letterSpacing: '0.12em', textTransform: 'uppercase' }}>
            SHOPIFY · ANALYTICS
          </div>
          <div style={{ fontFamily: DH.display, fontWeight: 600, fontSize: 20, color: DH.ink, marginTop: 4 }}>
            Store overview · Last 30d
          </div>
        </div>
      </div>

      {/* KPI tiles */}
      <div style={{ display: 'grid', gridTemplateColumns: 'repeat(3, 1fr)', gap: 12, marginBottom: 18 }}>
        {[
          { l: 'Conv. rate', v: '3.4%', d: '+1.6pp', c: DH.moss600 },
          { l: 'AOV', v: '€128.40', d: '+12%', c: DH.moss600 },
          { l: 'RPV', v: '€4.37', d: '+22%', c: DH.amber },
        ].map((k, i) => {
          const p = clamp(progress * 3 - i * 0.3, 0, 1);
          return (
            <div key={i} style={{
              padding: '14px 16px', background: '#fafaf6', border: `1px solid ${DH.rule}`, borderRadius: 6,
              opacity: p, transform: `translateY(${(1 - p) * 8}px)`,
            }}>
              <div style={{ fontSize: 10, fontFamily: DH.mono, color: DH.ink, opacity: 0.6, letterSpacing: '0.1em', textTransform: 'uppercase', marginBottom: 6 }}>
                {k.l}
              </div>
              <div style={{ fontFamily: DH.display, fontWeight: 700, fontSize: 26, color: DH.ink, fontVariantNumeric: 'tabular-nums' }}>
                {k.v}
                <span style={{ fontSize: 11, color: k.c, marginLeft: 8, fontWeight: 500 }}>↑ {k.d}</span>
              </div>
            </div>
          );
        })}
      </div>

      {/* Two panels: bar chart + collection breakdown */}
      <div style={{ display: 'grid', gridTemplateColumns: '1.3fr 1fr', gap: 12, height: 'calc(100% - 180px)' }}>
        <div style={{ background: '#fafaf6', border: `1px solid ${DH.rule}`, borderRadius: 6, padding: '14px 16px' }}>
          <div style={{ fontFamily: DH.mono, fontSize: 10, color: DH.moss600, letterSpacing: '0.1em', marginBottom: 2 }}>SALES · BY DAY</div>
          <div style={{ fontFamily: DH.display, fontSize: 20, fontWeight: 700, color: DH.ink, marginBottom: 12 }}>€48,220</div>
          <div style={{ display: 'flex', alignItems: 'flex-end', gap: 6, height: 120 }}>
            {bars.map((b, i) => {
              const p = clamp(progress * 2 - i * 0.04, 0, 1);
              return (
                <div key={i} style={{ flex: 1, height: `${b * p}%`,
                  background: i === bars.length - 1 ? DH.amber : DH.moss500,
                  borderRadius: '2px 2px 0 0', opacity: 0.85 + (i === bars.length - 1 ? 0.15 : 0) }}/>
              );
            })}
          </div>
        </div>

        <div style={{ background: '#fafaf6', border: `1px solid ${DH.rule}`, borderRadius: 6, padding: '14px 16px' }}>
          <div style={{ fontFamily: DH.mono, fontSize: 10, color: DH.moss600, letterSpacing: '0.1em', marginBottom: 10 }}>CONV · BY COLLECTION</div>
          {[
            ['Amber', 92, '3.8%'],
            ['Green Fig', 74, '2.9%'],
            ['Iris Oud', 58, '2.2%'],
            ['Moss', 42, '1.6%'],
          ].map(([n, w, r], i) => {
            const p = clamp(progress * 3 - i * 0.3, 0, 1);
            return (
              <div key={i} style={{ marginBottom: 10, opacity: p }}>
                <div style={{ display: 'flex', justifyContent: 'space-between', fontSize: 11, color: DH.ink, marginBottom: 4 }}>
                  <span>{n}</span>
                  <span style={{ fontFamily: DH.mono }}>{r}</span>
                </div>
                <div style={{ height: 8, background: '#f0ede5', borderRadius: 4 }}>
                  <div style={{ width: `${w * Easing.easeOutCubic(p)}%`, height: '100%', background: i === 0 ? DH.amber : DH.moss500, borderRadius: 4 }}/>
                </div>
              </div>
            );
          })}
        </div>
      </div>
    </div>
  );
}

// A/B mockups for Shopify
function ShopABMockupA() {
  return (
    <div style={{ width: '100%', height: '100%', background: '#fcf7ec', position: 'relative', fontFamily: DH.body, overflow: 'hidden', padding: 24 }}>
      <div style={{ display: 'flex', alignItems: 'center', marginBottom: 18, fontSize: 12 }}>
        <div style={{ fontFamily: DH.serif, fontStyle: 'italic', fontSize: 22, color: '#2a1f18' }}>maison</div>
        <div style={{ marginLeft: 'auto', display: 'flex', gap: 14, color: '#2a1f18', opacity: 0.7, fontSize: 10 }}>
          <span>Shop</span><span>About</span><span>Cart · 1</span>
        </div>
      </div>
      <div style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 24, marginTop: 20 }}>
        <div style={{ height: 280, background: 'linear-gradient(145deg, #e8d4b4, #8a6a42)', borderRadius: 2 }}/>
        <div>
          <div style={{ fontFamily: DH.serif, fontStyle: 'italic', fontSize: 30, color: '#2a1f18', lineHeight: 1.0 }}>Amber Woodsmoke</div>
          <div style={{ fontFamily: DH.mono, fontSize: 11, color: '#2a1f18', opacity: 0.6, marginTop: 8 }}>€120 · 50ml</div>
          <div style={{ fontSize: 12, color: '#2a1f18', opacity: 0.75, marginTop: 16, lineHeight: 1.6 }}>
            An editorial fragrance, layered with amber and birch smoke.
          </div>
          <div style={{ marginTop: 20 }}>
            <div style={{ display: 'inline-block', padding: '12px 28px', background: '#2a1f18', color: '#fcf7ec', fontSize: 11, letterSpacing: '0.14em', textTransform: 'uppercase' }}>
              Add to cart
            </div>
          </div>
        </div>
      </div>
    </div>
  );
}

function ShopABMockupB() {
  const time = useTime();
  return (
    <div style={{ width: '100%', height: '100%', background: '#fcf7ec', position: 'relative', fontFamily: DH.body, overflow: 'hidden', padding: 24 }}>
      <div style={{ display: 'flex', alignItems: 'center', marginBottom: 18, fontSize: 12 }}>
        <div style={{ fontFamily: DH.serif, fontStyle: 'italic', fontSize: 22, color: '#2a1f18' }}>maison</div>
        <div style={{ marginLeft: 'auto', display: 'flex', gap: 14, color: '#2a1f18', opacity: 0.7, fontSize: 10 }}>
          <span>Shop</span><span>About</span><span>Cart · 1</span>
        </div>
      </div>
      <div style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 24, marginTop: 8 }}>
        <div style={{ position: 'relative' }}>
          <div style={{ height: 260, background: 'linear-gradient(145deg, #e8d4b4, #8a6a42)', borderRadius: 2 }}/>
          <div style={{ display: 'flex', gap: 6, marginTop: 8 }}>
            {[0,1,2,3].map(i => (
              <div key={i} style={{ width: 54, height: 54, background: `linear-gradient(135deg, ${['#e8d4b4','#c8b89a','#a38760','#6a4a28'][i]}, #2a1f18)`, borderRadius: 2, opacity: i === 0 ? 1 : 0.6 }}/>
            ))}
          </div>
        </div>
        <div>
          <div style={{ fontFamily: DH.mono, fontSize: 9, color: DH.moss600, letterSpacing: '0.16em', marginBottom: 8 }}>ATELIER · NEW</div>
          <div style={{ fontFamily: DH.serif, fontStyle: 'italic', fontSize: 34, color: '#2a1f18', lineHeight: 0.98 }}>
            Amber,<br/>carried by <span style={{ color: DH.moss600 }}>smoke</span>.
          </div>
          <div style={{ fontFamily: DH.mono, fontSize: 11, color: '#2a1f18', opacity: 0.7, marginTop: 10 }}>€120 · 50ml · Eau de parfum</div>
          <div style={{ marginTop: 14, padding: '10px 12px', background: 'rgba(111,163,122,0.1)', border: `1px solid ${DH.rule}`, borderRadius: 4, fontSize: 10, color: DH.moss600, fontFamily: DH.mono, letterSpacing: '0.06em' }}>
            ● IN STOCK · SHIPS IN 24H · FREE RETURNS
          </div>
          <div style={{ fontSize: 12, color: '#2a1f18', opacity: 0.75, marginTop: 14, lineHeight: 1.55 }}>
            <span style={{ fontFamily: DH.serif, fontStyle: 'italic', fontSize: 16 }}>A</span>n editorial fragrance — amber and birch smoke, worn close.
          </div>
          <div style={{ marginTop: 16, display: 'flex', gap: 8 }}>
            <div style={{ flex: 1, padding: '13px 0', textAlign: 'center', background: '#2a1f18', color: '#fcf7ec', fontSize: 11, letterSpacing: '0.14em', textTransform: 'uppercase', fontWeight: 500 }}>
              Add to bag — €120
            </div>
            <div style={{ padding: '13px 16px', border: '1px solid #2a1f18', color: '#2a1f18', fontSize: 11, textTransform: 'uppercase', letterSpacing: '0.14em' }}>
              ♡
            </div>
          </div>
          <div style={{ marginTop: 10, fontFamily: DH.mono, fontSize: 9, color: DH.moss600, letterSpacing: '0.12em', display: 'flex', alignItems: 'center', gap: 6 }}>
            <span style={{ width: 6, height: 6, borderRadius: 3, background: DH.moss500, boxShadow: `0 0 ${6 + Math.sin(time * 6) * 3}px ${DH.moss500}` }}/>
            324 PURCHASED THIS WEEK
          </div>
        </div>
      </div>
    </div>
  );
}

Object.assign(window, { ShopDiscoverMockup, ShopDesignMockup, ShopBuildMockup, ShopLaunchMockup, ShopOptimizeMockup, ShopABMockupA, ShopABMockupB });
