/* =====================================================
 * FuturePages Premium Look — extra-premium layer (fp-x)
 * Loads after theme app.css and futurepages-polish.
 * Everything scoped under body.fp-x: deactivating the
 * plugin removes the entire layer.
 * ===================================================== */

body.fp-x {
  --fpx-gold-1: #f6e27a;
  --fpx-gold-2: #d9a93e;
  --fpx-gold-3: #f0cf6e;
  --fpx-glow: rgba(91, 91, 240, 0.28);
}

/* ---------------------------------------------------
 * Typography refinement — tighter optical rhythm on
 * display sizes, balanced wrapping. Premium is quiet.
 * --------------------------------------------------- */

body.fp-x h1,
body.fp-x h2 {
  letter-spacing: -0.018em;
  text-wrap: balance;
}

body.fp-x h3 {
  letter-spacing: -0.01em;
}

/* ---------------------------------------------------
 * Micro-details: selection, focus, scrollbar.
 * --------------------------------------------------- */

body.fp-x ::selection {
  background: rgba(91, 91, 240, 0.18);
  color: var(--fp-ink);
}

body.fp-x a:focus-visible,
body.fp-x button:focus-visible,
body.fp-x input:focus-visible,
body.fp-x [tabindex]:focus-visible {
  outline: 2px solid var(--fp-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (min-width: 782px) {
  body.fp-x::-webkit-scrollbar {
    width: 11px;
  }
  body.fp-x::-webkit-scrollbar-track {
    background: transparent;
  }
  body.fp-x::-webkit-scrollbar-thumb {
    background: #c9cede;
    border-radius: 999px;
    border: 3px solid #fff;
  }
  body.fp-x::-webkit-scrollbar-thumb:hover {
    background: var(--fp-primary);
  }
}

/* ---------------------------------------------------
 * Buttons: from flat indigo to glossy dimensional —
 * top light, depth shadow, glow lift on hover.
 * --------------------------------------------------- */

body.fp-x .wp-block-button__link,
body.fp-x .woocommerce a.button,
body.fp-x .woocommerce button.button,
body.fp-x .woocommerce input.button,
body.fp-x .woocommerce #respond input#submit,
body.fp-x .woocommerce a.button.alt,
body.fp-x .woocommerce button.button.alt {
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0) 42%),
    linear-gradient(120deg, #5b5bf0, #6448ee 55%, #4f46e5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 8px 20px var(--fpx-glow);
  transition: transform 0.22s var(--fp-ease), box-shadow 0.22s var(--fp-ease),
    filter 0.22s var(--fp-ease);
}

body.fp-x .wp-block-button__link:hover,
body.fp-x .woocommerce a.button:hover,
body.fp-x .woocommerce button.button:hover,
body.fp-x .woocommerce input.button:hover,
body.fp-x .woocommerce #respond input#submit:hover,
body.fp-x .woocommerce a.button.alt:hover,
body.fp-x .woocommerce button.button.alt:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    0 12px 28px rgba(91, 91, 240, 0.38);
  filter: saturate(1.08);
}

body.fp-x .wp-block-button__link:active,
body.fp-x .woocommerce a.button:active,
body.fp-x .woocommerce button.button:active {
  transform: translateY(0);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 5px 14px rgba(91, 91, 240, 0.3);
}

/* Keep outline-style buttons out of the glossy treatment. */
body.fp-x .is-style-outline .wp-block-button__link,
body.fp-x .wp-block-button.is-style-outline > .wp-block-button__link {
  background-image: none;
  box-shadow: none;
}

/* ---------------------------------------------------
 * Product cards: luminous gradient ring + indigo glow
 * on hover (on top of the theme's existing lift).
 * --------------------------------------------------- */

body.fp-x .woocommerce ul.products li.product::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--fp-radius);
  padding: 1.5px;
  background: linear-gradient(135deg, #5b5bf0, #7c3aed 45%, #22d3ee);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.35s var(--fp-ease);
  pointer-events: none;
  z-index: 4;
}

body.fp-x .woocommerce ul.products li.product:hover::after {
  opacity: 1;
}

body.fp-x .woocommerce ul.products li.product:hover {
  box-shadow:
    0 4px 12px rgba(11, 18, 32, 0.08),
    0 18px 44px rgba(91, 91, 240, 0.16);
}

/* Sale price gets quiet gradient ink on cards. Guarded so a
   browser without clip support keeps a solid, visible price. */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  body.fp-x .woocommerce ul.products li.product .price ins {
    background: linear-gradient(120deg, #4338ca, #5b5bf0 70%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

/* ---------------------------------------------------
 * Gold PREMIUM chip — injected by premium.js on cards
 * priced at the top tier ($47+). Sits opposite the
 * cyan savings badge (which lives top-right).
 * --------------------------------------------------- */

body.fp-x .fp-x-premium {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  font-family: Outfit, ui-sans-serif, system-ui, sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #574408;
  padding: 6px 10px;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--fpx-gold-1), var(--fpx-gold-2) 68%, var(--fpx-gold-3));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 2px 8px rgba(160, 120, 20, 0.35);
}

/* ---------------------------------------------------
 * Hero film grain — a whisper of texture for depth.
 * Injected by premium.js (theme owns both hero pseudos).
 * --------------------------------------------------- */

body.fp-x .fp-x-grain {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ---------------------------------------------------
 * Footer: gradient hairline instead of a flat border.
 * --------------------------------------------------- */

body.fp-x .fp-footer {
  position: relative;
}

body.fp-x .fp-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    rgba(91, 91, 240, 0.45) 30%,
    rgba(34, 211, 238, 0.45) 70%,
    transparent);
}

/* ---------------------------------------------------
 * Calm everything down for reduced-motion users.
 * --------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  body.fp-x .wp-block-button__link,
  body.fp-x .woocommerce a.button,
  body.fp-x .woocommerce button.button,
  body.fp-x .woocommerce ul.products li.product::after {
    transition: none;
  }
  body.fp-x .wp-block-button__link:hover,
  body.fp-x .woocommerce a.button:hover,
  body.fp-x .woocommerce button.button:hover {
    transform: none;
  }
}
