// SVG illustrations — original geometric wand silhouettes + monogram + icons.
// All shapes are simple geometry colored by --product-tone / --gold.

function Monogram({ size = 28, stroke = 'var(--gold)' }) {
  // DP monogram — two interlocking "D" arcs forming a P shape
  return (
    <svg width={size} height={size} viewBox="0 0 40 40" fill="none">
      <path d="M8 6 L8 34 L18 34 C26 34 30 28 30 20 C30 12 26 6 18 6 Z"
            stroke={stroke} strokeWidth="1.2" fill="none"/>
      <path d="M14 12 L14 26 L20 26 C24 26 26 23 26 20 C26 17 24 14 20 14 Z"
            stroke={stroke} strokeWidth="1" fill="none"/>
    </svg>
  );
}

// Geometric wand silhouettes — minimal, gallery-style
function WandAura({ tone = 'var(--product-tone)', accent = 'var(--gold)' }) {
  return (
    <svg viewBox="0 0 200 320" width="100%" height="100%">
      <defs>
        <linearGradient id="auraGrad" x1="0" x2="1">
          <stop offset="0" stopColor={tone} stopOpacity="0.95"/>
          <stop offset="0.5" stopColor={tone}/>
          <stop offset="1" stopColor={tone} stopOpacity="0.7"/>
        </linearGradient>
      </defs>
      {/* Curved wearable form — U shape */}
      <path d="M 70 40 Q 70 20 100 20 Q 130 20 130 40 L 130 200 Q 130 240 100 260 Q 70 240 70 200 Z"
            fill="url(#auraGrad)"/>
      <path d="M 70 40 Q 70 20 100 20 Q 130 20 130 40 L 130 200 Q 130 240 100 260 Q 70 240 70 200 Z"
            fill="none" stroke={accent} strokeWidth="0.5" opacity="0.4"/>
      {/* Inner curve */}
      <path d="M 95 50 Q 95 40 100 40 Q 105 40 105 50 L 105 180 Q 105 200 100 210 Q 95 200 95 180 Z"
            fill={accent} opacity="0.08"/>
      {/* Gold accent ring */}
      <ellipse cx="100" cy="245" rx="22" ry="6" fill={accent} opacity="0.35"/>
      <ellipse cx="100" cy="245" rx="22" ry="6" fill="none" stroke={accent} strokeWidth="0.8"/>
    </svg>
  );
}

function WandNova({ tone = 'var(--product-tone)', accent = 'var(--gold)' }) {
  return (
    <svg viewBox="0 0 200 320" width="100%" height="100%">
      <defs>
        <linearGradient id="novaGrad" x1="0" x2="1">
          <stop offset="0" stopColor={tone} stopOpacity="0.95"/>
          <stop offset="0.5" stopColor={tone}/>
          <stop offset="1" stopColor={tone} stopOpacity="0.7"/>
        </linearGradient>
      </defs>
      {/* Main body */}
      <path d="M 80 40 Q 80 20 100 20 Q 120 20 120 40 L 120 230 Q 120 270 100 280 Q 80 270 80 230 Z"
            fill="url(#novaGrad)"/>
      {/* Branching arm */}
      <path d="M 120 80 Q 145 70 155 90 Q 160 110 145 130 Q 130 140 120 130 Z"
            fill="url(#novaGrad)"/>
      {/* Gold collar */}
      <rect x="78" y="240" width="44" height="8" rx="4" fill={accent} opacity="0.7"/>
      <rect x="78" y="240" width="44" height="8" rx="4" fill="none" stroke={accent} strokeWidth="0.5"/>
      {/* Top highlight */}
      <ellipse cx="100" cy="35" rx="14" ry="6" fill={accent} opacity="0.15"/>
    </svg>
  );
}

