/* ════════════════════════════════════════════════════════════════════
   SevinHub v5.1 — Effects, Polish & Marketplace Layer
   Loaded after sevinhub-v5.css. Additive only.
   ════════════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────
   1. Scroll progress bar (top of page)
   ───────────────────────────────────────────── */
.v51-scrollbar {
  position: fixed; top: 0; left: 0; right: 0;
  height: 3px; z-index: 9998;
  background: transparent;
  pointer-events: none;
}
.v51-scrollbar > .bar {
  height: 100%; width: 0;
  background: linear-gradient(90deg, #7c3aed, #3b82f6 50%, #06b6d4);
  box-shadow: 0 0 12px rgba(124,58,237,.6);
  transition: width .12s linear;
}

/* ─────────────────────────────────────────────
   2. Mouse spotlight (subtle glow following cursor)
   ───────────────────────────────────────────── */
.v51-spotlight {
  position: fixed; top: 0; left: 0;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,58,237,.10) 0%, rgba(59,130,246,.06) 35%, transparent 70%);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 1; /* sits behind content */
  opacity: 0;
  transition: opacity .35s ease;
  mix-blend-mode: screen;
  will-change: transform, opacity;
}
.v51-spotlight.on { opacity: 1; }
@media (max-width: 992px) { .v51-spotlight { display: none; } }

/* ─────────────────────────────────────────────
   3. Reveal-on-scroll baseline
   ───────────────────────────────────────────── */
.v51-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1);
  will-change: opacity, transform;
}
.v51-reveal.in { opacity: 1; transform: translateY(0); }
.v51-reveal[data-d="2"] { transition-delay: .08s; }
.v51-reveal[data-d="3"] { transition-delay: .16s; }
.v51-reveal[data-d="4"] { transition-delay: .24s; }
.v51-reveal[data-d="5"] { transition-delay: .32s; }
@media (prefers-reduced-motion: reduce) {
  .v51-reveal { opacity: 1; transform: none; transition: none; }
}

/* ─────────────────────────────────────────────
   4. Animated counter style
   ───────────────────────────────────────────── */
.v51-count { font-variant-numeric: tabular-nums; }

/* ─────────────────────────────────────────────
   5. 3D tilt for product cards (cursor-driven)
   ───────────────────────────────────────────── */
.v51-tilt { perspective: 1000px; }
.v51-tilt .sh-product-card {
  transform-style: preserve-3d;
  transition: transform .25s cubic-bezier(.16,1,.3,1), border-color .2s, box-shadow .25s !important;
}
@media (prefers-reduced-motion: reduce) {
  .v51-tilt .sh-product-card { transform: none !important; }
}

/* ─────────────────────────────────────────────
   6. UI sound toggle widget
   ───────────────────────────────────────────── */
