/* ═══════════════════════════════════════════════════════════════
   DehydraEx — Global Export Hub
   styles.css  |  Custom styles (Tailwind utility overrides & components)
   CDN: Inter font + Material Symbols loaded in index.html <head>
═══════════════════════════════════════════════════════════════ */
* { font-family: 'Inter', sans-serif; }
  .material-symbols-outlined { font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24; }
  .fill-icon { font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24; }

  /* Page transitions */
  .page { display: none; animation: fadeIn 0.2s ease; }
  .page.active { display: block; }
  @keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

  /* Glass card */
  .glass-card {
    background: rgba(255,255,255,0.82);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(226,232,240,0.7);
  }

  /* Trust bar gradient */
  .trust-gradient { background: linear-gradient(90deg, #002819 0%, #06402b 50%, #002819 100%); }

  /* Product card hover */
  .product-card { transition: box-shadow 0.25s ease, transform 0.25s ease; }
  .product-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,40,25,0.10); }

  /* Shimmer for stats */
  @keyframes countUp { from { opacity: 0; } to { opacity: 1; } }
  .stat-num { animation: countUp 0.8s ease forwards; }

  /* Side nav tooltip */
  .side-tool .tip { 
    display: none; position: absolute; right: calc(100% + 8px); top: 50%; 
    transform: translateY(-50%); background: #002819; color: #fff;
    padding: 4px 10px; border-radius: 6px; font-size: 11px; font-weight: 600;
    white-space: nowrap; pointer-events: none;
  }
  .side-tool:hover .tip { display: block; }

  /* Transit progress bars */
  .transit-bar { height: 6px; background: rgba(255,255,255,0.12); border-radius: 999px; overflow: hidden; }
  .transit-fill { height: 100%; background: #fd761a; border-radius: 999px; width: 0; transition: width 1.2s ease 0.3s; }

  /* Filter checkbox custom */
  input[type="checkbox"]:checked { accent-color: #002819; }

  /* Scroll reveal */
  .reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.5s ease, transform 0.5s ease; }
  .reveal.visible { opacity: 1; transform: none; }

  /* Nav active tab underline */
  .nav-link.active-page { color: #002819 !important; font-weight: 700; border-bottom: 2px solid #002819; padding-bottom: 2px; }

  /* WhatsApp green */
  .wa-btn { background: #25D366; }
  .wa-btn:hover { background: #1ebe5d; }

  /* Zebra row */
  .zebra:nth-child(even) { background-color: #f2f4f6; }

  /* ═══════════════════════════════════════════
     FAN CARD STACK — hero right panel
     Mirrors the CardStack component exactly:
     perspective, rotateZ fan, translateZ depth,
     spring transitions, drag-to-swipe
  ═══════════════════════════════════════════ */
  #hero-fan-stage {
    position: relative;
    width: 100%;
    height: 420px;
    perspective: 1100px;
  }
  #hero-fan-stage::before {
    content: '';
    position: absolute; inset-x: 0; top: 24px;
    margin: 0 auto; height: 192px; width: 70%;
    border-radius: 9999px;
    background: rgba(0,0,0,0.12);
    filter: blur(40px);
    pointer-events: none; z-index: 0;
  }
  #hero-fan-stage::after {
    content: '';
    position: absolute; inset-x: 0; bottom: 0;
    margin: 0 auto; height: 160px; width: 76%;
    border-radius: 9999px;
    background: rgba(0,0,0,0.22);
    filter: blur(40px);
    pointer-events: none; z-index: 0;
  }
  .fan-card {
    position: absolute; bottom: 0;
    border-radius: 16px;
    border: 3px solid rgba(255,255,255,0.12);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.45);
    will-change: transform, opacity;
    transform-style: preserve-3d;
    transition: transform 0.55s cubic-bezier(0.34,1.12,0.64,1), opacity 0.4s ease, box-shadow 0.4s ease;
    user-select: none;
  }
  .fan-card.is-active { cursor: grab; box-shadow: 0 32px 80px rgba(0,0,0,0.55); }
  .fan-card.is-active:active { cursor: grabbing; }
  .fan-card.is-inactive { cursor: pointer; }
  .fan-card-inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; }
  .fan-card-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, transparent 55%);
    pointer-events: none;
  }
  .fan-card-body { position: absolute; bottom: 0; left: 0; right: 0; padding: 20px; z-index: 2; }
  .fan-card-tag {
    display: inline-block; font-size: 10px; font-weight: 700;
    letter-spacing: 0.08em; text-transform: uppercase;
    padding: 3px 10px; border-radius: 999px;
    background: rgba(253,118,26,0.85); color: #fff; margin-bottom: 6px;
  }
  .fan-card-title { font-size: 18px; font-weight: 700; color: #fff; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .fan-card-desc { font-size: 13px; color: rgba(255,255,255,0.78); margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .fan-dots { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 16px; }
  .fan-dot { height: 7px; width: 7px; border-radius: 9999px; background: rgba(255,255,255,0.3); transition: all 0.3s ease; cursor: pointer; border: none; }
  .fan-dot.active { background: #fff; width: 22px; }
  .hero-globe-section { position: relative; }

  /* ═══════════════════════════════════════════
     ANIMATED CARD STACK — testimonials
  ═══════════════════════════════════════════ */
  .card-stack-wrapper { position: relative; width: 100%; max-width: 520px; height: 340px; margin: 0 auto; }
  .stack-card {
    position: absolute; inset: 0; border-radius: 20px; padding: 32px;
    background: #fff; border: 1px solid #c0c9c1;
    transform-origin: bottom center;
    transition: transform 0.55s cubic-bezier(.34,1.56,.64,1), opacity 0.4s ease, box-shadow 0.4s ease;
    cursor: grab; user-select: none;
    box-shadow: 0 2px 8px rgba(0,40,25,0.06), 0 8px 32px rgba(0,40,25,0.04);
  }
  .stack-card:active { cursor: grabbing; }
  .stack-card[data-pos="0"] { transform: rotate(-2.5deg) translateY(14px) scale(0.91); opacity: 0.6; z-index: 1; }
  .stack-card[data-pos="1"] { transform: rotate(-1deg) translateY(7px) scale(0.95); opacity: 0.8; z-index: 2; }
  .stack-card[data-pos="2"] { transform: rotate(0deg) translateY(0) scale(1); z-index: 3; box-shadow: 0 8px 40px rgba(0,40,25,0.14); }
  .stack-card.dragging { transition: none !important; z-index: 10 !important; }
  .stack-card.fly-out { transform: rotate(18deg) translateX(140%) translateY(-40%) !important; opacity: 0 !important; transition: transform 0.45s ease, opacity 0.35s ease !important; }
  .stack-nav { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 20px; }
  .stack-dot { width: 8px; height: 8px; border-radius: 99px; background: #c0c9c1; transition: all 0.3s ease; cursor: pointer; }
  .stack-dot.active { background: #002819; width: 24px; }

  /* ═══════════════════════════════════════════
     MAGIC WAND — product category sparkle
  ═══════════════════════════════════════════ */
  .magic-cat-card {
    position: relative; cursor: pointer;
    /* NO overflow:hidden here — sparkles must escape the card boundary */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
  .magic-cat-card::before {
    content: ''; position: absolute; inset: 0; z-index: 1;
    background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(253,118,26,0.18) 0%, transparent 65%);
    opacity: 0; transition: opacity 0.35s ease; border-radius: inherit;
    pointer-events: none;
  }
  .magic-cat-card:hover::before { opacity: 1; }
  .magic-cat-card:hover { transform: translateY(-5px) scale(1.02); box-shadow: 0 16px 48px rgba(0,40,25,0.14); }
  /* Image wrapper clips the photo, not the sparkles */
  .magic-img-clip { overflow: hidden; border-radius: 12px 12px 0 0; }
  .sparkle-particle {
    position: fixed; /* fixed so it escapes ALL parent overflow constraints */
    pointer-events: none; z-index: 9999;
    border-radius: 50%; background: #fd761a;
    animation: sparkleFly 0.75s ease forwards;
  }
  @keyframes sparkleFly {
    0%   { transform: translate(0,0) scale(1.2); opacity: 1; }
    60%  { opacity: 0.8; }
    100% { transform: translate(var(--sx,20px), var(--sy,-40px)) scale(0); opacity: 0; }
  }
  .wand-trail {
    position: fixed; pointer-events: none; z-index: 9998;
    width: 5px; height: 5px; border-radius: 50%;
    animation: trailFade 0.45s ease forwards;
  }
  @keyframes trailFade { to { opacity: 0; transform: scale(0); } }

  /* Magic wand cursor indicator */
  .cat-wand-badge {
    position: absolute; top: 12px; right: 12px; z-index: 6;
    width: 32px; height: 32px; border-radius: 50%;
    background: rgba(0,40,25,0.9); display: flex; align-items: center; justify-content: center;
    opacity: 0; transform: scale(0.6);
    transition: opacity 0.25s, transform 0.25s;
    pointer-events: none;
  }
  .magic-cat-card:hover .cat-wand-badge { opacity: 1; transform: scale(1); }

  /* ═══════════════════════════════════════════
     HERO layout tweak for globe
  ═══════════════════════════════════════════ */
  /* overflow must NOT be hidden here — globe canvas must be visible at the edge */
  .hero-globe-section { position: relative; }
  .hero-content-z { position: relative; z-index: 10; }