/* Product page hero v2: an interactive sample store on a dark stage (assets/play.js).
   Loaded after base.css, home.css and product.css. */

.pp-hero.v2 { padding: 28px 0 80px; }
.pp-hero.v2 .pp-hero-in { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 56px; min-height: 700px; }
.pp-hero.v2 .pp-h1 { font-size: clamp(40px, 4.4vw, 62px); }
.shimmer { background-size: 220% 100%; background-image: linear-gradient(100deg, var(--violet) 10%, #a855f7 35%, #ec4899 55%, #a855f7 75%, var(--violet) 95%); animation: shimmer 6s linear infinite; }
@keyframes shimmer { to { background-position: -220% 0; } }

/* ---------------------------------------------------------------- stage */
.pg-stage {
  position: relative; isolation: isolate;
  display: grid; gap: 14px; padding: 18px;
  border-radius: 30px; color: #fff;
  background:
    radial-gradient(60% 50% at 85% 0%, color-mix(in srgb, var(--tint) 55%, transparent), transparent 70%),
    radial-gradient(70% 60% at 0% 100%, rgb(124 58 237 / 0.55), transparent 70%),
    #0d0a1a;
  box-shadow: 0 60px 120px -40px rgb(60 20 120 / 0.65), 0 0 0 1px rgb(255 255 255 / 0.06) inset;
  animation: rise 1000ms 150ms var(--ease-out) both;
}
.pg-stage::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; z-index: -1; pointer-events: none;
  background-image: linear-gradient(rgb(255 255 255 / 0.05) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / 0.05) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000, transparent 80%); -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000, transparent 80%);
}
.pg-aura { position: absolute; inset: -40px; z-index: -2; border-radius: 60px; background: radial-gradient(closest-side, color-mix(in srgb, var(--tint) 80%, transparent), transparent); filter: blur(30px); opacity: 0.8; animation: aura 5s ease-in-out infinite alternate; }
@keyframes aura { to { opacity: 0.45; transform: scale(1.04); } }
.pg-live { display: inline-flex; align-items: center; gap: 8px; justify-self: start; padding: 6px 14px 6px 10px; border-radius: 999px; background: rgb(255 255 255 / 0.08); border: 1px solid rgb(255 255 255 / 0.12); font-size: 13px; color: #e4ddff; padding-right: 110px; }
.pg-live .dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 0 rgb(74 222 128 / 0.6); animation: ping 2s infinite; }
.pg-reset { position: absolute; top: 18px; right: 18px; height: 31px; padding: 0 12px; border-radius: 999px; border: 1px solid rgb(255 255 255 / 0.14); background: rgb(255 255 255 / 0.06); color: #cfc6ee; font-size: 12.5px; transition: background 150ms, color 150ms; }
.pg-reset:hover { background: rgb(255 255 255 / 0.14); color: #fff; }

/* ---------------------------------------------------------------- browser window */
.pg-win { position: relative; height: 480px; border-radius: 16px; overflow: hidden; background: #fff; color: var(--ink); box-shadow: 0 30px 60px -20px rgb(0 0 0 / 0.6); font-size: 13px; }
.pg-bar { position: relative; z-index: 6; height: 38px; display: flex; align-items: center; gap: 6px; padding: 0 12px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.pg-bar > i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; } .pg-bar > i:nth-child(2) { background: #febc2e; } .pg-bar > i:nth-child(3) { background: #28c840; }
.pg-url { position: absolute; left: 50%; translate: -50% 0; padding: 3px 14px; border-radius: 99px; background: #fff; border: 1px solid var(--border); font-size: 11.5px; color: var(--ink-3); }
.pg-leave { margin-left: auto; height: 24px; padding: 0 10px; border-radius: 99px; border: 1px solid var(--border-strong); background: #fff; font-size: 11.5px; font-weight: 560; }
.pg-leave:hover { border-color: var(--rose); color: var(--rose); }
.pg-body { position: absolute; inset: 38px 0 0; }
.pg-veil { position: absolute; inset: 0; z-index: 3; background: rgb(9 9 11 / 0.4); opacity: 0; pointer-events: none; transition: opacity 300ms; }

/* sample product art */
.sto-img, .pdp-hero { display: block; border-radius: 12px; position: relative; overflow: hidden; background: linear-gradient(160deg, color-mix(in srgb, var(--c) 60%, #fff), var(--c)); }
.sto-img::after, .pdp-hero::after { content: ''; position: absolute; left: 50%; top: 52%; width: 44%; height: 56%; translate: -50% -50%; border-radius: 18px 18px 10px 10px; background: rgb(255 255 255 / 0.22); }

/* ---------------------------------------------------------------- store + cart */
.sto-h { display: flex; align-items: center; gap: 18px; height: 52px; padding: 0 18px; border-bottom: 1px solid var(--surface-3); }
.sto-h > b { font-size: 15px; letter-spacing: -0.02em; }
.sto-nav { display: flex; gap: 10px; margin-right: auto; } .sto-nav i { width: 38px; height: 7px; border-radius: 4px; background: var(--surface-3); }
.sto-cart { position: relative; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border); background: #fff; display: grid; place-items: center; }
.sto-cart svg { width: 18px; height: 18px; fill: none; stroke: var(--ink); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.sto-count { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 99px; background: var(--violet); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; }
.sto-cart.bump { animation: bumpy 450ms var(--spring); }
@keyframes bumpy { 40% { transform: scale(1.25) rotate(-8deg); } }
.sto-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 18px; }
.sto-card { display: grid; gap: 4px; }
.sto-img { height: 200px; margin-bottom: 6px; }
.sto-n { font-weight: 600; font-size: 13.5px; }
.sto-p { color: var(--ink-3); }
.sto-add { margin-top: 6px; height: 36px; border-radius: 10px; border: 0; background: var(--ink); color: #fff; font-weight: 600; font-size: 13px; transition: transform 150ms var(--ease), background 150ms; }
.sto-add:hover { background: var(--violet); }
.sto-add:active { transform: scale(0.96); }
.pg-win.fresh .sto-card:first-child .sto-add { animation: callme 1.6s ease-out infinite; }
@keyframes callme { 0% { box-shadow: 0 0 0 0 rgb(139 92 246 / 0.7); } 70%, 100% { box-shadow: 0 0 0 12px rgb(139 92 246 / 0); } }

.pg-drawer {
  position: absolute; z-index: 4; top: 0; right: 0; bottom: 0; width: 310px; max-width: 88%;
  display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 16px;
  background: #fff; border-left: 1px solid var(--border); box-shadow: -24px 0 50px -12px rgb(0 0 0 / 0.3);
  transform: translateX(105%); transition: transform 520ms var(--ease-out);
}
.drawer-open .pg-drawer { transform: none; }
.drawer-open .pg-veil { opacity: 1; pointer-events: auto; }
.dw-h { display: flex; align-items: center; justify-content: space-between; }
.dw-h b { font-size: 15.5px; letter-spacing: -0.015em; }
.dw-n { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 4px; padding: 0 5px; border-radius: 99px; background: var(--surface-2); font-size: 11px; }
.dw-h button { width: 28px; height: 28px; border-radius: 50%; border: 0; background: var(--surface-2); font-size: 16px; line-height: 1; color: var(--ink-3); }
.dw-prog { display: grid; gap: 10px; padding: 10px 12px 14px; border-radius: 12px; background: var(--surface-1); border: 1px solid var(--border); }
.dw-msg { font-size: 12px; color: var(--ink-2); min-height: 16px; }
.dw-msg b { color: var(--ink); }
.dw-msg.done { color: var(--green); font-weight: 600; }
.dw-track { position: relative; height: 6px; margin: 0 12px 0 0; border-radius: 99px; background: var(--surface-3); }
.dw-fill { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; background: linear-gradient(90deg, #fb923c, var(--violet)); transition: width 700ms var(--ease-out); }
.dw-fill.full { background: linear-gradient(90deg, #22c55e, var(--green)); }
.dw-m { position: absolute; top: 50%; width: 24px; height: 24px; translate: -50% -50%; border-radius: 50%; background: #fff; border: 1.5px solid var(--border-strong); display: grid; place-items: center; transition: background 300ms, border-color 300ms, transform 400ms var(--spring); }
.dw-m svg { width: 13px; height: 13px; fill: none; stroke: var(--ink-3); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.dw-m.on { background: var(--green); border-color: var(--green); transform: scale(1.15); }
.dw-m.on svg { stroke: #fff; }
.dw-lines { display: grid; align-content: start; gap: 0; overflow: auto; min-height: 0; flex: 0 1 auto; scrollbar-width: thin; }
.dw-l { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--surface-3); }
.dw-l .sw { width: 34px; height: 34px; border-radius: 9px; }
.dw-l .nm { flex: 1; display: grid; font-weight: 550; font-size: 12.5px; min-width: 0; }
.dw-l small { color: var(--ink-3); font-weight: 400; font-size: 11px; }
.dw-l b { font-variant-numeric: tabular-nums; }
.dw-l.new { animation: lineIn 450ms var(--spring); }
.dw-disc b { color: var(--green); }
.dw-disc .sw { background: var(--green-soft); }
.dw-gift { border-bottom-style: dashed; } .dw-gift b { color: var(--green); }
@keyframes lineIn { from { opacity: 0; transform: translateX(16px); background: var(--violet-soft); } }
.dw-up-h { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); margin-top: 2px; }
.dw-ups { display: grid; gap: 6px; }
.dw-up { display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: 10px; border: 1px dashed var(--violet-line); background: color-mix(in srgb, var(--violet-soft) 60%, #fff); transition: opacity 300ms; }
.dw-up .sw { width: 28px; height: 28px; border-radius: 8px; }
.dw-up .nm { flex: 1; font-size: 12.5px; color: var(--ink-2); }
.dw-up b { font-size: 12.5px; }
.dw-up button { height: 26px; padding: 0 10px; border-radius: 99px; border: 0; background: var(--violet); color: #fff; font-size: 11.5px; font-weight: 600; transition: transform 150ms; }
.dw-up button:hover { transform: scale(1.06); }
.dw-up.added { display: none; }
.dw-ups:not(:has(.dw-up:not(.added))), .pg-drawer:not(:has(.dw-up:not(.added))) .dw-up-h { display: none; }
.dw-foot { display: flex; justify-content: space-between; align-items: baseline; margin-top: auto; padding-top: 8px; font-weight: 600; }
.dw-tot { font-size: 20px; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.dw-btn { height: 42px; border-radius: 12px; border: 0; background: var(--ink); color: #fff; font-weight: 600; }

/* ---------------------------------------------------------------- product page (bundles / tiers) */
.pg-pdp { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 22px; padding: 22px; }
.pg-pdp .pdp-hero { height: 100%; min-height: 0; }
.pdp-r { display: grid; align-content: start; gap: 4px; }
.pdp-t { font-size: 20px; font-weight: 650; letter-spacing: -0.025em; }
.pdp-pr { color: var(--ink-2); margin-bottom: 10px; }
.fb, .tq { display: grid; gap: 7px; padding: 14px; border-radius: 14px; border: 1px solid var(--border); }
.fb-h { display: flex; justify-content: space-between; align-items: center; font-weight: 600; margin-bottom: 2px; }
.fb-save { font-size: 11px; color: var(--green); background: var(--green-soft); padding: 2px 8px; border-radius: 99px; transition: transform 300ms var(--spring); }
.fb-save:empty { display: none; }
.fb-it { display: flex; align-items: center; gap: 9px; padding: 7px 9px; border-radius: 10px; border: 1.5px solid var(--border); background: #fff; text-align: left; transition: border-color 200ms, background 200ms; }
.fb-it .sw { width: 30px; height: 30px; border-radius: 8px; }
.fb-it .nm { flex: 1; font-size: 12.5px; color: var(--ink-2); }
.fb-it.on { border-color: var(--violet-line); background: color-mix(in srgb, var(--violet-soft) 60%, #fff); }
.fb-it.locked { cursor: default; }
.fb-it:not(.locked):hover { border-color: var(--violet); }
.fb-ck { width: 18px; height: 18px; flex: none; border-radius: 5px; border: 1.5px solid var(--border-strong); display: grid; place-items: center; transition: background 200ms, border-color 200ms; }
.fb-it.on .fb-ck { background: var(--violet); border-color: var(--violet); }
.fb-it.on .fb-ck::after { content: ''; width: 8px; height: 4px; border: 2px solid #fff; border-top: 0; border-right: 0; rotate: -45deg; translate: 0 -1px; }
.pg-win.fresh .fb-it:not(.on) { animation: callme 1.6s ease-out infinite; }
.fb-tot { display: flex; align-items: baseline; gap: 8px; justify-content: flex-end; padding-top: 4px; }
.fb-was { color: var(--ink-4); }
.fb-now { font-size: 22px; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.fb-btn { height: 40px; border-radius: 11px; border: 0; background: var(--ink); color: #fff; font-weight: 600; transition: background 150ms, transform 150ms; }
.fb-btn:hover { background: var(--violet); } .fb-btn:active { transform: scale(0.98); }
.tq-o { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 11px; border: 1.5px solid var(--border); background: #fff; text-align: left; transition: border-color 200ms, background 200ms, transform 200ms var(--spring); }
.tq-o:hover { border-color: var(--violet-line); }
.tq-o.on { border-color: var(--violet); background: var(--violet-soft); transform: scale(1.02); }
.tq-r { width: 16px; height: 16px; flex: none; border-radius: 50%; border: 1.5px solid var(--border-strong); position: relative; }
.tq-o.on .tq-r { border-color: var(--violet); }
.tq-o.on .tq-r::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--violet); }
.tq-l { flex: 1; font-size: 13px; font-weight: 550; }
.tq-l em { font-style: normal; font-size: 10.5px; font-weight: 600; color: var(--green); background: var(--green-soft); padding: 1px 6px; border-radius: 99px; margin-left: 4px; }
.tq-o { position: relative; }
.tq-l i { position: absolute; top: -9px; right: 12px; font-style: normal; font-size: 10px; font-weight: 600; color: #fff; background: var(--violet); padding: 2px 8px; border-radius: 99px; }
.pg-win.fresh .tq-o:last-of-type { animation: callme 1.6s ease-out infinite; }

/* ---------------------------------------------------------------- exit popup */
.pg-blog { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; padding: 22px; }
.bl-l .pdp-hero { height: 100%; }
.bl-r { display: grid; align-content: start; gap: 10px; }
.bl-r i { height: 9px; border-radius: 5px; background: var(--surface-3); } .bl-r i.s { width: 60%; }
.bl-btn { margin-top: 8px; height: 38px; border-radius: 11px; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 600; }
.pg-win.fresh .pg-leave { animation: callme 1.6s ease-out infinite; }
.xp { position: absolute; z-index: 5; left: 50%; top: 50%; width: min(300px, 86%); translate: -50% -50%; display: grid; justify-items: center; gap: 4px; padding: 22px 20px 20px; border-radius: 20px; background: #fff; text-align: center; box-shadow: 0 30px 70px -20px rgb(0 0 0 / 0.55); opacity: 0; transform: scale(0.85) translateY(16px); pointer-events: none; transition: opacity 250ms, transform 450ms var(--spring); }
.xp-open .xp { opacity: 1; transform: none; pointer-events: auto; }
.xp-open .pg-veil { opacity: 1; }
.xp-x { position: absolute; top: 8px; right: 10px; border: 0; background: none; font-size: 18px; color: var(--ink-4); }
.xp-k { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--violet); }
.xp-big { font-size: 46px; line-height: 1; letter-spacing: -0.05em; background: linear-gradient(100deg, var(--violet), #ec4899); -webkit-background-clip: text; background-clip: text; color: transparent; }
.xp-s { color: var(--ink-3); margin-bottom: 8px; }
.xp-f { display: grid; grid-template-columns: minmax(0, 1fr); gap: 7px; width: 100%; }
.xp-f > * { width: 100%; min-width: 0; box-sizing: border-box; } /* an <input> keeps ~20ch of width unless allowed to shrink */
.xp-in { height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border-strong); font: inherit; font-size: 13px; }
.xp-in:focus { outline: 2px solid var(--violet); outline-offset: 0; border-color: transparent; }
.xp-btn { height: 38px; border-radius: 10px; border: 0; background: var(--violet); color: #fff; font-weight: 600; }
.xp-code { display: none; gap: 6px; justify-items: center; }
.xp-code span { font-family: var(--mono); font-weight: 700; letter-spacing: 0.12em; padding: 8px 16px; border-radius: 10px; border: 1.5px dashed var(--green); color: var(--green); background: var(--green-soft); }
.xp-code small { color: var(--green); font-weight: 600; }
.xp.sent .xp-f { display: none; }
.xp.sent .xp-code { display: grid; animation: lineIn 450ms var(--spring); }

/* ---------------------------------------------------------------- toast, cursor, confetti */
.pg-toast { position: absolute; z-index: 8; left: 50%; bottom: 16px; translate: -50% 0; padding: 9px 16px; border-radius: 99px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 560; white-space: nowrap; box-shadow: 0 12px 30px -8px rgb(0 0 0 / 0.5); opacity: 0; transform: translateY(14px); transition: opacity 250ms, transform 400ms var(--spring); pointer-events: none; }
.pg-toast.show { opacity: 1; transform: none; }
.pg-cursor { position: absolute; z-index: 9; left: 70%; top: 80%; width: 22px; opacity: 0; pointer-events: none; transition: left 700ms var(--ease-out), top 700ms var(--ease-out), opacity 300ms; filter: drop-shadow(0 3px 4px rgb(0 0 0 / 0.3)); }
.pg-cursor svg { fill: var(--ink); stroke: #fff; stroke-width: 1.2; }
.pg-win.auto .pg-cursor { opacity: 1; }
.pg-win.clicking .pg-cursor { transform: scale(0.8); }
.pg-confetti { position: absolute; inset: 0; z-index: 9; pointer-events: none; overflow: hidden; }
.pg-confetti i { position: absolute; left: var(--x0); top: var(--y0); width: 7px; height: 11px; border-radius: 2px; background: var(--c); animation: confetti 1300ms cubic-bezier(0.2, 0.6, 0.4, 1) forwards; }
@keyframes confetti { to { transform: translate(var(--dx), var(--dy)) rotate(var(--r)); opacity: 0; } }

/* ---------------------------------------------------------------- live stats */
.pg-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pg-st { display: grid; gap: 2px; padding: 12px 14px; border-radius: 14px; background: rgb(255 255 255 / 0.06); border: 1px solid rgb(255 255 255 / 0.1); transition: background 300ms, border-color 300ms; }
.pg-st span { font-size: 12px; color: #a99fc9; }
.pg-st b { font-size: 24px; font-weight: 650; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg-st.bump { animation: statBump 700ms var(--ease-out); }
.pg-st.good { border-color: rgb(74 222 128 / 0.5); background: rgb(74 222 128 / 0.1); }
.pg-st.good b { color: #86efac; }
@keyframes statBump { 0% { background: rgb(139 92 246 / 0.45); border-color: rgb(196 181 253 / 0.7); } }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1100px) {
  .sto-img { height: 150px; }
}
@media (max-width: 900px) {
  .pp-hero.v2 .pp-hero-in { grid-template-columns: minmax(0, 1fr); gap: 32px; min-height: 0; }
  .pg-stage { padding: 12px; border-radius: 24px; gap: 10px; }
  .pg-live { padding-right: 14px; font-size: 12px; }
  .pg-reset { position: static; justify-self: center; order: 9; }
  .pg-win { height: 440px; }
  .sto-grid { gap: 10px; padding: 12px; }
  .sto-img { height: 120px; }
}
@media (max-width: 600px) {
  .pg-win { height: 440px; font-size: 12px; }
  .sto-h { padding: 0 12px; } .sto-nav { display: none; } .sto-h > b { margin-right: auto; }
  .sto-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 10px; }
  .sto-img { height: 160px; border-radius: 9px; }
  .sto-n { font-size: 12px; line-height: 1.25; }
  .sto-add { height: 32px; font-size: 11.5px; border-radius: 8px; }
  .pg-pdp, .pg-blog { grid-template-columns: minmax(0, 1fr); grid-template-rows: 90px auto; gap: 12px; padding: 12px; }
  .pdp-t { font-size: 16px; } .pdp-pr { margin-bottom: 4px; }
  .fb, .tq { padding: 10px; gap: 6px; }
  .pg-st { padding: 9px 10px; border-radius: 12px; }
  .pg-st span { font-size: 10.5px; }
  .pg-st b { font-size: 17px; }
  .pg-url { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .shimmer, .pg-aura, .pg-live .dot { animation: none; }
  .pg-win.fresh * { animation: none !important; }
}