.v51-sound-toggle {
  position: fixed; bottom: 6.2rem; right: 1.25rem;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(13,13,26,.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.1);
  color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 1.05rem;
  transition: transform .2s, color .2s, border-color .2s;
  z-index: 9990;
}
.v51-sound-toggle:hover { transform: scale(1.05); color: var(--purple-light); border-color: rgba(124,58,237,.4); }
.v51-sound-toggle.on { color: #34d399; border-color: rgba(16,185,129,.4); }

/* ─────────────────────────────────────────────
   7. Confetti canvas
   ───────────────────────────────────────────── */
.v51-confetti-canvas {
  position: fixed; inset: 0; pointer-events: none; z-index: 9999;
}

/* ─────────────────────────────────────────────
   8. Marketplace stat strip
   ───────────────────────────────────────────── */
.v51-stat-strip {
  display: flex; flex-wrap: wrap; gap: 1.25rem;
  margin-top: 1.5rem;
}
.v51-stat-strip > div {
  background: rgba(13,13,26,.65);
  border: 1px solid var(--v5-stroke);
  border-radius: 14px;
  padding: .85rem 1.1rem;
  display: flex; align-items: center; gap: .65rem;
  backdrop-filter: blur(8px);
  transition: border-color .2s, transform .2s;
}
.v51-stat-strip > div:hover {
  border-color: rgba(124,58,237,.45);
  transform: translateY(-2px);
}
.v51-stat-strip .num {
  font-size: 1.6rem; font-weight: 900;
  letter-spacing: -.02em;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.v51-stat-strip .lbl {
  font-size: .72rem; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .08em;
  font-weight: 600;
}

/* ─────────────────────────────────────────────
   9. Marketplace sort dropdown + search form polish
   ───────────────────────────────────────────── */
.v51-search-input:focus {
  border-color: var(--purple) !important;
  box-shadow: 0 0 0 3px rgba(124,58,237,.18) !important;
  background: rgba(11,11,22,.85) !important;
}
.v51-sort {
  background: rgba(13,13,26,.7) !important;
  border: 1px solid var(--v5-stroke) !important;
  color: var(--text-primary) !important;
  font-size: .88rem !important;
  font-weight: 600 !important;
}
.v51-sort:focus { border-color: var(--purple) !important; outline: none; }
.v51-filter-sticky { position: sticky; top: 72px; z-index: 30; padding: .5rem 0; background: linear-gradient(180deg, var(--bg-base) 60%, transparent); }

/* ─────────────────────────────────────────────
   10. Marketplace empty state
   ───────────────────────────────────────────── */
.v51-empty {
  text-align: center; padding: 3.5rem 1.5rem;
  background: linear-gradient(160deg, rgba(124,58,237,.06), transparent);
  border: 1px dashed var(--v5-stroke-strong);
  border-radius: 22px;
}
.v51-empty .ic {
  width: 72px; height: 72px; margin: 0 auto 1rem;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(124,58,237,.18), rgba(59,130,246,.1));
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: var(--purple-light);
}
.v51-empty h4 { font-size: 1.15rem; font-weight: 700; margin-bottom: .5rem; }
.v51-empty p  { color: var(--text-muted); margin: 0; max-width: 420px; margin-inline: auto; }

/* ─────────────────────────────────────────────
   11. Coming Soon teaser cards
   ───────────────────────────────────────────── */
.v51-cs-card {
  position: relative;
  background: linear-gradient(160deg, rgba(22,22,42,.95), rgba(13,13,26,.95));
  border: 1px solid var(--v5-stroke);
  border-radius: var(--v5-radius-lg);
  overflow: hidden;
  height: 100%;
  display: flex; flex-direction: column;
  transition: transform .25s, border-color .2s, box-shadow .3s;
}
.v51-cs-card::before {
  content: ''; position: absolute; inset: -1px;
  border-radius: inherit;
  padding: 1.5px;
  background: linear-gradient(120deg, rgba(124,58,237,.55), rgba(59,130,246,.45) 40%, rgba(6,182,212,.55) 80%);
  background-size: 200% 200%;
  animation: v51borderShift 4s ease-in-out infinite;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none; opacity: .65;
}
.v51-cs-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 26px 56px -18px rgba(124,58,237,.55);
  border-color: rgba(124,58,237,.5);
}
.v51-cs-card:hover::before { opacity: 1; }
@keyframes v51borderShift {
  0%,100% { background-position: 0% 50%; }
  50%     { background-position: 100% 50%; }
}

.v51-cs-glow {
  position: absolute; top: -60px; right: -50px;
  width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(124,58,237,.35), transparent 70%);
  pointer-events: none;
  animation: v51glowPulse 4s ease-in-out infinite;
}
@keyframes v51glowPulse {
  0%,100% { opacity: .55; transform: scale(1); }
  50%     { opacity: .9;  transform: scale(1.15); }
}

.v51-cs-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background:
    linear-gradient(135deg, rgba(124,58,237,.18) 0%, rgba(59,130,246,.10) 60%, rgba(6,182,212,.08) 100%);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.v51-cs-icon {
  width: 76px; height: 76px;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem; color: #fff;
  box-shadow: 0 18px 40px -10px rgba(124,58,237,.65), inset 0 1px 0 rgba(255,255,255,.2);
  z-index: 2;
}
.v51-cs-pulse {
  position: absolute; inset: 0;
  border-radius: 22px;
  background: radial-gradient(circle at center, rgba(124,58,237,.5), transparent 50%);
  animation: v51pulseRing 2.2s ease-out infinite;
  pointer-events: none;
}
@keyframes v51pulseRing {
  0%   { transform: scale(.55); opacity: .9; }
  100% { transform: scale(2);   opacity: 0; }
}
.v51-cs-stripes {
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(124,58,237,.10) 0,
    rgba(124,58,237,.10) 8px,
    transparent 8px,
    transparent 22px
  );
  animation: v51stripeShift 8s linear infinite;
  pointer-events: none;
  opacity: .55;
}
@keyframes v51stripeShift {
  from { background-position: 0 0; }
  to   { background-position: 60px 0; }
}

