:root {
  --bg: #0b1020;
  --panel: #131b30;
  --campo: #0d1426;
  --linea: #27324d;
  --txt: #eef1f8;
  --suave: #9aa6c2;
  --brand: #6366f1;
  --brand2: #a5b4fc;
  --ok: #34d399;
  --err: #fca5a5;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--txt);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--brand2); outline-offset: 2px; }

/* BARRA SUPERIOR */
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--linea);
  position: sticky;
  top: 0;
  background: rgba(11, 16, 32, .95);
  backdrop-filter: blur(8px);
  z-index: 20;
}
.marca { font-weight: 800; font-size: 1.15rem; letter-spacing: -0.5px; }
.marca span { color: var(--brand2); }
.url {
  font-size: .82rem;
  color: var(--suave);
  background: var(--panel);
  border: 1px solid var(--linea);
  padding: 6px 12px;
  border-radius: 8px;
}
.url b { color: var(--brand2); }
.disp {
  display: flex;
  gap: 4px;
  background: var(--panel);
  border: 1px solid var(--linea);
  border-radius: 10px;
  padding: 3px;
}
.disp button {
  background: none;
  border: 0;
  padding: 6px 12px;
  border-radius: 7px;
  cursor: pointer;
  color: var(--suave);
  font-size: .8rem;
  font-weight: 600;
}
.disp button[aria-pressed=true] { background: var(--brand); color: #fff; }

/* CONTENEDOR MAESTRO DE 1078px */
.app {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(320px, 1fr);
  gap: 28px;
  padding: 24px 20px;
  max-width: 1078px;
  margin: 0 auto;
}

@media(max-width: 900px) {
  .app { grid-template-columns: 1fr; padding: 14px; }
  .url { display: none; }
}

/* PANEL ASISTENTE */
.panel {
  background: var(--panel);
  border: 1px solid var(--linea);
  border-radius: 20px;
  padding: 24px;
  min-width: 0;
}
.prog { display: flex; justify-content: space-between; font-size: .8rem; color: var(--suave); margin-bottom: 8px; }
.barra { height: 8px; border-radius: 99px; background: var(--campo); overflow: hidden; margin-bottom: 22px; }
.barra div { height: 100%; background: var(--brand); width: 14%; transition: width .25s ease; }
.step { display: none; }
.step.on { display: block; }

h2 { font-size: 1.4rem; line-height: 1.2; letter-spacing: -0.3px; }
.sub { color: var(--suave); font-size: .88rem; margin: 4px 0 18px; }

.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.opts-stack { display: grid; grid-template-columns: 1fr; gap: 10px; }
.opt {
  background: var(--campo);
  border: 2px solid var(--linea);
  border-radius: 14px;
  padding: 14px;
  text-align: left;
  cursor: pointer;
  min-height: 78px;
  transition: border-color .2s, background .2s;
}
.opt[aria-pressed=true] { border-color: var(--brand); background: #171f3d; }
.opt b { display: block; font-size: .95rem; }
.opt small { color: var(--suave); font-size: .78rem; line-height: 1.3; display: block; margin-top: 2px; }
.opt .e { font-size: 1.3rem; display: block; margin-bottom: 2px; }

.sw-group { display: flex; gap: 5px; margin-bottom: 6px; }
.sw { width: 18px; height: 18px; border-radius: 50%; display: inline-block; border: 1px solid rgba(255,255,255,.2); }

label { display: block; font-size: .84rem; font-weight: 600; margin: 14px 0 6px; }
input[type=text], input[type=tel], input[type=url], textarea {
  width: 100%;
  background: var(--campo);
  border: 1px solid var(--linea);
  border-radius: 10px;
  padding: 11px 12px;
}
textarea { min-height: 84px; resize: vertical; }
input:focus, textarea:focus { border-color: var(--brand); }

.pref { display: flex; align-items: center; }
.pref span { padding: 11px 10px; background: var(--linea); border-radius: 10px 0 0 10px; font-size: .85rem; color: var(--suave); }
.pref input { border-radius: 0 10px 10px 0; }

.hint { font-size: .78rem; color: var(--suave); margin-top: 4px; }
.err { font-size: .8rem; color: var(--err); margin-top: 4px; min-height: 1em; }

.file {
  position: relative;
  display: block;
  border: 2px dashed var(--linea);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  cursor: pointer;
  color: var(--suave);
  font-weight: 500;
}
.file:hover, .file:focus-within { border-color: var(--brand); }
.file input { position: absolute; opacity: 0; width: 1px; height: 1px; }

.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 8px; margin-top: 10px; }
.thumbs figure { position: relative; margin: 0; }
.thumbs img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; display: block; }
.thumbs button {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 0;
  background: rgba(0, 0, 0, .75);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.prod { display: grid; grid-template-columns: 1fr 105px; gap: 8px; margin-bottom: 8px; }
.nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 24px; }

