/* =========================================================
   Product PDP — shared showcase (templates + plugins) + floating nav
   White Desert–inspired: title/summary → inset gallery → tile grid
   Matches LAZI shop cards: Nunito, white / grey / black
   ========================================================= */

.product--template,
.product--plugin {
  max-width: none;
  padding: 0 0 calc(var(--space-6) + 4rem);
}

/* —— Template hero: copy on top, inset carousel below —— */
.product-showcase-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: clamp(1.75rem, 4vw, 2.75rem);
  max-width: var(--site-max);
  width: 100%;
  margin: 0 auto;
  padding: clamp(1.25rem, 3vw, 2rem) var(--site-margin) clamp(2rem, 4vw, 3rem);
  background: transparent;
  border-bottom: 0;
  overflow: visible;
  min-height: 0;
}

.product-showcase-hero__copy {
  position: relative;
  z-index: 1;
  max-width: 40rem;
  width: 100%;
  margin: 0;
  padding: 0;
  text-align: left;
}

.product-back {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 0.35rem;
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-muted-2);
  text-decoration: none;
  border: 0;
  line-height: 1.2;
  transition: color 0.2s var(--ease-out, ease);
}

.product-back__arrow {
  flex: 0 0 auto;
  display: block;
  transition: transform 0.2s var(--ease-out, ease);
}

.product-back:hover {
  color: var(--color-text, var(--ink-900));
}

.product-back:hover .product-back__arrow {
  transform: translateX(-2px);
}

.product-showcase-hero__eyebrow {
  margin: 0 0 0.45rem;
  font-size: var(--font-size-xs);
  font-weight: 400;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-muted);
}

.product-showcase-hero h1 {
  margin: 0;
  max-width: none;
  font-family: var(--font-heading, var(--font-display), "Helvetica Neue", Helvetica, Arial, sans-serif);
  font-size: var(--font-size-h1, clamp(1.85rem, 4vw, 3rem));
  font-weight: var(--font-weight-heading, 500);
  letter-spacing: -0.035em;
  line-height: var(--lh-tight, 1.08);
  color: var(--color-text);
}

.product-showcase-hero__summary {
  margin: 1.1rem 0 0;
  max-width: 36rem;
  color: var(--color-muted);
  font-size: var(--font-size-lg);
  line-height: 1.55;
  text-align: left;
}

.product-showcase-hero__summary p {
  margin: 0;
}

/* Description band between carousel and highlights */
.product-showcase-desc {
  max-width: var(--site-max);
  margin: 0 auto;
  padding: clamp(1.75rem, 4vw, 2.75rem) var(--site-margin) 0;
}

.product-showcase-desc__inner {
  max-width: 40rem;
  color: var(--color-muted);
  font-size: var(--font-size-lg);
  line-height: 1.6;
}

.product-showcase-desc__inner p {
  margin: 0 0 0.85em;
}

.product-showcase-desc__inner p:last-child {
  margin-bottom: 0;
}

/* Dedicated product YouTube / Vimeo — cinematic inset */
.product-showcase-video {
  max-width: var(--site-max);
  margin: 0 auto;
  padding: clamp(2.25rem, 5vw, 3.5rem) var(--site-margin) 0;
}

.product-showcase-video__inner {
  max-width: 52rem;
  margin: 0 auto;
}

.product-showcase-video__copy {
  margin: 0 0 1.15rem;
  max-width: 36rem;
}

.product-showcase-video__title {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--font-size-xs);
  font-weight: 400;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-muted);
}

.product-showcase-video__caption {
  margin: 0.45rem 0 0;
  color: var(--color-muted);
  font-size: var(--font-size-sm);
  line-height: 1.5;
}

.product-showcase-video__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--color-canvas, var(--grey-300));
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.product-showcase-video__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #000;
}

/* Inset media gallery — larger padded canvas, shared shop grey */
.product-showcase-hero__gallery {
  position: relative;
  width: 100%;
  margin: 0;
  padding: clamp(0.85rem, 2.2vw, 1.5rem);
  background: var(--color-canvas, var(--grey-300));
  border: 0;
  border-radius: var(--radius);
  overflow: hidden;
  outline: none;
  box-shadow: none;
}

