/* Estilos de la landing y el editor (no de la invitación: eso es plantillas.css). */

* { box-sizing: border-box; }

:root {
  --marca: #b3417c;
  --marca-oscuro: #8e2f62;
  --fondo: #fffaf6;
  --tinta: #33222c;
  --tinta-suave: #6d5a65;
  --tarjeta: #ffffff;
  --borde: #eadfe5;
  --ok: #2e7d4f;
  --error: #b3382f;
}

body {
  margin: 0;
  background: var(--fondo);
  color: var(--tinta);
  font-family: "Montserrat", system-ui, sans-serif;
  line-height: 1.6;
}

.contenedor { max-width: 1080px; margin: 0 auto; padding: 0 1.2rem; }

/* ---------- Hero ---------- */

.hero {
  background: linear-gradient(150deg, #fde7f1 0%, #fffaf6 55%, #f3e8ff 100%);
  padding: 3.5rem 0 3rem;
  text-align: center;
}
.hero .logo { font-weight: 700; font-size: 1.05rem; color: var(--marca); letter-spacing: 0.02em; }
.hero h1 { font-size: clamp(1.9rem, 5vw, 3rem); margin: 0.6rem auto 0.8rem; max-width: 18em; line-height: 1.2; }
.hero p.sub { color: var(--tinta-suave); max-width: 38em; margin: 0 auto 1.6rem; font-size: 1.1rem; }
.hero .beneficios {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; justify-content: center;
  list-style: none; padding: 0; margin: 0 0 1.8rem; color: var(--tinta-suave); font-size: 0.95rem;
}

.cta {
  display: inline-block;
  background: var(--marca);
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  padding: 0.9rem 2.2rem;
  border-radius: 999px;
  border: none;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
}
.cta:hover { background: var(--marca-oscuro); }
.cta.secundario { background: transparent; color: var(--marca); border: 2px solid var(--marca); }

/* ---------- Secciones ---------- */

section { padding: 2.8rem 0; }
section h2 { font-size: 1.7rem; margin: 0 0 0.4rem; }
section .intro { color: var(--tinta-suave); margin: 0 0 1.6rem; max-width: 44em; }

/* ---------- Galería de ejemplos ---------- */

.ejemplos-grilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1rem; }
.ejemplo-card {
  display: block; text-decoration: none; color: inherit;
  border: 1px solid var(--borde); border-radius: 16px; overflow: hidden;
  background: var(--tarjeta); transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.ejemplo-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(120, 40, 85, 0.16); }
.ejemplo-card:focus-visible { outline: 2px solid var(--marca); outline-offset: 2px; }

/* La miniatura toma los colores y la tipografía del diseño real.
   Definimos los valores base acá; cada .plantilla-<id> los sobrescribe. */
.ejemplo-thumb {
  --fondo: #faf6ef; --tinta: #3f3a33; --acento: #b08d3f;
  --acento-suave: rgba(176, 141, 63, 0.14);
  --fuente-titulo: "Great Vibes", cursive;
  --fuente-texto: "Cormorant Garamond", Georgia, serif;
  height: 168px; padding: 1.2rem;
  background: var(--fondo); color: var(--tinta);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.35rem; text-align: center;
}
.ejemplo-thumb .et-eyebrow {
  font-family: var(--fuente-texto); text-transform: uppercase; letter-spacing: 0.28em;
  font-size: 0.6rem; color: var(--acento);
}
.ejemplo-thumb .et-nombre {
  font-family: var(--fuente-titulo); font-size: 1.7rem; line-height: 1.05; color: var(--tinta);
}
.ejemplo-thumb .et-linea { width: 34px; height: 1px; background: var(--acento); opacity: 0.8; margin-top: 0.2rem; }
.ejemplo-info { padding: 0.8rem 1rem 0.9rem; }
.ejemplo-info strong { display: block; font-size: 0.98rem; }
.ejemplo-info span { font-size: 0.82rem; color: var(--tinta-suave); }

/* ---------- Editor ---------- */

.editor-grilla { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 2rem; align-items: start; }
@media (max-width: 900px) { .editor-grilla { grid-template-columns: 1fr; } }

.panel { background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 16px; padding: 1.5rem; }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.2rem; }
.chip {
  border: 1.5px solid var(--borde);
  background: #fff;
  border-radius: 999px;
  padding: 0.45rem 1rem;
  font-size: 0.95rem;
  font-family: inherit;
  cursor: pointer;
}
.chip.activo { border-color: var(--marca); background: var(--marca); color: #fff; font-weight: 600; }

.campo { margin-bottom: 0.9rem; }
.campo label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.25rem; }
.campo label small { font-weight: 400; color: var(--tinta-suave); }
.campo input, .campo textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1.5px solid var(--borde);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.98rem;
  background: #fff;
  color: var(--tinta);
}
.campo input:focus, .campo textarea:focus { outline: 2px solid var(--marca); outline-offset: 1px; border-color: var(--marca); }
.campo textarea { resize: vertical; min-height: 4.2em; }
.dos-columnas { display: grid; grid-template-columns: 1fr 1fr; gap: 0 0.8rem; }
@media (max-width: 560px) { .dos-columnas { grid-template-columns: 1fr; } }

