/**
 * RTM Pantallas LED - Landings de categoría (/productos/<categoria>.html)
 *
 * Una hoja compartida por las ocho landings. No redefine header, footer, botones ni el dock
 * flotante: eso ya vive en css/main.css y estas páginas usan las mismas clases. Acá sólo están
 * las bandas propias de la landing (hero, problema, series, proceso, público, cierre).
 *
 * Paleta: negro/gris oscuro, blanco y el rojo institucional (--accent). El verde queda reservado
 * para el dock de WhatsApp que arma main.css (AGENTS.md §4).
 */

/* ============================================
   HERO
   ============================================ */
/*
  La foto del hero entra por la variable --lp-hero-image, seteada inline en cada página. Cuando no
  hay una foto real de esa categoría (caso Iluminación Profesional) el fallback es el degradado
  oscuro: preferimos una banda sobria antes que ilustrar con una imagen de otro producto.
*/
.lp-hero {
  position: relative;
  padding: 56px 20px 68px;
  color: #fff;
  background: #11151f var(--lp-hero-image, none) center / cover no-repeat;
}

.lp-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(15, 18, 25, .9);
  pointer-events: none;
}

.lp-hero__wrap {
  position: relative;
  z-index: 1;
  max-width: var(--container);
  margin: 0 auto;
}

.lp-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 26px;
  font-size: .88rem;
  color: var(--nav-text-dim);
}
.lp-breadcrumb a {
  color: var(--nav-text);
  text-decoration: none;
}
.lp-breadcrumb a:hover { color: #fff; text-decoration: underline; }
.lp-breadcrumb .separator { color: #6b7280; }
.lp-breadcrumb [aria-current="page"] { color: var(--nav-text-dim); }

.lp-hero__title {
  font-size: clamp(2.1rem, 3.4vw + .8rem, 3.5rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.015em;
  max-width: 20ch;
  margin-bottom: 20px;
}
.lp-hero__title span { color: var(--accent); display: block; }

.lp-hero__lead {
  max-width: 660px;
  font-size: clamp(1rem, .35vw + .95rem, 1.15rem);
  color: #e3e9f1;
  line-height: 1.6;
  margin-bottom: 32px;
}

.lp-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.lp-hero__proof {
  list-style: none;
  margin: 30px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  font-size: .9rem;
  color: #cbd5e1;
}
.lp-hero__proof li {
  position: relative;
  padding-left: 15px;
}
.lp-hero__proof li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .58em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* ============================================
   BANDAS DE CONTENIDO
   ============================================ */
.lp-section { padding: 76px 20px; }
.lp-section__wrap { max-width: var(--container); margin: 0 auto; }
.lp-section--light { background: var(--bg-light); }
.lp-section--dark { background: var(--bg-dark); color: var(--ink-about); }

.lp-eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  font-size: .88rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #5b6474;
  margin-bottom: 16px;
}
.lp-eyebrow::before {
  content: "";
  width: 0; height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 9px solid var(--accent);
}
.lp-section--dark .lp-eyebrow { color: var(--label); }
.lp-section--dark .lp-eyebrow::before { border-left-color: var(--bullet); }

.lp-title {
  font-size: clamp(1.8rem, 2.2vw + .8rem, 2.7rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-dark);
  margin-bottom: 20px;
  max-width: 24ch;
}
.lp-section--dark .lp-title { color: var(--ink-about); }

.lp-lead {
  max-width: 860px;
  font-size: clamp(1rem, .25vw + .95rem, 1.1rem);
  line-height: 1.65;
  color: #4b5563;
}
.lp-lead + .lp-lead { margin-top: 14px; }
.lp-section--dark .lp-lead { color: var(--ink-soft); }

/* ============================================
   SERIES Y MODELOS
   ============================================ */
.lp-models {
  list-style: none;
  margin: 44px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(276px, 100%), 1fr));
  gap: 24px;
}

.lp-model {
  display: flex;
  flex-direction: column;
  background: var(--product-card-bg);
  border: 1px solid var(--product-media-border);
  border-radius: var(--product-card-radius);
  overflow: hidden;
}

/*
  Altura fija, no aspect-ratio: las fotos de producto vienen con proporciones muy distintas y el
  `max-height: 100 %` de la imagen sólo resuelve contra una altura definida. Con aspect-ratio la
  caja terminaba midiendo lo que medía cada foto y los títulos quedaban escalonados en la fila.
*/
.lp-model__media {
  flex: 0 0 auto;
  height: clamp(168px, 17vw, 210px);
  padding: 16px;
  background: #fff;
  border-bottom: 1px solid #eef0f4;
  overflow: hidden;
}
/*
  El contenedor es un bloque con altura definida a propósito. Con `display: grid` la fila implícita
  queda en `auto`: su alto lo define la imagen y el `height: 100 %` de la imagen lo define la fila,
  o sea una dependencia circular que CSS resuelve tratando el 100 % como `auto`. La imagen se
  dibujaba entonces a su alto natural y `overflow: hidden` la recortaba abajo — invisible en las
  fotos apaisadas de paneles, evidente en las cuadradas de colectivos.
  Con el bloque de altura fija el 100 % resuelve contra el content box y `contain` encuadra sin
  recortar nunca.
*/
.lp-model__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.lp-model__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 20px 22px;
  flex: 1;
}

