/* ==========================================================
   Estilos de la plataforma — panel y tiendas públicas
   ========================================================== */
:root {
  --tinta: #0f172a;
  --tinta2: #334155;
  --gris: #64748b;
  --linea: #e2e8f0;
  --fondo: #f6f7fb;
  --blanco: #ffffff;
  --primario: #4f46e5;
  --primario-osc: #4338ca;
  --exito: #059669;
  --peligro: #dc2626;
  --wa: #25d366;
  --radio: 14px;
  --sombra: 0 1px 3px rgba(15, 23, 42, .07), 0 8px 24px rgba(15, 23, 42, .06);
  /* color de acento de cada tienda (se sobreescribe por tienda) */
  --acento: #0e7490;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--tinta);
  background: var(--fondo);
  line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
p { margin: 0 0 1em; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 10px; border: none; cursor: pointer;
  font: 600 15px/1 'Inter', sans-serif; transition: .18s; text-align: center;
}
.btn-primario { background: linear-gradient(120deg, #6366f1, #a855f7 60%, #ec4899); color: #fff; box-shadow: 0 6px 18px rgba(139, 92, 246, .35); }
.btn-primario:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 10px 24px rgba(139, 92, 246, .42); }
.btn-borde { background: #fff; border: 1px solid var(--linea); color: var(--tinta2); }
.btn-borde:hover { border-color: var(--primario); color: var(--primario); }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { filter: brightness(.94); }
.btn-peligro { background: #fef2f2; color: var(--peligro); border: 1px solid #fecaca; }
.btn-chico { padding: 8px 14px; font-size: 13px; border-radius: 8px; }
.btn-bloque { width: 100%; }

/* ---------- Formularios ---------- */
.campo { margin-bottom: 16px; }
.campo label { display: block; font: 600 13px/1.4 'Inter'; color: var(--tinta2); margin-bottom: 6px; }
.campo input, .campo select, .campo textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--linea); border-radius: 10px;
  font: 400 15px/1.4 'Inter'; color: var(--tinta); background: #fff; outline: none; transition: border .15s;
}
.campo input:focus, .campo select:focus, .campo textarea:focus { border-color: var(--primario); }
.campo textarea { min-height: 110px; resize: vertical; }
.campo .ayuda { font-size: 12px; color: var(--gris); margin-top: 5px; }
.fila-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .fila-2 { grid-template-columns: 1fr; } }

.alerta { padding: 12px 16px; border-radius: 10px; font-size: 14px; margin-bottom: 16px; }
.alerta-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alerta-ok { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }

/* ---------- Tarjetas ---------- */
.tarjeta { background: var(--blanco); border: 1px solid var(--linea); border-radius: var(--radio); box-shadow: var(--sombra); padding: 24px; }

/* ---------- Insignias de estado ---------- */
.insignia { display: inline-block; padding: 4px 10px; border-radius: 999px; font: 700 11px/1.4 'Inter'; letter-spacing: .04em; }
.est-NUEVO { background: #eff6ff; color: #1d4ed8; }
.est-CONFIRMADO { background: #f5f3ff; color: #6d28d9; }
.est-EN.RUTA, .est-ENRUTA { background: #fffbeb; color: #b45309; }
.est-ENTREGADO { background: #ecfdf5; color: #047857; }
.est-CANCELADO { background: #fef2f2; color: #b91c1c; }

/* ==========================================================
   PANEL (alumno y admin)
   ========================================================== */
.panel-cuerpo { display: flex; min-height: 100vh; }
.panel-lateral {
  width: 240px; flex: 0 0 240px; background: linear-gradient(185deg, #0f172a 55%, #1e1339); color: #cbd5e1;
  display: flex; flex-direction: column; padding: 22px 14px; position: sticky; top: 0; height: 100vh;
}
.panel-logo { font: 800 20px/1 'Inter'; color: #fff; letter-spacing: -.02em; padding: 0 10px 22px; }
.panel-logo span { color: #818cf8; }
.panel-menu a {
  display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 9px;
  font: 500 14px/1 'Inter'; color: #cbd5e1; margin-bottom: 4px; transition: .15s;
}
.panel-menu a:hover { background: #1e293b; color: #fff; }
.panel-menu a.activo { background: linear-gradient(120deg, #6366f1, #a855f7); color: #fff; }
.panel-pie { margin-top: auto; padding: 10px; font-size: 12px; color: #64748b; }
.panel-pie a { color: #94a3b8; text-decoration: underline; }
.panel-main { flex: 1; padding: 32px 36px; max-width: 1060px; }
.panel-titulo { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.panel-titulo h1 { font-size: 26px; margin: 0; letter-spacing: -.02em; }

@media (max-width: 860px) {
  .panel-cuerpo { flex-direction: column; }
  .panel-lateral { width: 100%; flex: none; height: auto; position: static; flex-direction: row; align-items: center; overflow-x: auto; padding: 12px 14px; gap: 6px; }
  .panel-logo { padding: 0 10px 0 0; font-size: 16px; white-space: nowrap; }
  .panel-menu { display: flex; gap: 4px; }
  .panel-menu a { white-space: nowrap; padding: 9px 12px; margin: 0; }
  .panel-pie { display: none; }
  .panel-main { padding: 20px 16px; }
}

/* Estadísticas */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat { background: #fff; border: 1px solid var(--linea); border-radius: var(--radio); padding: 18px 20px; box-shadow: var(--sombra); }
.stat .valor { font: 800 28px/1.1 'Inter'; letter-spacing: -.02em; }
.stat .nombre { font-size: 12.5px; color: var(--gris); margin-top: 4px; }

/* Tablas */
.tabla-envoltura { overflow-x: auto; background: #fff; border: 1px solid var(--linea); border-radius: var(--radio); box-shadow: var(--sombra); }
table.tabla { width: 100%; border-collapse: collapse; min-width: 640px; }
.tabla th { text-align: left; font: 700 11.5px/1.4 'Inter'; letter-spacing: .06em; text-transform: uppercase; color: var(--gris); padding: 12px 16px; border-bottom: 1px solid var(--linea); background: #f8fafc; }
.tabla td { padding: 13px 16px; border-bottom: 1px solid var(--linea); font-size: 14px; vertical-align: middle; }
.tabla tr:last-child td { border-bottom: none; }

/* Filtros de pedidos */
.filtros { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.filtros a { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--linea); background: #fff; font: 600 13px/1 'Inter'; color: var(--tinta2); }
.filtros a.activo { background: var(--tinta); color: #fff; border-color: var(--tinta); }

/* Cuadrícula de productos en el panel */
.grid-productos { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.card-prod { background: #fff; border: 1px solid var(--linea); border-radius: var(--radio); overflow: hidden; box-shadow: var(--sombra); display: flex; flex-direction: column; }
.card-prod .foto { aspect-ratio: 1; background: #f1f5f9 center/cover no-repeat; }
.card-prod .cuerpo { padding: 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-prod .nombre { font: 600 14.5px/1.35 'Inter'; }
.card-prod .precio { font: 800 16px/1 'Inter'; }
.card-prod .acciones { display: flex; gap: 8px; margin-top: auto; }

/* Página de acceso (login / registro) */
.acceso { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.acceso .caja { width: 100%; max-width: 420px; }
.acceso .marca { text-align: center; font: 800 26px/1 'Inter'; letter-spacing: -.02em; margin-bottom: 22px; }
.acceso .marca span { color: var(--primario); }

/* ==========================================================
   PORTADA DE LA PLATAFORMA
   ========================================================== */
.portada-nav { display: flex; align-items: center; justify-content: space-between; max-width: 1080px; margin: 0 auto; padding: 20px 24px; }
.portada-nav .marca { font: 800 22px/1 'Inter'; letter-spacing: -.02em; }
.portada-nav .marca span { color: var(--primario); }
.portada-hero { max-width: 820px; margin: 0 auto; text-align: center; padding: 72px 24px 60px; }
.portada-hero h1 { font: 800 clamp(34px, 6vw, 56px)/1.08 'Inter'; letter-spacing: -.03em; }
.portada-hero h1 em { font-style: normal; color: var(--primario); }
.portada-hero p { font-size: 18px; color: var(--gris); max-width: 560px; margin: 18px auto 30px; }
.portada-pasos { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; max-width: 1080px; margin: 0 auto; padding: 0 24px 80px; }
.paso { background: #fff; border: 1px solid var(--linea); border-radius: var(--radio); padding: 24px; box-shadow: var(--sombra); text-align: left; }
.paso .n { width: 34px; height: 34px; border-radius: 10px; background: #eef2ff; color: var(--primario); display: flex; align-items: center; justify-content: center; font: 800 15px/1 'Inter'; margin-bottom: 12px; }
.paso h3 { font-size: 16px; }
.paso p { font-size: 14px; color: var(--gris); margin: 0; }

/* ==========================================================
   TIENDA PÚBLICA
   ========================================================== */
.tienda-body { background: #fff; }
.tienda-header { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--linea); }
.tienda-header .interior { max-width: 1020px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 12px; }
.tienda-header img.logo { width: 42px; height: 42px; border-radius: 10px; object-fit: cover; }
.tienda-header .nombre { font: 800 19px/1.1 'Inter'; letter-spacing: -.02em; }
.tienda-header .ciudad { font-size: 12px; color: var(--gris); }
.tienda-header .wa { margin-left: auto; }

.tienda-banda { background: var(--acento); color: #fff; text-align: center; font: 600 13.5px/1.4 'Inter'; padding: 9px 16px; }

.tienda-main { max-width: 1020px; margin: 0 auto; padding: 28px 20px 70px; }
.tienda-main h2.titulo-seccion { font-size: 22px; margin: 6px 0 18px; letter-spacing: -.02em; }

.grid-tienda { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
@media (min-width: 700px) { .grid-tienda { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); } }
.prod-pub { border: 1px solid var(--linea); border-radius: var(--radio); overflow: hidden; background: #fff; transition: .18s; display: flex; flex-direction: column; }
.prod-pub:hover { box-shadow: var(--sombra); transform: translateY(-2px); }
.prod-pub .foto { aspect-ratio: 1; background: #f1f5f9 center/cover no-repeat; position: relative; }
.prod-pub .desc-tag { position: absolute; top: 10px; left: 10px; background: var(--peligro); color: #fff; font: 800 11px/1 'Inter'; padding: 5px 8px; border-radius: 7px; }
.prod-pub .cuerpo { padding: 13px 14px 15px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.prod-pub .nombre { font: 600 14.5px/1.35 'Inter'; }
.prod-pub .precios { display: flex; align-items: baseline; gap: 8px; margin-top: auto; }
.prod-pub .precio { font: 800 17px/1 'Inter'; color: var(--acento); }
.prod-pub .antes { font-size: 13px; color: var(--gris); text-decoration: line-through; }
.prod-pub .cta { background: var(--acento); color: #fff; text-align: center; font: 700 13px/1 'Inter'; padding: 11px; border-radius: 9px; }

/* Página de producto */
.prod-detalle { display: grid; gap: 28px; max-width: 1020px; margin: 0 auto; padding: 24px 20px 90px; }
@media (min-width: 880px) { .prod-detalle { grid-template-columns: 1.05fr .95fr; align-items: start; } }
.galeria .principal { aspect-ratio: 1; border-radius: var(--radio); background: #f1f5f9 center/cover no-repeat; border: 1px solid var(--linea); }
.galeria .miniaturas { display: flex; gap: 10px; margin-top: 10px; overflow-x: auto; }
.galeria .miniaturas button { width: 64px; height: 64px; flex: 0 0 64px; border-radius: 10px; border: 2px solid var(--linea); background: #f1f5f9 center/cover no-repeat; cursor: pointer; padding: 0; }
.galeria .miniaturas button.activa { border-color: var(--acento); }

.compra h1 { font: 800 clamp(22px, 3.4vw, 30px)/1.15 'Inter'; letter-spacing: -.02em; }
.compra .precios { display: flex; align-items: baseline; gap: 12px; margin: 10px 0 4px; }
.compra .precio { font: 800 30px/1 'Inter'; color: var(--acento); }
.compra .antes { font-size: 17px; color: var(--gris); text-decoration: line-through; }
.compra .ahorro { background: #fef2f2; color: var(--peligro); font: 700 12px/1 'Inter'; padding: 5px 9px; border-radius: 7px; }
.compra .descripcion { color: var(--tinta2); font-size: 15px; white-space: pre-line; margin: 14px 0 20px; }

.confianza { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0; }
.confianza div { display: flex; align-items: center; gap: 9px; font: 600 12.5px/1.3 'Inter'; color: var(--tinta2); background: #f8fafc; border: 1px solid var(--linea); border-radius: 10px; padding: 10px 12px; }
.confianza svg { flex: 0 0 auto; }

.form-cod { background: #fff; border: 2px solid var(--acento); border-radius: var(--radio); padding: 22px; box-shadow: var(--sombra); }
.form-cod h3 { font-size: 17px; display: flex; align-items: center; gap: 8px; }
.form-cod .btn-comprar { width: 100%; background: var(--acento); color: #fff; font: 800 16px/1.2 'Inter'; padding: 16px; border: none; border-radius: 11px; cursor: pointer; transition: .18s; }
.form-cod .btn-comprar:hover { filter: brightness(.92); }
.form-cod .nota { text-align: center; font-size: 12px; color: var(--gris); margin: 10px 0 0; }
.cantidad-caja { display: flex; align-items: center; gap: 0; border: 1px solid var(--linea); border-radius: 10px; overflow: hidden; width: max-content; }
.cantidad-caja button { width: 42px; height: 42px; border: none; background: #f8fafc; font: 700 18px/1 'Inter'; cursor: pointer; }
.cantidad-caja input { width: 54px; height: 42px; border: none; text-align: center; font: 700 15px/1 'Inter'; outline: none; }

/* Barra fija de compra en el celular */
.barra-movil { position: fixed; bottom: 0; left: 0; right: 0; z-index: 50; background: #fff; border-top: 1px solid var(--linea); padding: 10px 14px; display: flex; align-items: center; gap: 12px; box-shadow: 0 -6px 20px rgba(15,23,42,.08); }
.barra-movil .precio { font: 800 18px/1 'Inter'; color: var(--acento); }
.barra-movil .antes { font-size: 12px; color: var(--gris); text-decoration: line-through; }
.barra-movil a { flex: 1; background: var(--acento); color: #fff; text-align: center; font: 800 14px/1 'Inter'; padding: 14px; border-radius: 10px; }
@media (min-width: 880px) { .barra-movil { display: none; } }

/* Página de gracias */
.gracias { max-width: 560px; margin: 0 auto; padding: 60px 20px 90px; text-align: center; }
.gracias .icono { width: 84px; height: 84px; border-radius: 50%; background: #ecfdf5; color: var(--exito); display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; }
.gracias h1 { font: 800 28px/1.15 'Inter'; letter-spacing: -.02em; }
.gracias .resumen { text-align: left; background: #f8fafc; border: 1px solid var(--linea); border-radius: var(--radio); padding: 18px 20px; margin: 22px 0; font-size: 14.5px; }
.gracias .resumen div { display: flex; justify-content: space-between; gap: 14px; padding: 6px 0; border-bottom: 1px dashed var(--linea); }
.gracias .resumen div:last-child { border-bottom: none; }
.gracias .resumen b { text-align: right; }

/* Galería deslizable del producto */
.g-carrusel { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; aspect-ratio: 1; border-radius: var(--radio); border: 1px solid var(--linea); background: #f1f5f9; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.g-carrusel::-webkit-scrollbar { display: none; }
.g-slide { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: center; scroll-snap-stop: always; }
.g-vacia { display: flex; align-items: center; justify-content: center; font-size: 70px; }
.g-puntos { display: flex; gap: 7px; justify-content: center; margin-top: 12px; }
.g-puntos button { width: 8px; height: 8px; border-radius: 99px; border: none; background: #cbd5e1; cursor: pointer; padding: 0; transition: .25s; }
.g-puntos button.activa { background: var(--acento); width: 24px; }
.solo-pc { display: none; }
@media (min-width: 880px) {
  .solo-pc { display: flex; }
  .g-puntos { display: none; }
}

/* WhatsApp flotante en la tienda */
.wa-flot { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 70; width: 56px; height: 56px; border-radius: 50%; background: #25D366; display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 28px rgba(37, 211, 102, .45); transition: transform .2s; }
.wa-flot:hover { transform: scale(1.07); }
.wa-flot::before { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid rgba(37, 211, 102, .45); animation: wa-onda 2.2s ease-out infinite; }
@keyframes wa-onda { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(1.5); opacity: 0; } }

/* Los campos de la tienda usan 16px: iPhone NO hace zoom al tocarlos */
.tienda-body .campo input, .tienda-body .campo select, .tienda-body .campo textarea { font-size: 16px; }
.tienda-body .form-cod .btn-comprar { font-size: 17px; padding: 17px; }

/* Barra fija con espacio para celulares con "notch" */
.barra-movil { padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }

/* Ajustes finos SOLO para celular */
@media (max-width: 640px) {
  .sec { padding: 32px 16px; }
  .sec-hero { padding: 52px 18px; }
  .sec-hero .btn-hero { display: block; margin: 0 auto; max-width: 320px; }
  .tienda-header .interior { padding: 10px 14px; }
  .tienda-header .nombre { font-size: 16.5px; }
  .prod-detalle { padding: 14px 14px 96px; gap: 18px; }
  .compra h1 { font-size: 23px; }
  .compra .precio { font-size: 27px; }
  .form-cod { padding: 18px 15px; }
  .grid-tienda { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .prod-pub .cuerpo { padding: 11px 12px 13px; }
  .prod-pub .cta { padding: 12px 8px; font-size: 12.5px; }
  .confianza { gap: 8px; }
  .confianza div { padding: 9px 10px; font-size: 12px; }
  /* Testimonios: se deslizan con el dedo */
  .tienda-body .grid-testimonios { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; padding: 4px 2px 10px; scrollbar-width: none; }
  .tienda-body .grid-testimonios::-webkit-scrollbar { display: none; }
  .tienda-body .grid-testimonios .testimonio { flex: 0 0 84%; scroll-snap-align: center; }
  .beneficio { padding: 20px 14px; }
  .sec-ti .ti-img { aspect-ratio: 16/10; }
  .gracias { padding: 44px 18px 90px; }
  .wa-flot { width: 52px; height: 52px; }
}

/* Pie de tienda */
.tienda-pie { border-top: 1px solid var(--linea); padding: 26px 20px 110px; text-align: center; color: var(--gris); font-size: 13px; background: #f8fafc; }
.pagina-404 { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px; text-align: center; }

/* ==========================================================
   Tipografía por tienda (elegida en el panel)
   ========================================================== */
.tienda-body, .tienda-body button, .tienda-body input, .tienda-body select, .tienda-body textarea {
  font-family: var(--fuente, 'Inter'), 'Inter', system-ui, sans-serif;
}

/* ==========================================================
   SECCIONES DEL CONSTRUCTOR (tienda pública)
   ========================================================== */
.sec { max-width: 1020px; margin: 0 auto; padding: 44px 20px; }

/* Portada principal */
.sec-hero { position: relative; overflow: hidden; background: linear-gradient(135deg, var(--acento), color-mix(in srgb, var(--acento) 60%, #000)); color: #fff; text-align: center; padding: 72px 20px; }
.sec-hero.con-imagen { background: #111 center/cover no-repeat; }
.sec-hero .velo { position: absolute; inset: 0; background: rgba(10, 15, 25, .52); }
.sec-hero .contenido { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; }
.sec-hero h1 { font-size: clamp(30px, 6vw, 52px); font-weight: 800; letter-spacing: -.02em; margin: 0 0 14px; }
.sec-hero p { font-size: clamp(15px, 2.4vw, 19px); opacity: .92; margin: 0 auto 26px; max-width: 540px; }
.sec-hero .btn-hero { display: inline-block; background: #fff; color: var(--tinta); font-weight: 800; font-size: 15px; padding: 15px 34px; border-radius: 11px; transition: .18s; }
.sec-hero .btn-hero:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0,0,0,.28); }

/* Beneficios */
.sec-beneficios { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.beneficio { text-align: center; padding: 26px 18px; border: 1px solid var(--linea); border-radius: var(--radio); background: #fff; }
.beneficio .icono { font-size: 34px; margin-bottom: 10px; }
.beneficio h3 { font-size: 16px; margin-bottom: 6px; }
.beneficio p { font-size: 13.5px; color: var(--gris); margin: 0; }

/* Texto + imagen */
.sec-ti { display: grid; gap: 26px; align-items: center; }
@media (min-width: 760px) { .sec-ti { grid-template-columns: 1fr 1fr; } .sec-ti.lado-der .ti-img { order: 2; } }
.sec-ti .ti-img { aspect-ratio: 4/3; border-radius: var(--radio); background: #f1f5f9 center/cover no-repeat; border: 1px solid var(--linea); display: flex; align-items: center; justify-content: center; font-size: 44px; }
.sec-ti h2 { font-size: clamp(22px, 3.4vw, 30px); letter-spacing: -.02em; }
.sec-ti p { color: var(--tinta2); white-space: pre-line; }

/* Testimonios */
.sec-testimonios h2, .sec-faq h2 { text-align: center; font-size: clamp(22px, 3.4vw, 30px); letter-spacing: -.02em; margin-bottom: 26px; }
.grid-testimonios { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.testimonio { background: #fff; border: 1px solid var(--linea); border-radius: var(--radio); padding: 22px; box-shadow: var(--sombra); }
.testimonio .estrellas { color: #f59e0b; font-size: 15px; letter-spacing: 2px; margin-bottom: 10px; }
.testimonio .texto { font-size: 14.5px; color: var(--tinta2); font-style: italic; }
.testimonio .quien { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.testimonio .avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--acento); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; }
.testimonio .nombre { font-weight: 700; font-size: 13.5px; }

/* Preguntas frecuentes */
.sec-faq { max-width: 760px; }
.faq-item { background: #fff; border: 1px solid var(--linea); border-radius: 12px; margin-bottom: 10px; overflow: hidden; }
.faq-item summary { cursor: pointer; list-style: none; padding: 16px 18px; font-weight: 700; font-size: 15px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq-item summary::after { content: '+'; font-size: 20px; color: var(--acento); font-weight: 800; }
.faq-item[open] summary::after { content: '−'; }
.faq-item .respuesta { padding: 0 18px 16px; color: var(--tinta2); font-size: 14.5px; }

/* Banner promocional */
.sec-banner { background: var(--acento); color: #fff; text-align: center; padding: 22px 20px; font-weight: 800; font-size: clamp(15px, 2.6vw, 19px); }

/* Barra de urgencia en la página de producto */
.urgencia { display: flex; align-items: center; justify-content: center; gap: 10px; background: #fef2f2; border: 1.5px dashed var(--peligro); color: #991b1b; border-radius: 11px; padding: 12px 14px; font-weight: 700; font-size: 14px; margin-bottom: 14px; text-align: center; flex-wrap: wrap; }
.urgencia .reloj { background: var(--peligro); color: #fff; border-radius: 8px; padding: 4px 10px; font-variant-numeric: tabular-nums; font-weight: 800; }

/* Beneficios ✓ del producto */
.check-lista { list-style: none; padding: 0; margin: 14px 0 4px; }
.check-lista li { display: flex; gap: 10px; align-items: baseline; font-size: 15px; color: var(--tinta2); padding: 5px 0; }
.check-lista li::before { content: '✓'; color: var(--exito); font-weight: 800; }

/* Secciones extra bajo el producto */
.prod-extra { max-width: 760px; margin: 0 auto; padding: 10px 20px 60px; }
.prod-extra h2 { text-align: center; font-size: clamp(20px, 3vw, 26px); letter-spacing: -.02em; margin: 34px 0 20px; }

/* ==========================================================
   EDITOR DE DISEÑO (panel)
   ========================================================== */
.diseno-layout { display: grid; gap: 20px; align-items: start; }
@media (min-width: 1100px) { .diseno-layout { grid-template-columns: 440px 1fr; } }
.lista-secciones { display: flex; flex-direction: column; gap: 10px; }
.fila-seccion { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--linea); border-radius: 12px; padding: 12px 14px; box-shadow: var(--sombra); }
.fila-seccion.apagada { opacity: .5; }
.fila-seccion .icono { font-size: 20px; }
.fila-seccion .info { flex: 1; min-width: 0; }
.fila-seccion .titulo { font-weight: 700; font-size: 14px; }
.fila-seccion .detalle { font-size: 12px; color: var(--gris); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fila-seccion .botones { display: flex; gap: 5px; }
.btn-mini { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--linea); background: #fff; border-radius: 8px; cursor: pointer; font-size: 13px; transition: .15s; padding: 0; }
.btn-mini:hover { border-color: var(--primario); color: var(--primario); }
.previa { border: 1px solid var(--linea); border-radius: var(--radio); overflow: hidden; box-shadow: var(--sombra); background: #fff; position: sticky; top: 20px; }
.previa .barra { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--linea); background: #f8fafc; font-size: 12.5px; color: var(--gris); }
.previa .punto { width: 10px; height: 10px; border-radius: 50%; background: #e2e8f0; }
.previa iframe { width: 100%; height: 72vh; border: none; display: block; }

/* ==========================================================
   NAVEGACIÓN TIPO APP (barra inferior en el celular)
   ========================================================== */
.tabs-movil { display: none; }
.hoja-mas { display: none; }
@media (max-width: 860px) {
  .panel-lateral.con-tabs .panel-menu { display: none; }
  .tabs-movil {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 85;
    background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px);
    border-top: 1px solid var(--linea);
    padding: 7px 4px calc(7px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -6px 24px rgba(15, 23, 42, .07);
  }
  .tabs-movil a, .tabs-movil button {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
    font: 600 10.5px/1 'Inter'; color: var(--gris); background: none; border: none;
    padding: 4px 0; cursor: pointer; border-radius: 10px;
  }
  .tabs-movil .activo { color: var(--primario); }
  .tabs-movil .t-ico { font-size: 21px; line-height: 1; }
  .panel-main { padding-bottom: 100px; }
  .hoja-mas {
    display: block; position: fixed; left: 10px; right: 10px; z-index: 84;
    bottom: calc(74px + env(safe-area-inset-bottom, 0px));
    background: #fff; border: 1px solid var(--linea); border-radius: 16px;
    box-shadow: 0 18px 50px rgba(15, 23, 42, .22); padding: 8px;
    opacity: 0; pointer-events: none; transform: translateY(10px); transition: .22s;
  }
  .hoja-mas.abierta { opacity: 1; pointer-events: auto; transform: none; }
  .hoja-mas a { display: block; padding: 13px 14px; border-radius: 10px; font: 600 14.5px/1 'Inter'; color: var(--tinta); }
  .hoja-mas a:active, .hoja-mas a:hover { background: var(--fondo); }
}

/* Selector de plantilla al crear la tienda */
.plantillas-pick { display: grid; gap: 10px; }
.plantilla-op { display: grid; grid-template-columns: 34px 1fr; grid-template-areas: 'ico nombre' 'ico desc'; gap: 2px 10px; border: 1.5px solid var(--linea); border-radius: 12px; padding: 12px 14px; cursor: pointer; transition: .15s; }
.plantilla-op:hover { border-color: #c7d2fe; }
.plantilla-op:has(input:checked) { border-color: var(--primario); background: #eef2ff; }
.plantilla-op input { display: none; }
.plantilla-op .pl-icono { grid-area: ico; font-size: 24px; align-self: center; }
.plantilla-op .pl-nombre { grid-area: nombre; font: 700 14px/1.3 'Inter'; }
.plantilla-op .pl-desc { grid-area: desc; font: 400 12px/1.45 'Inter'; color: var(--gris); }

/* Administrador de fotos del producto */
.fotos-admin { display: flex; gap: 10px; flex-wrap: wrap; }
.foto-item { position: relative; width: 108px; border: 1px solid var(--linea); border-radius: 10px; padding: 6px; background: #fff; }
.foto-item img { width: 94px; height: 94px; object-fit: cover; border-radius: 7px; display: block; }
.foto-item .foto-num { display: block; font: 700 10.5px/1 'Inter'; color: var(--primario); text-align: center; margin: 6px 0 4px; }
.foto-item .foto-botones { display: flex; gap: 4px; justify-content: center; }
.foto-item .btn-mini { width: 28px; height: 26px; font-size: 12px; }

/* Aviso flotante de nuevo pedido (con el cha-ching) */
.aviso-pedido { position: fixed; top: 18px; right: 18px; z-index: 90; background: #0f172a; color: #fff; padding: 14px 20px; border-radius: 12px; font: 500 14px/1.4 'Inter'; box-shadow: 0 14px 40px rgba(15, 23, 42, .35); cursor: pointer; animation: aviso-entra .35s ease; border-left: 4px solid #4ade80; }
.aviso-pedido.irse { opacity: 0; transform: translateY(-8px); transition: .5s; }
@keyframes aviso-entra { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }

/* ==========================================================
   EN VIVO (Live View)
   ========================================================== */
.ev-badge { display: inline-flex; align-items: center; gap: 8px; background: #0f172a; color: #4ade80; font: 700 12px/1 'Inter'; letter-spacing: .07em; padding: 10px 16px; border-radius: 999px; }
.ev-punto { width: 9px; height: 9px; border-radius: 50%; background: #4ade80; animation: evpulso 1.6s ease infinite; }
@keyframes evpulso { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.75); } }
.ev-fondo { background: linear-gradient(160deg, #0f172a, #1e1b4b 130%); border-radius: var(--radio); padding: 26px; color: #e2e8f0; box-shadow: var(--sombra); }
.ev-activos { display: flex; align-items: center; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.ev-numero { font: 800 64px/1 'Inter'; color: #4ade80; letter-spacing: -.03em; }
.ev-etiqueta { font-size: 14px; color: #cbd5e1; line-height: 1.5; }
.ev-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 16px; }
.ev-card { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .09); border-radius: 12px; padding: 14px 16px; }
.ev-card .v { font: 800 23px/1.1 'Inter'; letter-spacing: -.02em; }
.ev-card .n { font-size: 11.5px; color: #94a3b8; margin-top: 4px; }
.ev-seccion { background: rgba(255, 255, 255, .045); border: 1px solid rgba(255, 255, 255, .08); border-radius: 12px; padding: 16px 18px; margin-bottom: 14px; }
.ev-seccion h3 { font-size: 13.5px; margin: 0 0 14px; color: #e2e8f0; }
.ev-seccion h3 span { color: #64748b; font-weight: 400; }
.ev-mini { display: flex; gap: 3px; align-items: flex-end; height: 58px; }
.ev-mini .ev-b { flex: 1; background: #4ade80; border-radius: 3px 3px 0 0; min-height: 3px; transition: height .5s; }
.ev-horas { display: flex; gap: 4px; align-items: flex-end; height: 112px; }
.ev-hcol { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; min-width: 0; }
.ev-hbarras { display: flex; gap: 1.5px; align-items: flex-end; height: 88px; }
.ev-hbarras .ev-b { flex: 1; background: #818cf8; border-radius: 2.5px 2.5px 0 0; min-height: 2px; transition: height .5s; }
.ev-hbarras .ev-b.pedido { background: #4ade80; }
.ev-hcol > span { font-size: 9px; color: #64748b; text-align: center; height: 12px; margin-top: 5px; }
.ev-feed-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 720px) { .ev-feed-grid { grid-template-columns: 1fr; } .ev-numero { font-size: 48px; } }
.ev-item { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 9px 0; border-bottom: 1px dashed rgba(255, 255, 255, .09); font-size: 13px; }
.ev-item:last-child { border-bottom: none; }
.ev-item b { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-item span { color: #94a3b8; white-space: nowrap; font-size: 12px; }
.ev-vacio { color: #64748b; font-size: 13px; margin: 0; }

/* Gráfico del panel (visitas y pedidos) */
.grafico { display: flex; gap: 5px; align-items: flex-end; height: 150px; }
.g-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; min-width: 0; }
.g-barras { display: flex; gap: 2px; align-items: flex-end; height: 124px; }
.g-barras .g-barra { flex: 1; background: #c7d2fe; border-radius: 4px 4px 0 0; transition: .2s; }
.g-barras .g-barra.pedidos { background: var(--primario); }
.g-col:hover .g-barra { filter: brightness(.85); }
.g-dia { font-size: 10px; color: var(--gris); text-align: center; margin-top: 6px; }
.leyenda { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: -1px; margin-right: 4px; }
@media (max-width: 860px) { .dos-col { grid-template-columns: 1fr !important; } }

/* Filas repetibles del editor */
.item-editor { border: 1px solid var(--linea); border-radius: 12px; padding: 14px; margin-bottom: 12px; background: #f8fafc; position: relative; }
.item-editor .quitar { position: absolute; top: 10px; right: 10px; }

/* ==========================================================
   LOGO DE LA PLATAFORMA
   ========================================================== */
.logo-v { display: inline-flex; align-items: center; gap: 10px; }
.logo-texto { font-family: 'Sora', 'Inter', sans-serif; font-weight: 800; letter-spacing: -.04em; color: var(--tinta); font-size: calc(var(--alto, 34px) * .68); line-height: 1; }
.logo-texto em { font-style: normal; background: linear-gradient(120deg, #6366f1, #a855f7 55%, #ec4899); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.logo-texto.claro { color: #fff; }

/* Tipografía de marca en los titulares de la plataforma */
.portada-hero h1, .resenas h2, .comparacion h2, .planes-sec h2, .cta-final h2,
.paso h3, .plan h3, .stat .valor { font-family: 'Sora', 'Inter', sans-serif; }

/* ==========================================================
   PORTADA DE LA PLATAFORMA — aliados, reseñas, comparación
   ========================================================== */
.hero-chip { display: inline-flex; align-items: center; gap: 8px; background: #eef2ff; color: #4338ca; border: 1px solid #e0e7ff; font: 600 13px/1 'Inter'; padding: 9px 16px; border-radius: 999px; margin-bottom: 22px; }

/* Vida de fondo: manchas de color flotando detrás del héroe */
.portada-hero { position: relative; z-index: 0; }
.portada-hero::before, .portada-hero::after { content: ''; position: absolute; border-radius: 50%; filter: blur(70px); z-index: -1; pointer-events: none; }
.portada-hero::before { width: 380px; height: 380px; left: -120px; top: -40px; background: radial-gradient(circle, rgba(99, 102, 241, .38), transparent 70%); animation: flotar 9s ease-in-out infinite alternate; }
.portada-hero::after { width: 420px; height: 420px; right: -140px; top: 120px; background: radial-gradient(circle, rgba(236, 72, 153, .30), transparent 70%); animation: flotar 11s ease-in-out infinite alternate-reverse; }
@keyframes flotar { from { transform: translateY(0) scale(1); } to { transform: translateY(26px) scale(1.08); } }
.portada-hero h1 em { background: linear-gradient(120deg, #6366f1, #a855f7 55%, #ec4899); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* Cinta infinita (se reutiliza para logos y reseñas) */
.cinta { overflow: hidden; position: relative; }
.cinta::before, .cinta::after { content: ''; position: absolute; top: 0; bottom: 0; width: 70px; z-index: 2; pointer-events: none; }
.cinta::before { left: 0; background: linear-gradient(90deg, var(--fondo), transparent); }
.cinta::after { right: 0; background: linear-gradient(-90deg, var(--fondo), transparent); }
.cinta-track { display: flex; align-items: stretch; gap: 18px; width: max-content; animation: cinta 26s linear infinite; }
.cinta-track.lenta { animation-duration: 45s; }
.cinta-track.reversa { animation-direction: reverse; }
.cinta:hover .cinta-track { animation-play-state: paused; }
@keyframes cinta { to { transform: translateX(-50%); } }

/* Aliados */
.aliados { padding: 10px 0 44px; }
.aliados-titulo { text-align: center; font: 700 13px/1.4 'Inter'; letter-spacing: .12em; text-transform: uppercase; color: var(--gris); margin: 0 0 20px; }
.chip-logo { display: inline-flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--linea); border-radius: 12px; padding: 12px 22px; white-space: nowrap; box-shadow: var(--sombra); }
.chip-logo .mini { width: 28px; height: 28px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; color: #fff; font: 800 15px/1 'Inter'; flex: 0 0 28px; }
.chip-logo .mini-img { width: 28px; height: 28px; border-radius: 7px; object-fit: contain; flex: 0 0 28px; }
.chip-logo .mini.palabra { font-size: 8.5px; font-style: italic; letter-spacing: -.02em; }
.chip-logo .mini.cursiva { font-style: italic; }
.chip-logo .nombre-marca { font: 800 16px/1 'Inter'; letter-spacing: -.01em; }

/* Planes y precios */
.planes-sec { padding: 60px 20px; }
.planes-sec h2 { text-align: center; font-size: clamp(24px, 4vw, 34px); letter-spacing: -.02em; margin: 0 0 8px; }
.planes-sub { text-align: center; color: var(--gris); font-size: 14.5px; margin: 0 0 22px; }
.toggle-pago { display: flex; justify-content: center; width: max-content; margin: 0 auto 34px; border: 1px solid var(--linea); border-radius: 999px; overflow: hidden; background: #fff; box-shadow: var(--sombra); }
.toggle-pago button { padding: 11px 22px; border: none; background: transparent; font: 700 13.5px/1 'Inter'; color: var(--tinta2); cursor: pointer; transition: .18s; }
.toggle-pago button.activo { background: var(--tinta); color: #fff; }
.planes { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 18px; max-width: 1040px; margin: 0 auto; align-items: stretch; }
.plan { position: relative; background: #fff; border: 1px solid var(--linea); border-radius: var(--radio); padding: 30px 26px 26px; box-shadow: var(--sombra); display: flex; flex-direction: column; }
.plan h3 { font-size: 19px; margin: 0 0 4px; }
.plan-desc { font-size: 13.5px; color: var(--gris); margin: 0 0 16px; min-height: 38px; }
.plan .precio { font: 800 44px/1 'Inter'; letter-spacing: -.03em; }
.plan .precio .periodo { font: 600 15px/1 'Inter'; color: var(--gris); letter-spacing: 0; }
.plan .nota-anual { font-size: 12.5px; color: var(--exito); font-weight: 600; margin: 6px 0 4px; min-height: 18px; }
.plan-lista { list-style: none; padding: 0; margin: 14px 0 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.plan-lista li { display: flex; gap: 9px; font-size: 14px; color: var(--tinta2); align-items: baseline; }
.plan-lista li::before { content: '✓'; color: var(--exito); font-weight: 800; flex: 0 0 auto; }
.plan.destacado { border: 2px solid var(--primario); box-shadow: 0 12px 34px rgba(79, 70, 229, .18); }
@media (min-width: 940px) { .plan.destacado { transform: scale(1.04); z-index: 1; } }
.plan-badge { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--primario); color: #fff; font: 800 11px/1 'Inter'; letter-spacing: .08em; padding: 7px 14px; border-radius: 999px; white-space: nowrap; }
.plan.mentoria { background: linear-gradient(160deg, #f5f3ff, #fff 55%); border-color: #ddd6fe; }

/* Reseñas en movimiento */
.resenas { padding: 54px 0 60px; background: #fff; border-top: 1px solid var(--linea); border-bottom: 1px solid var(--linea); }
.resenas .cinta::before { background: linear-gradient(90deg, #fff, transparent); }
.resenas .cinta::after { background: linear-gradient(-90deg, #fff, transparent); }
.resenas h2 { text-align: center; font-size: clamp(24px, 4vw, 34px); letter-spacing: -.02em; margin: 0 0 8px; }
.resenas-sub { text-align: center; color: var(--gris); font-size: 14px; margin: 0 0 30px; padding: 0 20px; }
.t-card { width: 320px; flex: 0 0 320px; background: #fff; border: 1px solid var(--linea); border-radius: var(--radio); padding: 22px; box-shadow: var(--sombra); display: flex; flex-direction: column; gap: 9px; }
.t-card .estrellas { color: #f59e0b; letter-spacing: 2px; font-size: 15px; }
.t-card .t-titular { font-weight: 800; font-size: 15.5px; letter-spacing: -.01em; }
.t-card .t-texto { font-size: 13.5px; color: var(--tinta2); line-height: 1.55; }
.t-card .quien { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 8px; }
.t-card .avatar { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(120deg, #6366f1, #8b5cf6); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; }
.t-card .nombre { font-weight: 700; font-size: 13.5px; }
.t-card .t-lugar { font-size: 12px; color: var(--gris); }
@media (max-width: 480px) { .t-card { width: 270px; flex-basis: 270px; } }

/* Tabla de comparación */
.comparacion { padding: 60px 20px; }
.comparacion h2 { text-align: center; font-size: clamp(24px, 4vw, 34px); letter-spacing: -.02em; margin: 0 0 28px; }
.tabla-comp td, .tabla-comp th { text-align: center; }
.tabla-comp td:first-child, .tabla-comp th:first-child { text-align: left; font-weight: 600; }
.tabla-comp .col-vy { background: #eef2ff; font-weight: 700; }
.tabla-comp thead .col-vy { background: #eef2ff; }

/* CTA final */
.cta-final { text-align: center; padding: 64px 24px; background: linear-gradient(120deg, #4f46e5, #7c3aed); color: #fff; }
.cta-final h2 { font-size: clamp(24px, 4.4vw, 36px); letter-spacing: -.02em; margin: 0 0 10px; }
.cta-final p { opacity: .92; margin: 0 0 26px; }

