/* ═══════════════════════════════════════════════════════════
   GIMNASIO — Estilos
   Tema 'energia' (oscuro/energético) por defecto + variantes
   ═══════════════════════════════════════════════════════════ */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
:root {
  --fondo: #0e0e12;
  --panel: #1a1a22;
  --panel-2: #242430;
  --texto: #f4f4f8;
  --texto-suave: #9a9aae;
  --marca: #d4f028;
  --marca-2: #b8e000;
  --marca-tinta: #0e0e12;
  --linea: rgba(255,255,255,.08);
  --sombra: 0 12px 40px rgba(0,0,0,.4);
  --r: 20px;
  --r-sm: 14px;
  --font: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-display: 'Outfit', system-ui, sans-serif;
  --ease: cubic-bezier(.22,1,.36,1);
}
/* Tema energia (default ya está en :root) */
.tema-energia { }
/* Tema fuego (naranja/rojo) */
.tema-fuego { --marca: #ff5722; --marca-2: #ff7849; --marca-tinta: #fff; }
/* Tema hielo (azul) */
.tema-hielo { --marca: #3da5ff; --marca-2: #6dc0ff; --marca-tinta: #06121f; }
/* Tema claro */
.tema-claro { --fondo: #f4f5f7; --panel: #ffffff; --panel-2: #eef0f3; --texto: #1a1a22; --texto-suave: #6b6b7b; --marca: #1a1a22; --marca-2: #333; --marca-tinta: #fff; --linea: rgba(0,0,0,.08); --sombra: 0 12px 40px rgba(0,0,0,.08); }

body { font-family: var(--font); background: var(--fondo); color: var(--texto); overflow: hidden; }
.app-gym {
  width: 100%; height: 100%; height: 100dvh;
  position: fixed; inset: 0;
  overflow: hidden;
}

/* ═══════════ PANTALLAS ═══════════ */
.pantalla-gym { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .4s, visibility .4s; overflow: hidden; }
.pantalla-gym.activa { opacity: 1; visibility: visible; }

/* ═══════════ BIENVENIDA ═══════════ */
#pantallaBienvenida { background: var(--fondo); }
.g-bienvenida-fondo { position: absolute; inset: 0; background-size: cover; background-position: center; background-image: url('https://images.unsplash.com/photo-1534438327276-14e5300c3a48?auto=format&fit=crop&w=900&q=80'); }
.g-bienvenida-overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(14,14,18,.4), rgba(14,14,18,.95)); }
/* ════════════════════════════════════════════════════
   PANTALLA BIENVENIDA — layout centrado, btn visible
   ════════════════════════════════════════════════════ */

/* Contenedor principal: columna centrada verticalmente */
/* ══ BIENVENIDA — nuevo layout ═══════════════════════════════
   Logo arriba-izquierda (sin caja), contenido centrado arriba,
   botón COMENZAR fijo al fondo.
   ════════════════════════════════════════════════════════════ */
.g-bienvenida-contenido {
  position: relative; z-index: 2;
  height: 100%; width: 100%;
  display: flex; flex-direction: column;
  align-items: flex-start;
  padding: calc(env(safe-area-inset-top, 0px) + 20px) 28px
           calc(env(safe-area-inset-bottom, 0px) + 28px);
}

/* ── Logo arriba-izquierda — sin fondo cuadrado ── */
.g-bienvenida-logo {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: auto; /* empuja el resto hacia abajo */
  animation: bv-pop .6s cubic-bezier(.16,1,.3,1) both;
}
.g-bienvenida-logo-inner {
  width: 52px; height: 52px; border-radius: 14px;
  overflow: hidden; flex-shrink: 0;
  /* Sin background — el logo se muestra sobre el fondo directo */
  background: transparent;
  border: none; box-shadow: none;
}
.g-bienvenida-logo-inner img {
  width: 100%; height: 100%; object-fit: contain; display: block;
  /* mix-blend-mode elimina el fondo blanco/claro del logo */
  mix-blend-mode: screen;
  filter: brightness(1.1) contrast(1.05);
}
.g-logo-placeholder {
  font-family: var(--font-display); font-size: 28px; font-weight: 900;
  color: var(--marca); text-shadow: 0 0 20px rgba(212,240,40,.6);
}
/* Nombre del gym al lado del logo */
.g-bienvenida-logo-nom {
  font-family: var(--font-display); font-size: 17px; font-weight: 800;
  color: rgba(255,255,255,.9); text-shadow: 0 2px 8px rgba(0,0,0,.5);
  letter-spacing: -.3px;
}
@keyframes bv-pop {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Área central — título y subtítulo ── */
.g-bienvenida-center {
  flex: 1;
  display: flex; flex-direction: column;
  justify-content: flex-end; /* pegado a la parte de abajo del área libre */
  padding-bottom: 32px;
  width: 100%;
}

/* ── Título ── */
.g-bienvenida-titulo {
  font-family: var(--font-display); font-size: 48px; font-weight: 900;
  line-height: .92; text-transform: uppercase; letter-spacing: -2.5px;
  text-shadow: 0 4px 28px rgba(0,0,0,.6);
  margin-bottom: 10px;
  animation: bv-up .7s cubic-bezier(.16,1,.3,1) .15s both;
  text-align: left;
}
.g-bienvenida-titulo .marca-text {
  color: var(--marca); display: block;
  filter: drop-shadow(0 0 20px rgba(212,240,40,.5));
}
@keyframes bv-up {
  from { opacity:0; transform: translateY(24px); }
  to   { opacity:1; transform: translateY(0); }
}

/* ── Subtítulo ── */
.g-bienvenida-sub {
  font-size: 16px; color: rgba(255,255,255,.65);
  line-height: 1.5; text-align: left;
  animation: bv-up .7s cubic-bezier(.16,1,.3,1) .25s both;
}

/* ── Espaciador (sin usar más) ── */
.g-bienvenida-spacer { display: none; }

/* ── Botón COMENZAR ── */
.g-btn-comenzar {
  position: relative; overflow: hidden;
  width: 100%; max-width: 360px; height: 72px;
  border-radius: 22px; border: none; cursor: pointer;
  background: var(--marca);
  display: flex; align-items: center; padding: 0 8px 0 8px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.15) inset,
    0 8px 32px rgba(212,240,40,.55),
    0 2px 0 rgba(0,0,0,.2);
  animation: bv-btn .7s cubic-bezier(.16,1,.3,1) .35s both;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
@keyframes bv-btn {
  from { opacity:0; transform: translateY(32px) scale(.9); }
  to   { opacity:1; transform: translateY(0) scale(1); }
}
/* Shine sweep */
.g-btn-comenzar::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(90deg,
    transparent 0%, rgba(255,255,255,.22) 50%, transparent 100%);
  transform: translateX(-100%);
  animation: btn-shine 2.8s ease-in-out 1.2s infinite;
}
@keyframes btn-shine { to { transform: translateX(200%); } }
/* Glow respirante debajo del btn */
.g-btn-comenzar::before {
  content: ""; position: absolute;
  left: 10%; right: 10%; bottom: -14px; height: 40px;
  background: var(--marca); filter: blur(20px);
  opacity: .7; animation: btn-glow 2.4s ease-in-out infinite;
}
@keyframes btn-glow {
  0%,100% { opacity: .5; transform: scaleX(.85); }
  50%      { opacity: .9; transform: scaleX(1.0); }
}
.g-btn-comenzar:active {
  transform: scale(.96);
  box-shadow: 0 4px 20px rgba(212,240,40,.6);
}
/* Elementos internos del btn */
.g-cont-glow {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(255,255,255,.18); filter: blur(12px);
  animation: cont-pulso 2.2s ease-in-out infinite;
}
@keyframes cont-pulso {
  0%,100% { transform: translateY(-50%) scale(1); opacity: .8; }
  50%      { transform: translateY(-50%) scale(1.3); opacity: 1; }
}
.g-cont-check {
  position: relative; z-index: 2;
  width: 54px; height: 54px; border-radius: 16px; flex-shrink: 0;
  background: rgba(0,0,0,.18); color: var(--marca-tinta);
  display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,.2);
  transition: transform .2s;
}
.g-cont-check svg { width: 22px; height: 22px; }
.g-cont-texto {
  flex: 1; text-align: center; color: var(--marca-tinta);
  font-family: var(--font-display); font-size: 20px; font-weight: 900;
  letter-spacing: -.3px; z-index: 2;
}
.g-cont-flechas {
  color: rgba(0,0,0,.35); font-size: 22px; font-weight: 900;
  padding-right: 14px; z-index: 2;
  animation: cont-flechas 1.4s ease-in-out infinite;
}
@keyframes cont-flechas {
  0%,100% { opacity: .3; transform: translateX(-2px); }
  50%      { opacity: .8; transform: translateX(3px); }
}
/* Estado cargando */
.g-btn-comenzar.cargando { pointer-events: none; }
.g-btn-comenzar.cargando .g-cont-check { animation: cont-viaja .55s cubic-bezier(.16,1,.3,1) forwards; }
.g-btn-comenzar.cargando .g-cont-texto,
.g-btn-comenzar.cargando .g-cont-flechas { opacity: 0; transition: opacity .2s; }
@keyframes cont-viaja {
  0%   { transform: translateX(0); opacity: 1; border-radius: 16px; }
  100% { transform: translateX(calc(45vw - 4px)); opacity: 0; border-radius: 50%; }
}
body.animando-comenzar .pantalla-gym,
body.animando-comenzar .g-bienvenida-contenido { overflow: visible !important; }

