/*
  LED panel and module explorer (/products/led-modules).
  ProductSelector → ProductMediaStage + summary → ProductSpecifications, then the optional 3D sample.
  Reuses the product page media frame (lc-pv, product.css) and the shared chips, badges and spec lists.
*/

.lc-explorer {
  display: grid;
  gap: var(--lc-space-10);
  padding-block: var(--lc-space-8) var(--lc-space-16);
  min-width: 0;
}

.lc-explorer[aria-busy="true"] .lc-explorer__product {
  opacity: 0.55;
  transition: opacity var(--lc-dur-fast) var(--lc-ease);
}

/* ---------- Selector: type → series → model / pixel pitch ---------- */
.lc-explorer__selector {
  display: grid;
  gap: var(--lc-space-4);
  padding: var(--lc-space-5);
  border: 1px solid var(--lc-border);
  border-radius: var(--lc-radius-md);
  background: var(--lc-surface-sunken);
  min-width: 0;
}

.lc-explorer__step {
  display: grid;
  gap: var(--lc-space-2);
  min-width: 0;
}

.lc-explorer__step-label {
  font-size: var(--lc-text-2xs);
  font-weight: var(--lc-weight-semibold);
  letter-spacing: var(--lc-tracking-caps);
  text-transform: uppercase;
  color: var(--lc-text-subtle);
}

.lc-explorer__selector .lc-chip-row { min-width: 0; }

.lc-explorer__selector .lc-chip {
  flex: none;
  min-height: 2.5rem;
}

.lc-explorer__selector .lc-chip[aria-current="true"] {
  border-color: var(--lc-accent);
  box-shadow: inset 0 0 0 1px var(--lc-accent);
}

/* A series can have many variants: they wrap instead of scrolling so every option stays visible. */
.lc-explorer__products { flex-wrap: wrap; }

@media (min-width: 1024px) {
  .lc-explorer__step {
    grid-template-columns: 11rem minmax(0, 1fr);
    align-items: center;
    gap: var(--lc-space-4);
  }

  .lc-explorer__step:last-child { align-items: start; }
  .lc-explorer__step:last-child .lc-explorer__step-label { padding-top: 0.8rem; }
}

/* ---------- Media stage + summary ---------- */
.lc-explorer__product {
  display: grid;
  gap: var(--lc-space-12);
  min-width: 0;
}

.lc-explorer__top {
  display: grid;
  gap: var(--lc-space-8);
  align-items: start;
  min-width: 0;
}

@media (min-width: 1024px) {
  .lc-explorer__top {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: var(--lc-space-12);
  }
}

.lc-explorer__media .lc-pv__stage { aspect-ratio: 16 / 11; }

.lc-explorer__image { padding: var(--lc-space-5); }

.lc-explorer__caption {
  margin: 0;
  font-size: var(--lc-text-xs);
  color: var(--lc-text-subtle);
}

.lc-explorer__summary {
  display: grid;
  gap: var(--lc-space-5);
  min-width: 0;
}

.lc-explorer__title {
  margin: 0;
  overflow-wrap: anywhere;
}

.lc-explorer__title:focus { outline: none; }

.lc-explorer__badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--lc-space-2);
}

.lc-explorer__description {
  margin: 0;
  color: var(--lc-text-muted);
  line-height: var(--lc-leading-normal);
}

.lc-explorer__actions {
  display: grid;
  gap: var(--lc-space-4);
  padding-top: var(--lc-space-5);
  border-top: 1px solid var(--lc-border);
}

.lc-explorer__actions .lc-price { margin: 0; }

/* ---------- Specifications ---------- */
.lc-explorer__specs {
  display: grid;
  gap: var(--lc-space-6);
  min-width: 0;
}

.lc-explorer__specs-head {
  display: grid;
  gap: var(--lc-space-2);
}

.lc-explorer__specs-head h3 { margin: 0; }

.lc-explorer__specs-head p {
  margin: 0;
  color: var(--lc-text-muted);
  font-size: var(--lc-text-sm);
}

.lc-explorer__specs .lc-spec-list dd { overflow-wrap: anywhere; }

.lc-explorer .lc-empty {
  display: grid;
  justify-items: center;
  gap: var(--lc-space-4);
  padding-block: var(--lc-space-16);
  text-align: center;
  color: var(--lc-text-muted);
}

/* ---------- Optional 3D sample (the original P4 / P2.5 viewer) ---------- */
.lc-explorer-3d {
  padding-block: var(--lc-space-12) var(--lc-space-16);
  border-top: 1px solid var(--lc-border);
}

/* The open button and the viewer body are switched with the hidden attribute. */
.lc-explorer-3d [hidden] { display: none !important; }

.lc-explorer-3d .lc-section-header p { max-width: 62ch; }

.lc-explorer-3d .led-viewer-page { margin-top: var(--lc-space-8); }

.lc-explorer-3d .led-viewer-header h3 { margin: 0 0 var(--lc-space-2); font-size: var(--lc-text-xl); }

.lc-explorer-3d .led-specs h3,
.lc-explorer-3d .led-info h3 {
  margin: 0 0 var(--lc-space-3);
  font-size: var(--lc-text-md);
}

@media (max-width: 639px) {
  .lc-explorer { gap: var(--lc-space-8); padding-block: var(--lc-space-6) var(--lc-space-12); }
  .lc-explorer__selector { padding: var(--lc-space-4); }
  .lc-explorer__media .lc-pv__stage { aspect-ratio: 4 / 3; min-height: 220px; }
  .lc-explorer__image { padding: var(--lc-space-3); }
}

@media (prefers-reduced-motion: reduce) {
  .lc-explorer[aria-busy="true"] .lc-explorer__product { transition: none; }
}
