/* Diseño por bloques de la Landing Page (pantalla landing-disenio). Prefijo ld-. */

.ld {
  --ld-primario: #5d6cc7;
  --ld-primario-suave: #eef0fb;
  --ld-borde: #e2e6ef;
  --ld-fondo: #f5f7fb;
  --ld-texto: #2d3748;
  --ld-texto-suave: #6b7280;
  --ld-peligro: #dc3545;
  --ld-aviso: #b7791f;
  --ld-radio: 10px;
}

/* ---------- Cabecera ---------- */

.ld-cabecera {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #fff;
  border: 1px solid var(--ld-borde);
  border-radius: var(--ld-radio);
  padding: 16px 20px;
  margin-bottom: 14px;
}

.ld-cabecera__titulo {
  margin: 0 0 4px;
  color: var(--ld-texto);
  font-weight: 700;
}

.ld-cabecera__titulo .mdi {
  color: var(--ld-primario);
}

.ld-cabecera__ayuda {
  margin: 0;
  color: var(--ld-texto-suave);
  font-size: 13px;
  max-width: 680px;
}

.ld-cabecera__acciones {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.ld-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--ld-texto);
}

.ld-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.ld-switch__pista {
  position: relative;
  width: 38px;
  height: 22px;
  border-radius: 22px;
  background: #cbd2e0;
  transition: background 0.2s;
  flex: 0 0 auto;
}

.ld-switch__pista::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
}

.ld-switch input:checked + .ld-switch__pista {
  background: #28a745;
}

.ld-switch input:checked + .ld-switch__pista::after {
  transform: translateX(16px);
}

.ld-switch input:focus-visible + .ld-switch__pista {
  outline: 2px solid var(--ld-primario);
  outline-offset: 2px;
}

.ld-aviso {
  margin-bottom: 14px;
}

.ld-aviso-cambios {
  margin-bottom: 14px;
  padding: 8px 14px;
  border-radius: var(--ld-radio);
  background: #fff8e6;
  border: 1px solid #f6d58b;
  color: var(--ld-aviso);
  font-size: 13px;
  font-weight: 600;
}

/* ---------- Editor: panel + lienzo ---------- */

/* El módulo mide el alto de la pantalla: cabecera y avisos arriba, el editor ocupa el resto. */
#moduloDisenioLanding {
  display: flex;
  flex-direction: column;
  height: var(--ld-modulo, calc(100vh - 70px));
}

#moduloDisenioLanding > * {
  flex-shrink: 0;
}

.ld-editor {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 14px;
  flex: 1 1 auto !important;
  min-height: 420px;
}

.ld-panel {
  position: relative;
  z-index: 5;
  background: #fff;
  border: 1px solid var(--ld-borde);
  border-radius: var(--ld-radio);
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ld-panel__pestanas {
  display: flex;
  border-bottom: 1px solid var(--ld-borde);
  flex: 0 0 auto;
}

.ld-panel__pestana {
  flex: 1;
  border: 0;
  background: var(--ld-fondo);
  padding: 11px 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ld-texto-suave);
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.ld-panel__pestana.is-activa {
  background: #fff;
  color: var(--ld-primario);
  border-bottom-color: var(--ld-primario);
}

.ld-panel__cuerpo {
  flex: 1 1 auto;
  min-height: 0;
  padding: 14px;
  overflow-y: auto;
}

.ld-panel__nota {
  font-size: 12px;
  color: var(--ld-texto-suave);
  margin-bottom: 12px;
}

.ld-paleta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.ld-paleta__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 12px 6px;
  border: 1px dashed #c9cfdd;
  border-radius: 8px;
  background: #fff;
  cursor: grab;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
}

.ld-paleta__item:hover {
  border-color: var(--ld-primario);
  background: var(--ld-primario-suave);
}

.ld-paleta__item .mdi {
  font-size: 26px;
  color: var(--ld-primario);
  line-height: 1.1;
}

.ld-paleta__nombre {
  font-size: 13px;
  font-weight: 700;
  color: var(--ld-texto);
}

.ld-paleta__ayuda {
  font-size: 11px;
  line-height: 1.3;
  color: var(--ld-texto-suave);
}

/* ---------- Inspector ---------- */

.ld-inspector label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ld-texto);
  margin-bottom: 4px;
}

.ld-inspector .form-group {
  margin-bottom: 12px;
}

.ld-inspector__vacio {
  text-align: center;
  color: var(--ld-texto-suave);
  padding: 30px 10px;
}

.ld-inspector__vacio .mdi {
  font-size: 34px;
  color: #c3c9d8;
}

.ld-inspector__titulo {
  font-size: 15px;
  font-weight: 700;
  color: var(--ld-texto);
  margin-bottom: 10px;
}

.ld-inspector__titulo .mdi {
  color: var(--ld-primario);
}

.ld-inspector__grupo {
  margin: 16px 0 10px;
  padding-top: 12px;
  border-top: 1px solid var(--ld-borde);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ld-texto-suave);
}

.ld-check {
  margin-bottom: 12px;
  padding-left: 1.5rem;
}

