/* =========================================================
   CATÁLOGO DE AUDITORIO — librito de las líneas Plaxmetal
   (Esibire, Nanobi, Audiplax, Iven y Th2).
   Usa la base de catalogo-telas.css (escenario, libro, tapa, contratapa,
   banda azul, raya, controles y muestra ampliada) y suma acá las páginas
   propias. Lo arma catalogo-auditorio.js.
   ========================================================= */

/* ---------- Página de cada línea (izquierda) ---------- */

.ca-linea .ct-amb__body {
  justify-content: flex-start;
  padding: 6cqh 7cqw 0;
}

.ca-linea .ct-amb__name { font-size: 9.4cqw; }

.ca-linea .ct-amb__body .ct-rule { width: 62cqw; }

.ca-desc {
  margin: 2.6cqh 0 0;
  align-self: stretch;
  font-size: max(9.5px, 2.75cqw);
  line-height: 1.5;
  color: var(--ct-texto-2);
  text-align: left;
}

.ca-foto {
  all: unset;
  box-sizing: border-box;
  display: block;
  position: relative;
  margin-top: auto;
  margin-bottom: 8.5cqh;
  width: 72cqw;
  aspect-ratio: 4 / 3;
  max-height: 40cqh;
  outline: 0.5cqw solid var(--ct-rojo);
  outline-offset: 1.4cqw;
  background: #eef0f5;
  cursor: zoom-in;
  overflow: hidden;
}

.ca-foto > * { pointer-events: none; }

.ca-foto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Ficha de cada línea (derecha) ---------- */

.ca-ficha .ct-in::before,
.ca-indice .ct-in::before,
.ca-pasos .ct-in::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 4.6cqw;
  background: var(--ct-azul);
  border-left: 0.7cqw solid var(--ct-rojo);
}

.ca-col {
  position: absolute;
  top: 5.5cqh;
  bottom: 4cqh;
  left: 7cqw;
  right: 11.5cqw;
  display: flex;
  flex-direction: column;
}

.ca-h {
  margin: 0;
  font-family: var(--ct-serif);
  font-weight: 400;
  font-size: 7.2cqw;
  line-height: 1;
  color: var(--ct-texto);
  text-align: center;
}

.ca-col > .ct-rule { margin-top: 1.6cqh; }

.ca-sub {
  margin: 2.4cqh 0 1.1cqh;
  font-size: max(8px, 2.1cqw);
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ct-azul);
}

.ca-modelos {
  display: grid;
  grid-template-columns: repeat(var(--ca-cols, 3), minmax(0, 1fr));
  gap: 1.4cqh 2.4cqw;
  margin-top: 2.2cqh;
}

.ca-modelo {
  all: unset;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6cqh;
  min-width: 0;
  cursor: zoom-in;
  -webkit-tap-highlight-color: transparent;
}

.ca-modelo > * { pointer-events: none; }

.ca-modelo__img {
  position: relative;
  display: block;
  width: 100%;
  height: var(--ca-img-h, 18cqh);
  border-radius: 1.4cqw;
  background: #fff;
  transition: transform 0.18s ease;
}

.ca-modelo__img > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Marca de "se puede ver en realidad aumentada" */
.ca-modelo__ra {
  position: absolute;
  top: 0;
  right: 6%;
  display: grid;
  place-items: center;
  width: max(18px, 4.6cqw);
  height: max(18px, 4.6cqw);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1px #e3e6ee, 0 1px 4px rgba(15, 43, 115, 0.12);
}

.ca-modelo__ra img { width: 64%; height: 64%; object-fit: contain; }

.ca-modelo__nombre {
  font-size: max(8.5px, 2.35cqw);
  line-height: 1.2;
  font-weight: 700;
  color: var(--ct-texto);
  text-align: center;
}

.ca-modelo__nota {
  font-size: max(7.5px, 1.9cqw);
  line-height: 1.2;
  color: var(--ct-texto-2);
  text-align: center;
}

@media (hover: hover) {
  .ca-modelo:hover .ca-modelo__img,
  .ca-medidas:hover img { transform: scale(1.03); }
  .ca-foto:hover img { transform: scale(1.03); transition: transform 0.25s ease; }
}

.ca-modelo:focus-visible .ca-modelo__img,
.ca-foto:focus-visible,
.ca-medidas:focus-visible {
  outline: 2px solid var(--ct-azul-2);
  outline-offset: 3px;
}

