/* ==========================================================================
   PixHaste — single product
   A digital key has no unboxing, no shipping and no size chart. The page is
   built around the three things a buyer actually has to check before paying:
   which platform the key activates on, which region it is valid in, and how
   fast it arrives. WooCommerce default layout is replaced entirely.
   ========================================================================== */

.ph-pdp { position: relative; }

/* Ambient backdrop taken from the game screenshot. */
.ph-pdp__ambient {
  position: absolute; top: 0; left: 0; right: 0; height: 620px;
  z-index: -1; overflow: hidden;
}
.ph-pdp__ambient img {
  width: 100%; height: 100%; object-fit: cover;
  filter: blur(58px) saturate(140%); transform: scale(1.15); opacity: .38;
}
.ph-pdp__ambient::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8, 11, 20, .74) 0%, rgba(8, 11, 20, .9) 48%, var(--ph-bg) 100%);
}

.ph-pdp__top {
  display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  gap: 46px; align-items: start;
  padding-block: 34px clamp(40px, 5vw, 64px);
}

/* ============================================================ gallery === */
.ph-pdp__gallery { position: sticky; top: calc(var(--ph-header-h) + 22px); }

.ph-pdp__cover {
  position: relative;
  border-radius: var(--ph-r-xl);
  overflow: hidden;
  border: 1px solid var(--ph-line-2);
  box-shadow: var(--ph-shadow-lg);
  aspect-ratio: 3 / 4;
  background: var(--ph-surface-2);
  transform-style: preserve-3d;
  transition: transform .5s cubic-bezier(.2, .8, .3, 1);
}
.ph-pdp__cover img { width: 100%; height: 100%; object-fit: cover; }

/* Glare that follows the pointer, driven by two custom properties set in JS. */
.ph-pdp__cover::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .17), transparent 55%);
  opacity: 0; transition: opacity .35s ease;
}
.ph-pdp__cover:hover::after { opacity: 1; }

.ph-pdp__shots {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 12px;
}
.ph-pdp__shot {
  position: relative; padding: 0; border: 1px solid var(--ph-line);
  border-radius: 9px; overflow: hidden; cursor: pointer;
  aspect-ratio: 16 / 9; background: var(--ph-surface-2);
  transition: border-color .25s ease, transform .25s ease;
}
.ph-pdp__shot img { width: 100%; height: 100%; object-fit: cover; transition: opacity .25s ease; }
.ph-pdp__shot:hover { border-color: var(--ph-violet); transform: translateY(-2px); }
.ph-pdp__shot.is-active { border-color: var(--ph-pink); }
.ph-pdp__shot-more {
  display: grid; place-items: center;
  font-size: .8rem; font-weight: 700; color: var(--ph-text-2);
  background: var(--ph-surface-2);
}

/* ============================================================= summary == */
.ph-pdp__summary { min-width: 0; }

.ph-pdp__eyebrow {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  font-size: .8rem; color: var(--ph-text-3); margin-bottom: 12px;
}
.ph-pdp__eyebrow a { color: var(--ph-violet-400); font-weight: 600; }
.ph-pdp__eyebrow a:hover { color: var(--ph-pink-400); }

.ph-pdp h1 {
  font-size: clamp(1.8rem, 3.6vw, 2.85rem);
  line-height: 1.08; margin-bottom: 16px;
}

.ph-pdp__chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }

/* Short editorial standfirst, distinct from the long description below. */
.ph-pdp__standfirst {
  font-size: 1.02rem; color: var(--ph-text-2); line-height: 1.7;
  margin-bottom: 26px; max-width: 62ch;
}

/* ------------------------------------------------------- purchase box -- */
.ph-buybox {
  position: relative; overflow: hidden;
  border-radius: var(--ph-r-lg);
  border: 1px solid var(--ph-line-2);
  background: linear-gradient(180deg, rgba(22, 31, 51, .9), rgba(13, 18, 32, .9));
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  padding: 22px;
  margin-bottom: 24px;
  box-shadow: var(--ph-shadow);
}
.ph-buybox::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--ph-grad);
}

.ph-buybox__price-row {
  display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 18px;
}
.ph-buybox__price {
  font-family: var(--ph-font-display);
  font-size: clamp(2rem, 4vw, 2.6rem); font-weight: 800; line-height: 1; color: #fff;
}
.ph-buybox__price del { font-size: 1.05rem; font-weight: 500; color: var(--ph-text-3); margin-right: 10px; }
.ph-buybox__price ins { text-decoration: none; background: none; color: #fff; }
.ph-buybox__vat { font-size: .78rem; color: var(--ph-text-3); padding-bottom: 5px; }

.ph-buybox__actions { display: flex; gap: 11px; align-items: stretch; margin-bottom: 18px; flex-wrap: wrap; }
.ph-buybox__actions .ph-btn--primary { flex: 1; min-width: 200px; }

/* Stock line */
.ph-buybox__stock {
  display: flex; align-items: center; gap: 8px;
  font-size: .86rem; font-weight: 600; color: #6ee7a0; margin-bottom: 16px;
}
.ph-buybox__stock .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--ph-success);
  box-shadow: 0 0 0 0 rgba(34, 197, 94, .6);
  animation: ph-stock-pulse 2.2s ease-out infinite;
}
@keyframes ph-stock-pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .55); }
  70% { box-shadow: 0 0 0 9px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}