.btn { border: 0; border-radius: 12px; padding: 12px 20px; font-weight: 700; cursor: pointer; background: var(--brand); color: #fff; }
.btn.sec { background: var(--campo); border: 1px solid var(--linea); color: var(--txt); font-weight: 600; }
.btn.mp { background: #009ee3; width: 100%; margin-top: 14px; padding: 14px; font-size: 1rem; }

.lista { list-style: none; border: 1px solid var(--linea); border-radius: 12px; padding: 6px 14px; margin: 14px 0; font-size: .88rem; }
.lista li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--linea); }
.lista li:last-child { border: 0; }
.tot { display: flex; justify-content: space-between; font-size: 1.2rem; font-weight: 800; margin-top: 12px; }

.chk { display: flex; gap: 10px; align-items: flex-start; margin: 0; font-weight: 500; background: var(--campo); border: 1px solid var(--linea); border-radius: 12px; padding: 12px; }
.chk input { margin-top: 4px; width: 18px; height: 18px; }
.demo { font-size: .78rem; color: var(--suave); text-align: center; margin-top: 10px; }

/* ========================================================
   VISTA PREVIA Y SIMULADOR
   ======================================================== */
.vista { position: sticky; top: 72px; align-self: start; display: flex; justify-content: center; width: 100%; }
@media(max-width: 900px) { .vista { position: static; margin-top: 24px; } }

/* Base Mobile: 320px mínimo */
.phone {
  width: 340px;
  min-width: 320px;
  max-width: 100%;
  height: 680px;
  border: 10px solid #1e293b;
  border-radius: 40px;
  background: #fff;
  overflow: hidden;
  position: relative;
  box-shadow: 0 20px 40px rgba(0,0,0,.5);
  transition: width .25s ease, height .25s ease;
}
.phone.pc { width: 100%; max-width: 520px; height: 620px; border-radius: 16px; border-width: 6px; }