.lp-model__name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0;
}
.lp-model__serie {
  display: block;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}

.lp-model__text {
  font-size: .94rem;
  line-height: 1.55;
  color: #4b5563;
  margin: 0;
}

.lp-model__specs {
  margin: 4px 0 0;
  font-size: .84rem;
  line-height: 1.5;
  color: #4b5563;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3px 10px;
}
.lp-model__specs dt { font-weight: 600; color: #6b7280; }
.lp-model__specs dd { margin: 0; }

.lp-model__link {
  margin-top: auto;
  padding-top: 6px;
  color: var(--accent);
  font-weight: 600;
  font-size: .92rem;
  text-decoration: none;
  align-self: flex-start;
}
.lp-model__link:hover { text-decoration: underline; }
.lp-model__link::after { content: " →"; }

/*
  CTA intermedio, justo después de la grilla. Es el punto donde alguien termina de mirar las fichas
  y decide: antes sólo existían el del hero y el del cierre, y el de cierre quedaba a 7.000 px en
  una página que el visitante promedio abandona a los 3.100.
*/
.lp-inline-cta {
  margin-top: 38px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}
.lp-inline-cta span {
  font-size: .95rem;
  color: #6b7280;
}

.lp-note {
  margin-top: 34px;
  max-width: 860px;
  font-size: 1rem;
  line-height: 1.65;
  color: #4b5563;
}

/* ============================================
   GALERÍA (categorías sin catálogo de modelos)
   ============================================ */
.lp-gallery {
  list-style: none;
  margin: 44px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 22px;
}
.lp-gallery figure { margin: 0; }
.lp-gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}
.lp-gallery figcaption {
  margin-top: 10px;
  font-size: .92rem;
  color: #4b5563;
}

/* ============================================
   QUÉ INCLUYE EL TRABAJO
   ============================================ */
.lp-steps {
  counter-reset: lp-step;
  list-style: none;
  margin: 44px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(290px, 100%), 1fr));
  gap: 30px 40px;
}
.lp-steps li {
  position: relative;
  padding-left: 54px;
}
.lp-steps li::before {
  counter-increment: lp-step;
  content: counter(lp-step);
  position: absolute;
  left: 0;
  top: -2px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1rem;
}
.lp-steps strong {
  display: block;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 5px;
}
.lp-steps span {
  color: #4b5563;
  font-size: .97rem;
  line-height: 1.6;
}

/* ============================================
   PARA QUIÉN
   ============================================ */
.lp-audience {
  list-style: none;
  margin: 34px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 14px 40px;
  max-width: 1000px;
}
.lp-audience li {
  position: relative;
  padding-left: 20px;
  font-size: clamp(.97rem, .2vw + .92rem, 1.05rem);
  line-height: 1.55;
  color: var(--ink-soft);
}
.lp-audience li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .5em;
  width: 0; height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid var(--bullet);
}

/* ============================================
   CIERRE / COTIZACIÓN
   ============================================ */
.lp-cta {
  background: var(--nav-bg);
  color: #fff;
  padding: 72px 20px;
}
.lp-cta__wrap {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 30px 48px;
}
.lp-cta__text { max-width: 620px; }
.lp-cta__title {
  font-size: clamp(1.6rem, 1.6vw + .9rem, 2.2rem);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 14px;
}
.lp-cta__lead {
  color: #cbd5e1;
  font-size: 1.05rem;
  line-height: 1.6;
}
.lp-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .lp-hero { padding: 40px 20px 52px; }
  .lp-hero__title { max-width: none; }
  .lp-section { padding: 56px 20px; }
  .lp-cta { padding: 56px 20px; }
  .lp-title { max-width: none; }
}

@media (max-width: 560px) {
  /*
    Ficha compacta en teléfono. Con una tarjeta por fila, seis modelos ocupaban ~3.600 px y
    empujaban el CTA intermedio fuera de la ventana de scroll. Acá la tarjeta sólo tiene que hacer
    que la reconozcan y que la toquen: la tabla de specs completa vive en la ficha técnica, a un
    tap de distancia. Se deja el pitch, que es lo único que distingue modelos de una misma serie.
  */
  .lp-model__media { height: 132px; }
  .lp-model__specs dt:not(:first-of-type),
  .lp-model__specs dd:not(:first-of-type) { display: none; }
  .lp-model__text {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  /* .btn es inline-block: para centrar el texto a ancho completo hay que pasarlo a flex. */
  .lp-hero__actions .btn,
  .lp-cta__actions .btn {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    text-align: center;
  }
  .lp-models { grid-template-columns: 1fr; }
  .lp-steps { gap: 24px; }
}

/* El dock flotante de WhatsApp no debe tapar el cierre en pantallas chicas. */
@media (max-width: 480px) {
  body.conversion-dock-active .lp-cta { padding-bottom: 96px; }
}