/* Plantillas */
.plantillas-grilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.7rem; margin-top: 0.4rem; }
.tarjeta-plantilla {
  border: 2px solid var(--borde);
  border-radius: 12px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  background: #fff;
  font-family: inherit;
  text-align: left;
}
.tarjeta-plantilla .muestra { height: 64px; display: grid; place-items: center; font-size: 1.4rem; }
.tarjeta-plantilla .info { padding: 0.5rem 0.7rem; }
.tarjeta-plantilla .info strong { font-size: 0.9rem; display: block; }
.tarjeta-plantilla .info small { color: var(--tinta-suave); font-size: 0.72rem; line-height: 1.3; display: block; }
.tarjeta-plantilla.activa { border-color: var(--marca); box-shadow: 0 0 0 2px rgba(179, 65, 124, 0.2); }
.tarjeta-plantilla .candado { float: right; }

/* Vista previa */
.marco-telefono {
  border: 10px solid #2b2330;
  border-radius: 34px;
  overflow: hidden;
  height: 640px;
  box-shadow: 0 18px 40px rgba(60, 20, 45, 0.18);
  position: sticky;
  top: 1rem;
  background: #fff;
}
.marco-telefono .pantalla { height: 100%; overflow-y: auto; }
.marco-telefono .invitacion { min-height: 100%; font-size: 0.92rem; }
.nota-preview { text-align: center; color: var(--tinta-suave); font-size: 0.85rem; margin-top: 0.6rem; }

/* Resultado */
.acciones-generar { margin-top: 1.2rem; display: flex; flex-wrap: wrap; gap: 0.7rem; align-items: center; }
.resultado { margin-top: 1rem; display: none; }
.resultado.visible { display: block; }
.resultado .link-caja {
  display: flex; gap: 0.5rem; align-items: center;
  background: #f7eef4; border: 1.5px dashed var(--marca);
  border-radius: 10px; padding: 0.6rem 0.8rem;
}
.resultado .link-caja input { flex: 1; border: none; background: transparent; font-size: 0.85rem; color: var(--tinta); min-width: 0; }
.resultado .botones { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.7rem; }
.errores { color: var(--error); font-size: 0.9rem; margin-top: 0.8rem; white-space: pre-line; }
.aviso-ok { color: var(--ok); font-weight: 600; }

/* ---------- Premium ---------- */

.planes { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; max-width: 760px; }
@media (max-width: 700px) { .planes { grid-template-columns: 1fr; } }
.plan { background: var(--tarjeta); border: 1.5px solid var(--borde); border-radius: 16px; padding: 1.5rem; }
.plan.destacado { border-color: var(--marca); box-shadow: 0 10px 30px rgba(179, 65, 124, 0.12); }
.plan h3 { margin: 0 0 0.2rem; }
.plan .precio { font-size: 1.6rem; font-weight: 800; margin: 0.2rem 0 0.8rem; }
.plan .precio small { font-size: 0.85rem; font-weight: 400; color: var(--tinta-suave); }
.plan ul { padding-left: 1.2rem; margin: 0 0 1rem; }
.plan li { margin-bottom: 0.3rem; font-size: 0.95rem; }

/* Botones de pago dentro de la tarjeta Premium: texto prolijo, sin cortes feos */
#botones-pago { display: flex; flex-direction: column; gap: 0.6rem; }
#botones-pago .cta {
  width: 100%;
  text-align: center;
  font-size: 1rem;
  padding: 0.8rem 1rem;
  line-height: 1.25;
}

.canje { margin-top: 1.5rem; max-width: 760px; }
.canje .fila { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.canje input { flex: 1; min-width: 220px; padding: 0.65rem 0.8rem; border: 1.5px solid var(--borde); border-radius: 10px; font-family: inherit; }
.estado-licencia { margin-top: 0.5rem; font-size: 0.95rem; }

/* ---------- Pasos / FAQ / footer ---------- */

.pasos { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; }
.paso { background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 14px; padding: 1.1rem 1.2rem; }
.paso .numero { font-size: 1.6rem; font-weight: 800; color: var(--marca); }
.paso h3 { margin: 0.3rem 0; font-size: 1.05rem; }
.paso p { margin: 0; color: var(--tinta-suave); font-size: 0.92rem; }

details { background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 12px; padding: 0.9rem 1.2rem; margin-bottom: 0.7rem; }
details summary { font-weight: 600; cursor: pointer; }
details p { color: var(--tinta-suave); margin: 0.6rem 0 0; }

.b2b { background: linear-gradient(150deg, #2b2330 0%, #46283c 100%); color: #f5e9f0; border-radius: 20px; padding: 2.2rem; }
.b2b h2 { color: #fff; }
.b2b p { color: #e0cfda; max-width: 44em; }
.b2b a { color: #ffb3d9; }

footer.pie { border-top: 1px solid var(--borde); padding: 2rem 0 2.5rem; color: var(--tinta-suave); font-size: 0.9rem; text-align: center; }
footer.pie a { color: var(--marca); }