.product-showcase-hero__viewport {
  position: relative;
  overflow: hidden;
  background: var(--color-canvas, var(--grey-300));
  border: 0;
  border-radius: var(--radius-sm);
  aspect-ratio: 16 / 9;
  max-height: min(86vh, 64rem);
  margin: 0 auto;
}

.product-showcase-hero__track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.55s var(--ease-out);
  will-change: transform;
}

.product-showcase-hero__slide {
  position: relative;
  flex: 0 0 100%;
  margin: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-showcase-hero__slide img,
.product-showcase-hero__slide video,
.product-showcase-hero__video {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  filter: grayscale(0.08) contrast(1.03);
}

.product-showcase-hero__slide--iframe {
  background: var(--color-bg, var(--grey-50));
}

.product-showcase-hero__iframe-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--color-bg, var(--grey-50));
}

/* Compact demo controls living in the gallery's padding band */
.product-showcase-hero__iframe-controls {
  display: none;
  position: absolute;
  top: 0.45rem;
  right: clamp(0.85rem, 2.2vw, 1.5rem);
  z-index: 4;
  align-items: center;
  gap: 0.6rem;
}

.product-showcase-hero__gallery.is-iframe-active .product-showcase-hero__iframe-controls {
  display: inline-flex;
}

/* Extra headroom in the gutter for the demo controls */
.product-showcase-hero__gallery--demo {
  padding-top: 2.3rem;
}

.product-showcase-hero__device {
  display: inline-flex;
  gap: 0.15rem;
}

.product-showcase-hero__device-btn {
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.26rem;
  padding: 0.15rem 0.35rem;
  font: inherit;
  font-size: 0.62rem;
  letter-spacing: var(--tracking-label, 0.06em);
  color: var(--color-text);
  opacity: 0.35;
  transition: opacity var(--duration) var(--ease-out);
}

.product-showcase-hero__device-btn svg {
  display: block;
}

.product-showcase-hero__device-btn:hover {
  opacity: 0.7;
}

.product-showcase-hero__device-btn.is-active {
  opacity: 1;
}

.product-showcase-hero__iframe-open {
  font-size: 0.62rem;
  letter-spacing: var(--tracking-label, 0.08em);
  text-transform: uppercase;
  color: var(--color-text);
  opacity: 0.55;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity var(--duration) var(--ease-out);
}

.product-showcase-hero__iframe-open:hover {
  opacity: 1;
}

/* Stage: letterbox area that frames the scaled device viewport */
.product-showcase-hero__iframe-stage {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--color-canvas, var(--grey-300));
}

.product-showcase-hero__iframe-wrap[data-device="mobile"] .product-showcase-hero__iframe-stage {
  background: var(--color-bg-ink, var(--ink-900));
}

/* Scaler holds the iframe at a logical device width; JS sets size + scale */
.product-showcase-hero__iframe-scaler {
  position: absolute;
  top: 0;
  left: 50%;
  transform-origin: top center;
  transform: translateX(-50%);
  width: 1200px;
  height: 100%;
}

.product-showcase-hero__iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: var(--color-bg, var(--grey-50));
  pointer-events: none;
}

.product-showcase-hero__iframe-wrap[data-interactive] .product-showcase-hero__iframe {
  pointer-events: auto;
}

/* Click-to-interact overlay (CodePen-style) */
.product-showcase-hero__iframe-overlay {
  appearance: none;
  position: absolute;
  inset: 0;
  z-index: 3;
  margin: 0;
  padding: 0;
  border: 0;
  cursor: pointer;
  overflow: hidden;
  background: var(--scrim-soft);
  color: var(--grey-50);
  transition:
    opacity 0.25s var(--ease-out),
    visibility 0.25s var(--ease-out);
}

