/* =====================================================
   FuturePages Polish — motion & conversion layer
   Loads after the theme's app.css and extends it.
   ===================================================== */

/* ---------------------------------------------------
   1. Hero: sequence the existing reveal groups so the
      badge → headline → sub → CTAs cascade on load.
   --------------------------------------------------- */

.fp-hero .fp-reveal:nth-of-type(1) { transition-delay: 0.05s; }
.fp-hero .fp-reveal:nth-of-type(2) { transition-delay: 0.18s; }
.fp-hero .fp-reveal:nth-of-type(3) { transition-delay: 0.32s; }
.fp-hero .fp-reveal:nth-of-type(4) { transition-delay: 0.46s; }

/* ---------------------------------------------------
   2. Social-proof marquee (injected by polish.js
      right under the hero on the front page).
   --------------------------------------------------- */

.fp-marquee {
  overflow: hidden;
  background: #0b1220;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 13px 0;
  position: relative;
}

.fp-marquee::before,
.fp-marquee::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 90px;
  z-index: 2;
  pointer-events: none;
}

.fp-marquee::before {
  left: 0;
  background: linear-gradient(90deg, #0b1220, transparent);
}

.fp-marquee::after {
  right: 0;
  background: linear-gradient(-90deg, #0b1220, transparent);
}

.fp-marquee-track {
  display: flex;
  gap: 44px;
  width: max-content;
  animation: fp-marquee-scroll 30s linear infinite;
  will-change: transform;
}

.fp-marquee:hover .fp-marquee-track {
  animation-play-state: paused;
}

.fp-marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.fp-marquee-item .fp-mq-star {
  color: #fbbf24;
  letter-spacing: 1px;
}

.fp-marquee-item strong {
  color: #fff;
  font-weight: 700;
}

.fp-marquee-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  flex: none;
  align-self: center;
}

@keyframes fp-marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------------------------------------------------
   3. Product grid alignment.
      WooCommerce's legacy clearfix (ul.products::before)
      becomes a phantom grid item under display:grid and
      shifts the whole grid (3+4+1 instead of 4+4) — kill
      it, and anchor every Add-to-cart button to the card
      bottom so rows line up perfectly.
   --------------------------------------------------- */

.woocommerce ul.products::before,
.woocommerce ul.products::after {
  content: none !important;
  display: none !important;
}

.woocommerce ul.products li.product {
  display: flex !important;
  flex-direction: column;
}

/* The add-to-cart button ships inside an unclassed <p> wrapper —
   anchoring that wrapper pins every button to the card bottom. */
.woocommerce ul.products li.product > p:has(.button) {
  margin-top: auto !important;
  margin-bottom: 0;
  text-align: center;
}

.woocommerce ul.products li.product .button {
  margin-top: 0.4em !important;
}

/* ---------------------------------------------------
   3b. Product cards: replace the plain black "Sale!"
      dot with a branded savings badge (JS computes
      the true % off per product).
   --------------------------------------------------- */

.woocommerce ul.products li.product .onsale {
  display: none;
}

.fp-save-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  background: linear-gradient(120deg, #5b5bf0, #22d3ee);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 5px 11px;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(91, 91, 240, 0.45);
  animation: fp-badge-in 0.5s var(--fp-ease, ease) both;
}

@keyframes fp-badge-in {
  from { opacity: 0; transform: scale(0.6); }
  to   { opacity: 1; transform: scale(1); }
}

/* ---------------------------------------------------
   4. Nav links: animated underline on hover.
   --------------------------------------------------- */

.fp-header .wp-block-navigation a {
  position: relative;
}

.fp-header .wp-block-navigation a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, #5b5bf0, #22d3ee);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.25s var(--fp-ease, ease);
}

.fp-header .wp-block-navigation a:hover::after,
.fp-header .wp-block-navigation a[aria-current="page"]::after {
  transform: scaleX(1);
}

/* ---------------------------------------------------
   5. Add-to-cart feedback (loop buttons).
   --------------------------------------------------- */

.woocommerce a.button.loading {
  opacity: 0.7;
  pointer-events: none;
}

.woocommerce a.button.added::after {
  content: " ✓";
  font-weight: 800;
}

/* ---------------------------------------------------
   6. FAQ page (page-id-15) repairs & accordion.
   --------------------------------------------------- */

