/* ── Homepage PG demo strip (full-width, ใต้แบนเนอร์) ── */
.hero-demo-strip {
  width: 100%;
  padding: 14px clamp(12px, 2vw, 36px) 18px;
  background:
    linear-gradient(180deg, #faf8ff 0%, #f0ebfa 42%, #ebe4f7 100%);
  border-top: 1px solid rgba(124, 58, 237, 0.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 -4px 20px rgba(91, 33, 182, 0.04);
}

.hero-demo-strip__inner {
  width: 100%;
  max-width: none;
  margin: 0 auto;
}

.hero-demo-strip__grid.pd-grid {
  gap: 8px;
}

/* Hero CTA card — การ์ดแรกในแถว */
.hero-demo-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(124, 58, 237, 0.18);
  box-shadow: 0 4px 14px rgba(76, 29, 149, 0.08);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.hero-demo-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(76, 29, 149, 0.16);
}

.hero-demo-card__link {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
}

.hero-demo-card__link:focus-visible {
  outline: 2px solid #7c3aed;
  outline-offset: 2px;
}

.hero-demo-card__media {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  aspect-ratio: 3 / 4.4;
  padding: 14px 10px;
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 0%, rgba(251, 191, 36, 0.28), transparent 52%),
    radial-gradient(circle at 85% 100%, rgba(236, 72, 153, 0.22), transparent 48%),
    linear-gradient(160deg, #4c1d95 0%, #6d28d9 45%, #9333ea 78%, #c026d3 100%);
}

.hero-demo-card__media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.65;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.13) 0.75px, transparent 0.75px),
    repeating-linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.045) 0,
      rgba(255, 255, 255, 0.045) 1px,
      transparent 1px,
      transparent 11px
    ),
    repeating-linear-gradient(
      45deg,
      rgba(255, 255, 255, 0.03) 0,
      rgba(255, 255, 255, 0.03) 1px,
      transparent 1px,
      transparent 11px
    );
  background-size: 15px 15px, auto, auto;
}

.hero-demo-card__media > * {
  position: relative;
  z-index: 1;
}

.hero-demo-card__badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: var(--fw-extrabold);
  letter-spacing: var(--tracking-thai);
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.hero-demo-card__lottie {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  pointer-events: none;
  line-height: 0;
}

.hero-demo-card__lottie svg {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.hero-demo-card__title {
  margin: 0;
  font-size: clamp(0.82rem, 2.8vw, 1.05rem);
  font-weight: var(--fw-extrabold);
  letter-spacing: var(--tracking-thai);
  line-height: 1.15;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
}

.hero-demo-card__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 2px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-thai);
  line-height: 1.2;
  color: #5b21b6;
  background: linear-gradient(180deg, #fff 0%, #faf5ff 100%);
  border: 1px solid rgba(124, 58, 237, 0.16);
  box-shadow: 0 2px 8px rgba(91, 33, 182, 0.1);
  transition: color 0.15s, background 0.15s;
}

.hero-demo-card:hover .hero-demo-card__btn {
  color: #6d28d9;
  background: #fff;
}

.hero-demo-card__btn i {
  font-size: 0.62rem;
}

.hero-demo-strip__wrap {
  position: relative;
  min-width: 0;
}

.hero-demo-strip__wrap::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 36px;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.2s ease;
  background: linear-gradient(90deg, transparent 0%, rgba(240, 235, 250, 0.72) 55%, #ebe4f7 100%);
}

.hero-demo-strip__wrap.is-scrollable::after {
  opacity: 1;
}

.hero-demo-strip__next {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  display: none;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid rgba(124, 58, 237, 0.22);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: #6d28d9;
  font-size: 0.7rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(76, 29, 149, 0.14);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.hero-demo-strip__wrap.is-scrollable .hero-demo-strip__next {
  display: inline-flex;
}

.hero-demo-strip__next:hover {
  transform: translateY(-50%) scale(1.06);
  box-shadow: 0 6px 16px rgba(76, 29, 149, 0.2);
  background: #fff;
}

.hero-demo-strip__next:active {
  transform: translateY(-50%) scale(0.96);
}

@media (max-width: 767px) {
  .hero-demo-strip {
    padding: 14px 10px 18px;
  }

  .hero-demo-strip__wrap {
    margin-right: -10px;
  }

  .hero-demo-strip__row.hero-demo-strip__grid.pd-grid {
    --demo-cols: 3.5;
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    padding: 0 10px 2px 12px;
  }

  .hero-demo-strip__row.hero-demo-strip__grid.pd-grid::-webkit-scrollbar {
    display: none;
  }

  .hero-demo-strip__row .pd-card,
  .hero-demo-strip__row .hero-demo-card {
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  .hero-demo-strip__row .pd-card {
    width: calc((100vw - 56px) / var(--demo-cols));
  }

  .hero-demo-strip__row .hero-demo-card {
    width: calc(((100vw - 56px) / var(--demo-cols)) * 1.28);
  }

  .hero-demo-card__media {
    aspect-ratio: 3.84 / 4.4;
  }
}

@media (min-width: 768px) {
  .hero-demo-strip {
    padding: 16px clamp(14px, 2vw, 36px) 20px;
  }

  .hero-demo-strip__grid.pd-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) repeat(10, minmax(0, 1fr));
    gap: 10px;
    align-items: start;
  }

  .hero-demo-card__media {
    aspect-ratio: 4.5 / 4.4;
  }
}

.hero-demo-strip .pd-card__body {
  display: none;
}

.hero-demo-strip .pd-card__badge {
  top: 7px;
  left: 7px;
  padding: 2px 7px;
  font-size: 0.55rem;
}

@media (min-width: 992px) {
  .hero-demo-strip {
    padding: 18px clamp(16px, 2vw, 40px) 22px;
  }

  .hero-demo-strip__grid.pd-grid {
    grid-template-columns: minmax(0, 1.5fr) repeat(10, minmax(0, 1fr));
    gap: 10px;
  }

  .hero-demo-card__media {
    aspect-ratio: 4.5 / 4.4;
  }

  .hero-demo-card {
    border-radius: 14px;
  }

  .hero-demo-card__lottie {
    width: 36px;
    height: 36px;
  }

  .hero-demo-card__btn {
    font-size: var(--fs-xs);
    padding: 8px 14px;
  }

  .hero-demo-strip .pd-card {
    border-radius: 14px;
  }

  .hero-demo-strip .pd-card__badge {
    top: 8px;
    left: 8px;
    padding: 3px 8px;
    font-size: 0.58rem;
  }
}