/* ── Overlay con gradiente mejorado ── */
.g-bienvenida-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(14,14,18,.2) 0%,
    rgba(14,14,18,.1) 30%,
    rgba(14,14,18,.6) 65%,
    rgba(14,14,18,.96) 100%
  );
}

/* ═══════════ APP / HEADER ═══════════ */
#pantallaApp {
  background: var(--fondo);
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden; /* el scroll va en .g-app-scroll, no aquí */
}
/* Área scrollable: entre header y navbar */
.g-app-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); /* espacio para navbar */
}
.g-header { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; padding: calc(14px + env(safe-area-inset-top)) 20px 14px; background: rgba(14,14,18,.85); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--linea); }
.tema-claro .g-header { background: rgba(255,255,255,.85); }
.g-header-info { display: flex; align-items: center; gap: 12px; }
.g-header-logo {
  width: 42px; height: 42px; border-radius: 13px;
  background: rgba(212,240,40,.12); border: 1px solid rgba(212,240,40,.2);
  display: grid; place-items: center; overflow: hidden; flex-shrink: 0;
}
.g-header-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.g-header-logo-placeholder {
  font-family: var(--font-display); font-size: 20px; font-weight: 900; color: var(--marca);
}
.g-header-info { flex: 1; min-width: 0; }
.g-header-info h2 {
  font-family: var(--font-display); font-size: 15px; font-weight: 800;
  letter-spacing: -.3px; line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin: 0;
}
/* Estado: muestra horario + punto de color */
.g-header-estado {
  display: flex; align-items: center; gap: 5px;
  margin-top: 2px; min-height: 16px;
}
.g-abierto, .g-cerrado, .g-horario {
  font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; gap: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 190px;
}
.g-abierto  { color: #4ade80; }
.g-cerrado  { color: #f87171; }
.g-horario  { color: var(--texto-suave); }
/* Punto animado */
.g-abierto::before {
  content: ""; flex-shrink: 0;
  width: 6px; height: 6px; border-radius: 50%; background: #4ade80;
  animation: g-pulso 2s ease-in-out infinite;
}
.g-cerrado::before {
  content: ""; flex-shrink: 0;
  width: 6px; height: 6px; border-radius: 50%; background: #f87171;
}
@keyframes g-pulso {
  0%,100% { opacity:1; transform:scale(1); }
  50%     { opacity:.3; transform:scale(.6); }
}
.g-header-perfil { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--linea); background: var(--panel); color: var(--texto); display: grid; place-items: center; cursor: pointer; }

/* ═══════════ VISTAS ═══════════ */
.g-vista { display: none; padding: 0 20px 24px; }
.g-vista.activa { display: block; animation: fade-in .25s var(--ease); }
@keyframes fade-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.g-vista-titulo h2 { font-family: var(--font-display); font-size: 26px; font-weight: 800; margin-bottom: 18px; }
.g-espaciador { height: 20px; } /* navbar ya no es fixed, solo small padding */

/* Secciones */
.g-seccion { margin-bottom: 30px; }
.g-seccion-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px; padding: 0 20px;
}
.g-seccion-head h3 {
  font-family: var(--font-display); font-size: 19px; font-weight: 800;
  letter-spacing: -.3px;
}
.g-ver-mas { background: none; border: 0; color: var(--marca); font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit; }
.tema-claro .g-ver-mas { color: var(--texto); }
.g-scroll-h { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 0 20px 4px; }
.g-scroll-h::-webkit-scrollbar { display: none; }
.g-vacio { color: var(--texto-suave); font-size: 14px; text-align: center; padding: 30px 0; }

/* ═══════════ BANNER SUSCRIPCIÓN ═══════════ */
.g-banner-suscripcion { margin-bottom: 22px; }
.g-banner-cta, .g-banner-activo { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px; border-radius: var(--r); }
.g-banner-cta { background: linear-gradient(135deg, var(--marca), var(--marca-2)); color: var(--marca-tinta); }
.g-banner-cta strong { font-family: var(--font-display); font-size: 18px; font-weight: 800; }
.g-banner-cta p { font-size: 13px; opacity: .8; }
.g-banner-activo { background: var(--panel); border: 1px solid var(--linea); }
.g-banner-activo-ico { width: 44px; height: 44px; color: var(--marca); }
.g-banner-activo strong { font-family: var(--font-display); font-size: 16px; }
.g-banner-activo p { font-size: 13px; color: var(--texto-suave); }

/* ═══════════ PLANES ═══════════ */
.g-planes { display: flex; flex-direction: column; gap: 12px; }
.g-plan-card { position: relative; background: var(--panel); border: 1px solid var(--linea); border-radius: var(--r); padding: 22px; cursor: pointer; transition: transform .15s, border-color .2s; }
.g-plan-card:active { transform: scale(.99); }
.g-plan-card.destacado { border-color: var(--marca); background: linear-gradient(180deg, rgba(212,240,40,.06), var(--panel)); }
.g-plan-badge { position: absolute; top: 14px; right: 14px; background: var(--marca); color: var(--marca-tinta); font-size: 11px; font-weight: 800; padding: 4px 12px; border-radius: 999px; text-transform: uppercase; }
.g-plan-ico { width: 40px; height: 40px; color: var(--marca); margin-bottom: 12px; }
.g-plan-card h4 { font-family: var(--font-display); font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.g-plan-precio { font-family: var(--font-display); font-size: 28px; font-weight: 800; margin-bottom: 14px; }
.g-plan-precio span { font-size: 13px; color: var(--texto-suave); font-weight: 600; }
.g-plan-benef { list-style: none; margin-bottom: 16px; }
.g-plan-benef li { font-size: 13px; color: var(--texto-suave); padding: 4px 0 4px 20px; position: relative; }
.g-plan-benef li::before { content: "✓"; position: absolute; left: 0; color: var(--marca); font-weight: 800; }
.g-plan-btn { width: 100%; padding: 13px; border: 0; border-radius: var(--r-sm); background: var(--marca); color: var(--marca-tinta); font-weight: 700; font-family: inherit; font-size: 14px; cursor: pointer; }

/* Detalle plan (sheet) */
.g-plan-detalle-ico { width: 56px; height: 56px; color: var(--marca); margin-bottom: 14px; }
.g-plan-detalle-nombre { font-family: var(--font-display); font-size: 26px; font-weight: 800; }
.g-plan-detalle-precio { font-family: var(--font-display); font-size: 34px; font-weight: 800; margin: 6px 0 16px; }
.g-plan-detalle-precio span { font-size: 14px; color: var(--texto-suave); font-weight: 600; }
.g-plan-detalle-desc { color: var(--texto-suave); font-size: 14px; line-height: 1.5; margin-bottom: 16px; }
.g-plan-detalle-benef { list-style: none; margin-bottom: 24px; }
.g-plan-detalle-benef li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--linea); font-size: 14px; }
.g-plan-detalle-benef li svg { color: var(--marca); flex-shrink: 0; }
.g-plan-detalle-acciones { display: flex; flex-direction: column; gap: 10px; }

