/**
 * Gmingo — Promote Products premium layer.
 * Scoped to body.gmingo-promote. Visual enhancement only: layered background,
 * breathing cards, deep hover states, upgraded buttons. GPU-friendly
 * (transform / opacity / filter / box-shadow only) with reduced-motion support.
 */

/* ---------------------------------------------------------------- *
 * Layered page background — soft radial lighting + brand pattern
 * ---------------------------------------------------------------- */
body.gmingo-promote {
  background-color: #fbfcfe;
}
body.gmingo-promote::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(56rem 38rem at 8% -4%, rgba(44, 100, 211, 0.06), transparent 60%),
    radial-gradient(48rem 34rem at 96% 22%, rgba(56, 179, 90, 0.045), transparent 58%),
    radial-gradient(40rem 30rem at 50% 105%, rgba(26, 58, 124, 0.05), transparent 55%),
    linear-gradient(180deg, #f8fafc 0%, #ffffff 42%, #f8fafc 100%);
}
body.gmingo-promote::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.025;
  background-image: url('../images/gmingo-chat-mark.svg');
  background-size: 180px 180px;
  background-repeat: repeat;
  -webkit-mask-image: linear-gradient(90deg, #000 0%, transparent 20%, transparent 80%, #000 100%);
  mask-image: linear-gradient(90deg, #000 0%, transparent 20%, transparent 80%, #000 100%);
}

/* Sections sit on the layered background instead of flat blocks. */
body.gmingo-promote .promote-benefits-section {
  background:
    linear-gradient(180deg, rgba(241, 245, 249, 0) 0%, rgba(241, 245, 249, 0.85) 14%, rgba(241, 245, 249, 0.85) 86%, rgba(241, 245, 249, 0) 100%);
}

/* ---------------------------------------------------------------- *
 * Shared breathing (shadow / glow only — never fights hover motion)
 * ---------------------------------------------------------------- */
@keyframes gm-promote-card-breathe {
  0%, 100% {
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 10px 34px -22px rgba(15, 23, 42, 0.12);
    filter: brightness(1);
  }
  50% {
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.05), 0 18px 44px -22px rgba(44, 100, 211, 0.16);
    filter: brightness(1.02);
  }
}
@keyframes gm-promote-icon-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.035); }
}

/* ---------------------------------------------------------------- *
 * Product cards — premium elevation, glow border, breathing
 * ---------------------------------------------------------------- */
body.gmingo-promote .promote-product-card {
  border-radius: 1.5rem;
  border-color: rgba(203, 213, 225, 0.7);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 10px 34px -22px rgba(15, 23, 42, 0.12);
  transition:
    transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1),
    box-shadow 0.35s cubic-bezier(0.22, 0.61, 0.36, 1),
    border-color 0.35s ease;
  animation: gm-promote-card-breathe 7s ease-in-out infinite;
  will-change: transform;
}
body.gmingo-promote .promote-product-card:nth-child(4n + 2) { animation-delay: -1.8s; }
body.gmingo-promote .promote-product-card:nth-child(4n + 3) { animation-delay: -3.5s; }
body.gmingo-promote .promote-product-card:nth-child(4n + 4) { animation-delay: -5.2s; }
body.gmingo-promote .promote-product-card:hover {
  transform: translateY(-6px);
  border-color: rgba(44, 100, 211, 0.28);
  box-shadow:
    0 20px 60px rgba(15, 23, 42, 0.08),
    0 28px 56px -20px rgba(44, 100, 211, 0.22),
    0 0 0 1px rgba(44, 100, 211, 0.08);
  animation-play-state: paused;
}
body.gmingo-promote .promote-product-card img {
  transition: transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}
body.gmingo-promote .promote-product-card:hover img {
  transform: scale(1.045);
}
body.gmingo-promote .promote-product-card .promote-card-price {
  transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1), color 0.3s ease;
  transform-origin: left center;
}
body.gmingo-promote .promote-product-card:hover .promote-card-price {
  transform: scale(1.05);
  color: #1e4a9e;
}