/* Kill the duplicate "FAQs" heading and show the proper page
   title instead (Elementor's kit hides it via
   --page-title-display, leaving dead space at the top). */
.page-id-15 .elementor-element-58509ed {
  display: none;
}

.page-id-15 h1.wp-block-post-title {
  display: block !important;
}

.page-id-15 .e-con {
  padding-top: 0;
  padding-bottom: 0;
}

/* The FAQ block sits in a 2-column grid whose second column is
   empty, squeezing every card to half width — collapse it. */
.page-id-15 .elementor-element-83589cf > .e-con-inner {
  display: block !important;
}

.page-id-15 .elementor-element-9ad70ad {
  width: 100% !important;
  max-width: none !important;
}

/* Give the accordion list a comfortable reading width. */
.page-id-15 .fp-acc {
  width: 100%;
  max-width: 820px;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Accordion items (activated by polish.js) */
.page-id-15 .fp-acc {
  background: #fff;
  border: 1px solid var(--fp-line, #e5e8f0);
  border-radius: 14px;
  box-shadow: var(--fp-shadow, 0 1px 2px rgba(11, 18, 32, 0.05));
  margin: 0 0 12px;
  overflow: hidden;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.page-id-15 .fp-acc.is-open {
  border-color: rgba(91, 91, 240, 0.45);
  box-shadow: var(--fp-shadow-lg, 0 10px 30px rgba(11, 18, 32, 0.12));
}

.page-id-15 .fp-acc-q {
  margin: 0 !important;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px !important;
  font-size: 1.02rem !important;
  font-weight: 600 !important;
  color: var(--fp-ink, #0b1220) !important;
  user-select: none;
}

.page-id-15 .fp-acc-q:hover {
  color: var(--fp-primary, #5b5bf0) !important;
}

.page-id-15 .fp-acc-q::after {
  content: "+";
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--fp-line, #e5e8f0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 600;
  color: var(--fp-primary, #5b5bf0);
  transition: transform 0.3s var(--fp-ease, ease), background 0.2s ease, color 0.2s ease;
}

.page-id-15 .fp-acc.is-open .fp-acc-q::after {
  content: "–";
  background: var(--fp-primary, #5b5bf0);
  border-color: var(--fp-primary, #5b5bf0);
  color: #fff;
  transform: rotate(180deg);
}

.page-id-15 .fp-acc-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s var(--fp-ease, ease);
}

.page-id-15 .fp-acc-a > * {
  margin: 0 !important;
  padding: 0 20px 18px !important;
  font-size: 0.96rem !important;
  font-weight: 400 !important;
  color: var(--fp-muted, #5b6478) !important;
  line-height: 1.6 !important;
}

/* "Need help?" CTA: replace the flat grey box (kit colour on
   the outer container 425a1bf) with the brand gradient. */
.page-id-15 .elementor-element-425a1bf {
  background: linear-gradient(125deg, #5b5bf0 0%, #6d5bff 45%, #22d3ee 115%) !important;
  border-radius: 20px;
  padding: 56px 32px !important;
  margin-top: 28px;
  max-width: 1040px;
  margin-left: auto;
  margin-right: auto;
}

.page-id-15 .elementor-element-8eb3a11 {
  background: transparent !important;
}

.page-id-15 .elementor-element-425a1bf .elementor-heading-title {
  color: #fff !important;
}

.page-id-15 .elementor-element-425a1bf .elementor-widget-text-editor {
  color: rgba(255, 255, 255, 0.85) !important;
}

.page-id-15 .elementor-element-425a1bf .elementor-button {
  background: #fff !important;
  color: var(--fp-ink, #0b1220) !important;
  font-weight: 700;
  border: none !important;
  border-radius: 999px;
  padding: 12px 30px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.page-id-15 .elementor-element-425a1bf .elementor-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(11, 18, 32, 0.25);
}

/* ---------------------------------------------------
   7. Empty cart: bring the button in line with the
      brand and soften the notice.
   --------------------------------------------------- */

.wc-block-cart__empty-cart__title {
  font-weight: 700;
}

/* ---------------------------------------------------
   8. Header brand: bigger, bolder, perfectly aligned.
   --------------------------------------------------- */

.fp-header .fp-brand {
  gap: 13px;
  align-items: center;
}

.fp-header .fp-wordmark {
  font-size: 1.72rem;
  letter-spacing: -0.03em;
  position: relative;
  top: -1px;
}

@media (max-width: 640px) {
  .fp-header .fp-wordmark {
    font-size: 1.45rem;
  }

  .fp-header .fp-mark {
    width: 40px;
    height: 40px;
  }
}

/* Highlight the Free Guide nav item. */
.fp-header .wp-block-navigation .fp-nav-free a {
  color: #5b5bf0;
  font-weight: 700;
}

/* ---------------------------------------------------
   9. Free Guide page.
   --------------------------------------------------- */

/* The page template prints its own h1 above the custom hero —
   hide it so the designed headline is the only title. */
.page-id-134 h1.wp-block-post-title {
  display: none;
}

.fp-free-hero {
  text-align: center;
  padding-top: 22px;
}

.fp-free-gate {
  margin-top: 46px;
}

.fp-free-sub {
  color: var(--fp-muted, #5b6478);
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
  font-size: 1.06rem;
  line-height: 1.6;
}

.fp-free-point {
  background: #fff;
  border: 1px solid var(--fp-line, #e5e8f0);
  border-radius: 14px;
  box-shadow: var(--fp-shadow, 0 1px 2px rgba(11, 18, 32, 0.05));
  padding: 20px 18px;
  font-size: 0.95rem;
  color: var(--fp-muted, #5b6478);
  line-height: 1.5;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.fp-free-point:hover {
  transform: translateY(-4px);
  box-shadow: var(--fp-shadow-lg, 0 12px 30px rgba(11, 18, 32, 0.12));
}

.fp-free-point strong {
  color: var(--fp-ink, #0b1220);
  font-size: 1.02rem;
}

.fp-free-card {
  max-width: 560px;
  margin: 30px auto 10px;
  background: #fff;
  border: 1px solid var(--fp-line, #e5e8f0);
  border-radius: 22px;
  box-shadow: var(--fp-shadow-lg, 0 20px 44px rgba(11, 18, 32, 0.14));
  padding: 38px 36px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.fp-free-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, #5b5bf0, #22d3ee);
}

.fp-free-card h2 {
  margin: 0 0 8px;
  font-size: 1.5rem;
}

.fp-free-card > p {
  color: var(--fp-muted, #5b6478);
  font-size: 0.98rem;
  margin: 0 0 20px;
}

#fp-free-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#fp-free-email {
  width: 100%;
  box-sizing: border-box;
  padding: 15px 17px;
  font-size: 15px;
  border: 1.5px solid #e3e5f0;
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#fp-free-email:focus {
  border-color: #5b5bf0;
  box-shadow: 0 0 0 4px rgba(91, 91, 240, 0.14);
}

#fp-free-submit {
  width: 100%;
  padding: 15px 18px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  background: linear-gradient(120deg, #5b5bf0, #22d3ee);
  transition: filter 0.2s, transform 0.05s;
}

#fp-free-submit:hover {
  filter: brightness(1.06);
}

#fp-free-submit[disabled] {
  opacity: 0.6;
  cursor: default;
}

#fp-free-msg {
  font-size: 13px;
  color: #d23b3b;
  min-height: 16px;
}

#fp-free-success {
  display: none;
}

#fp-free-success.fpwp-on {
  display: block;
}

#fp-free-success .fp-free-success-title {
  font-weight: 700;
  color: var(--fp-ink, #0b1220);
  font-size: 1.1rem;
  margin: 0 0 4px;
}

#fp-free-success p {
  color: var(--fp-muted, #5b6478);
  font-size: 0.95rem;
  margin: 0 0 14px;
}

.fp-free-dl {
  display: inline-block;
  background: linear-gradient(120deg, #5b5bf0, #22d3ee);
  color: #fff !important;
  font-weight: 700;
  font-size: 15px;
  padding: 14px 30px;
  border-radius: 999px;
  text-decoration: none;
  transition: filter 0.2s, transform 0.15s;
}

.fp-free-dl:hover {
  filter: brightness(1.07);
  transform: translateY(-2px);
}

.fp-free-fine {
  margin: 16px 0 0 !important;
  font-size: 11.5px !important;
  color: #9aa0b4 !important;
}

/* ---------------------------------------------------
   10. Checkout (classic): clean, focused, pro.
   --------------------------------------------------- */

.fp-checkout-header {
  background: #fff;
  border-bottom: 1px solid var(--fp-line, #e5e8f0);
}

.fp-checkout-secure {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--fp-muted, #5b6478);
  background: #f3f4ff;
  border: 1px solid rgba(91, 91, 240, 0.25);
  border-radius: 999px;
  padding: 8px 16px;
}

.woocommerce-checkout .woocommerce-info {
  background: #f3f4ff;
  border-top: none;
  border: 1px solid rgba(91, 91, 240, 0.25);
  border-radius: 12px;
  color: var(--fp-ink, #0b1220);
}

.woocommerce-checkout .woocommerce-info::before {
  color: #5b5bf0;
}

.woocommerce-checkout #customer_details,
.woocommerce-checkout .woocommerce-checkout-review-order {
  background: #fff;
  border: 1px solid var(--fp-line, #e5e8f0);
  border-radius: 18px;
  box-shadow: var(--fp-shadow, 0 1px 2px rgba(11, 18, 32, 0.05));
  padding: 28px 30px;
}

.woocommerce-checkout #order_review_heading {
  float: none;
  width: 100%;
  clear: both;
  margin: 34px 0 14px;
}

.woocommerce-checkout .form-row input.input-text,
.woocommerce-checkout .form-row select {
  border: 1.5px solid #e3e5f0;
  border-radius: 11px;
  padding: 13px 15px;
  font-size: 15px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.woocommerce-checkout .form-row input.input-text:focus,
.woocommerce-checkout .form-row select:focus {
  border-color: #5b5bf0;
  box-shadow: 0 0 0 4px rgba(91, 91, 240, 0.14);
  outline: none;
}

.woocommerce-checkout table.shop_table {
  border: none;
  border-radius: 0;
}

.woocommerce-checkout table.shop_table td,
.woocommerce-checkout table.shop_table th {
  border-color: #eef0f6;
}

.woocommerce-checkout #place_order {
  width: 100%;
  background: linear-gradient(120deg, #5b5bf0, #22d3ee);
  border: none;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 17px 28px;
  transition: filter 0.2s, transform 0.1s;
}

.woocommerce-checkout #place_order:hover {
  filter: brightness(1.07);
  transform: translateY(-1px);
}

/* Trust reassurance under the pay button */
.woocommerce-checkout .woocommerce-privacy-policy-text p {
  font-size: 0.82rem;
  color: var(--fp-muted, #5b6478);
}

/* ---------------------------------------------------
   11. Thank-you / order received (classic): celebrate.
   --------------------------------------------------- */

.woocommerce-order-received .woocommerce-thankyou-order-received {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--fp-ink, #0b1220);
  background: linear-gradient(125deg, rgba(91, 91, 240, 0.08), rgba(34, 211, 238, 0.08));
  border: 1px solid rgba(91, 91, 240, 0.25);
  border-radius: 18px;
  padding: 34px 26px;
  margin-bottom: 26px;
}

.woocommerce-order-received .woocommerce-thankyou-order-received::before {
  content: "🎉";
  display: block;
  font-size: 2.2rem;
  margin-bottom: 8px;
}

.woocommerce-order-received ul.woocommerce-thankyou-order-details {
  background: #fff;
  border: 1px solid var(--fp-line, #e5e8f0);
  border-radius: 16px;
  box-shadow: var(--fp-shadow, 0 1px 2px rgba(11, 18, 32, 0.05));
  padding: 22px 26px !important;
  margin-bottom: 24px;
}

.woocommerce-order-received .woocommerce-table--order-downloads,
.woocommerce-order-received .woocommerce-table--order-details {
  background: #fff;
  border: 1px solid var(--fp-line, #e5e8f0) !important;
  border-radius: 16px;
  box-shadow: var(--fp-shadow, 0 1px 2px rgba(11, 18, 32, 0.05));
  padding: 10px 16px;
}

.woocommerce-order-received .woocommerce-table--order-downloads {
  border-left: 4px solid #5b5bf0 !important;
}

.woocommerce-order-received .woocommerce-MyAccount-downloads-file,
.woocommerce-order-received .download-file a {
  background: linear-gradient(120deg, #5b5bf0, #22d3ee);
  color: #fff !important;
  border-radius: 999px;
  padding: 9px 20px;
  font-weight: 700;
  text-decoration: none;
  display: inline-block;
}

/* ---------------------------------------------------
   12. My Account: login / register as clean cards.
   --------------------------------------------------- */

.woocommerce-account .u-columns.col2-set {
  gap: 26px;
}

.woocommerce-account .u-column1,
.woocommerce-account .u-column2 {
  background: #fff;
  border: 1px solid var(--fp-line, #e5e8f0);
  border-radius: 18px;
  box-shadow: var(--fp-shadow, 0 1px 2px rgba(11, 18, 32, 0.05));
  padding: 28px 30px 30px;
}

.woocommerce-account .u-column1 h2,
.woocommerce-account .u-column2 h2 {
  margin-top: 0;
  font-size: 1.4rem;
}

.woocommerce-account form.login,
.woocommerce-account form.register {
  border: none;
  padding: 0;
  margin: 0;
}

/* ---------------------------------------------------
   13. Social band (homepage) + thank-you follow strip.
   --------------------------------------------------- */

.fp-social-band {
  padding: 26px 24px 78px;
}

.fp-social-band-sub {
  color: var(--fp-muted, #5b6478);
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.fp-social-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  max-width: 860px;
  margin: 34px auto 0;
}

@media (max-width: 720px) {
  .fp-social-cards {
    grid-template-columns: 1fr;
    max-width: 420px;
  }
}

.fp-social-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--fp-line, #e5e8f0);
  border-radius: 18px;
  box-shadow: var(--fp-shadow, 0 1px 2px rgba(11, 18, 32, 0.05));
  padding: 28px 20px 24px;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.fp-social-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--fp-shadow-lg, 0 20px 44px rgba(11, 18, 32, 0.14));
  border-color: rgba(91, 91, 240, 0.4);
}

.fp-social-ic {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: linear-gradient(135deg, #7c5cff, #5b5bf0 50%, #22d3ee);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  box-shadow: 0 6px 16px rgba(91, 91, 240, 0.35);
  transition: transform 0.2s ease;
}

.fp-social-card:hover .fp-social-ic {
  transform: scale(1.08) rotate(-3deg);
}

.fp-social-ic svg {
  width: 26px;
  height: 26px;
}

.fp-social-name {
  font-weight: 700;
  color: var(--fp-ink, #0b1220);
  font-size: 1.02rem;
}

.fp-social-handle {
  color: var(--fp-muted, #5b6478);
  font-size: 0.88rem;
}

.fp-social-btn {
  margin-top: 10px;
  background: #f3f4ff;
  color: #5b5bf0;
  border: 1px solid rgba(91, 91, 240, 0.35);
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: 999px;
  padding: 7px 22px;
  transition: background 0.18s ease, color 0.18s ease;
}

.fp-social-card:hover .fp-social-btn {
  background: #5b5bf0;
  color: #fff;
}

/* Thank-you page follow strip (rendered via woocommerce_thankyou) */
.fp-ty-social {
  margin-top: 26px;
  background: linear-gradient(125deg, rgba(91, 91, 240, 0.07), rgba(34, 211, 238, 0.07));
  border: 1px solid rgba(91, 91, 240, 0.22);
  border-radius: 16px;
  padding: 22px 24px;
  text-align: center;
}

.fp-ty-social p {
  margin: 0 0 12px;
  font-weight: 600;
  color: var(--fp-ink, #0b1220);
}

.fp-ty-social a {
  display: inline-block;
  margin: 0 7px;
  color: #5b5bf0;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid rgba(91, 91, 240, 0.3);
  transition: border-color 0.15s;
}

.fp-ty-social a:hover {
  border-bottom-color: #5b5bf0;
}

/* Popup success: small follow links */
.fpwp-social {
  margin-top: 14px;
  font-size: 12.5px;
  color: #9aa0b4;
}

.fpwp-social a {
  color: #5b5bf0;
  font-weight: 700;
  text-decoration: none;
  margin: 0 4px;
}

/* ---------------------------------------------------
   Reduced motion: disable the decorative loops.
   --------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .fp-marquee-track {
    animation: none;
    flex-wrap: wrap;
    width: auto;
  }

  .fp-hero .fp-reveal:nth-of-type(n) {
    transition-delay: 0s;
  }

  .fp-save-badge {
    animation: none;
  }
}