/* ═══════════ CLASES ═══════════ */
.g-clase-mini { flex-shrink: 0; width: 130px; cursor: pointer; }
.g-clase-mini-foto { width: 130px; height: 130px; border-radius: var(--r-sm); overflow: hidden; background: var(--panel-2); margin-bottom: 8px; position: relative; }
.g-clase-mini-foto img { width: 100%; height: 100%; object-fit: cover; }
.g-clase-mini-ico { width: 100%; height: 100%; display: grid; place-items: center; color: var(--marca); }
.g-clase-mini-ico svg { width: 40px; height: 40px; }
.g-clase-mini strong { display: block; font-size: 14px; font-weight: 700; }
.g-clase-mini span { font-size: 12px; color: var(--texto-suave); }

.g-clase-card { background: var(--panel); border: 1px solid var(--linea); border-radius: var(--r); padding: 18px; margin-bottom: 14px; }
.g-clase-card-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.g-clase-card-ico { width: 48px; height: 48px; border-radius: 14px; background: var(--panel-2); color: var(--marca); display: grid; place-items: center; flex-shrink: 0; }
.g-clase-card-ico svg { width: 26px; height: 26px; }
.g-clase-card-info h3 { font-family: var(--font-display); font-size: 18px; font-weight: 800; }
.g-clase-card-info span { font-size: 13px; color: var(--texto-suave); }
.g-clase-card-desc { font-size: 13px; color: var(--texto-suave); line-height: 1.5; margin-bottom: 12px; }
.g-horarios { display: flex; flex-wrap: wrap; gap: 8px; }
.g-horario-chip { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 14px; background: var(--panel-2); border: 1px solid var(--linea); border-radius: 12px; cursor: pointer; transition: all .15s; min-width: 60px; }
.g-horario-chip:active { transform: scale(.95); }
.g-horario-chip:hover { border-color: var(--marca); }
.g-horario-dia { font-size: 11px; color: var(--texto-suave); font-weight: 600; }
.g-horario-hora { font-size: 14px; font-weight: 800; color: var(--marca); }
.g-clase-sin-horario { font-size: 12px; color: var(--texto-suave); }

/* ═══════════ ENTRENADORES ═══════════ */
.g-coach-mini { flex-shrink: 0; width: 110px; text-align: center; cursor: pointer; }
.g-coach-mini-foto { width: 110px; height: 110px; border-radius: 50%; overflow: hidden; background: var(--panel-2); margin-bottom: 8px; }
.g-coach-mini-foto img { width: 100%; height: 100%; object-fit: cover; }
.g-coach-mini-ph { width: 100%; height: 100%; display: grid; place-items: center; color: var(--texto-suave); }
.g-coach-mini-ph svg { width: 44px; height: 44px; }
.g-coach-mini strong { display: block; font-size: 14px; font-weight: 700; }
.g-coach-mini span { font-size: 12px; color: var(--texto-suave); }

.g-coach-card { display: flex; gap: 16px; background: var(--panel); border: 1px solid var(--linea); border-radius: var(--r); padding: 18px; margin-bottom: 14px; }
.g-coach-card-foto { width: 90px; height: 90px; border-radius: 16px; overflow: hidden; background: var(--panel-2); flex-shrink: 0; }
.g-coach-card-foto img { width: 100%; height: 100%; object-fit: cover; }
.g-coach-card-info h3 { font-family: var(--font-display); font-size: 18px; font-weight: 800; }
.g-coach-esp { font-size: 13px; color: var(--marca); font-weight: 600; }
.g-coach-card-info p { font-size: 13px; color: var(--texto-suave); line-height: 1.4; margin: 6px 0; }
.g-coach-precio { font-size: 13px; font-weight: 700; margin-bottom: 10px; }

/* Detalle entrenador (sheet) */
.g-ent-foto { width: 100px; height: 100px; border-radius: 50%; overflow: hidden; background: var(--panel-2); margin-bottom: 14px; }
.g-ent-foto img { width: 100%; height: 100%; object-fit: cover; }
.g-ent-nombre { font-family: var(--font-display); font-size: 24px; font-weight: 800; }
.g-ent-esp { font-size: 14px; color: var(--marca); font-weight: 600; }
.g-ent-bio { font-size: 14px; color: var(--texto-suave); line-height: 1.5; margin: 12px 0; }
.g-ent-precio { font-family: var(--font-display); font-size: 26px; font-weight: 800; margin-bottom: 16px; }
.g-ent-precio span { font-size: 14px; color: var(--texto-suave); font-weight: 600; }
.g-ent-disp { background: var(--panel-2); border-radius: var(--r-sm); padding: 14px; margin-bottom: 18px; }
.g-ent-disp h4 { font-size: 14px; margin-bottom: 10px; }
.g-ent-disp-fila { display: flex; justify-content: space-between; font-size: 13px; padding: 5px 0; color: var(--texto-suave); }
.g-ent-form { display: flex; flex-direction: column; gap: 12px; }

/* ═══════════ TIENDA ═══════════ */
.g-productos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.g-prod-card { background: var(--panel); border: 1px solid var(--linea); border-radius: var(--r-sm); overflow: hidden; position: relative; }
.g-prod-foto { width: 100%; height: 120px; background: var(--panel-2); }
.g-prod-foto img { width: 100%; height: 100%; object-fit: cover; }
.g-prod-ph { width: 100%; height: 100%; display: grid; place-items: center; color: var(--texto-suave); }
.g-prod-ph svg { width: 40px; height: 40px; }
.g-prod-info { padding: 12px; }
.g-prod-info h4 { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.g-prod-cat { font-size: 11px; color: var(--texto-suave); text-transform: capitalize; }
.g-prod-precio { font-family: var(--font-display); font-size: 17px; font-weight: 800; margin-top: 6px; }
.g-prod-add { position: absolute; bottom: 12px; right: 12px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--marca); color: var(--marca-tinta); display: grid; place-items: center; cursor: pointer; }

/* FAB carrito */
.g-fab-carrito { position: fixed; bottom: calc(76px + env(safe-area-inset-bottom)); right: 20px; width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--marca); color: var(--marca-tinta); display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 8px 24px rgba(212,240,40,.4); z-index: 35; }
.g-fab-badge { position: absolute; top: -2px; right: -2px; background: #ff4444; color: #fff; font-size: 11px; font-weight: 800; min-width: 20px; height: 20px; border-radius: 999px; display: grid; place-items: center; padding: 0 5px; }

/* Carrito */
.g-carrito-items { margin-bottom: 16px; }
.g-carrito-item { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--linea); }
.g-carrito-item-info strong { display: block; font-size: 14px; }
.g-carrito-item-info span { font-size: 13px; color: var(--texto-suave); }
.g-carrito-qty { display: flex; align-items: center; gap: 12px; }
.g-carrito-qty button { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--linea); background: var(--panel-2); color: var(--texto); font-size: 18px; cursor: pointer; }
.g-carrito-total { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; margin-bottom: 14px; }
.g-carrito-total strong { font-family: var(--font-display); font-size: 22px; font-weight: 800; }