.product-showcase-hero__iframe-wrap[data-interactive] .product-showcase-hero__iframe-overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.product-showcase-hero__iframe-cue {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.6rem 1.05rem;
  border-radius: 999px;
  background: var(--scrim-mid);
  border: 1px solid var(--frost-soft);
  font-size: var(--font-size-xs);
  font-weight: 500;
  letter-spacing: var(--tracking-label, 0.1em);
  text-transform: uppercase;
  white-space: nowrap;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition:
    background var(--duration) var(--ease-out),
    transform var(--duration) var(--ease-out);
}

.product-showcase-hero__iframe-overlay:hover .product-showcase-hero__iframe-cue {
  background: var(--scrim-strong);
  transform: translate(-50%, -50%) scale(1.03);
}

/* Secondary action on the overlay: open the demo in a new tab */
.product-showcase-hero__iframe-newtab {
  position: absolute;
  left: 50%;
  top: calc(50% + 2.9rem);
  transform: translateX(-50%);
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  padding: 0.42rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--frost-soft);
  background: transparent;
  color: var(--frost-solid);
  font-size: var(--font-size-xs);
  font-weight: 500;
  letter-spacing: var(--tracking-label, 0.1em);
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background var(--duration) var(--ease-out),
    color var(--duration) var(--ease-out),
    opacity 0.25s var(--ease-out),
    visibility 0.25s var(--ease-out);
}

.product-showcase-hero__iframe-newtab:hover {
  background: var(--frost-weak);
  color: var(--grey-50);
}

.product-showcase-hero__iframe-wrap[data-interactive] .product-showcase-hero__iframe-newtab {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.product-showcase-hero__video {
  background: var(--color-bg-soft);
}

.product-showcase-hero__slide-label {
  display: none;
  position: absolute;
  left: 1rem;
  top: 1rem;
  bottom: auto;
  margin: 0;
  padding: 0.35rem 0.55rem;
  background: var(--color-glass, var(--frost-solid));
  border: 1px solid var(--color-border);
  font-size: var(--font-size-xs);
  font-weight: 400;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-text);
  z-index: 2;
}

/* Overlay chrome: arrows mid-height, frosted dots at bottom */
.product-showcase-hero__nav {
  appearance: none;
  position: absolute;
  top: 50%;
  z-index: 3;
  transform: translateY(-50%);
  border: 0;
  margin: 0;
  width: 2.15rem;
  height: 2.15rem;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--color-glass, var(--frost-strong));
  border: 1px solid var(--color-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--color-text);
  cursor: pointer;
  font-size: 1.35rem;
  font-weight: 300;
  line-height: 1;
  opacity: 0.9;
  box-shadow: var(--shadow-md);
  transition:
    background var(--duration) var(--ease-out),
    opacity var(--duration) var(--ease-out),
    color var(--duration) var(--ease-out);
}

.product-showcase-hero__nav--prev {
  left: clamp(0.2rem, 0.8vw, 0.55rem);
}

.product-showcase-hero__nav--next {
  right: clamp(0.2rem, 0.8vw, 0.55rem);
}

.product-showcase-hero__nav:hover {
  background: var(--color-bg, var(--grey-50));
  opacity: 1;
  color: var(--color-text);
}

.product-showcase-hero__dots {
  position: absolute;
  left: 50%;
  bottom: clamp(1.1rem, 2vw, 1.9rem);
  z-index: 3;
  transform: translateX(-50%);
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  background: var(--color-glass, var(--frost-strong));
  border: 1px solid var(--color-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-md);
}

.product-showcase-hero__dot {
  appearance: none;
  border: 0;
  padding: 0;
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 999px;
  background: var(--scrim-weak);
  cursor: pointer;
  transition: background var(--duration) var(--ease-out), transform var(--duration) var(--ease-out);
}

.product-showcase-hero__dot.is-active {
  background: var(--scrim-strong);
  transform: scale(1.12);
}

/* —— Highlights: labeled image grid —— */
.product-highlights {
  max-width: var(--site-max);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3.5rem) var(--site-margin) 0;
}