function WandEmber({ tone = 'var(--product-tone)', accent = 'var(--gold)' }) {
  return (
    <svg viewBox="0 0 200 320" width="100%" height="100%">
      <defs>
        <linearGradient id="emberGrad" x1="0" x2="1">
          <stop offset="0" stopColor={tone} stopOpacity="0.95"/>
          <stop offset="0.5" stopColor={tone}/>
          <stop offset="1" stopColor={tone} stopOpacity="0.7"/>
        </linearGradient>
      </defs>
      {/* Bulbous head */}
      <ellipse cx="100" cy="60" rx="42" ry="48" fill="url(#emberGrad)"/>
      {/* Slim shaft */}
      <path d="M 84 100 L 84 280 Q 84 295 100 295 Q 116 295 116 280 L 116 100 Z"
            fill="url(#emberGrad)"/>
      {/* Ribbed grip */}
      {[200, 215, 230, 245, 260].map((y,i) => (
        <line key={i} x1="84" y1={y} x2="116" y2={y} stroke={accent} strokeWidth="0.4" opacity="0.5"/>
      ))}
      {/* Star pattern on head */}
      <g opacity="0.6">
        <circle cx="92" cy="55" r="1.2" fill={accent}/>
        <circle cx="100" cy="48" r="1.2" fill={accent}/>
        <circle cx="108" cy="55" r="1.2" fill={accent}/>
        <circle cx="100" cy="65" r="1.2" fill={accent}/>
      </g>
      {/* Gold ring under head */}
      <ellipse cx="100" cy="100" rx="16" ry="3" fill={accent} opacity="0.4"/>
    </svg>
  );
}

function SerumBottle({ tone = 'var(--product-tone)', accent = 'var(--gold)' }) {
  return (
    <svg viewBox="0 0 200 360" width="100%" height="100%">
      <defs>
        <linearGradient id="serumGrad" x1="0" x2="0" y1="0" y2="1">
          <stop offset="0" stopColor="#1a1410"/>
          <stop offset="0.5" stopColor="#3a2a1a"/>
          <stop offset="1" stopColor={accent} stopOpacity="0.6"/>
        </linearGradient>
      </defs>
      {/* Bottle — hourglass */}
      <path d="M 70 80 Q 60 130 65 180 Q 60 220 75 280 Q 75 320 100 320 Q 125 320 125 280 Q 140 220 135 180 Q 140 130 130 80 Z"
            fill="url(#serumGrad)"/>
      <path d="M 70 80 Q 60 130 65 180 Q 60 220 75 280 Q 75 320 100 320 Q 125 320 125 280 Q 140 220 135 180 Q 140 130 130 80 Z"
            fill="none" stroke={accent} strokeWidth="0.5" opacity="0.4"/>
      {/* Cap petals */}
      <path d="M 80 80 L 85 30 L 95 75 Z" fill={accent}/>
      <path d="M 95 75 L 100 25 L 105 75 Z" fill={accent} opacity="0.85"/>
      <path d="M 105 75 L 115 30 L 120 80 Z" fill={accent}/>
      {/* Collar */}
      <rect x="78" y="72" width="44" height="10" rx="2" fill={accent}/>
      {/* Logo */}
      <text x="100" y="190" textAnchor="middle" fill={accent} fontSize="10" fontFamily="Cormorant Garamond" opacity="0.7">DP</text>
      <text x="100" y="220" textAnchor="middle" fill={accent} fontSize="6" fontFamily="Inter" letterSpacing="2" opacity="0.6">DISCRETE</text>
      <text x="100" y="232" textAnchor="middle" fill={accent} fontSize="6" fontFamily="Inter" letterSpacing="2" opacity="0.6">PLEASURES</text>
      {/* Droplet */}
      <path d="M 100 260 Q 95 270 95 278 Q 95 285 100 285 Q 105 285 105 278 Q 105 270 100 260 Z"
            fill={accent} opacity="0.5"/>
    </svg>
  );
}