/* ═══════════ RAZONES / TESTIMONIOS ═══════════ */
.g-razones { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.g-razon { background: var(--panel); border: 1px solid var(--linea); border-radius: var(--r-sm); padding: 16px; }
.g-razon-ico { width: 32px; height: 32px; color: var(--marca); margin-bottom: 8px; }
.g-razon strong { display: block; font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.g-razon p { font-size: 12px; color: var(--texto-suave); line-height: 1.4; }
.g-testi { flex-shrink: 0; width: 260px; background: var(--panel); border: 1px solid var(--linea); border-radius: var(--r); padding: 18px; }
.g-testi-estrellas { color: var(--marca); font-size: 14px; margin-bottom: 8px; }
.g-testi p { font-size: 14px; line-height: 1.5; margin-bottom: 10px; font-style: italic; }
.g-testi strong { font-size: 13px; }

/* ═══════════ FOOTER ═══════════ */
.g-footer { background: var(--panel); border-radius: var(--r); padding: 22px; text-align: center; margin-top: 20px; }
.g-footer-nombre { font-family: var(--font-display); font-size: 18px; font-weight: 800; margin-bottom: 10px; }
.g-footer-linea { font-size: 13px; color: var(--texto-suave); margin: 5px 0; display: flex; align-items: center; justify-content: center; gap: 6px; }
.g-footer-linea svg { width: 14px; height: 14px; }
.g-footer-redes { display: flex; gap: 16px; justify-content: center; margin: 12px 0; }
.g-footer-redes a { color: var(--marca); font-size: 13px; font-weight: 600; text-decoration: none; }
.g-footer-texto { font-size: 12px; color: var(--texto-suave); margin-top: 8px; }

/* ═══════════ PERFIL ═══════════ */
.g-perfil-invitado { text-align: center; padding: 40px 20px; }
.g-perfil-ico { width: 64px; height: 64px; color: var(--texto-suave); margin: 0 auto 16px; }
.g-perfil-invitado h3 { font-family: var(--font-display); font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.g-perfil-invitado p { font-size: 14px; color: var(--texto-suave); margin-bottom: 20px; }
.g-perfil-invitado button { margin-bottom: 10px; }
.g-perfil-header { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.g-perfil-avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--marca); color: var(--marca-tinta); display: grid; place-items: center; font-family: var(--font-display); font-size: 24px; font-weight: 800; }
.g-perfil-header h3 { font-family: var(--font-display); font-size: 20px; font-weight: 800; }
.g-perfil-header span { font-size: 13px; color: var(--texto-suave); }
.g-perfil-card { background: var(--panel); border: 1px solid var(--linea); border-radius: var(--r-sm); padding: 16px; margin-bottom: 14px; }
.g-perfil-card.activa { border-color: var(--marca); }
.g-perfil-label { font-size: 13px; color: var(--texto-suave); }
.g-perfil-card p { font-size: 15px; font-weight: 700; margin-top: 4px; }
.g-perfil-reservas { margin-bottom: 16px; }
.g-perfil-reservas h4 { font-size: 15px; margin-bottom: 10px; }
.g-reserva-item { display: flex; align-items: center; justify-content: space-between; background: var(--panel); border: 1px solid var(--linea); border-radius: var(--r-sm); padding: 14px; margin-bottom: 8px; }
.g-reserva-item strong { display: block; font-size: 14px; }
.g-reserva-item span { font-size: 12px; color: var(--texto-suave); }
.g-reserva-cancelar { background: none; border: 1px solid var(--linea); color: #f87171; font-size: 12px; padding: 6px 12px; border-radius: 8px; cursor: pointer; }

/* ═══════════ NAVBAR ═══════════ */
.g-navbar {
  flex-shrink: 0; /* no se encoge */
  display: flex;
  background: rgba(14,14,18,.96);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--linea);
  padding-bottom: max(env(safe-area-inset-bottom), 6px);
  z-index: 30;
  /* Sin position:fixed — queda anclado al flex de #pantallaApp */
}
.tema-claro .g-navbar { background: rgba(255,255,255,.96); }
.g-nav-btn { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0 6px; background: none; border: 0; color: var(--texto-suave); cursor: pointer; font-family: inherit; transition: color .15s; }
.g-nav-btn svg { width: 21px; height: 21px; }
.g-nav-btn span { font-size: 10px; font-weight: 600; }
.g-nav-btn.activo { color: var(--marca); }

/* ═══════════ SHEETS / OVERLAY ═══════════ */
.g-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.6); backdrop-filter: blur(4px); opacity: 0; visibility: hidden; transition: opacity .3s; z-index: 40; }
.g-overlay.visible { opacity: 1; visibility: visible; }
.g-sheet { position: fixed; bottom: 0; left: 0; right: 0; max-height: 88vh; overflow-y: auto; background: var(--fondo); border-radius: 28px 28px 0 0; transform: translateY(100%); transition: transform .35s var(--ease); z-index: 50; padding-bottom: calc(24px + env(safe-area-inset-bottom)); scrollbar-width: none; }
.g-sheet::-webkit-scrollbar { display: none; }
.g-sheet.abierto { transform: translateY(0); }
.g-sheet-handle { width: 40px; height: 4px; background: var(--linea); border-radius: 999px; margin: 12px auto 0; }
.g-sheet-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 24px; }
.g-sheet-header h3 { font-family: var(--font-display); font-size: 20px; font-weight: 800; }
.g-btn-x { width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--panel-2); color: var(--texto-suave); display: grid; place-items: center; cursor: pointer; }
.g-sheet-body { padding: 8px 24px; }

/* Auth */
.g-auth-tabs { display: flex; background: var(--panel-2); border-radius: 12px; padding: 4px; margin-bottom: 18px; }
.g-auth-tab { flex: 1; padding: 10px; border: 0; background: none; color: var(--texto-suave); font-weight: 700; font-size: 14px; border-radius: 9px; cursor: pointer; font-family: inherit; }
.g-auth-tab.activo { background: var(--marca); color: var(--marca-tinta); }
.g-auth-error { background: rgba(248,113,113,.12); color: #f87171; padding: 12px; border-radius: 12px; font-size: 13px; margin-bottom: 14px; }

/* Campos */
.g-campo { margin-bottom: 14px; }
.g-campo label { display: block; font-size: 13px; font-weight: 600; color: var(--texto-suave); margin-bottom: 6px; }
.g-campo input { width: 100%; padding: 14px; border: 1px solid var(--linea); border-radius: 12px; background: var(--panel); color: var(--texto); font-size: 15px; font-family: inherit; }
.g-campo input:focus { outline: none; border-color: var(--marca); }

/* Botones */
.g-btn-primario { width: 100%; padding: 15px; border: 0; border-radius: 14px; background: var(--marca); color: var(--marca-tinta); font-size: 15px; font-weight: 800; cursor: pointer; font-family: inherit; transition: transform .15s; }
.g-btn-primario:active { transform: scale(.98); }
.g-btn-secundario { width: 100%; padding: 15px; border: 1px solid var(--linea); border-radius: 14px; background: var(--panel); color: var(--texto); font-size: 15px; font-weight: 700; cursor: pointer; font-family: inherit; }
.g-btn-sm { width: auto; padding: 10px 18px; font-size: 13px; }

/* ═══════════ CONFIRMACIÓN ═══════════ */
.g-confirmacion { position: fixed; inset: 0; background: rgba(0,0,0,.7); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; padding: 30px; opacity: 0; visibility: hidden; transition: opacity .3s; z-index: 60; }
.g-confirmacion.visible { opacity: 1; visibility: visible; }
.g-confirmacion-card { position: relative; background: var(--panel); border-radius: 28px; padding: 36px 28px; text-align: center; max-width: 340px; width: 100%; transform: scale(.85); transition: transform .4s var(--ease); }
.g-confirmacion.visible .g-confirmacion-card { transform: scale(1); }
.g-conf-x { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--panel-2); color: var(--texto-suave); display: grid; place-items: center; cursor: pointer; }
.g-conf-check { width: 80px; height: 80px; margin: 0 auto 18px; }
.g-conf-check svg { width: 100%; height: 100%; }
.g-conf-circ { stroke: var(--marca); stroke-width: 3; stroke-dasharray: 151; stroke-dashoffset: 151; animation: conf-circ .5s var(--ease) forwards; }
.g-conf-tick { stroke: var(--marca); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: conf-tick .35s .45s var(--ease) forwards; }
@keyframes conf-circ { to { stroke-dashoffset: 0; } }
@keyframes conf-tick { to { stroke-dashoffset: 0; } }
.g-confirmacion-card h2 { font-family: var(--font-display); font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.g-confirmacion-card p { font-size: 14px; color: var(--texto-suave); line-height: 1.5; margin-bottom: 22px; white-space: pre-line; }

/* ═══════════ TOAST ═══════════ */
.g-toast { position: fixed; bottom: calc(100px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%) translateY(20px); background: var(--marca); color: var(--marca-tinta); padding: 13px 22px; border-radius: 14px; font-size: 14px; font-weight: 700; opacity: 0; visibility: hidden; transition: all .3s; z-index: 70; box-shadow: var(--sombra); }
.g-toast.visible { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }

/* ═══════════ CRÉDITO FOOTER ═══════════ */
.g-footer-credito { font-size: 11px; color: var(--texto-suave); opacity: .6; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--linea); }