.product-highlights__title {
  margin: 0 0 clamp(1.25rem, 3vw, 1.85rem);
  font-family: var(--font-body);
  font-size: var(--font-size-xs);
  font-weight: 400;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-muted);
}

.product-highlights__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 2rem) clamp(1rem, 2.5vw, 1.75rem);
}

.product-highlight {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin: 0;
}

.product-highlight__open {
  appearance: none;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  text-align: left;
}

.product-highlight__media {
  position: relative;
  margin: 0;
  background: var(--color-canvas, var(--grey-300));
  border: 0;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  outline: none;
  box-shadow: none;
}

.product-highlight__media img,
.product-highlight__media video,
.product-highlight__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(0.1) contrast(1.03);
  transition: transform 0.65s var(--ease-out), filter 0.65s var(--ease-out);
}

.product-highlight__open:hover .product-highlight__media img,
.product-highlight__open:focus-visible .product-highlight__media img,
.product-highlight__open:hover .product-highlight__media video,
.product-highlight__open:focus-visible .product-highlight__media video {
  transform: scale(1.02);
  filter: grayscale(0) contrast(1.05);
}

.product-highlight__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: var(--scrim-weakest);
  transition: background 0.35s var(--ease-out);
}

.product-highlight__play-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  background: var(--frost-solid);
  box-shadow: 0 6px 20px var(--scrim-weak);
  position: relative;
}

.product-highlight__play-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 54%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 0.45rem 0 0.45rem 0.75rem;
  border-color: transparent transparent transparent var(--ink-900);
}

.product-highlight__open:hover .product-highlight__play,
.product-highlight__open:focus-visible .product-highlight__play {
  background: var(--scrim-weak);
}

.product-highlight--walkthrough .product-highlight__open {
  cursor: pointer;
}

.product-highlight__open:focus-visible .product-highlight__media {
  outline: 1px solid var(--color-text);
  outline-offset: 2px;
}

.product-highlight__placeholder {
  width: 100%;
  height: 100%;
  background:
    linear-gradient(135deg, var(--color-bg-muted) 0%, var(--color-bg-soft) 50%, var(--grey-50) 100%);
}

.product-highlight__caption {
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-weight: 400;
}

.product-highlight__caption strong,
.product-highlight__caption b {
  font-weight: 400;
}

.product-highlight__label {
  font-size: var(--font-size-xs);
  font-weight: 400;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-text);
}

.product-highlight__note {
  margin: 0;
  color: var(--color-muted);
  font-size: var(--font-size-sm);
  line-height: 1.45;
  max-width: 36ch;
}

/* —— Details —— */
.product-details {
  max-width: var(--site-max);
  margin: 0 auto;
  padding: var(--space-5) var(--site-margin) 0;
  display: grid;
  grid-template-columns: minmax(14rem, 0.85fr) minmax(0, 1.35fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.product-details--lean {
  display: block;
  padding-top: 0;
}

.product-details__heading {
  margin: 0 0 0.45rem;
  font-family: var(--font-heading, var(--font-display), "Helvetica Neue", Helvetica, Arial, sans-serif);
  font-size: var(--font-size-h2);
  font-weight: var(--font-weight-heading, 500);
  letter-spacing: -0.02em;
  text-transform: none;
}

.product-details__buy {
  position: sticky;
  top: calc(var(--header-height) + 1.25rem);
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--color-border-strong);
  text-align: left;
}

.product-details__buy .product-library-save--inline {
  margin: 0 0 0.85rem;
}

.product-details__buy .product-actions {
  gap: 0.45rem;
}

/* Low-key library bookmark */
.product-library-save {
  margin: 0;
}

.product-library-save--inline {
  margin: 0.55rem 0 0;
  text-align: left;
}

.product-library-save__btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-muted, var(--color-muted));
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  line-height: 1.2;
  transition: color 0.2s var(--ease-out);
}

.product-library-save__btn:hover {
  color: var(--color-text, var(--ink-900));
}

.product-library-save.is-saved .product-library-save__btn {
  color: var(--color-text, var(--ink-900));
}

.product-library-save__icon {
  flex: 0 0 auto;
  display: block;
}

