/* Product page + demo modal — unique TSTP story layout */
.product-page { padding-bottom: 3.5rem; }
.product-hero-band {
  background:
    radial-gradient(circle at 12% 18%, var(--hero-glow-teal, rgba(31,154,168,.42)), transparent 42%),
    radial-gradient(circle at 88% 8%, var(--hero-glow-accent, rgba(198,243,109,.16)), transparent 34%),
    linear-gradient(145deg, var(--hero-from, #050f14) 0%, var(--hero-mid, #0c2a33) 48%, var(--hero-to, #11404c) 100%);
  color: var(--hero-ink, #e8f6f8);
  padding: 2.75rem 0 2.25rem;
  border-bottom: 1px solid var(--hero-border, rgba(255,255,255,.06));
  text-align: center;
}
.product-hero-band a { color: var(--hero-link, #9fe7ef); }
.product-hero-band .meta,
.product-hero-band .muted {
  color: var(--hero-muted, #cfe9ee);
}
.product-hero-stack {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1.15rem 1.35rem;
  align-items: start;
  margin: 1rem auto 1.35rem;
  max-width: 52rem;
  text-align: left;
}
.product-hero-copy { min-width: 0; }
.product-hero-band h1 {
  font-family: var(--display);
  font-size: clamp(1.85rem, 4.5vw, 2.75rem);
  margin: 0 0 .35rem;
  letter-spacing: -.015em;
  line-height: 1.1;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.product-icon.xl {
  width: 88px; height: 88px; border-radius: 20px; display: grid; place-items: center;
  background: linear-gradient(145deg, #1f9aa8, #0e6f7a); color: #fff;
  font-weight: 800; font-size: 1.4rem; flex: 0 0 auto;
  box-shadow: 0 12px 28px rgba(0,0,0,.28);
}
.product-tagline {
  font-size: 1.12rem; max-width: 38rem; color: var(--hero-muted, #cfe9ee);
  margin: .35rem 0 .5rem; line-height: 1.5;
}
.product-actions { display: flex; flex-wrap: wrap; gap: .65rem; justify-content: center; }
.btn-ghost-dark {
  border: 1px solid var(--hero-btn-border, rgba(255,255,255,.4));
  color: var(--hero-btn-text, #fff);
  background: transparent;
}
.btn-quiet {
  background: var(--hero-btn-bg, rgba(255,255,255,.1));
  color: var(--hero-btn-text, #fff);
  border: 1px solid var(--hero-btn-border, rgba(255,255,255,.2));
}
.product-hero-band .btn-primary {
  color: var(--on-accent, #102018);
}

.product-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  margin-top: 2.25rem;
  align-items: start;
}
.product-layout-wide { width: min(var(--wrap-max, 1080px), calc(100% - 2rem)); }
.product-main { min-width: 0; display: grid; gap: 1.25rem; }
.product-panel {
  background: var(--panel, #f7fafb);
  color: var(--ink, #12222b);
  border: 1px solid rgba(18,34,43,.12);
  border-radius: 16px;
  padding: 1.4rem 1.5rem 1.3rem;
  box-shadow: 0 8px 24px rgba(8, 28, 36, 0.04);
}
.product-panel h2,
.product-panel p,
.product-panel li { color: inherit; }
.product-story-body .tstp-prose { max-width: none; }
.product-story-split {
  display: grid;
  grid-template-columns: minmax(160px, 280px) minmax(0, 1fr);
  gap: 1.25rem 1.5rem;
  align-items: start;
}
.product-block {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}
.product-block h2 {
  font-family: var(--display);
  margin: 0 0 .75rem;
  font-size: 1.35rem;
}
.product-lede-text {
  font-size: 1.08rem;
  line-height: 1.65;
  max-width: none;
  margin: 0;
}
.capability-list, .howto-list { margin: 0; padding-left: 1.2rem; line-height: 1.55; }
.capability-list li, .howto-list li { margin-bottom: .5rem; }
.capability-list li::marker { color: var(--teal-deep); }

.product-story-media {
  margin: 0 0 1.25rem;
  border-radius: 18px;
  overflow: hidden;
  background: #0f2430;
  max-width: 320px;
}
.product-story-media img {
  display: block; width: 100%; height: auto;
}

.aside-card {
  background: var(--card-bg, var(--panel, #fff));
  color: var(--ink, #12222b);
  border: 1px solid var(--line, rgba(18,34,43,.1));
  border-radius: 16px;
  padding: 1.05rem 1.15rem;
  margin-bottom: 1rem;
}
.aside-card h3 { margin: 0 0 .45rem; font-size: 1rem; font-family: var(--display); }
.aside-card ul { margin: 0; padding-left: 1.1rem; }
.aside-card p { margin: 0; line-height: 1.5; color: var(--muted); }
.aside-actions { display: grid; gap: .55rem; margin-top: .85rem; }
.aside-link-list { list-style: none; margin: 0; padding: 0; }
.aside-link-list li { margin: 0 0 .45rem; }
.aside-link-list a { text-decoration: none; font-weight: 600; }
.product-kicker {
  margin: 0 0 .35rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .72rem;
  color: var(--hero-link, #9fe7ef);
  font-weight: 700;
}

.product-layout-compact .product-hero-band { padding: 1.75rem 0 1.5rem; }
.product-layout-compact .product-icon.xl { width: 64px; height: 64px; font-size: 1.1rem; border-radius: 14px; }
.product-layout-compact .product-hero-band h1 { font-size: clamp(1.5rem, 3.5vw, 2rem); }

.demo-modal[hidden] { display: none !important; }
.demo-modal {
  position: fixed; inset: 0; z-index: 80; display: grid; place-items: center;
}
.demo-modal-backdrop { position: absolute; inset: 0; background: rgba(4, 14, 18, .72); }
.demo-modal-panel {
  position: relative; width: min(1100px, calc(100% - 1.5rem)); height: min(86vh, 820px);
  background: #0b1c24; border-radius: 16px; overflow: hidden;
  display: flex; flex-direction: column; box-shadow: 0 24px 60px rgba(0,0,0,.4);
}
.demo-modal-bar {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  padding: .75rem 1rem; background: #122833; color: #dff6f9;
}
.demo-modal-bar h2 { margin: 0; font-size: 1rem; font-family: var(--display); }
.demo-modal-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.demo-frame { flex: 1; width: 100%; border: 0; background: #fff; }
body.demo-open { overflow: hidden; }

/* Downloads */
.product-downloads {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--hero-border, rgba(255,255,255,.12));
}
.product-downloads-title {
  font-family: var(--display);
  margin: 0 0 .35rem;
  font-size: 1.1rem;
  color: var(--hero-ink, #e8f6f8);
}
.product-downloads .muted { color: var(--hero-muted, #a8c5cc); margin: 0 0 .75rem; }
.product-downloads-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
}
.product-download-btn { text-decoration: none; }

/* Feature grid — bordered capability tiles */
.product-feature-grid-inner {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 0.85rem;
}
.product-feature-item {
  position: relative;
  padding: 1.05rem 1.1rem 1.1rem;
  border: 1px solid var(--line, rgba(18,34,43,.12));
  border-radius: 14px;
  background: var(--card-bg, var(--panel, #f4fafb));
  color: var(--ink, #12222b);
  box-shadow: 0 6px 16px rgba(8, 28, 36, 0.04);
  min-height: 100%;
}
.product-feature-item::before {
  content: "";
  display: block;
  width: 2.1rem;
  height: 3px;
  border-radius: 999px;
  margin: 0 0 0.75rem;
  background: linear-gradient(90deg, var(--teal, #1f9aa8), var(--accent, #c6f36d));
}
.product-feature-item h3 {
  margin: 0 0 .45rem;
  font-size: 1.02rem;
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.25;
}
.product-feature-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: .95rem;
}
.product-feature-grid > .muted {
  margin: 0 0 0.25rem;
  max-width: 42rem;
}

/* Gallery */
.product-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: .75rem;
}
.product-gallery-item {
  display: block;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(18,34,43,.1);
  border-radius: 12px;
  overflow: hidden;
  background: #0f2430;
  cursor: pointer;
  text-align: left;
  color: inherit;
  font: inherit;
}
.product-gallery-item img {
  display: block;
  width: 100%;
  height: 120px;
  object-fit: cover;
}
.product-gallery-caption {
  display: block;
  padding: .4rem .55rem;
  font-size: .8rem;
  color: #cfe9ee;
  background: #122833;
}

/* Lightbox */
.product-lightbox[hidden] { display: none !important; }
.product-lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
}
.product-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 14, 18, .82);
}
.product-lightbox-panel {
  position: relative;
  width: min(960px, calc(100% - 1.5rem));
  max-height: min(90vh, 860px);
  background: #0b1c24;
  border-radius: 14px;
  padding: 2.5rem 1rem 1rem;
  box-shadow: 0 24px 60px rgba(0,0,0,.45);
  overflow: auto;
}
.product-lightbox-close {
  position: absolute;
  top: .5rem;
  right: .5rem;
}
.product-lightbox-panel img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 8px;
}
.product-lightbox-caption {
  margin: .75rem 0 0;
  color: #cfe9ee;
  text-align: center;
}
body.lightbox-open { overflow: hidden; }

/* Theme switcher */
.theme-switcher {
  margin-top: 1rem;
}
.theme-switcher-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
}
.theme-switcher-form label {
  font-size: .85rem;
  color: var(--muted);
}
.theme-switcher-form select {
  min-height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(18,34,43,.15);
  padding: .25rem .5rem;
}
.theme-switcher-hint { font-size: .8rem; margin: .4rem 0 0; }

/* Product reviews + next steps — bordered panels with clear padding */
.product-reviews.product-panel,
.product-next-steps.product-panel {
  padding: 1.5rem 1.6rem 1.45rem;
  border: 1px solid var(--line, rgba(18, 34, 43, 0.14));
  background: var(--card-bg, var(--panel, #fff));
  color: var(--ink, #12222b);
  box-shadow: 0 10px 28px rgba(8, 28, 36, 0.05);
}
.product-reviews-board {
  display: grid;
  gap: 0.75rem;
  margin: 0 0 1.15rem;
  padding: 0.95rem 1rem;
  border: 1px solid var(--line, rgba(18, 34, 43, 0.1));
  border-radius: 12px;
  background: color-mix(in srgb, var(--panel, #f7fafb) 92%, transparent);
}
.product-reviews-empty { margin: 0; }
.product-review-card {
  margin: 0;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--line, rgba(18, 34, 43, 0.1));
  border-radius: 10px;
  background: var(--card-bg, var(--panel, #fff));
  color: var(--ink, #12222b);
}
.product-review-card .meta { margin: 0 0 0.4rem; font-weight: 600; }
.product-review-card p { margin: 0; line-height: 1.55; }
.product-review-compose {
  margin-top: 0.25rem;
  padding: 1rem 1.05rem 1.05rem;
}
.product-review-compose h3 {
  margin: 0 0 0.75rem;
  font-family: var(--display);
  font-size: 1.05rem;
}
.product-next-steps .product-lede-text {
  margin: 0 0 1rem;
}
.product-next-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.25rem;
  padding: 1rem 1.05rem;
  border: 1px solid var(--line, rgba(18, 34, 43, 0.1));
  border-radius: 12px;
  background: color-mix(in srgb, var(--panel, #f7fbfc) 94%, transparent);
}

@media (max-width: 900px) {
  .product-layout { grid-template-columns: 1fr; gap: 1.5rem; }
  .product-hero-stack { grid-template-columns: auto minmax(0, 1fr); }
  .product-story-split { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .product-hero-stack { grid-template-columns: 1fr; justify-items: start; }
  .product-actions .btn { width: 100%; }
  .product-story-media { max-width: none; }
  .demo-modal-panel { width: calc(100% - .75rem); height: calc(100% - .75rem); border-radius: 12px; }
  .demo-modal-actions { width: 100%; }
  .demo-modal-actions .btn { flex: 1 1 auto; min-height: 44px; }
  .product-downloads-list { flex-direction: column; }
  .product-download-btn { width: 100%; text-align: center; }
  .product-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-feature-grid-inner { grid-template-columns: 1fr; }
  .product-lightbox-panel { width: calc(100% - .75rem); padding-top: 2.75rem; }
  .product-next-actions .btn { width: 100%; }
  .product-reviews.product-panel,
  .product-next-steps.product-panel { padding: 1.15rem 1.1rem 1.1rem; }
}