/* ═══════════ DATOS FÍSICOS / OBJETIVOS ═══════════ */
.g-datos-intro { font-size: 14px; color: var(--texto-suave); margin-bottom: 18px; line-height: 1.5; }
.g-row-2 { display: flex; gap: 12px; }
.g-row-2 .g-campo { flex: 1; }
.g-objetivos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
.g-objetivo { padding: 14px; border: 1px solid var(--linea); border-radius: 12px; background: var(--panel); color: var(--texto); font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit; transition: all .15s; }
.g-objetivo.activo { border-color: var(--marca); background: rgba(212,240,40,.08); color: var(--marca); }
.tema-claro .g-objetivo.activo { color: var(--texto); background: var(--panel-2); }
.g-btn-texto { width: 100%; padding: 12px; border: 0; background: none; color: var(--texto-suave); font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit; margin-top: 8px; }

/* ═══════════ RUTINAS ═══════════ */
.g-rutina-mini { flex-shrink: 0; width: 140px; cursor: pointer; }
.g-rutina-mini-foto { width: 140px; height: 100px; border-radius: var(--r-sm); overflow: hidden; background: var(--panel-2); margin-bottom: 8px; }
.g-rutina-mini-foto img { width: 100%; height: 100%; object-fit: cover; }
.g-rutina-mini-ico { width: 100%; height: 100%; display: grid; place-items: center; color: var(--marca); }
.g-rutina-mini-ico svg { width: 38px; height: 38px; }
.g-rutina-mini strong { display: block; font-size: 14px; font-weight: 700; }
.g-rutina-mini span { font-size: 12px; color: var(--texto-suave); text-transform: capitalize; }

.g-rutina-card { background: var(--panel); border: 1px solid var(--linea); border-radius: var(--r); overflow: hidden; margin-bottom: 14px; }
.g-rutina-card-foto { width: 100%; height: 160px; background: var(--panel-2); }
.g-rutina-card-foto img { width: 100%; height: 100%; object-fit: cover; }
.g-rutina-card-body { padding: 18px; }
.g-rutina-card-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.g-rutina-card-ico { width: 46px; height: 46px; border-radius: 12px; background: var(--panel-2); color: var(--marca); display: grid; place-items: center; flex-shrink: 0; padding: 10px; }
.g-rutina-card-ico svg { width: 100%; height: 100%; }
.g-rutina-card-head h3 { font-family: var(--font-display); font-size: 18px; font-weight: 800; }
.g-rutina-card-head span { font-size: 13px; color: var(--texto-suave); text-transform: capitalize; }
.g-rutina-desc { font-size: 13px; color: var(--texto-suave); line-height: 1.5; margin-bottom: 14px; }
.g-ejercicios { display: flex; flex-direction: column; gap: 2px; }
.g-ejercicio { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--linea); gap: 12px; }
.g-ejercicio:last-child { border-bottom: 0; }
.g-ejercicio-nombre { font-size: 14px; font-weight: 600; }
.g-ejercicio-detalle { font-size: 12px; color: var(--texto-suave); text-align: right; flex-shrink: 0; }

/* ═══════════ CARRUSEL DE IMÁGENES ═══════════ */
.g-carrusel { position: relative; width: calc(100% + 40px); margin: -18px -20px 22px; height: 220px; overflow: hidden; }
.g-carrusel-track { display: flex; height: 100%; transition: transform .6s var(--ease); }
.g-carrusel-slide { min-width: 100%; height: 100%; }
.g-carrusel-slide img { width: 100%; height: 100%; object-fit: cover; }
.g-carrusel-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(14,14,18,.85) 0%, transparent 50%); display: flex; align-items: flex-end; padding: 20px; pointer-events: none; }
.g-carrusel-overlay span { font-family: var(--font-display); font-size: 26px; font-weight: 900; color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,.5); text-transform: uppercase; letter-spacing: -.5px; }
.g-carrusel-dots { position: absolute; bottom: 14px; right: 16px; display: flex; gap: 6px; z-index: 3; }
.g-carrusel-dot { width: 7px; height: 7px; border-radius: 999px; border: 0; background: rgba(255,255,255,.4); cursor: pointer; padding: 0; transition: all .3s; }
.g-carrusel-dot.activo { width: 20px; background: var(--marca); }

/* ═══════════ CARRUSEL DE IMÁGENES (fin) ═══════════ */

