/**
 * Campaign-style product landing (Kickstarter-inspired). Loaded via head-product-landing.ejs.
 * Typography: match app shell (Plus Jakarta Sans from header).
 */
.product-landing-page {
  --pl-font: var(--fg-font-sans, 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif);
  --pl-bg: var(--fg-bg, #f4f6f9);
  --pl-ink: var(--fg-text, #1a1d21);
  --pl-muted: var(--fg-text-secondary, #4a5568);
  --pl-hero-ink: #fff;
  --pl-accent: var(--fg-secondary, #2e9d4f);
  --pl-card-border: var(--fg-border, rgba(15, 23, 42, 0.08));
  --pl-radius: 14px;
  background: var(--pl-bg);
  color: var(--pl-ink);
  font-family: var(--pl-font);
}

.product-landing-page,
.product-landing-page .ui.button,
.product-landing-page .ui.container,
.product-landing-page .ui.message,
.product-landing-page .pl-story,
.product-landing-page .pl-story__body {
  font-family: var(--pl-font) !important;
}

/* Rich text from TinyMCE: strip editor fonts so the page matches the app */
.product-landing-page .pl-story__body,
.product-landing-page .pl-story__body p,
.product-landing-page .pl-story__body li,
.product-landing-page .pl-story__body td,
.product-landing-page .pl-story__body th,
.product-landing-page .pl-story__body blockquote,
.product-landing-page .pl-story__body span,
.product-landing-page .pl-story__body div,
.product-landing-page .landing-body,
.product-landing-page .landing-body p {
  font-family: var(--pl-font) !important;
}

.product-landing-page .pl-story__body h1,
.product-landing-page .pl-story__body h2,
.product-landing-page .pl-story__body h3,
.product-landing-page .pl-story__body h4 {
  font-family: var(--pl-font) !important;
  font-weight: 700;
  color: var(--pl-ink);
  letter-spacing: -0.02em;
}

.product-landing-page .pl-story__body code,
.product-landing-page .pl-story__body pre,
.product-landing-page .pl-story__body kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', monospace !important;
}

.product-landing-page .pl-preview-banner {
  margin: 0 !important;
  border-radius: 0 !important;
}

/* ----- Full-width hero ----- */
.product-landing-page .pl-hero {
  position: relative;
  min-height: min(72vh, 640px);
  display: flex;
  align-items: flex-end;
  color: var(--pl-hero-ink);
  margin-bottom: 0;
}

.product-landing-page .pl-hero__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #0d1f12;
}

.product-landing-page .pl-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.product-landing-page .pl-hero__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(8, 18, 12, 0.92) 0%,
    rgba(8, 18, 12, 0.45) 45%,
    rgba(8, 18, 12, 0.25) 100%
  );
}

.product-landing-page .pl-hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 3rem 1.25rem 2.75rem;
  max-width: 960px !important;
}

.product-landing-page .pl-hero__favorite {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 3;
}

.product-landing-page .pl-hero__favorite .icon {
  font-size: 1.75rem !important;
  cursor: pointer;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
  opacity: 0.95;
}

.product-landing-page .pl-hero__creator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem;
  font-size: 0.95rem;
  opacity: 0.95;
}

.product-landing-page .pl-hero__creator a {
  color: #fff !important;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
}

.product-landing-page .pl-hero__title {
  font-family: var(--pl-font);
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}

.product-landing-page .pl-hero__sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.55;
  max-width: 42rem;
  margin: 0 0 1.5rem;
  opacity: 0.92;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}

.product-landing-page .pl-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.product-landing-page .pl-hero__learn.ui.button {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.55) inset !important;
  color: #fff !important;
}

/* ----- Main two-column ----- */
.product-landing-page .pl-main-wrap {
  padding: 2.75rem 1.25rem 4rem;
}

.product-landing-page .pl-campaign-grid {
  align-items: flex-start !important;
}

.product-landing-page .pl-section-title {
  font-family: var(--pl-font);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 1.1rem;
  letter-spacing: -0.02em;
  padding-bottom: 0.65rem;
  border-bottom: 2px solid rgba(46, 157, 79, 0.25);
  display: inline-block;
  width: 100%;
  box-sizing: border-box;
}

.product-landing-page .pl-muted {
  color: var(--pl-muted);
}

.product-landing-page .pl-tiny {
  font-size: 0.85rem;
  margin: 0.5rem 0 0;
}

/* Video — YouTube/Vimeo: fixed 16:9 embed. Direct MP4/WebM: natural aspect ratio (no crop). */
.product-landing-page .pl-video {
  margin-bottom: 2.75rem;
}