.site {
  height: 100%;
  overflow-y: auto;
  background: var(--c-bg, #ffffff);
  color: var(--c-tx, #1f2328);
  font-size: 13.5px;
  scroll-behavior: smooth;
  position: relative;
  padding-bottom: 84px;
}

.p-hero { position: relative; background: #cbd5e1; overflow: hidden; }
.p-hero img.h { width: 100%; height: 100%; object-fit: cover; display: block; }
.p-logo { border-radius: 50%; object-fit: cover; background: #fff; border: 3px solid #fff; display: block; }
.p-body { padding: 16px; }
.p-sec { margin-top: 20px; }
.p-sec h4 { font-size: .98rem; margin-bottom: 8px; font-weight: 700; }
.p-gal { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.p-gal img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; display: block; }
.p-gal img:first-child { grid-column: span 2; aspect-ratio: 16/9; }

.p-map { display: inline-block; margin-top: 8px; padding: 7px 14px; border-radius: 8px; font-weight: 700; text-decoration: none; font-size: .82rem; }
.p-pie { margin: 28px 16px 0; padding: 12px 0 20px; border-top: 1px solid rgba(125,125,125,.2); text-align: center; font-size: 11px; opacity: .75; }

/* BOTÓN DE WHATSAPP INTEGRADO (IN-PAGE) */
.p-wsp-block { margin-top: 24px; }
.btn-wsp-inpage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: #25d366;
  color: #062a14;
  font-weight: 800;
  text-decoration: none;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: .92rem;
  box-shadow: 0 3px 8px rgba(37,211,102,.3);
}
.btn-wsp-inpage svg { width: 20px; height: 20px; fill: currentColor; }

/* BOTÓN FLOTANTE (FAB) CON PULSO */
.fab-wsp {
  position: absolute;
  bottom: 18px;
  right: 18px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(37,211,102,.5);
  z-index: 15;
  text-decoration: none;
  animation: pulso 2.4s infinite;
}
.fab-wsp svg { width: 28px; height: 28px; fill: currentColor; }

@keyframes pulso {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 211, 102, .7); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(37, 211, 102, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* --------------------------------------------------------
   LOS 5 ESTILOS MAESTROS DE LANDING
   -------------------------------------------------------- */

/* 1. Editorial / Artesanal */
.lay-artesanal { --c-tx: #292524; }
.lay-artesanal .p-hero { height: 160px; margin: 12px 12px 0; border-radius: 14px; }
.lay-artesanal .p-logo { position: relative; margin: -32px auto 0; width: 68px; height: 68px; box-shadow: 0 4px 12px rgba(0,0,0,.1); }
.lay-artesanal .p-tit { text-align: center; padding: 10px 0; }
.lay-artesanal .p-tit h3 { font-family: Georgia, serif; font-size: 1.5rem; }
.lay-artesanal .p-row { display: flex; align-items: baseline; gap: 6px; padding: 8px 0; border-bottom: 1px dashed rgba(0,0,0,.15); }
.lay-artesanal .p-row i { flex: 1; }
.lay-artesanal .p-row b:last-child { color: var(--c-brand); font-weight: 800; }

/* 2. Dark Neo-Brutalism */
.lay-dark { background: #0d1117 !important; color: #f0f6fc !important; }
.lay-dark .p-hero { height: 140px; border-bottom: 2px solid var(--c-brand); }
.lay-dark .p-logo { position: absolute; left: 16px; bottom: -24px; width: 60px; height: 60px; border: 2px solid var(--c-brand); box-shadow: 3px 3px 0 var(--c-brand); }
.lay-dark .p-tit { padding-top: 34px; }
.lay-dark .p-tit h3 { font-size: 1.35rem; text-transform: uppercase; letter-spacing: 1px; }
.lay-dark .p-sec h4 { color: var(--c-acc); text-transform: uppercase; font-size: .85rem; letter-spacing: 1px; }
.lay-dark .p-row { background: #161b22; border: 1px solid #30363d; padding: 10px 12px; border-radius: 8px; margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; }
.lay-dark .p-row i { display: none; }
.lay-dark .p-row b:last-child { background: var(--c-brand); color: #fff; padding: 3px 8px; border-radius: 6px; font-size: .85rem; }

/* 3. Card Grid / App Showcase */
.lay-cards .p-hero { height: 120px; }
.lay-cards .p-logo { position: absolute; left: 50%; transform: translateX(-50%); bottom: -30px; width: 66px; height: 66px; border-radius: 18px; box-shadow: 0 8px 16px rgba(0,0,0,.12); }
.lay-cards .p-tit { text-align: center; padding-top: 38px; }
.lay-cards .p-badge-open { display: inline-block; padding: 3px 9px; border-radius: 99px; background: #dcfce7; color: #15803d; font-size: .72rem; font-weight: 700; margin-bottom: 6px; }
.lay-cards #v-p { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lay-cards .p-row { background: #fff; border-radius: 12px; padding: 10px; box-shadow: 0 2px 8px rgba(0,0,0,.06); display: flex; flex-direction: column; justify-content: space-between; min-height: 76px; border: 1px solid rgba(0,0,0,.05); }
.lay-cards .p-row i { display: none; }
.lay-cards .p-row b:first-child { font-size: .85rem; line-height: 1.2; }
.lay-cards .p-row b:last-child { color: var(--c-brand); margin-top: 6px; font-size: .9rem; }

/* 4. Showcase Inmersivo */
.lay-inmersivo .p-hero { height: 220px; position: relative; }
.lay-inmersivo .p-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,.85) 100%); }
.lay-inmersivo .p-logo { position: absolute; left: 16px; bottom: 16px; z-index: 2; width: 56px; height: 56px; }
.lay-inmersivo .p-hero-txt { position: absolute; left: 82px; right: 16px; bottom: 16px; z-index: 2; color: #fff; }
.lay-inmersivo .p-hero-txt h3 { font-size: 1.25rem; line-height: 1.1; color: #fff; }
.lay-inmersivo .p-hero-txt p { font-size: .78rem; opacity: .9; color: #e2e8f0; margin: 0; }
.lay-inmersivo .p-tit { display: none; }
.lay-inmersivo .p-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid rgba(0,0,0,.08); }
.lay-inmersivo .p-row i { display: none; }
.lay-inmersivo .p-row b:last-child { color: var(--c-brand); }

/* 5. Industrial / Servicios Pro */
.lay-industrial { --c-tx: #1e293b; }
.lay-industrial .p-hero { height: 100px; border-radius: 0; }
.lay-industrial .p-logo { position: absolute; left: 14px; bottom: -20px; width: 52px; height: 52px; border-radius: 4px; border: 2px solid #000; }
.lay-industrial .p-tit { padding-top: 28px; }
.lay-industrial .p-tit h3 { font-size: 1.3rem; font-weight: 900; }
.lay-industrial .p-badge-tech { display: inline-block; padding: 3px 8px; background: var(--c-brand); color: #fff; font-weight: 800; font-size: .7rem; border-radius: 2px; margin-bottom: 6px; text-transform: uppercase; }
.lay-industrial .p-row { border-left: 4px solid var(--c-brand); background: #fff; padding: 8px 10px; margin-bottom: 6px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.lay-industrial .p-row i { display: none; }
.lay-industrial .p-row b:last-child { font-family: monospace; font-size: 1rem; color: var(--c-brand); }

/* MODAL DE PAGO */
.modal { position: fixed; inset: 0; background: rgba(5, 8, 18, .88); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 50; }
.caja { background: var(--panel); border: 1px solid var(--linea); border-radius: 20px; padding: 26px; max-width: 420px; width: 100%; text-align: center; }
.caja code { display: block; margin: 12px 0; padding: 10px; background: var(--campo); border-radius: 10px; color: var(--ok); word-break: break-all; }

@media(prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}