/* ═══════════ PLANES RESUMEN (inicio) ═══════════ */
.g-planes-resumen {
  display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none;
  margin: 0 -20px; padding: 4px 20px 8px;
}
.g-planes-resumen::-webkit-scrollbar { display: none; }
.g-plan-mini { position: relative; flex-shrink: 0; width: 130px; background: var(--panel); border: 1px solid var(--linea); border-radius: var(--r-sm); padding: 16px; text-align: center; cursor: pointer; transition: transform .15s; }
.g-plan-mini:active { transform: scale(.97); }
.g-plan-mini.destacado { border-color: var(--marca); background: linear-gradient(180deg, rgba(212,240,40,.06), var(--panel)); }
.g-plan-mini-badge { position: absolute; top: 8px; right: 8px; background: var(--marca); color: var(--marca-tinta); font-size: 9px; font-weight: 800; padding: 2px 8px; border-radius: 999px; text-transform: uppercase; }
.g-plan-mini-ico { width: 36px; height: 36px; color: var(--marca); margin: 0 auto 8px; }
.g-plan-mini strong { display: block; font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.g-plan-mini-precio { font-family: var(--font-display); font-size: 18px; font-weight: 800; }
.g-plan-mini-dur { font-size: 11px; color: var(--texto-suave); }

/* Sección de planes en perfil */
.g-perfil-seccion { margin: 22px 0; }
.g-perfil-seccion h4 { font-family: var(--font-display); font-size: 17px; font-weight: 800; margin-bottom: 14px; }

/* Tag "Para ti" en rutinas personalizadas */
.g-rutina-mini-foto { position: relative; }
.g-rutina-tag-pers { position: absolute; top: 6px; left: 6px; background: var(--marca); color: var(--marca-tinta); font-size: 9px; font-weight: 800; padding: 2px 8px; border-radius: 999px; text-transform: uppercase; }

/* Banner pedir rutina */
.g-pedir-rutina { display: flex; align-items: center; gap: 14px; background: var(--panel); border: 1px solid var(--linea); border-radius: var(--r); padding: 18px; margin-bottom: 16px; }
.g-pedir-rutina-ico { width: 44px; height: 44px; border-radius: 12px; background: var(--panel-2); color: var(--marca); display: grid; place-items: center; padding: 10px; flex-shrink: 0; }
.g-pedir-rutina-ico svg { width: 100%; height: 100%; }
.g-pedir-rutina-txt { flex: 1; min-width: 0; }
.g-pedir-rutina-txt strong { display: block; font-size: 15px; font-weight: 700; }
.g-pedir-rutina-txt p { font-size: 12px; color: var(--texto-suave); }

/* ═══════════ PULL TO REFRESH ═══════════ */
.g-ptr { height: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .2s; position: relative; z-index: 5; }
.g-ptr-spinner { width: 38px; height: 38px; border-radius: 50%; background: var(--panel); border: 1px solid var(--linea); color: var(--texto-suave); display: grid; place-items: center; box-shadow: 0 4px 12px rgba(0,0,0,.2); transition: color .2s; }
.g-ptr.listo .g-ptr-spinner { color: var(--marca); border-color: var(--marca); }
.g-ptr.refrescando .g-ptr-spinner { color: var(--marca); border-color: var(--marca); animation: ptr-girar .8s linear infinite; }
@keyframes ptr-girar { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* ═══════════ PROGRESO DE RUTINA ═══════════ */
.g-rutina-progreso { position: fixed; inset: 0; background: var(--fondo); z-index: 65; display: flex; flex-direction: column; opacity: 0; visibility: hidden; transform: translateY(20px); transition: opacity .3s, transform .3s, visibility .3s; }
.g-rutina-progreso.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.g-rp-header { display: flex; align-items: center; gap: 14px; padding: calc(16px + env(safe-area-inset-top)) 20px 14px; }
.g-rp-salir { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--linea); background: var(--panel); color: var(--texto); display: grid; place-items: center; cursor: pointer; flex-shrink: 0; }
.g-rp-titulo { flex: 1; font-family: var(--font-display); font-size: 17px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-rp-contador { font-size: 14px; font-weight: 700; color: var(--marca); }
.g-rp-barra { height: 6px; background: var(--panel-2); margin: 0 20px; border-radius: 999px; overflow: hidden; }
.g-rp-barra-fill { height: 100%; background: var(--marca); border-radius: 999px; width: 0; transition: width .4s var(--ease); }
.g-rp-cuerpo { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px 28px calc(40px + env(safe-area-inset-bottom)); overflow-y: auto; }
.g-rp-ico { width: 90px; height: 90px; border-radius: 28px; background: var(--panel); color: var(--marca); display: grid; place-items: center; padding: 22px; margin-bottom: 24px; }
.g-rp-ico svg { width: 100%; height: 100%; }
.g-rp-paso { font-size: 13px; font-weight: 700; color: var(--texto-suave); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.g-rp-nombre { font-family: var(--font-display); font-size: 30px; font-weight: 800; line-height: 1.1; margin-bottom: 24px; }
.g-rp-stats { display: flex; gap: 12px; margin-bottom: 18px; }
.g-rp-stat { background: var(--panel); border: 1px solid var(--linea); border-radius: 16px; padding: 16px 20px; min-width: 76px; }
.g-rp-stat strong { display: block; font-family: var(--font-display); font-size: 22px; font-weight: 800; }
.g-rp-stat span { font-size: 11px; color: var(--texto-suave); text-transform: uppercase; }
.g-rp-notas { font-size: 14px; color: var(--texto-suave); margin-bottom: 28px; max-width: 320px; line-height: 1.5; }
.g-rp-check { max-width: 340px; margin-bottom: 6px; }
.g-rp-cuerpo .g-btn-texto { max-width: 340px; }

/* Pantalla de éxito */
.g-rp-exito { position: absolute; inset: 0; background: var(--fondo); display: none; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px 28px; }
.g-rp-exito.visible { display: flex; }
.g-rp-exito-check { width: 100px; height: 100px; margin-bottom: 22px; }
.g-rp-exito-check svg { width: 100%; height: 100%; }
.g-rp-exito h2 { font-family: var(--font-display); font-size: 30px; font-weight: 900; margin-bottom: 10px; }
.g-rp-exito p { font-size: 15px; color: var(--texto-suave); margin-bottom: 26px; }
.g-rp-resumen { display: flex; gap: 16px; margin-bottom: 30px; }
.g-rp-resumen-item { background: var(--panel); border: 1px solid var(--linea); border-radius: 18px; padding: 18px 26px; }
.g-rp-resumen-item strong { display: block; font-family: var(--font-display); font-size: 26px; font-weight: 800; color: var(--marca); }
.g-rp-resumen-item span { font-size: 12px; color: var(--texto-suave); }
.g-rp-exito .g-btn-primario { max-width: 320px; }

/* ═══════════ EFECTOS MODERNOS EN CARDS ═══════════ */
/* Transición suave + iluminación sutil en hover/touch */
.g-plan-card, .g-clase-card, .g-coach-card, .g-rutina-card, .g-prod-card,
.g-plan-mini, .g-clase-mini, .g-coach-mini, .g-rutina-mini, .g-testi {
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
  will-change: transform;
}
/* Iluminación al pasar/tocar: borde marca tenue + glow */
.g-plan-card:hover, .g-clase-card:hover, .g-coach-card:hover, .g-rutina-card:hover, .g-prod-card:hover {
  transform: translateY(-3px);
  border-color: rgba(212,240,40,.35);
  box-shadow: 0 12px 30px rgba(0,0,0,.3), 0 0 0 1px rgba(212,240,40,.1);
}
.tema-fuego .g-plan-card:hover, .tema-fuego .g-clase-card:hover, .tema-fuego .g-coach-card:hover, .tema-fuego .g-rutina-card:hover, .tema-fuego .g-prod-card:hover { border-color: rgba(255,87,34,.4); box-shadow: 0 12px 30px rgba(0,0,0,.3), 0 0 0 1px rgba(255,87,34,.12); }
.tema-hielo .g-plan-card:hover, .tema-hielo .g-clase-card:hover, .tema-hielo .g-coach-card:hover, .tema-hielo .g-rutina-card:hover, .tema-hielo .g-prod-card:hover { border-color: rgba(61,165,255,.4); box-shadow: 0 12px 30px rgba(0,0,0,.3), 0 0 0 1px rgba(61,165,255,.12); }

/* Mini cards: leve elevación al tocar */
.g-plan-mini:hover, .g-clase-mini:hover, .g-coach-mini:hover, .g-rutina-mini:hover { transform: translateY(-2px); }

/* Brillo que recorre el plan destacado */
.g-plan-card.destacado, .g-plan-mini.destacado { position: relative; overflow: hidden; }
.g-plan-card.destacado::after, .g-plan-mini.destacado::after {
  content: ""; position: absolute; top: 0; left: -60%; width: 50%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(212,240,40,.12), transparent);
  transform: skewX(-20deg); animation: card-brillo 4s ease-in-out infinite; pointer-events: none;
}
@keyframes card-brillo { 0%, 100% { left: -60%; } 50% { left: 130%; } }

/* Íconos de card: micro-animación al hover */
.g-plan-ico, .g-clase-card-ico, .g-rutina-card-ico {
  transition: transform .3s var(--ease);
}
.g-plan-card:hover .g-plan-ico, .g-clase-card:hover .g-clase-card-ico, .g-rutina-card:hover .g-rutina-card-ico {
  transform: scale(1.1) rotate(-4deg);
}

/* Banner activo/cta con glow sutil */
.g-banner-cta { box-shadow: 0 8px 28px rgba(212,240,40,.18); }

/* Fotos de coach: zoom sutil al hover */
.g-coach-card-foto img, .g-clase-mini-foto img, .g-rutina-card-foto img, .g-prod-foto img {
  transition: transform .5s var(--ease);
}
.g-coach-card:hover .g-coach-card-foto img, .g-rutina-card:hover .g-rutina-card-foto img, .g-prod-card:hover .g-prod-foto img {
  transform: scale(1.06);
}
.g-coach-card-foto, .g-rutina-card-foto, .g-prod-foto, .g-clase-mini-foto { overflow: hidden; }

/* Entrada suave de las cards al aparecer */
@keyframes card-aparece { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.g-vista.activa .g-seccion { animation: card-aparece .4s var(--ease) backwards; }
.g-vista.activa .g-seccion:nth-child(2) { animation-delay: .04s; }
.g-vista.activa .g-seccion:nth-child(3) { animation-delay: .08s; }
.g-vista.activa .g-seccion:nth-child(4) { animation-delay: .12s; }
.g-vista.activa .g-seccion:nth-child(5) { animation-delay: .16s; }

/* ═══════════ DESKTOP: marco teléfono ═══════════ */
@media (min-width: 600px) {
  body {
    display: flex; align-items: center; justify-content: center;
    min-height: 100vh; background: #05050a;
  }
  .app-gym {
    width: 390px; /* ancho iPhone 14 Pro */
    height: 844px; /* alto iPhone 14 Pro */
    max-height: 95vh;
    border-radius: 48px;
    overflow: hidden;
    box-shadow: 0 40px 120px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.07);
    position: relative;
    flex-shrink: 0;
  }
  /* Simular borde del teléfono */
  .app-gym::before {
    content: '';
    position: absolute; inset: 0; z-index: 9999;
    border-radius: 48px;
    box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.12);
    pointer-events: none;
  }
  .pantalla-gym { border-radius: 48px; }
  /* Los elementos fixed dentro del app deben ser absolute */
  .g-navbar,
  .g-fab-carrito,
  .g-toast,
  .g-sheet,
  .g-overlay,
  .g-confirmacion,
  .g-rutina-progreso { position: absolute; }
  .g-sheet { border-radius: 28px 28px 48px 48px; }
  .g-toast { bottom: 100px; left: 50%; transform: translateX(-50%); width: auto; }
}
/* ═══════════════════════════════════════════════
   UPGRADE VISUAL — Mobile-first premium
   ═══════════════════════════════════════════════ */

/* ── Subtítulo bienvenida ── */
.g-bienvenida-sub {
  font-size: 15.5px; color: rgba(244,244,248,.6); margin-top: 10px;
  line-height: 1.5; font-weight: 400;
  animation: bv-up .8s cubic-bezier(.16,1,.3,1) .25s both;
}

/* ── Nombre gym en header ── */
/* g-header-nombre movido a g-header-info h2 */

/* ── Cards de planes premium ── */
.g-plan-card-mini {
  flex: 0 0 200px; background: var(--panel);
  border: 1.5px solid var(--linea); border-radius: 18px;
  padding: 16px; position: relative; overflow: hidden;
  transition: border-color .2s, transform .15s;
}
.g-plan-card-mini:active { transform: scale(.97); }
.g-plan-card-mini.destacado {
  border-color: rgba(212,240,40,.35);
  background: linear-gradient(135deg, rgba(212,240,40,.06), rgba(212,240,40,.02));
}
.g-plan-card-mini.destacado::before {
  content: "POPULAR"; position: absolute; top: 10px; right: -6px;
  background: var(--marca); color: var(--marca-tinta);
  font-size: 9px; font-weight: 800; padding: 3px 12px;
  border-radius: 999px 0 0 999px; letter-spacing: .5px;
}
.g-plan-mini-ico {
  width: 40px; height: 40px; border-radius: 12px;
  background: rgba(212,240,40,.1); border: 1px solid rgba(212,240,40,.18);
  display: grid; place-items: center; margin-bottom: 12px; color: var(--marca);
}
.g-plan-mini-nombre {
  font-family: var(--font-display); font-size: 15px; font-weight: 700;
  margin-bottom: 4px;
}
.g-plan-mini-precio {
  font-family: var(--font-display); font-size: 24px; font-weight: 900;
  color: var(--marca); line-height: 1;
}
.g-plan-mini-dur {
  font-size: 12px; color: var(--texto-suave); margin-top: 4px;
}
.g-plan-mini-btn {
  display: block; width: 100%; margin-top: 14px; height: 38px;
  border-radius: 11px; border: none; cursor: pointer;
  font-family: var(--font); font-size: 13px; font-weight: 700;
  background: var(--marca); color: var(--marca-tinta);
  box-shadow: 0 3px 12px rgba(212,240,40,.3);
  transition: transform .12s;
}
.g-plan-mini-btn:active { transform: scale(.96); }

/* ── Cards de clases ── */
.g-clase-card {
  flex: 0 0 160px; border-radius: 18px; overflow: hidden;
  position: relative; min-height: 190px;
  background: var(--panel); border: 1px solid var(--linea);
  transition: transform .15s;
}
.g-clase-card:active { transform: scale(.97); }
.g-clase-card-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block; opacity: .6;
}
.g-clase-card::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.85) 0%, transparent 55%);
}
.g-clase-card-body {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 14px 12px; z-index: 2;
}
.g-clase-card-ico {
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--marca); color: var(--marca-tinta);
  display: grid; place-items: center; margin-bottom: 6px;
}
.g-clase-card-nom {
  font-family: var(--font-display); font-size: 14px; font-weight: 700;
  color: #fff; margin-bottom: 3px; line-height: 1.2;
}
.g-clase-card-dur {
  font-size: 11.5px; color: rgba(255,255,255,.6);
}