.ld-check .form-check-label {
  font-weight: 500;
}

.ld-quill {
  min-height: 140px;
  background: #fff;
}

.ld-imagen-campo {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ld-imagen-campo img {
  width: 100%;
  max-height: 170px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--ld-borde);
}

.ld-imagen-campo__botones {
  display: flex;
  gap: 6px;
}

.ld-colores {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.ld-color__fila {
  display: flex;
  align-items: center;
  gap: 4px;
}

.ld-color input[type="color"] {
  width: 42px;
  height: 30px;
  padding: 2px;
  border: 1px solid var(--ld-borde);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}

.ld-color input[type="color"].is-vacio {
  opacity: 0.35;
}

.ld-color .btn-link {
  padding: 0 4px;
  font-size: 12px;
}

.ld-alinear {
  display: inline-flex;
  border: 1px solid var(--ld-borde);
  border-radius: 6px;
  overflow: hidden;
}

.ld-alinear button {
  border: 0;
  background: #fff;
  padding: 4px 12px;
  font-size: 18px;
  color: var(--ld-texto-suave);
  cursor: pointer;
}

.ld-alinear button + button {
  border-left: 1px solid var(--ld-borde);
}

.ld-alinear button.is-activa {
  background: var(--ld-primario-suave);
  color: var(--ld-primario);
}

.ld-aviso-campo {
  display: block;
  margin: -6px 0 12px;
  color: var(--ld-peligro);
  font-size: 12px;
}

/* ---------- Lienzo ---------- */

.ld-lienzo {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  background: #fff;
  border: 1px solid var(--ld-borde);
  border-radius: var(--ld-radio);
  overflow: hidden;
}

.ld-lienzo__barra {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--ld-fondo);
  border-bottom: 1px solid var(--ld-borde);
}

.ld-lienzo__punto {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d5dae5;
}

.ld-lienzo__url {
  margin-left: 10px;
  font-size: 12px;
  color: var(--ld-texto-suave);
}

.ld-lienzo__contador {
  margin-left: auto;
  font-size: 12px;
  color: var(--ld-texto-suave);
}

.ld-lienzo__bloques {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 14px;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ld-cargando {
  text-align: center;
  padding: 50px 0;
  color: var(--ld-texto-suave);
}

.ld-marcador {
  height: 4px;
  border-radius: 4px;
  background: var(--ld-primario);
  box-shadow: 0 0 0 3px var(--ld-primario-suave);
}

.ld-bloque {
  border: 1px solid var(--ld-borde);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.ld-bloque:hover {
  border-color: #b8c0e8;
}

.ld-bloque.is-seleccionado {
  border-color: var(--ld-primario);
  box-shadow: 0 0 0 2px var(--ld-primario-suave);
}

.ld-bloque.is-arrastrando {
  opacity: 0.4;
}

.ld-bloque.is-oculto .ld-bloque__vista {
  opacity: 0.4;
  filter: grayscale(1);
}

.ld-bloque__barra {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: var(--ld-fondo);
  border-bottom: 1px solid var(--ld-borde);
}

.ld-bloque--seccion .ld-bloque__barra {
  background: #f0f2f7;
}

.ld-bloque__asa {
  cursor: grab;
  color: var(--ld-texto-suave);
  font-size: 20px;
  line-height: 1;
  padding: 0 2px;
}

.ld-bloque__nombre {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--ld-texto);
}

.ld-bloque__nombre .mdi {
  color: var(--ld-primario);
}

.ld-etiqueta {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 10px;
  background: var(--ld-primario-suave);
  color: var(--ld-primario);
  font-size: 11px;
  font-weight: 600;
}

.ld-etiqueta--gris {
  background: #e5e7eb;
  color: var(--ld-texto-suave);
}

.ld-bloque__acciones {
  display: inline-flex;
  gap: 2px;
}

.ld-bloque__acciones button {
  border: 0;
  background: transparent;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  color: var(--ld-texto-suave);
  font-size: 16px;
  cursor: pointer;
}

.ld-bloque__acciones button:hover:not(:disabled) {
  background: #fff;
  color: var(--ld-primario);
}

.ld-bloque__acciones button.is-peligro:hover {
  color: var(--ld-peligro);
}

.ld-bloque__acciones button:disabled {
  opacity: 0.3;
  cursor: default;
}

.ld-bloque__vista {
  padding: 18px 20px;
  color: var(--ld-texto);
}

.ld-esp-none { padding-top: 4px; padding-bottom: 4px; }
.ld-esp-s { padding-top: 12px; padding-bottom: 12px; }
.ld-esp-m { padding-top: 24px; padding-bottom: 24px; }
.ld-esp-l { padding-top: 40px; padding-bottom: 40px; }

/* ---------- Vista previa de los bloques ---------- */

.ld-seccion {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  text-align: left;
}

.ld-seccion__icono {
  font-size: 34px;
  color: #aab3c9;
  line-height: 1;
}

.ld-seccion__texto {
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--ld-texto-suave);
}

