/* ==========================================================================
   Telamorph — Product detail page
   Clean, minimal single-product view: framed media on one side, a calm
   information column on the other, a quiet spec list and a single clear CTA.
   ========================================================================== */

.pd-section {
  padding: calc(var(--nav-height, 72px) + 25px + clamp(1.25rem, 4vh, 2.25rem)) 0
    clamp(3.5rem, 11vh, 6.5rem);
}

.pd-layout {
  display: flex;
  align-items: flex-start;
  gap: clamp(2rem, 5vw, 4.5rem);
  margin-top: clamp(1.25rem, 3vh, 2rem);
}

/* --- Media column --- */
.pd-media {
  flex: 1 1 0;
  min-width: 0;
}

.pd-media-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  /* No frame — the transparent render just hangs in space. overflow stays
     visible so the drop-shadow isn't clipped. */
}

.pd-media-img {
  width: 100%;
  height: 100%;
  /* Product renders are transparent (no-bg) — show the whole part floating. */
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 22px 45px rgba(0, 0, 0, 0.55));
}

.pd-thumbs {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.pd-thumb {
  width: 84px;
  height: 64px;
  flex: 0 0 auto;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  cursor: pointer;
  opacity: 0.55;
  transition:
    opacity var(--transition),
    border-color var(--transition);
}

.pd-thumb:hover,
.pd-thumb.is-active {
  opacity: 1;
  border-color: var(--accent);
}

/* --- Info column --- */
.pd-info {
  flex: 1 1 0;
  min-width: 0;
}

.pd-eyebrow {
  display: inline-block;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 0.9rem;
}

.pd-title {
  font-size: clamp(1.9rem, 1.3rem + 2vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 0 0 1.25rem;
}

.pd-lead {
  font-size: clamp(1.05rem, 0.98rem + 0.35vw, 1.22rem);
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0 0 clamp(2rem, 5vh, 2.75rem);
  max-width: 58ch;
}

/* --- Tabbed detail sections (Highlights / Specifications) --- */
.pd-tabs {
  margin-top: clamp(2.75rem, 7vh, 4.5rem);
}

.pd-tab-nav {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.75rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: clamp(1.5rem, 4vh, 2.25rem);
}

/* The active/hover underline is the cursor-tracked streak (::after, see
   streak.css) — same effect as the nav tabs — so no flat border here. */
.pd-tab-btn {
  position: relative;
  appearance: none;
  background: transparent;
  border: none;
  margin-bottom: -1px;
  padding: 0.7rem 0.15rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition);
}

.pd-tab-btn:hover,
.pd-tab-btn:focus-visible,
.pd-tab-btn.is-active {
  color: var(--text-primary);
}

/* Single-section fallback keeps the small caps label instead of a lone tab */
.pd-tab-heading {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
  color: var(--text-muted);
  margin: 0 0 clamp(1.25rem, 3vh, 1.75rem);
}

.pd-tab-panel[hidden] {
  display: none;
}

.pd-tab-panel:not([hidden]) {
  animation: pd-tab-fade 0.4s ease;
}

@keyframes pd-tab-fade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pd-tab-panel:not([hidden]) {
    animation: none;
  }
}

/* --- Highlights (scannable feature list, full width in its panel) --- */
.pd-highlights {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.75rem 2.5rem;
}

.pd-highlights li {
  position: relative;
  padding-left: 1.6rem;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.5;
}

.pd-highlights li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 2px;
  background-color: var(--accent);
  transform: rotate(45deg);
}

/* --- Spec list (quiet rows, no heavy table chrome; two columns when wide) --- */
.pd-spec-list {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  column-gap: clamp(2rem, 5vw, 4rem);
}

.pd-spec-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border-color);
}

.pd-spec-row dt {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.98rem;
}

.pd-spec-row dd {
  margin: 0;
  text-align: right;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.98rem;
}

/* --- Actions --- */
.pd-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0.85rem;
}

/* --- Reveal slide-in variants (paired with main.js IntersectionObserver) --- */
.reveal.reveal-left {
  translate: -32px 0;
}

.reveal.reveal-right {
  translate: 32px 0;
}

.reveal.reveal-left.is-visible,
.reveal.reveal-right.is-visible {
  translate: 0 0;
}

@media (prefers-reduced-motion: reduce) {
  .reveal.reveal-left,
  .reveal.reveal-right {
    translate: none;
  }
}

@media (max-width: 991.98px) {
  .pd-layout {
    flex-direction: column;
  }

  .reveal.reveal-left,
  .reveal.reveal-right {
    translate: 0 24px;
  }

  .pd-media {
    position: static;
    width: 100%;
    max-width: 38rem;
  }

  .pd-info {
    width: 100%;
  }
}