/* Hero library save — top right, opposite the back link */
.product-showcase-hero > .product-library-save--inline {
  position: absolute;
  top: clamp(1.25rem, 3vw, 2rem);
  right: var(--site-margin);
  z-index: 2;
  margin: 0;
  text-align: right;
}

.product-showcase-hero > .product-library-save--inline .product-library-save__btn {
  color: var(--color-muted-2);
}

.product-showcase-hero > .product-library-save--inline.is-saved .product-library-save__btn,
.product-showcase-hero > .product-library-save--inline .product-library-save__btn:hover {
  color: var(--color-text, var(--ink-900));
}

.product-library-save--float {
  display: flex;
  align-items: stretch;
}

.product-library-save--float .product-library-save__btn {
  height: 100%;
  padding: 0.62rem 1.05rem;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--color-text, var(--ink-900));
  border: 1px solid var(--frost-mid);
  border-radius: 999px;
  background: var(--frost-mid);
  box-shadow: 0 1px 0 var(--frost-mid) inset;
}

.product-library-save--float .product-library-save__btn:hover {
  background: var(--frost-strong);
  border-color: var(--frost-strong);
}

.product-library-save--float.is-saved .product-library-save__btn {
  color: var(--color-text, var(--ink-900));
}

.is-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.product-details__buy .product-actions .button {
  padding: 0.5rem 0.9rem;
  font-size: var(--font-size-xs);
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1.2;
  width: auto;
  min-height: 0;
}

.product-details__buy .product-actions .button.secondary {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border-strong);
}

.product-details__buy .product-actions .button.secondary:hover {
  background: var(--color-text);
  color: var(--grey-50);
}

.product-details__buy .product-free-note {
  margin: 0.15rem 0 0;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--color-muted);
  max-width: 16rem;
}

.product--template .product-content,
.product--template .product-blocks,
.product--template .template-details,
.product--plugin .product-content,
.product--plugin .product-blocks,
.product--plugin .plugin-details {
  max-width: none;
  margin-left: 0;
  margin-top: 0;
}

.product--template .product-content a,
.product--template .product-blocks a,
.product--template .template-details a,
.product--plugin .product-content a,
.product--plugin .product-blocks a,
.product--plugin .plugin-details a {
  color: var(--color-link, var(--color-link));
  text-decoration: underline;
  text-underline-offset: 0.18em;
  opacity: 1;
}

.product--template .product-content a:hover,
.product--template .product-blocks a:hover,
.product--template .template-details a:hover,
.product--plugin .product-content a:hover,
.product--plugin .product-blocks a:hover,
.product--plugin .plugin-details a:hover {
  color: var(--color-link-hover, var(--color-link-hover));
  opacity: 1;
}

.product--template .template-features li,
.product--plugin .template-features li {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding-left: 1rem;
}

.product--template .template-details strong,
.product--plugin .plugin-details strong,
.product--template .template-features li strong,
.product--plugin .template-features li strong {
  color: var(--color-text);
  font-weight: 500;
}

.product--template .template-features li span,
.product--plugin .template-features li span {
  color: var(--color-muted);
  font-weight: 400;
}

/* —— Floating action bar ——
   Sit above site-header (40) and body grain overlay (50). */
.product-float-nav {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  z-index: 80;
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
  transition:
    transform 0.4s var(--ease-out),
    opacity 0.4s var(--ease-out);
}

.product-float-nav.is-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.product-float-nav__inner {
  display: flex;
  align-items: stretch;
  gap: 0.35rem;
  padding: 0.3rem;
  background: var(--color-glass, var(--frost-solid));
  border: 1px solid var(--color-border);
  border-radius: 999px;
  backdrop-filter: blur(22px) saturate(1.15);
  -webkit-backdrop-filter: blur(22px) saturate(1.15);
  box-shadow:
    var(--shadow-sm),
    0 12px 32px var(--scrim-weakest);
}

.product-float-nav__btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.62rem 1.05rem;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: none;
  transition:
    background var(--duration) var(--ease-out),
    color var(--duration) var(--ease-out);
}