/* ── Sección de entrenadores ── */
.g-entrenador-card {
  flex: 0 0 145px; border-radius: 18px; overflow: hidden;
  background: var(--panel); border: 1px solid var(--linea);
  padding: 14px 12px; text-align: center;
  transition: transform .15s;
}
.g-entrenador-card:active { transform: scale(.97); }
.g-entrenador-av {
  width: 68px; height: 68px; border-radius: 50%;
  margin: 0 auto 10px; border: 2.5px solid rgba(212,240,40,.3);
  overflow: hidden; background: var(--panel-2); display: block;
  object-fit: cover;
}
.g-entrenador-av-placeholder {
  width: 68px; height: 68px; border-radius: 50%; margin: 0 auto 10px;
  background: rgba(212,240,40,.12); border: 2.5px solid rgba(212,240,40,.3);
  display: grid; place-items: center;
  font-family: var(--font-display); font-size: 26px; font-weight: 900; color: var(--marca);
}
.g-entrenador-nom {
  font-size: 13.5px; font-weight: 700; margin-bottom: 3px; line-height: 1.2;
}
.g-entrenador-esp {
  font-size: 11.5px; color: var(--texto-suave);
}

/* ── Banner suscripción ── */
.g-banner-suscripcion {
  margin: 0 20px 20px; border-radius: 18px; padding: 16px 18px;
  background: linear-gradient(110deg, rgba(212,240,40,.12), rgba(212,240,40,.05));
  border: 1px solid rgba(212,240,40,.22);
  display: flex; align-items: center; gap: 14px;
}
.g-banner-sus-ico {
  width: 44px; height: 44px; border-radius: 13px;
  background: var(--marca); color: var(--marca-tinta);
  display: grid; place-items: center; flex-shrink: 0;
}
.g-banner-sus-txt strong { font-family: var(--font-display); font-size: 14px; font-weight: 800; display: block; margin-bottom: 2px; }
.g-banner-sus-txt span { font-size: 12.5px; color: var(--texto-suave); }
.g-banner-sus-btn {
  margin-left: auto; flex-shrink: 0; padding: 9px 16px;
  border-radius: 11px; border: none; background: var(--marca);
  color: var(--marca-tinta); font-size: 13px; font-weight: 700;
  cursor: pointer; white-space: nowrap;
}

/* ── Scroll horizontal mejorado ── */
.g-scroll-h {
  display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none;
  margin: 0 -20px; padding: 4px 20px 8px;
}
.g-scroll-h::-webkit-scrollbar { display: none; }

/* ── Stats del gym (razones) ── */
.g-razones-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  padding: 0 20px;
}
.g-razon-card {
  background: var(--panel); border: 1px solid var(--linea);
  border-radius: 16px; padding: 16px 13px; text-align: center;
}
.g-razon-ico {
  width: 40px; height: 40px; border-radius: 12px;
  background: rgba(212,240,40,.1); border: 1px solid rgba(212,240,40,.18);
  color: var(--marca); display: grid; place-items: center; margin: 0 auto 10px;
}
.g-razon-titulo { font-size: 13px; font-weight: 700; margin-bottom: 3px; }
.g-razon-texto { font-size: 12px; color: var(--texto-suave); line-height: 1.4; }