.ph-buybox__stock--out { color: var(--ph-text-3); }
.ph-buybox__stock--out .dot { background: var(--ph-text-3); animation: none; }

/* Key facts table inside the buy box: platform, region, activation, type. */
.ph-keyfacts { display: grid; gap: 1px; background: var(--ph-line); border-radius: var(--ph-r); overflow: hidden; }
.ph-keyfact {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 11px 14px; background: rgba(8, 11, 20, .6);
  font-size: .85rem;
}
.ph-keyfact__label { display: flex; align-items: center; gap: 9px; color: var(--ph-text-3); }
.ph-keyfact__label svg { width: 15px; height: 15px; color: var(--ph-violet-400); flex: none; }
.ph-keyfact__value { color: var(--ph-text); font-weight: 600; text-align: right; }

/* ------------------------------------------------------- trust badges -- */
/* Four promises, each with its own idle animation so the row has life
   without needing a video or hero image to carry it. */
.ph-trust-badges {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 26px;
}
.ph-trust-badge {
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  padding: 16px 10px; text-align: center;
  border-radius: var(--ph-r); border: 1px solid var(--ph-line);
  background: rgba(255, 255, 255, .035);
  transition: transform .3s ease, border-color .3s ease, background .3s ease;
}
.ph-trust-badge:hover {
  transform: translateY(-4px);
  border-color: rgba(124, 58, 237, .5);
  background: var(--ph-grad-soft);
}
.ph-trust-badge__icon {
  display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 11px;
  background: var(--ph-grad-soft); border: 1px solid rgba(124, 58, 237, .3);
  color: var(--ph-violet-400);
}
.ph-trust-badge__icon svg { width: 19px; height: 19px; }
.ph-trust-badge b { font-size: .8rem; color: var(--ph-text); line-height: 1.25; }
.ph-trust-badge span { font-size: .7rem; color: var(--ph-text-3); line-height: 1.3; }

/* Idle motion, one per badge, staggered so they never move in unison. */
.ph-trust-badge:nth-child(1) .ph-trust-badge__icon { animation: ph-bolt 3.4s ease-in-out infinite; }
.ph-trust-badge:nth-child(2) .ph-trust-badge__icon { animation: ph-float 3.8s ease-in-out infinite .3s; }
.ph-trust-badge:nth-child(3) .ph-trust-badge__icon { animation: ph-float 4.2s ease-in-out infinite .6s; }
.ph-trust-badge:nth-child(4) .ph-trust-badge__icon { animation: ph-float 3.6s ease-in-out infinite .9s; }

@keyframes ph-bolt {
  0%, 88%, 100% { transform: none; color: var(--ph-violet-400); }
  92% { transform: scale(1.14); color: var(--ph-pink); }
  96% { transform: scale(.97); }
}
@keyframes ph-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@media (max-width: 620px) { .ph-trust-badges { grid-template-columns: repeat(2, 1fr); } }

/* ---------------------------------------------------- delivery notice -- */
.ph-pdp__pause {
  display: flex; gap: 13px; align-items: flex-start;
  padding: 15px 17px; margin-bottom: 24px;
  border-radius: var(--ph-r);
  border: 1px solid rgba(245, 165, 36, .35);
  background: rgba(245, 165, 36, .1);
  color: #f7cf94; font-size: .87rem; line-height: 1.6;
}
.ph-pdp__pause svg { width: 19px; height: 19px; flex: none; margin-top: 2px; }
.ph-pdp__pause strong { color: #ffe3b8; }

/* ============================================================== tabs ==== */
.ph-pdp__detail { padding-bottom: clamp(40px, 5vw, 70px); }

.ph-tabs__nav {
  display: flex; gap: 4px; flex-wrap: wrap;
  border-bottom: 1px solid var(--ph-line);
  margin-bottom: 28px;
}
.ph-tabs__btn {
  position: relative;
  padding: 13px 20px; border: 0; background: none; cursor: pointer;
  font-size: .94rem; font-weight: 600; color: var(--ph-text-3);
  transition: color .25s ease;
}
.ph-tabs__btn::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px;
  background: var(--ph-grad); border-radius: 2px;
  transform: scaleX(0); transform-origin: center;
  transition: transform .3s cubic-bezier(.4, 0, .2, 1);
}
.ph-tabs__btn:hover { color: var(--ph-text-2); }
.ph-tabs__btn.is-active { color: var(--ph-text); }
.ph-tabs__btn.is-active::after { transform: scaleX(1); }