.product-float-nav__btn:hover {
  background: var(--color-accent-soft);
  color: var(--color-text);
  text-decoration: none;
}

.product-float-nav__btn--buy {
  background: var(--color-accent, var(--color-accent));
  color: var(--color-accent-text, var(--ink-900));
}

.product-float-nav__btn--buy:hover {
  background: var(--color-accent-hover, var(--color-accent-hover));
  color: var(--color-accent-text, var(--ink-900));
}

/* —— Demo lightbox —— */
.product-demo {
  width: min(1100px, calc(100vw - 2rem));
  max-width: calc(100vw - 2rem);
  height: min(80vh, 720px);
  max-height: calc(100vh - 2rem);
  margin: auto;
  padding: 0;
  border: 1px solid var(--color-border-strong);
  background: var(--color-bg);
  color: var(--color-text);
}

.product-demo::backdrop {
  background: var(--scrim-strong);
  backdrop-filter: blur(14px) saturate(0.85);
  -webkit-backdrop-filter: blur(14px) saturate(0.85);
}

.product-demo__chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
}

.product-demo__title {
  margin: 0;
  font-size: var(--font-size-xs);
  font-weight: 400;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

.product-demo__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.product-demo__frame-wrap {
  position: relative;
  height: calc(100% - 3.25rem);
  background: var(--color-bg-soft);
}

.product-demo__frame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: var(--grey-50);
}

.product-demo__fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 1rem;
  padding: 2rem;
  text-align: center;
  background: var(--color-bg);
}

.product-demo__fallback[hidden] {
  display: none;
}

.product-demo__fallback p {
  margin: 0;
  color: var(--color-muted);
}

/* —— Highlight lightbox (minimal fade / scale) —— */
.product-highlight-lightbox {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--grey-50);
  overflow: hidden;
  opacity: 0;
  transform: scale(0.985);
  transition:
    opacity 0.32s var(--ease-out),
    transform 0.36s var(--ease-out),
    display 0.32s allow-discrete,
    overlay 0.32s allow-discrete;
}

.product-highlight-lightbox[open] {
  opacity: 1;
  transform: scale(1);
  display: grid;
  place-items: center;
}

@starting-style {
  .product-highlight-lightbox[open] {
    opacity: 0;
    transform: scale(0.985);
  }
}

.product-highlight-lightbox.is-closing {
  opacity: 0;
  transform: scale(0.985);
}

.product-highlight-lightbox::backdrop {
  background: var(--scrim-solid);
  backdrop-filter: blur(16px) saturate(0.8);
  -webkit-backdrop-filter: blur(16px) saturate(0.8);
  opacity: 0;
  transition: opacity 0.32s var(--ease-out), display 0.32s allow-discrete, overlay 0.32s allow-discrete;
}

.product-highlight-lightbox[open]::backdrop {
  opacity: 1;
}

@starting-style {
  .product-highlight-lightbox[open]::backdrop {
    opacity: 0;
  }
}

.product-highlight-lightbox.is-closing::backdrop {
  opacity: 0;
}

.product-highlight-lightbox__close {
  appearance: none;
  position: absolute;
  top: max(0.85rem, env(safe-area-inset-top));
  right: max(0.85rem, env(safe-area-inset-right));
  z-index: 4;
  width: 2.35rem;
  height: 2.35rem;
  margin: 0;
  padding: 0;
  border: 1px solid var(--frost-weak);
  border-radius: 999px;
  background: var(--frost-weakest);
  color: var(--frost-solid);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 1.45rem;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  transition: background 0.2s var(--ease-out), color 0.2s var(--ease-out), border-color 0.2s var(--ease-out);
}

.product-highlight-lightbox__close:hover {
  background: var(--frost-weak);
  color: var(--grey-50);
  border-color: var(--frost-soft);
}