function ProductSilhouette({ id, ...props }) {
  if (id === 'aura')  return <WandAura {...props}/>;
  if (id === 'nova')  return <WandNova {...props}/>;
  if (id === 'ember') return <WandEmber {...props}/>;
  if (id === 'serum') return <SerumBottle {...props}/>;
  return null;
}

// Icons — simple line glyphs
const Icon = {
  box: () => (
    <svg viewBox="0 0 24 24" width="20" height="20" fill="none" stroke="currentColor" strokeWidth="1">
      <path d="M3 8 L12 4 L21 8 L21 18 L12 22 L3 18 Z"/>
      <path d="M3 8 L12 12 L21 8"/>
      <path d="M12 12 L12 22"/>
    </svg>
  ),
  shield: () => (
    <svg viewBox="0 0 24 24" width="20" height="20" fill="none" stroke="currentColor" strokeWidth="1">
      <path d="M12 3 L20 6 L20 12 Q 20 18 12 21 Q 4 18 4 12 L 4 6 Z"/>
      <path d="M9 12 L11 14 L15 10"/>
    </svg>
  ),
  lock: () => (
    <svg viewBox="0 0 24 24" width="20" height="20" fill="none" stroke="currentColor" strokeWidth="1">
      <rect x="5" y="11" width="14" height="10" rx="1"/>
      <path d="M8 11 L8 8 Q 8 4 12 4 Q 16 4 16 8 L 16 11"/>
    </svg>
  ),
  leaf: () => (
    <svg viewBox="0 0 24 24" width="20" height="20" fill="none" stroke="currentColor" strokeWidth="1">
      <path d="M5 19 Q 5 8 17 5 Q 19 14 12 18 Q 8 19 5 19 Z"/>
      <path d="M5 19 L 13 11"/>
    </svg>
  ),
  heart: () => (
    <svg viewBox="0 0 24 24" width="20" height="20" fill="none" stroke="currentColor" strokeWidth="1">
      <path d="M12 20 L 4 12 Q 1 8 4 5 Q 8 2 12 7 Q 16 2 20 5 Q 23 8 20 12 Z"/>
    </svg>
  ),
  truck: () => (
    <svg viewBox="0 0 24 24" width="20" height="20" fill="none" stroke="currentColor" strokeWidth="1">
      <rect x="2" y="7" width="12" height="10"/>
      <path d="M14 10 L19 10 L22 14 L22 17 L14 17"/>
      <circle cx="6" cy="18" r="2"/>
      <circle cx="17" cy="18" r="2"/>
    </svg>
  ),
  arrow: () => (
    <svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" strokeWidth="1.2">
      <path d="M5 12 L 19 12"/>
      <path d="M14 7 L 19 12 L 14 17"/>
    </svg>
  ),
  cart: () => (
    <svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" strokeWidth="1">
      <path d="M3 4 L6 4 L8 18 L19 18 L21 8 L7 8"/>
      <circle cx="9" cy="21" r="1.2"/>
      <circle cx="18" cy="21" r="1.2"/>
    </svg>
  ),
  chevronDown: () => (
    <svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" strokeWidth="1">
      <path d="M5 9 L12 16 L19 9"/>
    </svg>
  ),
  drop: () => (
    <svg viewBox="0 0 24 24" width="20" height="20" fill="none" stroke="currentColor" strokeWidth="1">
      <path d="M12 3 Q 5 11 5 16 Q 5 21 12 21 Q 19 21 19 16 Q 19 11 12 3 Z"/>
    </svg>
  ),
  spark: () => (
    <svg viewBox="0 0 24 24" width="20" height="20" fill="none" stroke="currentColor" strokeWidth="1">
      <path d="M12 3 L13 10 L20 12 L13 14 L12 21 L11 14 L4 12 L11 10 Z"/>
    </svg>
  ),
};

Object.assign(window, { Monogram, ProductSilhouette, WandAura, WandNova, WandEmber, SerumBottle, Icon });