.ph-tabs__panel { display: none; animation: ph-tab-in .4s ease; }
.ph-tabs__panel.is-active { display: block; }
@keyframes ph-tab-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* Description body — supplier HTML lands here, so style generically. */
.ph-pdp__desc { color: var(--ph-text-2); line-height: 1.8; max-width: 76ch; }
.ph-pdp__desc h2, .ph-pdp__desc h3 { color: var(--ph-text); margin-top: 1.8em; }
.ph-pdp__desc h2:first-child, .ph-pdp__desc h3:first-child { margin-top: 0; }
.ph-pdp__desc img { border-radius: var(--ph-r); margin: 1.4em 0; border: 1px solid var(--ph-line); }
.ph-pdp__desc ul, .ph-pdp__desc ol { padding-left: 1.3em; }
.ph-pdp__desc li { margin-bottom: .5em; }
.ph-pdp__desc strong { color: var(--ph-text); }
.ph-pdp__desc a { color: var(--ph-violet-400); }

/* System requirements: supplier ships two <ul> blocks, min and recommended. */
.ph-sysreq { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 18px; }
.ph-sysreq__col {
  padding: 22px; border-radius: var(--ph-r-lg);
  border: 1px solid var(--ph-line); background: var(--ph-surface);
}
.ph-sysreq__col h4 {
  display: flex; align-items: center; gap: 9px;
  font-size: .8rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ph-pink-400); margin-bottom: 15px;
}
.ph-sysreq ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ph-sysreq li {
  display: grid; grid-template-columns: 116px 1fr; gap: 12px;
  font-size: .87rem; color: var(--ph-text-2);
  padding-bottom: 10px; border-bottom: 1px solid var(--ph-line);
}
.ph-sysreq li:last-child { border-bottom: 0; padding-bottom: 0; }
.ph-sysreq li strong { color: var(--ph-text-3); font-weight: 600; }
.ph-sysreq li br { display: none; }
@media (max-width: 480px) { .ph-sysreq li { grid-template-columns: 1fr; gap: 2px; } }

/* Activation steps */
.ph-activation { display: grid; gap: 14px; max-width: 760px; }
.ph-activation__step {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 18px 20px; border-radius: var(--ph-r);
  border: 1px solid var(--ph-line); background: var(--ph-surface);
  transition: border-color .3s ease, transform .3s ease;
}
.ph-activation__step:hover { border-color: rgba(124, 58, 237, .45); transform: translateX(4px); }
.ph-activation__num {
  display: grid; place-items: center; flex: none;
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--ph-grad); color: #fff;
  font-weight: 800; font-size: .9rem; font-family: var(--ph-font-display);
}
.ph-activation__step p { margin: 0; color: var(--ph-text-2); font-size: .93rem; line-height: 1.65; padding-top: 4px; }

/* ========================================================== lightbox ==== */
.ph-lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center;
  background: rgba(4, 6, 12, .93);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  opacity: 0; visibility: hidden;
  transition: opacity .3s ease, visibility .3s;
  padding: 24px;
}
.ph-lightbox.is-open { opacity: 1; visibility: visible; }
.ph-lightbox img {
  max-width: min(1180px, 94vw); max-height: 86vh;
  width: auto; border-radius: var(--ph-r-lg);
  box-shadow: var(--ph-shadow-lg);
  transform: scale(.95); transition: transform .35s cubic-bezier(.34, 1.3, .5, 1);
}
.ph-lightbox.is-open img { transform: scale(1); }
.ph-lightbox__close, .ph-lightbox__nav {
  position: absolute; z-index: 2;
  display: grid; place-items: center;
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--ph-line-2); background: rgba(255, 255, 255, .08);
  color: #fff; cursor: pointer; transition: background .25s ease, transform .25s ease;
}
.ph-lightbox__close:hover, .ph-lightbox__nav:hover { background: rgba(255, 255, 255, .18); transform: scale(1.08); }
.ph-lightbox__close { top: 22px; right: 22px; }
.ph-lightbox__nav svg, .ph-lightbox__close svg { width: 21px; height: 21px; }
.ph-lightbox__nav--prev { left: 22px; top: 50%; margin-top: -23px; }
.ph-lightbox__nav--next { right: 22px; top: 50%; margin-top: -23px; }
.ph-lightbox__count {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  padding: 7px 16px; border-radius: 99px;
  background: rgba(255, 255, 255, .08); border: 1px solid var(--ph-line-2);
  font-size: .82rem; color: var(--ph-text-2);
}

/* ====================================================== related rail ==== */
.ph-related { border-top: 1px solid var(--ph-line); padding-block: clamp(40px, 5vw, 66px); }

/* ======================================================== responsive ==== */
@media (max-width: 1023px) {
  .ph-pdp__top { grid-template-columns: 1fr; gap: 32px; }
  .ph-pdp__gallery { position: static; max-width: 420px; margin-inline: auto; width: 100%; }
}

/* Sticky mobile buy bar — the buy box scrolls away on a phone, this does not. */
.ph-sticky-buy {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  display: none; align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(13, 18, 32, .94);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--ph-line-2);
  transform: translateY(110%); transition: transform .35s cubic-bezier(.4, 0, .2, 1);
}
.ph-sticky-buy.is-visible { transform: translateY(0); }
.ph-sticky-buy__price { font-family: var(--ph-font-display); font-size: 1.25rem; font-weight: 750; color: #fff; }
.ph-sticky-buy__title { font-size: .75rem; color: var(--ph-text-3); }
@media (max-width: 1023px) { .ph-sticky-buy { display: flex; } }