.ld-seccion__aviso {
  margin: 0 0 6px;
  font-size: 12px;
  color: var(--ld-aviso);
  font-weight: 600;
}

.ld-seccion__enlace {
  font-size: 12px;
  font-weight: 600;
}

.ld-seccion__fija {
  font-size: 12px;
  color: var(--ld-texto-suave);
}

.ld-vista-sub {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.75;
  margin-bottom: 4px;
}

.ld-vista-titulo {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 8px;
  color: inherit;
}

.ld-vista-desc {
  margin: 0 0 10px;
  font-size: 14px;
  opacity: 0.85;
}

.ld-vista-html {
  font-size: 14px;
}

.ld-vista-html p:last-child {
  margin-bottom: 0;
}

.ld-vista-html .ql-align-center { text-align: center; }
.ld-vista-html .ql-align-right { text-align: right; }
.ld-vista-html .ql-align-justify { text-align: justify; }

.ld-vacio {
  color: #9ca3af;
  font-style: italic;
  font-weight: 400;
}

.ld-vista-boton {
  display: inline-block;
  margin-top: 8px;
  padding: 8px 22px;
  border-radius: 100px;
  background: var(--ld-primario);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.ld-vista-imagen img {
  display: block;
  max-width: 100%;
  border-radius: 8px;
  margin: 0 auto;
}

.ld-tam-pequeno img,
.ld-tam-pequeno .ld-vista-sinimagen { max-width: 280px; }

.ld-tam-mediano img,
.ld-tam-mediano .ld-vista-sinimagen { max-width: 560px; }

.ld-vista-imagen .ld-vista-sinimagen {
  margin: 0 auto;
}

.ld-vista-sinimagen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 120px;
  border: 2px dashed #d5dae5;
  border-radius: 8px;
  color: #9ca3af;
  font-size: 12px;
  background: #fafbfd;
}

.ld-vista-sinimagen .mdi {
  font-size: 30px;
}

.ld-vista-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: center;
}

.ld-vista-cols.is-invertido .ld-vista-cols__img {
  order: 2;
}

.ld-vista-cols__img img {
  width: 100%;
  border-radius: 8px;
}

.ld-vista-video {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
}

.ld-vista-video img {
  width: 100%;
  border-radius: 8px;
  display: block;
}

.ld-vista-video__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 64px;
  color: #ff0000;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.ld-vista-espacio {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(45deg, #f7f8fb, #f7f8fb 6px, #eef0f5 6px, #eef0f5 12px);
  border-radius: 6px;
}

.ld-vista-espacio hr {
  position: absolute;
  left: 10%;
  right: 10%;
  margin: 0;
  border-top: 1px solid #b8c0d4;
}

.ld-vista-espacio span {
  position: relative;
  font-size: 11px;
  color: #9ca3af;
  background: #fff;
  padding: 0 6px;
  border-radius: 4px;
}

/* ---------- Responsive ---------- */

@media (max-width: 991.98px) {
  #moduloDisenioLanding {
    height: auto;
  }

  .ld-editor {
    grid-template-columns: 1fr;
    height: auto;
  }

  .ld-lienzo,
  .ld-lienzo__bloques {
    height: auto;
    overflow: visible;
  }

  .ld-panel {
    position: static;
    height: auto;
    max-height: none;
  }

  .ld-vista-cols {
    grid-template-columns: 1fr;
  }

  .ld-vista-cols.is-invertido .ld-vista-cols__img {
    order: 0;
  }
}

/* ---------- Tarjetas (vista antigua, sin uso) ---------- */

.ld-vista-tarjetas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.ld-vista-tarjeta {
  display: flex;
  flex-direction: column;
  align-items: inherit;
  gap: 4px;
  padding: 14px 12px;
  border-radius: 10px;
  background: #fff;
  color: var(--ld-texto);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
  font-size: 13px;
}

.ld-bloque__vista[style*="text-align: center"] .ld-vista-tarjeta { align-items: center; }

.ld-vista-tarjeta small {
  color: var(--ld-texto-suave);
  line-height: 1.35;
}

.ld-vista-tarjeta__icono {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--ld-primario);
  color: #fff;
  margin-bottom: 4px;
}

.ld-tarjetas-campo {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.ld-tarjeta-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--ld-borde);
  border-radius: 8px;
  background: var(--ld-fondo);
}

.ld-tarjeta-item__cab {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ld-tarjeta-item__icono {
  flex: 0 0 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: var(--ld-primario);
  color: #fff;
}

.ld-aviso-muestra {
  color: var(--ld-aviso);
  font-weight: 600;
}

/* ---------- Galería de plantillas ---------- */

.ld-sin-scroll {
  overflow: hidden;
}

.ld-galeria {
  position: fixed;
  inset: 0;
  z-index: 1055;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: rgba(15, 23, 42, 0.55);
}

.ld-galeria[hidden] {
  display: none;
}

.ld-galeria__caja {
  width: 100%;
  max-width: 1200px;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--ld-fondo);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}

.ld-galeria__cab {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 22px;
  background: #fff;
  border-bottom: 1px solid var(--ld-borde);
}