.ca-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9cqh 1.4cqw;
}

.ca-chip {
  padding: 0.55cqh 2cqw;
  border-radius: 999px;
  background: #eef0f5;
  color: var(--ct-texto);
  font-size: max(8px, 2.15cqw);
  line-height: 1.3;
}

.ca-medidas {
  all: unset;
  box-sizing: border-box;
  display: block;
  position: relative;
  flex: 1 1 0;
  min-height: 8cqh;
  cursor: zoom-in;
  -webkit-tap-highlight-color: transparent;
}

.ca-medidas > * { pointer-events: none; }

.ca-medidas img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.18s ease;
}

.ca-pie {
  margin-top: 1.2cqh;
  font-size: max(7.5px, 1.95cqw);
  line-height: 1.35;
  color: var(--ct-texto-2);
}

.ca-pie strong { color: var(--ct-texto); }

/* Iven y Th2: dibujo vertical al lado de los opcionales */
.ca-fila {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 3cqw;
  flex: 1 1 auto;
  min-height: 0;
}

.ca-fila > div {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* ---------- Presentación (izquierda) ---------- */

.ca-intro .ct-amb__body {
  justify-content: center;
  padding: 4cqh 7cqw 6cqh;
  align-items: stretch;
}

.ca-intro .ct-amb__name {
  font-size: 7.6cqw;
  text-align: center;
}

.ca-intro .ct-amb__num { text-align: center; }

.ca-intro .ct-rule { width: auto; }

.ca-intro p {
  margin: 1.8cqh 0 0;
  font-size: max(9px, 2.6cqw);
  line-height: 1.5;
  color: var(--ct-texto-2);
}

.ca-intro p strong { color: var(--ct-texto); }

.ca-planta {
  margin-top: 2.4cqh;
  width: 100%;
  aspect-ratio: 1100 / 422;
  object-fit: cover;
  border-radius: 1cqw;
}

.ca-iso {
  display: flex;
  align-items: center;
  gap: 3cqw;
  margin-top: 2cqh;
}

.ca-iso img {
  width: 30cqw;
  height: auto;
}

.ca-iso span {
  font-size: max(8px, 2cqw);
  line-height: 1.35;
  color: var(--ct-texto-2);
}

/* ---------- Índice (derecha) ---------- */

.ca-lista {
  display: flex;
  flex-direction: column;
  gap: 1.3cqh;
  margin-top: 2.6cqh;
  flex: 1 1 auto;
}

.ca-ir {
  all: unset;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 17cqw minmax(0, 1fr) auto;
  align-items: center;
  gap: 3cqw;
  flex: 1 1 0;
  min-height: 0;
  padding: 0.8cqh 2.4cqw 0.8cqh 1.2cqw;
  border-radius: 1.6cqw;
  border: 1px solid #e3e6ee;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.ca-ir > * { pointer-events: none; }

.ca-ir:hover { background: #f4f6fb; border-color: #cfd4e2; }
.ca-ir:focus-visible { outline: 2px solid var(--ct-azul-2); outline-offset: 2px; }

.ca-ir img {
  width: 17cqw;
  height: 100%;
  max-height: 13cqh;
  object-fit: contain;
}

.ca-ir__txt { min-width: 0; }

.ca-ir__num {
  font-family: var(--ct-serif);
  font-style: italic;
  font-size: max(8px, 2.3cqw);
  color: var(--ct-rojo);
}

.ca-ir__nombre {
  display: block;
  font-family: var(--ct-serif);
  font-size: 4.6cqw;
  line-height: 1.05;
  color: var(--ct-texto);
}

.ca-ir__uso {
  display: block;
  margin-top: 0.3cqh;
  font-size: max(8px, 2cqw);
  line-height: 1.3;
  color: var(--ct-texto-2);
}

.ca-ir__flecha {
  font-size: 3.4cqw;
  color: var(--ct-azul);
}

/* ---------- Terminaciones (izquierda) ---------- */

.ca-term .ct-amb__body {
  justify-content: flex-start;
  padding: 6cqh 7cqw 0;
  align-items: stretch;
}

.ca-term .ct-amb__name,
.ca-term .ct-amb__num { text-align: center; }

.ca-term .ct-amb__name { font-size: 7.6cqw; }

.ca-term p {
  margin: 1.8cqh 0 0;
  font-size: max(9px, 2.6cqw);
  line-height: 1.5;
  color: var(--ct-texto-2);
}

/* Muestrario: las telas no se amplían; al presionarlas se ve su nombre y código arriba */
.ca-telas {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: 1.7cqh;
  margin-top: 2.2cqh;
  --ca-sw-gap: 0.9cqw;
  --ca-sw: calc((100cqw - 13.7cqw - 14cqw - 9 * var(--ca-sw-gap)) / 10);
}

.ca-telas__h {
  display: flex;
  align-items: baseline;
  gap: 1.6cqw;
  margin-bottom: 0.7cqh;
  white-space: nowrap;
}

.ca-telas__h b {
  font-size: max(8px, 2.05cqw);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ct-azul);
}

.ca-telas__h span {
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: max(7px, 1.75cqw);
  color: var(--ct-texto-2);
}

.ca-telas__grid {
  display: grid;
  grid-template-columns: repeat(10, var(--ca-sw));
  gap: var(--ca-sw-gap);
}

/* Bouclé y Aero comparten fila */
.ca-telas__fila {
  display: flex;
  gap: calc(var(--ca-sw) + var(--ca-sw-gap) * 2);
}

.ca-telas__fila .ca-telas__grid { grid-template-columns: repeat(var(--ca-n), var(--ca-sw)); }
.ca-telas__fila .ca-telas__h span { display: none; }

.ca-tela {
  all: unset;
  box-sizing: border-box;
  display: block;
  width: var(--ca-sw);
  aspect-ratio: 1;
  border-radius: 0.6cqw;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(23, 20, 31, 0.1);
  -webkit-tap-highlight-color: transparent;
}

.ca-tela img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.ca-tela.is-sel { box-shadow: 0 0 0 1.5px #fff, 0 0 0 3px var(--ct-azul); }
.ca-tela:focus-visible { outline: 2px solid var(--ct-azul-2); outline-offset: 2px; }

.ca-term .ca-telas__info {
  min-height: 1.5em;
  color: var(--ct-texto);
  font-weight: 500;
}

/* ---------- Cómo trabajamos (derecha) ---------- */

.ca-pasos ol {
  list-style: none;
  margin: auto 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2.4cqh;
}

.ca-pasos li {
  display: grid;
  grid-template-columns: 9cqw minmax(0, 1fr);
  gap: 3cqw;
  align-items: start;
}

.ca-pasos li span {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 9cqw;
  height: 9cqw;
  border-radius: 50%;
  background: var(--ct-azul);
  color: #fff;
  /* Georgia tiene números de texto (el 3 baja de la línea): van en Roboto */
  font-family: "Roboto", Arial, sans-serif;
  font-size: 4cqw;
  font-weight: 500;
  line-height: 1;
  font-variant-numeric: lining-nums tabular-nums;
}

.ca-pasos li p {
  margin: 0;
  font-size: max(9px, 2.6cqw);
  line-height: 1.45;
  color: var(--ct-texto-2);
}

.ca-pasos li p b {
  display: block;
  margin-bottom: 0.3cqh;
  color: var(--ct-texto);
  font-size: max(9.5px, 2.9cqw);
}

.ca-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2cqw;
  margin-top: 6cqh;
  margin-bottom: auto;
  align-self: center;
  padding: 2.4cqw 5.5cqw;
  border-radius: 999px;
  border: 1px solid #d9dde6;
  background: #fff;
  color: var(--ct-azul) !important;
  font-weight: 700;
  font-size: max(10px, 3cqw);
  text-decoration: none;
  box-shadow: 0 0.8cqw 2.4cqw rgba(15, 43, 115, 0.12);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.ca-cta:hover { background: #f4f6fb; border-color: #c9cfdd; }

.ca-cta > * { pointer-events: none; }
.ca-cta img { width: 4.6cqw; height: 4.6cqw; }

/* ---------- Muestra ampliada de fotos y dibujos ---------- */

.ct-lb--foto .ct-lb__card {
  width: min(880px, 100%);
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
}

@media (max-width: 560px) {
  .ct-lb--foto .ct-lb__card { padding: 16px 16px 14px; }
  .ct-lb--foto .ct-lb__color { font-size: 22px; }
}

/* La cruz siempre arriba de la foto y fácil de tocar */
.ct-lb--foto .ct-lb__close {
  z-index: 3;
  top: 6px;
  right: 6px;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.94);
  font-size: 28px;
}

.ct-lb--foto .ct-lb__close:hover { background: #eef0f5; }

.ca-lb__media { position: relative; z-index: 1; padding-top: 30px; }

.ct-lb--foto .ct-lb__img {
  aspect-ratio: auto;
  margin: 0 auto;
  width: 100%;
  height: auto;
  max-height: calc(100vh - 300px);
  object-fit: contain;
  background: #fff;
}

/* Frente, costado y atrás de la misma butaca */
.ca-lb__vistas {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
}

.ca-lb__vistas[hidden] { display: none; }

.ca-lb__vista {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 4px 6px 5px;
  border: 1px solid #e3e6ee;
  border-radius: 10px;
  background: #fff;
  color: var(--texto-secundario, #595766);
  font: 600 11.5px/1.2 "Roboto", Arial, sans-serif;
  cursor: pointer;
}

.ca-lb__vista img { width: 54px; height: 54px; object-fit: contain; pointer-events: none; }
.ca-lb__vista span { pointer-events: none; }
.ca-lb__vista:hover { border-color: #c9cfdd; }

.ca-lb__vista.is-active {
  border-color: var(--azul-principal, #0f2b73);
  box-shadow: 0 0 0 1px var(--azul-principal, #0f2b73);
  color: var(--azul-principal, #0f2b73);
}

/* Botones: WhatsApp y realidad aumentada, lado a lado (apilados en celular) */
.ca-lb__acciones {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.ca-lb__acciones.con-ra { grid-template-columns: 1fr 1fr; }

@media (max-width: 560px) {
  .ca-lb__acciones.con-ra { grid-template-columns: 1fr; }
}

/* Mismo botón que "Ver en realidad aumentada" de la ficha de producto */
.ca-lb__ra {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 16px;
  border: 1px solid #d9dde6;
  border-radius: 10px;
  background: #fff;
  color: var(--azul-principal, #0f2b73);
  font: 700 15px/1.2 "Roboto", Arial, sans-serif;
  cursor: pointer;
}

.ca-lb__ra[hidden] { display: none; }
.ca-lb__ra:hover { background: #f4f6fb; border-color: #c9cfdd; }
.ca-lb__ra img { width: 22px; height: 22px; object-fit: contain; pointer-events: none; }
.ca-lb__ra img[hidden] { display: none; }
.ca-lb__ra span { pointer-events: none; }

/* Panel del QR: reemplaza a la foto dentro de la misma ventana */
.ct-lb--foto.is-ra .ca-lb__media,
.ct-lb--foto.is-ra .ca-lb__vistas,
.ct-lb--foto.is-ra .ca-lb__nota { display: none; }

.ca-lb__ar { margin-top: 10px; }
.ca-lb__ar[hidden] { display: none; }

.ca-ar__titulo {
  margin: 0;
  font: 700 16px/1.3 "Roboto", Arial, sans-serif;
  color: var(--texto-principal, #17141f);
}

.ca-ar__texto,
.ca-ar__hint,
.ca-ar__nota {
  margin: 4px 0 0;
  font-size: 13.5px;
  color: var(--texto-secundario, #595766);
}

.ca-ar__nota[hidden] { display: none; }

.ca-ar__qr {
  display: block;
  width: auto;
  height: auto;
  max-width: min(260px, 100%);
  margin: 10px auto 6px;
  image-rendering: pixelated;
}

.ca-ar__abrir {
  display: inline-block;
  margin-top: 6px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--azul-principal, #0f2b73);
  color: #fff !important;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}

.ca-ar__abrir:hover { filter: brightness(1.12); }

/* WhatsApp: fondo blanco, el logo ya es verde */
.ct-lb--foto .ct-lb__wa {
  margin-top: 0;
  border: 1px solid #d9dde6;
  background: #fff;
  color: var(--azul-principal, #0f2b73) !important;
}

.ct-lb--foto .ct-lb__wa:hover { background: #f4f6fb; border-color: #c9cfdd; }

.ca-lb__nota {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--texto-secundario, #595766);
}

/* Que no se seleccione texto del libro al arrastrar las hojas */
.catalogo-auditorio .ct-book { -webkit-user-select: none; user-select: none; }