.product-highlight-lightbox__nav {
  appearance: none;
  position: absolute;
  top: 50%;
  z-index: 4;
  transform: translateY(-50%);
  width: 2.5rem;
  height: 2.5rem;
  margin: 0;
  padding: 0;
  border: 1px solid var(--frost-weakest);
  border-radius: 999px;
  background: var(--frost-weakest);
  color: var(--frost-solid);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 1.5rem;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  opacity: 0.75;
  transition: opacity 0.2s var(--ease-out), background 0.2s var(--ease-out), color 0.2s var(--ease-out);
}

.product-highlight-lightbox__nav:hover {
  opacity: 1;
  background: var(--frost-weak);
  color: var(--grey-50);
}

.product-highlight-lightbox__nav--prev {
  left: max(0.75rem, env(safe-area-inset-left));
}

.product-highlight-lightbox__nav--next {
  right: max(0.75rem, env(safe-area-inset-right));
}

.product-highlight-lightbox__stage {
  width: min(1040px, calc(100vw - 4.5rem));
  max-height: calc(100vh - 3rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  padding: 3.25rem 0 1.25rem;
  box-sizing: border-box;
}

.product-highlight-lightbox__media {
  position: relative;
  width: 100%;
  display: grid;
  place-items: center;
  min-height: 0;
}

.product-highlight-lightbox__image,
.product-highlight-lightbox__video,
.product-highlight-lightbox__embed {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(78vh, 820px);
  object-fit: contain;
  background: var(--ink-900);
  border: 0;
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.28s var(--ease-out), transform 0.28s var(--ease-out);
}

.product-highlight-lightbox__embed {
  width: min(100%, 960px);
  aspect-ratio: 16 / 9;
  height: auto;
  min-height: min(42vh, 360px);
}

.product-highlight-lightbox__media.is-switching .product-highlight-lightbox__image,
.product-highlight-lightbox__media.is-switching .product-highlight-lightbox__video,
.product-highlight-lightbox__media.is-switching .product-highlight-lightbox__embed {
  opacity: 0;
  transform: scale(0.985);
}

.product-highlight-lightbox__image[hidden],
.product-highlight-lightbox__video[hidden],
.product-highlight-lightbox__embed[hidden] {
  display: none;
}

.product-highlight-lightbox__meta {
  min-width: 0;
  max-width: 40rem;
  text-align: center;
  padding: 0 1rem;
}

.product-highlight-lightbox__label {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--font-size-xs);
  font-weight: 400;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--frost-solid);
}

.product-highlight-lightbox__caption {
  margin: 0.35rem 0 0;
  color: var(--frost-mid);
  font-size: var(--font-size-sm);
  line-height: 1.45;
}

.product-highlight-lightbox__label[hidden],
.product-highlight-lightbox__caption[hidden] {
  display: none;
}

@media (max-width: 1100px) {
  .product-highlights__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .product-details {
    grid-template-columns: 1fr;
  }

  .product-details__buy {
    position: static;
  }

  .product-showcase-hero__gallery {
    padding: 0.85rem 0.6rem;
  }

  .product-showcase-hero__gallery--demo {
    padding-top: 2.1rem;
  }

  .product-showcase-hero__viewport {
    aspect-ratio: 4 / 3;
    max-height: min(64vh, 34rem);
  }

  /* Live demo on small screens: tall portrait frame so the desktop
     preview shows real page length and the mobile preview runs near
     full width instead of a tiny letterboxed phone. */
  .product-showcase-hero__gallery--demo .product-showcase-hero__viewport {
    aspect-ratio: auto;
    height: min(72vh, 42rem);
    max-height: none;
  }

  /* The top bar already has an "Open" control on small screens */
  .product-showcase-hero__iframe-newtab {
    display: none;
  }
}

@media (max-width: 720px) {
  .product-highlights__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .product-float-nav {
    left: var(--site-margin);
    right: var(--site-margin);
    bottom: 0.85rem;
    width: auto;
    transform: translateX(0) translateY(0);
  }

  .product-float-nav.is-visible {
    transform: translateX(0) translateY(0);
  }

  .product-float-nav__inner {
    width: 100%;
    gap: 0.28rem;
    padding: 0.28rem;
  }

  .product-float-nav__btn {
    flex: 1;
    text-align: center;
    padding: 0.58rem 0.45rem;
    font-size: 0.6rem;
  }

  .product-showcase-hero h1 {
    font-size: clamp(2.1rem, 11vw, 2.75rem);
  }
}