.ld-galeria__titulo {
  margin: 0 0 4px;
  font-weight: 700;
  color: var(--ld-texto);
}

.ld-galeria__titulo .mdi {
  color: var(--ld-primario);
}

.ld-galeria__ayuda {
  margin: 0;
  font-size: 13px;
  color: var(--ld-texto-suave);
}

.ld-galeria__cerrar {
  border: 0;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  color: var(--ld-texto-suave);
  cursor: pointer;
}

.ld-galeria__grilla {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  padding: 20px 22px;
  overflow-y: auto;
}

.ld-plantilla {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--ld-borde);
  border-radius: 12px;
  padding: 16px;
}

.ld-plantilla__colores {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.ld-plantilla__colores span {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.ld-plantilla__nombre {
  margin: 0;
  font-weight: 700;
  color: var(--ld-texto);
}

.ld-plantilla__ideal {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ld-primario);
  margin: 2px 0 6px;
}

.ld-plantilla__desc {
  font-size: 12px;
  color: var(--ld-texto-suave);
  margin-bottom: 10px;
}

.ld-plantilla__mini {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px;
  margin-bottom: 12px;
  border-radius: 8px;
  background: var(--ld-fondo);
  max-height: 210px;
  overflow: hidden;
  flex: 1 1 auto;
}

.ld-mini {
  display: block;
  padding: 3px 8px;
  border-radius: 4px;
  border-left: 3px solid #94a3b8;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05) inset;
}

.ld-mini--seccion {
  background: #e7eaf2;
  color: #475569;
  border-left-color: #cbd2e0;
}

.ld-plantilla__acciones {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ld-plantilla__acciones .btn {
  flex: 1 1 auto;
}


/* ================= Editor por esquema (variantes, listas, página) ================= */

.ld-lienzo__bloques {
  --ldt-p: #5d6cc7;
  --ldt-s: #1f2937;
  --ldt-suave: #f5f6fa;
  --ldt-r: 10px;
}

.ld-bloque__vista .ld-vista-boton { background: var(--ldt-p); border-radius: var(--ldt-r); }
.ld-vista-boton--borde { background: transparent !important; color: var(--ldt-p); box-shadow: inset 0 0 0 2px var(--ldt-p); }
.ld-vista-sub { color: var(--ldt-p); opacity: 1; }
.ld-bloque__vista .ld-vista-titulo { color: inherit; }
.ld-bloque__vista:not([style*="color"]) .ld-vista-titulo { color: var(--ldt-s); }

.ld-variantes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.ld-variante {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 10px;
  border: 1px solid var(--ld-borde);
  border-radius: 8px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.ld-variante b { font-size: 12px; color: var(--ld-texto); }
.ld-variante small { font-size: 11px; line-height: 1.3; color: var(--ld-texto-suave); }
.ld-variante:hover { border-color: #b8c0e8; }
.ld-variante.is-activa { border-color: var(--ld-primario); background: var(--ld-primario-suave); box-shadow: 0 0 0 1px var(--ld-primario); }

.ld-lista { display: flex; flex-direction: column; gap: 6px; }
.ld-lista__item { border: 1px solid var(--ld-borde); border-radius: 8px; background: #fff; overflow: hidden; }
.ld-lista__cab { display: flex; align-items: center; gap: 6px; padding: 7px 8px; cursor: pointer; font-size: 12px; font-weight: 600; color: var(--ld-texto); }
.ld-lista__cab span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ld-lista__cab .mdi-chevron-right { transition: transform .15s; color: var(--ld-texto-suave); }
.ld-lista__item.is-abierto .mdi-chevron-right { transform: rotate(90deg); }
.ld-lista__cab button { border: 0; background: transparent; width: 24px; height: 24px; border-radius: 5px; color: var(--ld-texto-suave); cursor: pointer; }
.ld-lista__cab button:hover:not(:disabled) { background: var(--ld-fondo); color: var(--ld-primario); }
.ld-lista__cab button.is-peligro:hover { color: var(--ld-peligro); }
.ld-lista__cab button:disabled { opacity: .3; }
.ld-lista__cuerpo { padding: 10px; border-top: 1px solid var(--ld-borde); background: var(--ld-fondo); }

.ld-icono-campo { display: flex; align-items: center; gap: 6px; }
.ld-icono-campo__ver {
  flex: 0 0 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: var(--ld-primario);
  color: #fff;
}

.ld-imagen-campo__botones { flex-wrap: wrap; }

.ld-colores--3 { grid-template-columns: repeat(3, 1fr); }
.ld-colores--3 .ld-color .btn-link { padding: 0 2px; font-size: 11px; }

.ld-radios { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ld-radio {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid var(--ld-borde);
  border-radius: 8px;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  color: var(--ld-texto);
  cursor: pointer;
}
.ld-radio span { width: 22px; height: 16px; border: 2px solid var(--ld-texto-suave); }
.ld-radio--recto span { border-radius: 1px; }
.ld-radio--suave span { border-radius: 4px; }
.ld-radio--redondo span { border-radius: 7px; }
.ld-radio--pildora span { border-radius: 10px; }
.ld-radio.is-activa { border-color: var(--ld-primario); background: var(--ld-primario-suave); }
.ld-radio.is-activa span { border-color: var(--ld-primario); }

.ld-galeria__caja--angosta { max-width: 860px; }
.ld-muestras { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); grid-auto-rows: 130px; gap: 10px; flex: 1 1 auto; min-height: 0; padding: 20px 22px; overflow-y: auto; }
.ld-muestra { height: 100%; padding: 0; border: 2px solid transparent; border-radius: 10px; background: none; overflow: hidden; cursor: pointer; }
.ld-muestra img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.ld-muestra:hover { border-color: var(--ld-primario); }
.ld-muestra:hover img { transform: scale(1.06); }

.ld-plantilla__portada { position: relative; height: 150px; margin: -16px -16px 12px; overflow: hidden; border-radius: 12px 12px 0 0; }
.ld-plantilla__portada img { width: 100%; height: 100%; object-fit: cover; }
.ld-plantilla__portada .ld-plantilla__colores { position: absolute; left: 12px; bottom: 10px; margin: 0; padding: 4px 6px; border-radius: 20px; background: rgba(255, 255, 255, .9); }

/* ---------- Vistas esquemáticas de los bloques ---------- */

.ld-m-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: center; text-align: left; }
.ld-m-2col.is-invertido > :first-child { order: 2; }
.ld-m-hero__texto .ld-vista-titulo { font-size: 20px; }
.ld-m-hero__texto > div:last-child { margin-top: 8px; }
.ld-m-forma img, .ld-m-forma .ld-vista-sinimagen { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 46% 54% 42% 58% / 52% 44% 56% 48%; }
.ld-m-collage { display: grid; grid-template-columns: 1.2fr 1fr; grid-template-rows: 70px 70px; gap: 6px; }
.ld-m-collage > :first-child { grid-row: span 2; }
.ld-m-collage img, .ld-m-collage .ld-vista-sinimagen { width: 100%; height: 100%; min-height: 0; object-fit: cover; border-radius: var(--ldt-r); }
.ld-m-hero { padding: 26px; border-radius: var(--ldt-r); background: var(--ldt-s) center / cover no-repeat; text-align: left; }
.ld-m-hero--fondo { position: relative; text-align: center; color: #fff; }
.ld-m-hero--fondo::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: rgba(15, 23, 42, .55); }
.ld-m-hero--fondo .ld-m-hero__texto { position: relative; }
.ld-m-hero--fondo .ld-vista-titulo { color: #fff !important; }
.ld-m-hero--tarjeta .ld-m-hero__texto { max-width: 60%; padding: 14px; border-radius: var(--ldt-r); background: #fff; color: var(--ld-texto); border-top: 4px solid var(--ldt-p); }
.ld-m-centrado { text-align: center; }
.ld-m-panoramica { display: block; width: 100%; height: 110px; margin-top: 12px; object-fit: cover; border-radius: var(--ldt-r); }
.ld-m-foto img, .ld-m-foto .ld-vista-sinimagen, .ld-m-apilada > img:first-child, .ld-m-apilada > .ld-vista-sinimagen { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--ldt-r); }
.ld-m-foto--marco { padding: 0 8px 8px 0; background: linear-gradient(var(--ldt-p), var(--ldt-p)) 8px 8px / calc(100% - 8px) calc(100% - 8px) no-repeat; border-radius: var(--ldt-r); }
.ld-m-foto--checklist img { border-radius: 999px 999px var(--ldt-r) var(--ldt-r); aspect-ratio: 4 / 4.4; }
.ld-m-apilada { position: relative; padding: 0 22% 18% 0; }
.ld-m-apilada > img:nth-child(2) { position: absolute; right: 0; bottom: 0; width: 45%; aspect-ratio: 1; object-fit: cover; border: 4px solid #fff; border-radius: var(--ldt-r); }
.ld-m-insignia { position: absolute; top: 8px; left: -6px; padding: 4px 10px; border-radius: 6px; background: var(--ldt-p); color: #fff; font-size: 16px; }
.ld-m-checks { margin: 6px 0; padding-left: 16px; font-size: 12px; }
.ld-m-tarjetas { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin-top: 8px; text-align: left; }
.ld-m-tarjeta { display: flex; flex-direction: column; gap: 3px; padding: 10px; border-radius: var(--ldt-r); background: #fff; color: var(--ld-texto); box-shadow: 0 3px 12px rgba(15, 23, 42, .08); font-size: 12px; }
.ld-m-tarjeta small { color: var(--ld-texto-suave); line-height: 1.3; }
.ld-m-tarjeta__icono { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 7px; background: color-mix(in srgb, var(--ldt-p) 14%, #fff); color: var(--ldt-p); font-weight: 800; }
.ld-m-tarjeta__foto { width: calc(100% + 20px); height: 60px; margin: -10px -10px 4px; object-fit: cover; border-radius: var(--ldt-r) var(--ldt-r) 0 0; }
.ld-m-tarjetas--destacada .ld-m-tarjeta:first-child, .ld-m-tarjetas--superpuestas .ld-m-tarjeta:last-child { background: var(--ldt-p); color: #fff; }
.ld-m-tarjetas--destacada .ld-m-tarjeta:first-child small, .ld-m-tarjetas--superpuestas .ld-m-tarjeta:last-child small { color: rgba(255, 255, 255, .85); }
.ld-m-tarjetas--lista .ld-m-tarjeta { box-shadow: none; background: transparent; }
.ld-m-tarjetas--lista .ld-m-tarjeta__icono, .ld-m-tarjetas--numeradas .ld-m-tarjeta__icono { border-radius: 50%; background: var(--ldt-p); color: #fff; }
.ld-m-tarjetas--superpuestas { gap: 0; overflow: hidden; border-radius: var(--ldt-r); box-shadow: 0 6px 20px rgba(15, 23, 42, .12); }
.ld-m-tarjetas--superpuestas .ld-m-tarjeta { box-shadow: none; border-radius: 0; }
.ld-m-cifras { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 8px; margin-top: 8px; }
.ld-m-cifras > div { display: flex; flex-direction: column; padding: 10px; }
.ld-m-cifras b { font-size: 20px; color: var(--ldt-p); }
.ld-m-cifras small { font-size: 11px; }
.ld-m-cifras--franja { padding: 6px; border-radius: var(--ldt-r); background: var(--ldt-p); }
.ld-m-cifras--franja b, .ld-m-cifras--franja small { color: #fff; }
.ld-m-cifras--tarjetas > div { border-radius: var(--ldt-r); background: #fff; box-shadow: 0 3px 12px rgba(15, 23, 42, .08); }
.ld-m-planes { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; margin-top: 8px; align-items: center; }
.ld-m-planes > div { display: flex; flex-direction: column; padding: 12px; border-radius: var(--ldt-r); background: #fff; box-shadow: 0 3px 12px rgba(15, 23, 42, .08); }
.ld-m-planes b { font-size: 18px; color: var(--ldt-p); }
.ld-m-planes .is-destacado { padding: 18px 12px; background: var(--ldt-p); color: #fff; }
.ld-m-planes .is-destacado b { color: #fff; }
.ld-m-faq { display: flex; flex-direction: column; gap: 5px; margin-top: 8px; text-align: left; }
.ld-m-faq > div { display: flex; justify-content: space-between; padding: 8px 10px; border-radius: var(--ldt-r); background: #fff; box-shadow: 0 2px 8px rgba(15, 23, 42, .07); font-size: 12px; font-weight: 600; color: var(--ld-texto); }
.ld-m-faq i { color: var(--ldt-p); }
.ld-m-galeria { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 8px; }
.ld-m-galeria img, .ld-m-galeria .ld-vista-sinimagen { width: 100%; height: 70px; min-height: 0; object-fit: cover; border-radius: var(--ldt-r); }
.ld-m-galeria--mosaico > :first-child { grid-column: span 2; grid-row: span 2; height: 146px; }
.ld-m-galeria--fila { display: flex; overflow: hidden; }
.ld-m-galeria--fila > * { flex: 0 0 90px; height: 110px; }
.ld-m-marquesina { display: flex; align-items: center; gap: 14px; padding: 12px; overflow: hidden; white-space: nowrap; background: var(--ldt-p); color: #fff; font-weight: 800; font-size: 16px; }
.ld-m-marquesina i { font-size: 6px; opacity: .7; }
.ld-m-marquesina.is-inclinada { transform: rotate(-1.5deg); }
.ld-m-cta { display: flex; flex-direction: column; gap: 8px; padding: 18px; border-radius: var(--ldt-r); background: var(--ldt-p); color: #fff; }
.ld-m-cta .ld-vista-titulo { color: #fff !important; }
.ld-m-cta .ld-vista-boton { background: #fff; color: var(--ldt-s); }
.ld-m-cta--dividido { flex-direction: row; justify-content: space-between; align-items: center; background: var(--ldt-s); text-align: left; }
.ld-m-cta--dividido .ld-vista-boton { background: var(--ldt-p); color: #fff; }
.ld-m-cta--franja { border-radius: 0; }
.ld-m-cta--imagen { display: grid; grid-template-columns: 110px 1fr; align-items: end; background: color-mix(in srgb, var(--ldt-p) 14%, #fff); color: var(--ld-texto); text-align: left; }
.ld-m-cta--imagen .ld-vista-titulo { color: var(--ld-texto) !important; }
.ld-m-cta--imagen .ld-vista-boton { background: var(--ldt-p); color: #fff; }
.ld-m-cta--imagen img, .ld-m-cta--imagen .ld-vista-sinimagen { width: 110px; height: 120px; min-height: 0; margin-top: -30px; object-fit: cover; border-radius: var(--ldt-r) var(--ldt-r) 0 0; }
.ld-m-contacto { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; text-align: left; }
.ld-m-contacto > div { display: flex; flex-direction: column; gap: 3px; padding: 10px; border-radius: var(--ldt-r); background: #fff; color: var(--ld-texto); box-shadow: 0 3px 12px rgba(15, 23, 42, .08); font-size: 12px; }
.ld-m-contacto i { color: var(--ldt-p); }
.ld-m-contacto small { color: var(--ld-texto-suave); }
.ld-m-contacto--franja { padding: 8px; border-radius: var(--ldt-r); background: var(--ldt-s); }
.ld-m-contacto--franja > div { background: rgba(255, 255, 255, .08); color: #fff; box-shadow: none; }
.ld-m-contacto--franja small { color: rgba(255, 255, 255, .7); }

@media (max-width: 991.98px) {
  .ld-m-2col, .ld-m-contacto { grid-template-columns: 1fr; }
}

/* Captura de la plantilla: se ve el comienzo y, al pasar el mouse, recorre la página completa. */
.ld-plantilla__captura {
  --ld-recorrido: 0px;
  --ld-duracion: 4s;
  position: relative;
  height: 250px;
  margin: -16px -16px 14px;
  overflow: hidden;
  border-radius: 12px 12px 0 0;
  border-bottom: 1px solid var(--ld-borde);
  background: var(--ld-fondo);
  cursor: ns-resize;
}
.ld-plantilla__captura img {
  display: block;
  width: 100%;
  transform: translateY(0);
  transition: transform var(--ld-duracion) ease-in-out;
}
.ld-plantilla__captura:hover img { transform: translateY(calc(-1 * var(--ld-recorrido))); }
.ld-plantilla__captura .ld-plantilla__colores { position: absolute; left: 12px; bottom: 10px; margin: 0; padding: 4px 6px; border-radius: 20px; background: rgba(255, 255, 255, .92); box-shadow: 0 2px 8px rgba(0, 0, 0, .15); }

/* Formas extra de Imagen + texto en la vista esquemática */
.ld-m-foto--circulo img, .ld-m-foto--circulo .ld-vista-sinimagen { aspect-ratio: 1; border-radius: 50%; outline: 2px dashed var(--ldt-p); outline-offset: 6px; }
.ld-m-foto--mancha img, .ld-m-foto--mancha .ld-vista-sinimagen { aspect-ratio: 1; border-radius: 62% 38% 55% 45% / 45% 58% 42% 55%; box-shadow: -10px 10px 0 color-mix(in srgb, var(--ldt-p) 25%, transparent); }
.ld-m-foto--hoja img, .ld-m-foto--hoja .ld-vista-sinimagen { border-radius: 60px 6px 60px 6px; }
.ld-m-foto--hexagono img, .ld-m-foto--hexagono .ld-vista-sinimagen { aspect-ratio: 1 / .92; border-radius: 0; clip-path: polygon(25% 2%, 75% 2%, 100% 50%, 75% 98%, 25% 98%, 0 50%); }
.ld-m-foto--polaroid { padding: 8px 8px 22px; background: #fff; box-shadow: 0 6px 18px rgba(15, 23, 42, .15); transform: rotate(-3deg); }
.ld-m-foto--polaroid img, .ld-m-foto--polaroid .ld-vista-sinimagen { border-radius: 0; }
.ld-m-foto--capsula { max-width: 70%; margin: 0 auto; }
.ld-m-foto--capsula img, .ld-m-foto--capsula .ld-vista-sinimagen { aspect-ratio: 3 / 4.3; border-radius: 999px; }
.ld-m-foto--superpuesta img, .ld-m-foto--superpuesta .ld-vista-sinimagen { aspect-ratio: 16 / 11; }

.ld-url__otra { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; padding: 8px; border-radius: 6px; background: var(--ld-fondo); }
.ld-url__otra[hidden] { display: none; }
.ld-url__otra .ld-aviso-campo { margin: 0; }

.ld-seccion__foto { flex: 0 0 90px; width: 90px; height: 70px; object-fit: cover; border-radius: 8px; }

/* El lienzo tiene alto fijo y scroll propio: sus bloques no deben achicarse. */
.ld-lienzo__bloques > * { flex-shrink: 0; }

/* Guardar siempre a mano: pie del panel y botón en el bloque seleccionado */
.ld-panel__pie {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid var(--ld-borde);
  background: var(--ld-fondo);
}
.ld-guardado { font-size: 12px; font-weight: 600; color: #15803d; }
.ld-guardado.is-pendiente { color: var(--ld-aviso); }
[data-ld-guardar].is-pendiente { box-shadow: 0 0 0 3px rgba(93, 108, 199, .25); animation: ld-latido 1.8s ease-in-out infinite; }
@keyframes ld-latido { 50% { box-shadow: 0 0 0 6px rgba(93, 108, 199, .12); } }

.ld-bloque__acciones .ld-bloque__guardar {
  width: auto;
  padding: 0 10px;
  background: var(--ld-primario);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}
.ld-bloque__acciones .ld-bloque__guardar:hover:not(:disabled) { background: var(--ld-primario); color: #fff; filter: brightness(1.1); }
.ld-bloque:not(.is-seleccionado) .ld-bloque__guardar { display: none; }
.ld-panel__pie .btn { flex: 0 0 auto; white-space: nowrap; }
.ld-guardado { flex: 1 1 auto; min-width: 0; line-height: 1.3; }

/* Vista real: la página del sitio dentro del lienzo */
.ld-vistas { display: inline-flex; margin-left: 14px; border: 1px solid var(--ld-borde); border-radius: 8px; overflow: hidden; background: #fff; }
.ld-vistas__btn { border: 0; background: transparent; padding: 4px 10px; font-size: 12px; font-weight: 600; color: var(--ld-texto-suave); cursor: pointer; }
.ld-vistas__btn + .ld-vistas__btn { border-left: 1px solid var(--ld-borde); }
.ld-vistas__btn.is-activa { background: var(--ld-primario-suave); color: var(--ld-primario); }
.ld-vistas__btn:disabled { opacity: .45; cursor: not-allowed; }
.ld-real { position: relative; flex: 1 1 auto; min-height: 0; background: #e9ecf3; }
.ld-real[hidden] { display: none; }
.ld-real__marco { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; }
.ld-real__marco.is-cargando { visibility: hidden; }
.ld-real__estado {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 14px;
  padding: 6px 12px;
  border-radius: 20px;
  background: rgba(15, 23, 42, .78);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}
.ld-real__estado[hidden] { display: none; }
.ld-lienzo__bloques[hidden] { display: none !important; }

/* Menú y pie: piezas fijas del sitio */
.ld-bloque--fijo { border-style: dashed; background: #fbfcff; }
.ld-bloque--fijo .ld-bloque__barra { background: #eef1fa; }
.ld-bloque__asa.is-fija { cursor: default; }
.ld-opmenu { margin-bottom: 8px; padding: 8px 10px; border: 1px solid var(--ld-borde); border-radius: 8px; background: #fff; }
.ld-opmenu.is-sub { margin-left: 18px; }
.ld-opmenu__cab { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; cursor: pointer; }
.ld-opmenu__cab input { width: 16px; height: 16px; }
.ld-opmenu__cuerpo { margin-top: 8px; }
.ld-opmenu__cuerpo .form-group { margin-bottom: 8px; }
.ld-opmenu.is-apagada .ld-opmenu__cuerpo { display: none; }
.ld-opmenu.is-apagada .ld-opmenu__cab b { color: var(--ld-texto-suave); text-decoration: line-through; }
.ld-color--fila { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.ld-color--fila label { margin: 0; font-weight: 500; }
.ld-horario { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.ld-horario__dia { display: grid; grid-template-columns: 72px 92px 1fr; align-items: center; gap: 6px; font-size: 12px; }
.ld-horario__horas { display: flex; gap: 4px; }
.ld-horario__horas[hidden] { display: none; }
.ld-horario__horas input { padding: 2px 4px; }

.ld-paletacolor__tira { display: flex; height: 22px; margin: 8px 0 4px; overflow: hidden; border: 1px solid #e2e8f0; border-radius: 6px; }
.ld-paletacolor__tira span { flex: 1; }
.ld-paletacolor__tira span.is-vacio { background: repeating-linear-gradient(45deg, #f8fafc, #f8fafc 4px, #e2e8f0 4px, #e2e8f0 8px) !important; }
.ld-paletacolor { display: block !important; width: 100%; grid-column: 1 / -1; flex: 0 0 100%; }
.ld-paletacolor > label { display: block; margin-bottom: 4px; }
.ld-paletacolor small { display: block; }
.ld-paleta__grupo { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; margin: 6px 0 0; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #64748b; }
.ld-paleta__grupo:first-child { margin-top: 0; }
.ld-paleta__vacio { grid-column: 1 / -1; margin: 0; padding: 10px 12px; border: 1px dashed #cbd5e1; border-radius: 8px; font-size: 12px; color: #64748b; text-align: center; }
.ld-paleta__item--seccion { border-style: solid; background: #f8faff; }

/* Acceso a la Configuración general (pestaña Página) */
.ld-general-acceso { display: flex; align-items: center; gap: 12px; width: 100%; margin-bottom: 16px; padding: 14px 14px; border: 1px solid #c7cdf0; border-radius: 10px; background: #f5f6ff; color: #1e293b; text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.ld-general-acceso:hover { border-color: #5d6cc7; box-shadow: 0 4px 14px rgba(93, 108, 199, .15); }
.ld-general-acceso > .mdi:first-child { flex: 0 0 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: #5d6cc7; color: #fff; font-size: 20px; }
.ld-general-acceso span { flex: 1; min-width: 0; }
.ld-general-acceso b { display: block; font-size: 14px; }
.ld-general-acceso small { display: block; margin-top: 2px; font-size: 12px; line-height: 1.4; color: #64748b; }
.ld-general-acceso > .mdi:last-child { color: #94a3b8; font-size: 20px; }
.ld-quill--documento .ql-editor { min-height: 220px; max-height: 420px; overflow-y: auto; }