.v51-cs-body { padding: 1.25rem 1.35rem 1.35rem; display: flex; flex-direction: column; flex: 1; }
.v51-cs-cat {
  font-size: .68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .12em; color: var(--purple-light); margin-bottom: .4rem;
}
.v51-cs-title {
  font-size: 1.05rem; font-weight: 800; letter-spacing: -.015em;
  display: flex; align-items: center; gap: .35rem;
  margin: 0 0 .5rem;
}
.v51-cs-dots { display: inline-flex; gap: 3px; }
.v51-cs-dots span {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--purple-light);
  animation: v51dotJump 1.4s ease-in-out infinite;
}
.v51-cs-dots span:nth-child(2) { animation-delay: .2s; }
.v51-cs-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes v51dotJump {
  0%,60%,100% { opacity: .35; transform: translateY(0); }
  30%         { opacity: 1;   transform: translateY(-3px); }
}
.v51-cs-desc {
  font-size: .85rem; color: var(--text-secondary);
  line-height: 1.6; margin: 0 0 .85rem; flex: 1;
}
.v51-cs-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: .85rem; border-top: 1px solid var(--v5-stroke);
}
.v51-cs-badge {
  display: inline-flex; align-items: center; gap: .35rem;
  background: linear-gradient(135deg, rgba(245,158,11,.18), rgba(236,72,153,.12));
  border: 1px solid rgba(245,158,11,.3);
  color: #fbbf24;
  padding: .25rem .65rem; border-radius: 999px;
  font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
}
.v51-cs-cta {
  display: inline-flex; align-items: center; gap: .35rem;
  color: var(--purple-light) !important;
  font-size: .82rem; font-weight: 700;
  text-decoration: none;
  transition: gap .2s, color .2s;
}
.v51-cs-cta:hover { gap: .55rem; color: #60a5fa !important; }

/* ─────────────────────────────────────────────
   12. Page-load fade (whole body)
   ───────────────────────────────────────────── */
.v51-page-fade body { opacity: 0; transition: opacity .35s ease; }
.v51-page-ready body { opacity: 1; }

/* ─────────────────────────────────────────────
   13. Refined product card hover (3D-friendly)
   ───────────────────────────────────────────── */
.v51-tilt .sh-product-card:hover {
  box-shadow: 0 26px 60px -18px rgba(124,58,237,.55), 0 0 0 1px rgba(124,58,237,.4) !important;
}

/* ─────────────────────────────────────────────
   14. Subtle starfield (homepage hero overlay)
   ───────────────────────────────────────────── */
.v51-stars {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(255,255,255,.65), transparent 60%),
    radial-gradient(1px 1px at 34% 78%, rgba(255,255,255,.45), transparent 60%),
    radial-gradient(1.5px 1.5px at 56% 22%, rgba(167,139,250,.6), transparent 60%),
    radial-gradient(1px 1px at 72% 64%, rgba(96,165,250,.5), transparent 60%),
    radial-gradient(1.5px 1.5px at 88% 30%, rgba(34,211,238,.5), transparent 60%),
    radial-gradient(1px 1px at 22% 50%, rgba(255,255,255,.35), transparent 60%),
    radial-gradient(1px 1px at 92% 80%, rgba(255,255,255,.45), transparent 60%);
  opacity: .8;
  animation: v51twinkle 6s ease-in-out infinite;
}
@keyframes v51twinkle {
  0%,100% { opacity: .8; }
  50%     { opacity: .45; }
}

/* ─────────────────────────────────────────────
   15. Magnetic button micro-interaction (lift on hover via JS)
   ───────────────────────────────────────────── */
.btn-v5 { will-change: transform; }

/* ─────────────────────────────────────────────
   16. Smooth focus-visible ring across forms
   ───────────────────────────────────────────── */
.sh-form-control:focus-visible {
  outline: none;
  border-color: var(--purple) !important;
  box-shadow: 0 0 0 3px rgba(124,58,237,.22) !important;
}

/* ─────────────────────────────────────────────
   17. Toast (used by JS for celebration / confirmations)
   ───────────────────────────────────────────── */
.v51-toast-stack {
  position: fixed; top: 1rem; right: 1rem; z-index: 9995;
  display: flex; flex-direction: column; gap: .55rem;
}
.v51-toast {
  background: linear-gradient(135deg, rgba(13,13,26,.95), rgba(8,8,15,.95));
  border: 1px solid rgba(124,58,237,.45);
  border-radius: 12px;
  padding: .85rem 1.1rem;
  color: var(--text-primary);
  font-size: .88rem;
  box-shadow: 0 16px 36px rgba(0,0,0,.45), 0 0 32px rgba(124,58,237,.25);
  min-width: 240px;
  transform: translateX(120%);
  transition: transform .35s cubic-bezier(.34,1.56,.64,1);
}
.v51-toast.show { transform: translateX(0); }
.v51-toast.success { border-color: rgba(16,185,129,.5); }
.v51-toast.success::before { content: '✓ '; color: #34d399; font-weight: 800; }

/* ─────────────────────────────────────────────
   18. Mobile niceties
   ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .v51-stat-strip { gap: .65rem; }
  .v51-stat-strip > div { padding: .6rem .8rem; }
  .v51-stat-strip .num { font-size: 1.25rem; }
  .v51-filter-sticky { position: static; }
  .v51-sound-toggle { bottom: 5.6rem; right: 1rem; width: 38px; height: 38px; }
}