/* ── Footer premium ── */
.g-footer {
  padding: 28px 20px 40px; text-align: center;
  background: var(--panel); border-top: 1px solid var(--linea);
  border-radius: 24px 24px 0 0; margin-top: 8px;
}
.g-footer-nombre {
  font-family: var(--font-display); font-size: 20px; font-weight: 900;
  letter-spacing: -.3px; margin-bottom: 6px;
}
.g-footer-desc {
  font-size: 13.5px; color: var(--texto-suave); line-height: 1.55;
  margin-bottom: 14px; max-width: 300px; margin-left: auto; margin-right: auto;
}
.g-footer-linea {
  display: flex; align-items: center; justify-content: center;
  gap: 7px; font-size: 13.5px; color: var(--texto-suave); margin-bottom: 7px;
}
.g-footer-linea svg { color: var(--marca); flex-shrink: 0; }
.g-footer-redes {
  display: flex; justify-content: center; gap: 10px;
  flex-wrap: wrap; margin: 18px 0;
}
.g-footer-red {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 16px; border-radius: 12px;
  font-size: 13px; font-weight: 700; text-decoration: none;
  transition: transform .15s, opacity .15s;
  border: 1.5px solid transparent;
}
.g-footer-red:active { transform: scale(.95); opacity: .8; }
.g-footer-red-wa  { background: rgba(37,211,102,.12);  color: #25D366; border-color: rgba(37,211,102,.25); }
.g-footer-red-ig  { background: rgba(225,48,108,.1);   color: #e1306c; border-color: rgba(225,48,108,.22); }
.g-footer-red-fb  { background: rgba(24,119,242,.1);   color: #1877f2; border-color: rgba(24,119,242,.22); }
.g-footer-red-tk  { background: rgba(255,255,255,.07); color: var(--texto); border-color: var(--linea); }
.g-footer-red-yt  { background: rgba(255,0,0,.1);      color: #ff4444; border-color: rgba(255,0,0,.2); }
.g-footer-sep { height: 1px; background: var(--linea); margin: 16px 0; }
.g-footer-credito { font-size: 12px; color: var(--texto-suave); opacity: .55; line-height: 1.7; }
.g-footer-credito a { color: var(--marca); font-weight: 700; opacity: 1; }

/* ── Header texto (nombre + estado) ── */
.g-header-texto {
  min-width: 0; flex: 1; display: flex; flex-direction: column; justify-content: center;
}
.g-header-texto h2 {
  font-family: var(--font-display); font-size: 15px; font-weight: 800;
  letter-spacing: -.3px; line-height: 1.2; margin: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ════════════════════════════════════════════════════
   ANIMACIONES Y TRANSICIONES — Secciones del index
   ════════════════════════════════════════════════════ */

/* ── Transición pantalla bienvenida → app ── */
.pantalla-gym {
  transition: opacity .45s cubic-bezier(.4,0,.2,1),
              transform .45s cubic-bezier(.4,0,.2,1),
              visibility .45s;
}
#pantallaBienvenida {
  transform-origin: center center;
}
#pantallaBienvenida:not(.activa) {
  transform: scale(.94); opacity: 0;
}
#pantallaApp.activa {
  animation: app-entra .45s cubic-bezier(.16,1,.3,1) both;
}
@keyframes app-entra {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Vistas del app (tabs) con fade ── */
.g-vista { transition: opacity .25s ease, transform .25s ease; }
.g-vista:not(.activa) { opacity: 0; pointer-events: none; transform: translateY(6px); }
.g-vista.activa { opacity: 1; transform: translateY(0); }

/* ── Navbar con efecto al seleccionar ── */
.g-nav-btn {
  transition: color .18s, background .18s, transform .12s;
}
.g-nav-btn:active { transform: scale(.88); }
.g-nav-btn.activo svg {
  filter: drop-shadow(0 0 6px var(--marca));
}

/* ── Cards scroll horizontal ── */
.g-scroll-h > * {
  transition: transform .15s, box-shadow .15s;
}
.g-scroll-h > *:active {
  transform: scale(.96);
}

/* ── Sheets con entrada suave ── */
.g-sheet {
  transition: transform .38s cubic-bezier(.16,1,.3,1);
}

/* ── Confirmación (overlay) ── */
.g-confirmacion {
  transition: opacity .25s ease, visibility .25s;
}
.g-confirmacion-card {
  transition: transform .35s cubic-bezier(.16,1,.3,1);
}
.g-confirmacion:not(.activa) .g-confirmacion-card {
  transform: scale(.88) translateY(16px);
}

/* ── Overlay y cierre ── */
.g-overlay {
  transition: opacity .28s ease, visibility .28s;
}

/* ── Botón perfil del header ── */
.g-header-perfil {
  transition: transform .15s, background .15s;
}
.g-header-perfil:active { transform: scale(.88); }

/* ── Botón ver más ── */
.g-ver-mas { transition: background .15s, transform .1s; }
.g-ver-mas:active { transform: scale(.93); }

/* ── Toast ── */
.g-toast {
  transition: opacity .25s ease, transform .25s cubic-bezier(.16,1,.3,1);
}

/* ═══════════════════════════════════════════════════════════
   QR DE ACCESO — Perfil del cliente
   ═══════════════════════════════════════════════════════════ */
.g-qr-acceso {
  margin: 0 20px 20px;
  background: var(--panel);
  border: 1.5px solid rgba(212,240,40,.2);
  border-radius: 22px;
  overflow: hidden;
}
.g-qr-acceso-hd {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--linea);
}
.g-qr-acceso-ico {
  width: 40px; height: 40px; border-radius: 12px;
  background: rgba(212,240,40,.1); border: 1px solid rgba(212,240,40,.2);
  color: var(--marca); display: grid; place-items: center; flex-shrink: 0;
}
.g-qr-acceso-hd > div:nth-child(2) { flex: 1; min-width: 0; }
.g-qr-acceso-hd strong { display: block; font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.g-qr-acceso-hd span { font-size: 12px; color: var(--texto-suave); }
.g-qr-estado-dot {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
}
.g-qr-estado-dot.activo {
  background: #4ade80;
  box-shadow: 0 0 0 3px rgba(74,222,128,.2);
  animation: g-pulso 2s ease-in-out infinite;
}
.g-qr-estado-dot.inactivo { background: #f87171; }

/* Imagen del QR */
.g-qr-img-wrap {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  padding: 18px; background: #fff;
}
.g-qr-img-wrap.inactivo { filter: blur(6px); }
.g-qr-img {
  width: 200px; height: 200px; display: block;
  border-radius: 8px;
}
.g-qr-bloqueado {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; background: rgba(0,0,0,.55); color: #fff;
  font-size: 14px; font-weight: 700;
  backdrop-filter: blur(2px);
}
.g-qr-instruccion {
  display: flex; align-items: center; gap: 6px; justify-content: center;
  font-size: 12.5px; color: var(--texto-suave); padding: 10px 16px;
  border-top: 1px solid var(--linea);
}
.g-qr-regen {
  display: flex; align-items: center; gap: 6px; justify-content: center;
  width: 100%; padding: 11px;
  border: none; border-top: 1px solid var(--linea);
  background: transparent; color: var(--texto-suave);
  font-size: 12.5px; font-weight: 600; cursor: pointer; font-family: inherit;
}
.g-qr-regen:active { background: var(--panel-2,rgba(255,255,255,.04)); }

/* ── Botones de acción en perfil ── */
.g-perfil-acciones {
  display: flex; flex-direction: column; gap: 8px;
  margin-top: 20px; padding: 0 20px 20px;
}
.g-perfil-accion {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 15px 18px;
  background: var(--panel-2, rgba(255,255,255,.04));
  border: 1.5px solid var(--linea);
  border-radius: 14px; color: var(--texto);
  font-size: 15px; font-weight: 600; cursor: pointer;
  font-family: var(--font); text-align: left;
  transition: background .15s, border-color .15s;
  -webkit-tap-highlight-color: transparent;
}
.g-perfil-accion svg { flex-shrink: 0; opacity: .7; }
.g-perfil-accion:hover, .g-perfil-accion:active { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.15); }
.g-perfil-accion.peligro { color: #f87171; border-color: rgba(248,113,113,.25); }
.g-perfil-accion.peligro svg { opacity: 1; }

/* ── Botón ver todos los planes ── */
.g-btn-ver-todos {
  width: 100%; padding: 13px;
  background: transparent;
  border: 1.5px dashed var(--linea);
  border-radius: 14px;
  color: var(--texto-suave, rgba(244,244,248,.5));
  font-size: 14px; font-weight: 600;
  cursor: pointer; font-family: var(--font);
  margin-top: 4px; transition: border-color .15s, color .15s;
}
.g-btn-ver-todos:hover { border-color: var(--marca); color: var(--marca); }

/* ── Perfil scroll ── */
.g-perfil-scroll {
  flex: 1; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}