/* Card buttons: gradient primary + glass secondary */
body.gmingo-promote .promote-product-card .promote-card-btn-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 55%, #1d4ed8 100%);
  box-shadow: 0 6px 20px -8px rgba(37, 99, 235, 0.5);
  transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.3s ease, filter 0.3s ease;
}
body.gmingo-promote .promote-product-card .promote-card-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px -8px rgba(37, 99, 235, 0.6);
  filter: brightness(1.05);
}
body.gmingo-promote .promote-product-card .promote-card-btn-primary:active {
  transform: translateY(0);
  transition-duration: 0.1s;
}
body.gmingo-promote .promote-product-card .promote-card-btn-secondary {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1), border-color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}
body.gmingo-promote .promote-product-card .promote-card-btn-secondary:hover {
  transform: translateY(-2px);
  border-color: rgba(44, 100, 211, 0.35);
  box-shadow: 0 10px 22px -12px rgba(15, 23, 42, 0.25);
}
body.gmingo-promote .promote-product-card .promote-card-btn-secondary:active {
  transform: translateY(0);
  transition-duration: 0.1s;
}

/* ---------------------------------------------------------------- *
 * How-it-works + Benefits cards — breathing glow layered on the
 * existing hover lift defined inline on the page
 * ---------------------------------------------------------------- */
body.gmingo-promote .promote-pro-card,
body.gmingo-promote .promote-benefit-card {
  border-radius: 1.5rem;
  animation: gm-promote-card-breathe 8s ease-in-out infinite;
}
body.gmingo-promote .promote-pro-card:nth-child(2),
body.gmingo-promote .promote-benefit-card:nth-child(2) { animation-delay: -2.6s; }
body.gmingo-promote .promote-pro-card:nth-child(3),
body.gmingo-promote .promote-benefit-card:nth-child(3) { animation-delay: -5.2s; }
body.gmingo-promote .promote-benefit-card:nth-child(4) { animation-delay: -6.6s; }
body.gmingo-promote .promote-pro-card:hover,
body.gmingo-promote .promote-benefit-card:hover {
  animation-play-state: paused;
}
body.gmingo-promote .promote-pro-step {
  animation: gm-promote-icon-breathe 6s ease-in-out infinite;
}

/* ---------------------------------------------------------------- *
 * Products section heading + load more
 * ---------------------------------------------------------------- */
body.gmingo-promote #promote-products-load-more {
  border-radius: 1rem;
  transition:
    transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1),
    box-shadow 0.35s cubic-bezier(0.22, 0.61, 0.36, 1),
    border-color 0.3s ease,
    background-color 0.3s ease;
}
body.gmingo-promote #promote-products-load-more:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 32px -14px rgba(15, 23, 42, 0.25);
}
body.gmingo-promote #promote-products-load-more:active {
  transform: translateY(-1px);
  transition-duration: 0.1s;
}

/* ---------------------------------------------------------------- *
 * FAQ section — glass polish on existing pill items
 * ---------------------------------------------------------------- */
body.gmingo-promote .gmingo-faq-item {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
body.gmingo-promote .gmingo-faq-icon {
  animation: gm-promote-icon-breathe 7s ease-in-out infinite;
}
body.gmingo-promote .gmingo-faq-item.is-open .gmingo-faq-icon {
  animation: none;
}

/* ---------------------------------------------------------------- *
 * Focus visibility (accessibility)
 * ---------------------------------------------------------------- */
body.gmingo-promote .promote-product-card a:focus-visible,
body.gmingo-promote .promote-product-card button:focus-visible,
body.gmingo-promote .promote-faq-trigger:focus-visible,
body.gmingo-promote .gmingo-faq-trigger:focus-visible {
  outline: 2px solid #2C64D3;
  outline-offset: 2px;
  border-radius: 0.5rem;
}

/* ---------------------------------------------------------------- *
 * Reduced motion — everything settles, nothing animates
 * ---------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  body.gmingo-promote .promote-product-card,
  body.gmingo-promote .promote-pro-card,
  body.gmingo-promote .promote-benefit-card,
  body.gmingo-promote .promote-pro-step,
  body.gmingo-promote .promote-faq-icon,
  body.gmingo-promote .gmingo-faq-icon {
    animation: none !important;
  }
  body.gmingo-promote .promote-product-card:hover,
  body.gmingo-promote .promote-product-card .promote-card-btn-primary:hover,
  body.gmingo-promote .promote-product-card .promote-card-btn-secondary:hover,
  body.gmingo-promote #promote-products-load-more:hover {
    transform: none;
  }
  body.gmingo-promote .promote-product-card:hover img,
  body.gmingo-promote .promote-product-card:hover .promote-card-price {
    transform: none;
  }
}