@media (max-width: 720px) {
  .product-highlight-lightbox__stage {
    width: min(100vw - 1.5rem, 100%);
    padding-top: 3.5rem;
  }

  .product-highlight-lightbox__nav {
    display: none;
  }
}

/* Included plugins (template → companion plugins) */
.product-included {
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.25rem, 4vw, 3rem);
  border-top: 1px solid var(--color-border, var(--grey-300));
}

.product-included__inner {
  max-width: 72rem;
  margin: 0 auto;
}

.product-included__header {
  margin-bottom: 1.75rem;
  max-width: 36rem;
}

.product-included__title {
  margin: 0 0 0.5rem;
  font-family: var(--font-heading, var(--font-display), "Helvetica Neue", Helvetica, Arial, sans-serif);
  font-size: var(--font-size-h3, 1.1rem);
  font-weight: var(--font-weight-heading, 500);
  letter-spacing: -0.015em;
  text-transform: none;
}

.product-included__lede {
  margin: 0;
  color: var(--color-muted, var(--color-muted));
  font-size: 0.95rem;
  line-height: 1.5;
}

.product-included__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem 1rem;
}

.product-included__card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.product-included__media {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 5;
  background: var(--color-canvas, var(--grey-300));
  border: 1px solid var(--color-border, var(--grey-300));
  border-radius: var(--radius);
  overflow: hidden;
}

.product-included__media img {
  width: 68%;
  height: auto;
  max-height: 72%;
  object-fit: contain;
}

.product-included__name {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 500;
}

.product-included__name a {
  text-decoration: none;
  color: inherit;
}

.product-included__meta {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
  color: var(--color-muted, var(--color-muted));
}

.product-included__excerpt {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: var(--color-muted, var(--color-muted));
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-included__links {
  margin: 0.5rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  font-size: 0.8rem;
}

.product-included__links a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.price--included,
.product-included-only-note {
  font-size: 0.95rem;
  color: var(--color-muted, var(--color-muted));
}

.product-included-only-note a {
  color: inherit;
}

@media (max-width: 900px) {
  .product-included__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .product-included__grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .product-float-nav,
  .product-highlight__media img,
  .product-highlight__media video,
  .product-showcase-hero__track,
  .product-highlight-lightbox,
  .product-highlight-lightbox::backdrop,
  .product-highlight-lightbox__image,
  .product-highlight-lightbox__video {
    transition: none;
  }

  .product-highlight-lightbox,
  .product-highlight-lightbox[open] {
    transform: none;
  }
}

/* ---------------------------------------------------------------------------
   Mobile touch & legibility — PDP
   Must live here, not index.css: this file loads after it, so its
   @media (max-width: 720px) rules win on source order. The float bar is the
   primary mobile CTA and its labels were rendering at 9.6px.
   --------------------------------------------------------------------------- */
@media (hover: none) and (pointer: coarse) {
  .product-float-nav__btn {
    min-height: 44px;
    font-size: 0.72rem;
    padding: 0.7rem 0.5rem;
  }

  .product-float-nav__btn[disabled] {
    opacity: 0.45;
  }

  .product-showcase-hero__device-btn,
  .product-showcase-hero__iframe-open,
  .product-back {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  /* Only the 9.9px one gets a bump. The device buttons were already above the
     floor, and `1em` would have inflated them to the parent's size. */
  .product-showcase-hero__iframe-open {
    font-size: 0.6875rem;
  }
}

/* Free-sample link under the buy button on downloadable products. */
.product-sample-link {
  display: inline-block;
  margin-top: 0.9rem;
  font-size: var(--font-size-sm);
  color: var(--color-muted);
  text-decoration: none;
}

.product-sample-link:hover {
  color: var(--color-text);
}