.product-landing-page .pl-video__frame--embed {
  position: relative;
  width: 100%;
  border-radius: var(--pl-radius);
  overflow: hidden;
  background: #0a0a0a;
  box-shadow: var(--fg-shadow-md, 0 4px 6px rgba(15, 23, 42, 0.07), 0 12px 24px rgba(15, 23, 42, 0.06));
  aspect-ratio: 16 / 9;
}

.product-landing-page .pl-video__frame--embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Direct file URL: do not lock to 16:9 or use absolute fill — that crops/zooms many sources */
.product-landing-page .pl-video__frame--direct {
  position: relative;
  width: 100%;
  border-radius: var(--pl-radius);
  overflow: hidden;
  background: #0a0a0a;
  box-shadow: var(--fg-shadow-md, 0 4px 6px rgba(15, 23, 42, 0.07), 0 12px 24px rgba(15, 23, 42, 0.06));
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-landing-page .pl-video__native--direct {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(85vh, 960px);
  object-fit: contain;
  background: #000;
}

/* Gallery */
.product-landing-page .pl-gallery {
  margin-bottom: 2.5rem;
}

.product-landing-page .pl-gallery__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
}

.product-landing-page .pl-gallery__cell {
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #e8e6e1;
  aspect-ratio: 4 / 3;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.product-landing-page .pl-gallery__cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Story */
.product-landing-page .pl-story {
  background: var(--fg-surface, #fff);
  border-radius: var(--pl-radius);
  padding: 1.85rem 1.65rem 2.1rem;
  border: 1px solid var(--pl-card-border);
  box-shadow: var(--fg-shadow, 0 1px 3px rgba(15, 23, 42, 0.06), 0 4px 12px rgba(15, 23, 42, 0.04));
}

.product-landing-page .pl-story__body {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--pl-ink);
}

.product-landing-page .pl-story__body h1 {
  font-size: 1.5rem;
  margin: 1.5rem 0 0.75rem;
  font-weight: 700;
}

.product-landing-page .pl-story__body h2 {
  font-size: 1.35rem;
  margin: 1.5rem 0 0.75rem;
}

.product-landing-page .pl-story__body h3 {
  font-size: 1.15rem;
  margin: 1.25rem 0 0.5rem;
}

.product-landing-page .pl-story__body h4 {
  font-size: 1.05rem;
  margin: 1rem 0 0.5rem;
  font-weight: 600;
}

.product-landing-page .pl-story__body p {
  margin: 0 0 1rem;
}

.product-landing-page .pl-story__body ul,
.product-landing-page .pl-story__body ol {
  margin: 0 0 1rem 1.25rem;
}

.product-landing-page .pl-story__body a {
  color: var(--pl-accent);
  font-weight: 500;
  text-decoration: underline;
}

/* Sticky sidebar card */
.product-landing-page .pl-sticky-card {
  position: sticky;
  top: 88px;
  background: var(--fg-surface, #fff);
  border-radius: var(--pl-radius);
  border: 1px solid var(--pl-card-border);
  padding: 1.35rem;
  box-shadow: var(--fg-shadow-md, 0 4px 6px rgba(15, 23, 42, 0.07), 0 12px 24px rgba(15, 23, 42, 0.06));
}

.product-landing-page .pl-card-thumb {
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 1rem;
  aspect-ratio: 1;
  background: #eee;
}

.product-landing-page .pl-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-landing-page .pl-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  line-height: 1.3;
}

.product-landing-page .pl-card-price {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.product-landing-page .pl-price-old {
  text-decoration: line-through;
  color: #999;
  font-size: 0.95rem;
  margin-right: 0.35rem;
}

.product-landing-page .pl-price-now {
  color: var(--pl-ink);
}

.product-landing-page .pl-badge {
  display: inline-block;
  margin-left: 0.35rem;
  font-size: 0.85rem;
  background: #ffe8e6;
  color: #c0392b;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  vertical-align: middle;
}

.product-landing-page .pl-card-meta {
  font-size: 0.88rem;
  color: var(--pl-muted);
  margin: 0 0 1rem;
}

.product-landing-page .pl-card-ctas .button {
  margin-bottom: 0.35rem !important;
}

/* Reviews block (shared partial with PDP) */
.product-landing-page .pl-reviews-wrap {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--pl-card-border);
}

.product-landing-page .pl-reviews-wrap .fg-product-reviews {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

@media (max-width: 767px) {
  .product-landing-page .pl-sticky-card {
    position: relative;
    top: auto;
    margin-top: 1rem;
  }

  .product-landing-page .pl-hero {
    min-height: 56vh;
  }
}
