/* =========================================
   1. VARIABLES & TEMAS (El corazón del sistema)
   ========================================= */
:root {
  /* Valores Base (Se sobrescriben con las clases de paleta) */
  --bg: #0f1115;
  --surface: rgba(255, 255, 255, 0.05);
  --surface-hover: rgba(255, 255, 255, 0.1);
  --border: rgba(255, 255, 255, 0.1);
  --primary: #3b82f6;
  --secondary: #8b5cf6;
  --text-main: #ffffff;
  --text-muted: #9ca3af;
  --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  
  /* Gradiente principal */
  --gradient: linear-gradient(135deg, var(--primary), var(--secondary));
  
  /* Layout */
  --max-width: 1200px;
  --header-height: 70px;
  --radius: 16px;
}

/* --- TEMA A: MODERNO (Gym, Tech, Startups) --- */
.palette-modern {
  --bg: #0b0d10;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-hover: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.08);
  --primary: #0197F6; /* Tu azul corporativo */
  --secondary: #7c5cff;
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
}

/* --- TEMA B: ELEGANTE (Cafetería Premium, Vinos, Abogados) --- */
.palette-elegant {
  --bg: #12100e; /* Marrón muy oscuro / Negro cálido */
  --surface: rgba(255, 255, 255, 0.03);
  --border: rgba(255, 255, 255, 0.1);
  --primary: #d4af37; /* Dorado */
  --secondary: #c5a028;
  --text-main: #fefcf5;
  --text-muted: #a8a29e;
  --gradient: linear-gradient(to right, #d4af37, #f3d87e);
}

/* --- TEMA C: LUMINOSO (Médico, Nutrición, Spa) --- */
.palette-light {
  --bg: #f8fafc; /* Blanco azulado muy sutil */
  --surface: #ffffff;
  --surface-hover: #f1f5f9;
  --border: rgba(0, 0, 0, 0.06);
  --primary: #0ea5e9; /* Cyan limpio */
  --secondary: #14b8a6; /* Teal / Verde Salud */
  --text-main: #0f172a; /* Azul muy oscuro (casi negro) */
  --text-muted: #64748b;
  --shadow: 0 10px 25px -5px rgba(148, 163, 184, 0.15); /* Sombra suave */
}

/* =========================================
   2. RESET & BASE
   ========================================= */
* { box-sizing: border-box; margin: 0; padding: 0; }

.demo-main {
  transition: opacity 220ms ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg);
  color: var(--text-main);
  line-height: 1.6;
  transition: background-color 0.5s ease, color 0.5s ease;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  line-height: 1.1;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* =========================================
   3. BARRA DE CONTROL (TOPBAR)
   ========================================= */
.demo-topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  background: rgba(15, 23, 42, 0.8); /* Fallback */
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.3s ease;
}

/* Ajuste específico para modo claro en el header */
.palette-light .demo-topbar {
  background: rgba(255, 255, 255, 0.85);
}

.demo-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
}

.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Marca */
.demo-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 1.5rem;
  border: 2px solid var(--border); /* Borde sutil para encuadrar */
  border-radius: 8px;
  padding: 2px 8px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-title { font-weight: 600; font-size: 0.95rem; }
.brand-subtitle { font-size: 0.75rem; color: var(--text-muted); }

/* Controles */
.demo-controls {
  display: flex;
  align-items: center;
  gap: 15px;
}

.control-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.control-btn:hover { background: var(--surface-hover); transform: translateY(-1px); }

.control-divider {
  width: 1px;
  height: 24px;
  background: var(--border);
}

.control-group {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
}

.select-wrapper {
  position: relative;
}

select {
  appearance: none;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 8px 32px 8px 12px;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}

select:hover { border-color: var(--primary); }

/* Flecha custom para el select (truco CSS) */
.select-wrapper::after {
  content: '▼';
  font-size: 0.7rem;
  color: var(--text-muted);
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

/* --- CORRECCIÓN CRÍTICA PARA DROPDOWNS --- */
/* Forzamos que las opciones tengan el mismo fondo que el tema */
select option {
    background-color: var(--bg); 
    color: var(--text-main);
}

/* En caso de que algún navegador rebelde siga poniendo fondo blanco */
.palette-modern select option,
.palette-elegant select option {
    background-color: #1a1a1a; /* Un gris oscuro fijo de seguridad */
    color: #ffffff;
}

/* =========================================
   4. HERO SECTION & MOCKUP
   ========================================= */
.hero-section {
  padding: 4rem 0;
  min-height: calc(100vh - 70px);
  display: flex;
  align-items: center;
  position: relative;
}

/* Fondo decorativo sutil detrás del hero */
.hero-section::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: var(--primary);
  opacity: 0.08;
  filter: blur(80px);
  border-radius: 50%;
  z-index: -1;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.demo-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(1, 151, 246, 0.1);
  color: var(--primary);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(1, 151, 246, 0.2);
}

.hero-content h1 {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-lead {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 500px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.disclaimer-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  opacity: 0.6;
}

/* Browser Mockup (La pieza visual clave) */
.browser-mockup {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
  transform: perspective(1000px) rotateY(-5deg) rotateX(2deg); /* Efecto 3D */
  transition: transform 0.5s ease;
}

.hero-visual:hover .browser-mockup {
  transform: perspective(1000px) rotateY(0) rotateX(0); /* Vuelve al plano al hover */
}

.browser-header {
  background: var(--surface);
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--border);
}

.dots {
  display: flex;
  gap: 6px;
}

.dots::before, .dots::after { content: ''; width: 10px; height: 10px; border-radius: 50%; }
.dots { width: 10px; height: 10px; border-radius: 50%; background: #f59e0b; box-shadow: -16px 0 #ef4444, 16px 0 #10b981; }

.url-bar {
  background: var(--bg);
  color: var(--text-muted);
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.75rem;
  flex: 1;
  text-align: center;
  opacity: 0.7;
}

.browser-body {
  padding: 20px;
  min-height: 300px;
  position: relative;
}

/* Skeleton Loading Effect */
.skeleton-layout { display: flex; flex-direction: column; gap: 15px; }
.sk-header { width: 70%; height: 30px; border-radius: 8px; background: var(--surface); }
.sk-grid { display: flex; gap: 10px; margin-top: 20px; }
.sk-card { flex: 1; height: 120px; border-radius: 8px; background: var(--surface); }

/* Animación shimmer */
.sk-header, .sk-card {
  position: relative;
  overflow: hidden;
}
.sk-header::after, .sk-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(90deg, transparent, var(--surface-hover), transparent);
  transform: translateX(-100%);
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  100% { transform: translateX(100%); }
}

.interactive-hint {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: var(--primary);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* =========================================================
   MOCKUP LOADING "PREMIUM" (NO PARECE "ESPERA INFINITA")
   - Reduce intensidad del shimmer
   - Agrega "acabado" visual (grain + overlay)
   - Anima MUY sutil para que sea decoración
   ========================================================= */

/* 1) Suaviza el skeleton para que no grite "loading" */
.skeleton-layout {
  opacity: 0.55;                 /* antes se siente como "en proceso"; esto lo vuelve decorativo */
  filter: saturate(0.9);
}

/* 2) Reduce el contraste de las piezas */
.sk-header,
.sk-card {
  background: rgba(255, 255, 255, 0.035);  /* en lugar de var(--surface) para no verse "placeholder duro" */
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* 3) Shimmer más lento + más tenue (clave para que no parezca "cargando") */
.sk-header::after,
.sk-card::after {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.07),
    transparent
  );
  animation: shimmerSoft 2.6s ease-in-out infinite; /* más lento que 1.5s */
  opacity: 0.7; /* baja el impacto */
}

@keyframes shimmerSoft {
  0%   { transform: translateX(-120%); }
  100% { transform: translateX(120%); }
}

/* 4) Un overlay tipo "pantalla" para que parezca UI real, no loader */
.browser-body::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,0.06), transparent 55%),
    radial-gradient(circle at 70% 80%, rgba(255,255,255,0.04), transparent 60%);
  pointer-events: none;
  opacity: 0.35;
}

/* 5) Un poquito de “grain” (ruido) muy leve = premium */
.browser-body::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='260' height='260' filter='url(%23n)' opacity='.22'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
  opacity: 0.06;
  pointer-events: none;
}

/* 6) Hint: que no compita con el skeleton (más elegante) */
.interactive-hint {
  opacity: 0.92;
  transform: translateY(0);
  animation: hintFloat 2.8s ease-in-out infinite;
}

@keyframes hintFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}

/* 7) Accesibilidad: reduce motion */
@media (prefers-reduced-motion: reduce) {
  .sk-header::after,
  .sk-card::after,
  .interactive-hint {
    animation: none !important;
  }
}

/* =========================================================
   PREPARADO PARA EL SIGUIENTE PASO (cuando metas "preview real")
   - Con 1 clase puedes apagar skeleton y mostrar otro contenido
   ========================================================= */

/* Cuando quieras: agrega class="mockup-ready" a .browser-mockup (o al body) */
.mockup-ready .skeleton-layout {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 420ms ease, transform 420ms ease;
  pointer-events: none;
}

.mockup-ready .interactive-hint {
  opacity: 1;
  transition: opacity 420ms ease;
}

/* =========================================================
   MOCKUP PREVIEW (UI ESTÁTICA) - reemplazo visual del loop
   ========================================================= */

/* Preview oculto por defecto */
.mockup-preview{
  position: absolute;
  inset: 20px;               /* respeta padding visual */
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 450ms ease, transform 450ms ease;
  pointer-events: none;
}

/* Skeleton visible por defecto */
.skeleton-layout{
  opacity: 1;
  transition: opacity 350ms ease;
}

/* Cuando el mockup está listo */
.browser-mockup.mockup-ready .skeleton-layout{
  opacity: 0;
}

/* Cuando el mockup está listo: aparece preview */
.browser-mockup.mockup-ready .mockup-preview{
  opacity: 1;
  transform: translateY(0);
}

/* Asegura que browser-body sea el "contenedor" absoluto */
.browser-body{
  position: relative;
}
   
.browser-body {
  position: relative; /* por si no lo tenías */
}

.preview-hero{
  height: 100%;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}

.preview-pill{
  display: inline-flex;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  background: rgba(1,151,246,0.15);
  border: 1px solid rgba(1,151,246,0.25);
}

.preview-title{
  font-weight: 800;
  font-size: 18px;
}

.preview-sub{
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.4;
}

.preview-buttons{
  margin-top: 10px;
  display: flex;
  gap: 10px;
}

.preview-btn{
  width: 90px;
  height: 30px;
  border-radius: 999px;
  background: var(--gradient);
  opacity: 0.9;
}

.preview-btn.outline{
  background: transparent;
  border: 1px solid var(--border);
}

/* Contenedor del preview */
.mockup-preview {
  position: absolute;
  inset: 18px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background:
    radial-gradient(circle at 20% 0%, rgba(255,255,255,0.06), transparent 45%),
    radial-gradient(circle at 90% 80%, rgba(255,255,255,0.05), transparent 45%),
    rgba(255,255,255,0.02);
  box-shadow: 0 14px 30px rgba(0,0,0,0.25);
  overflow: hidden;
  padding: 16px;
  opacity: 1;
}

/* Topbar mini */
.pv-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  opacity: 0.9;
}

.pv-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: white;
  background: rgba(1,151,246,0.22);
  border: 1px solid rgba(1,151,246,0.25);
}

.pv-mini {
  font-size: 11px;
  color: var(--text-muted);
}

/* “Hero” */
.pv-hero { margin-bottom: 14px; }

.pv-title,
.pv-sub,
.pv-btn,
.pv-tile {
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.06);
}

.pv-title {
  height: 22px;
  width: 78%;
  margin-bottom: 10px;
  background: rgba(255,255,255,0.08);
}

.pv-sub {
  height: 10px;
  width: 92%;
  margin-bottom: 8px;
}

.pv-sub--short {
  width: 60%;
  margin-bottom: 14px;
}

/* Botones */
.pv-actions {
  display: flex;
  gap: 10px;
}

.pv-btn {
  height: 28px;
  width: 110px;
}

.pv-btn--primary {
  background: rgba(1,151,246,0.28);
  border: 1px solid rgba(1,151,246,0.25);
}

/* Grid de “cards” */
.pv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.pv-tile {
  height: 64px;
}

.pv-tile--wide {
  grid-column: 1 / -1;
  height: 56px;
}

/* Que convivan skeleton + preview sin estorbarse */
.skeleton-layout {
    opacity: 1;
    transition: opacity 300ms ease-out, transform 300ms ease-out;
    /* Aseguramos que ocupe espacio físico para dar altura al contenedor */
    position: relative; 
    z-index: 1;
}

.mockup-preview {
    position: absolute;
    inset: 18px; /* Mismo margen que tenías */
    z-index: 2;  /* Siempre encima del skeleton */
    
    opacity: 0;
    transform: translateY(10px); /* Entra desde abajo un poco */
    
    /* TRUCO CLAVE: Delay en la entrada. 
       Espera 100ms antes de empezar a aparecer para no chocar. */
    transition: opacity 400ms ease-out 100ms, transform 400ms ease-out 100ms;
    
    /* IMPORTANTE: Fondo base sólido para tapar el skeleton */
    background-color: var(--surface); 
    /* Luego tus gradientes decorativos encima */
    background-image: 
        radial-gradient(circle at 20% 0%, rgba(255,255,255,0.06), transparent 45%),
        radial-gradient(circle at 90% 80%, rgba(255,255,255,0.05), transparent 45%);
    
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
    padding: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

/* Si luego activas mockup-ready, el skeleton se oculta y el preview queda */
.mockup-ready .skeleton-layout {
    opacity: 0;
    transform: scale(0.98); /* Un pequeño zoom out sutil al irse */
    pointer-events: none;
}

.mockup-ready .mockup-preview {
    opacity: 1;
    transform: translateY(0);
}

/* Modo claro: ajustar el preview para que no se vea “gris sucio” */
.palette-light .mockup-preview {
    background-color: #ffffff; /* Fondo blanco sólido tapa todo */
    background-image: radial-gradient(circle at 50% 0%, rgba(0,0,0,0.03), transparent 50%);
    border-color: rgba(0,0,0,0.08);
}

.palette-light .pv-title,
.palette-light .pv-sub,
.palette-light .pv-btn,
.palette-light .pv-tile {
  background: rgba(0,0,0,0.05);
  border: 1px solid rgba(0,0,0,0.06);
}

.palette-light .pv-mini {
  color: var(--text-muted);
}

/* =========================================
   5. BOTONES
   ========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: 50px;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--gradient);
  color: white;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.btn-primary:hover { transform: translateY(-2px); filter: brightness(1.1); }

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-main);
}
.btn-outline:hover { background: var(--surface); border-color: var(--text-main); }

.btn-white {
    background: white;
    color: black;
    font-weight: 700;
}

/* =========================================
   6. SECCIONES (Info, Catalog, etc)
   ========================================= */
.demo-section { padding: 5rem 0; border-bottom: 1px solid var(--border); }
.section-header { text-align: center; margin-bottom: 3rem; max-width: 600px; margin-left: auto; margin-right: auto; }
.section-header h2 { font-size: 2.2rem; margin-bottom: 1rem; }
.section-header p { color: var(--text-muted); }

/* Info Grid */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 24px;
  border-radius: var(--radius);
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: transform 0.3s ease;
}
.info-card:hover { transform: translateY(-5px); background: var(--surface-hover); }

.card-icon {
  width: 40px; height: 40px;
  background: rgba(1, 151, 246, 0.1);
  color: var(--primary);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* Catalog / Showcase */
.catalog-layout {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  align-items: start;
}

.catalog-info .tag-label {
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 1rem;
}

.decoration-line {
    width: 60px;
    height: 4px;
    background: var(--primary);
    margin-top: 2rem;
    border-radius: 2px;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.3s;
}
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }

.product-img-placeholder {
  height: 140px;
  background: var(--surface-hover);
  overflow: hidden;

  display: flex;
  align-items: center;
  justify-content: center;
}

.product-img-placeholder i{
  font-size: 2.6rem;
  color: var(--text-muted);
  opacity: .65;
}

/* el <img> que inyectas */
.product-img-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1);
  transition: transform 0.3s ease;
}

.product-card:hover .product-img-placeholder img {
  transform: scale(1.05);
}


.product-body { padding: 16px; }
.product-body h3 { font-size: 1.1rem; margin-bottom: 4px; }
.price-tag { color: var(--primary); font-weight: 600; font-size: 0.9rem; }

/* Brand Panel */
.brand-panel {
  background: var(--gradient);
  border-radius: 24px;
  padding: 4rem 2rem;
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
}

/* Patrón de fondo opcional para el brand panel */
.brand-panel::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: radial-gradient(circle at 20% 50%, rgba(255,255,255,0.1) 0%, transparent 50%);
    pointer-events: none;
}

.panel-content { position: relative; z-index: 1; max-width: 600px; margin: 0 auto; }
.panel-badge { 
    background: rgba(255,255,255,0.2); 
    padding: 4px 12px; 
    border-radius: 20px; 
    font-size: 0.8rem; 
    text-transform: uppercase; 
    letter-spacing: 1px;
}
.brand-panel h2 { font-size: 2.5rem; margin: 1.5rem 0 1rem; }
.brand-panel p { margin-bottom: 2rem; opacity: 0.9; font-size: 1.1rem; }

/* Testimonials */
.testimonials-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}
.quote-card {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 2rem;
    border-radius: var(--radius);
    position: relative;
}
.quote-icon {
    font-size: 1.5rem;
    color: var(--primary);
    opacity: 0.3;
    margin-bottom: 1rem;
}
.quote-card p { font-style: italic; font-size: 1.1rem; margin-bottom: 1rem; }
.quote-author { font-weight: 700; color: var(--text-muted); font-size: 0.9rem; text-align: right; }

/* CTA Final */
.cta-final { text-align: center; border-bottom: none; }
.cta-box {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 4rem 2rem;
    border-radius: 24px;
    max-width: 800px;
    margin: 0 auto;
}
.cta-icon-wrapper {
    width: 60px; height: 60px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin: 0 auto 1.5rem;
}
.cta-buttons { display: flex; justify-content: center; gap: 1rem; margin-top: 2rem; flex-wrap: wrap; }

/* Footer */
.demo-footer {
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
}
.tiny { font-size: 0.75rem; opacity: 0.5; margin-top: 0.5rem; }

/* =========================================
   7. ANIMACIONES (Scroll Reveal) - FIX REAL
   - Evita transition: all
   - Evita que transform se pise entre clases
   - Define fade-up (la usas en HTML)
   - Mantiene animación en PC y Mobile
   ========================================= */

/* Base: escondidos antes de revelarse */
.reveal,
.stagger {
  opacity: 0;
  transform: translate3d(0, 24px, 0);
  transition-property: opacity, transform;
  transition-duration: 700ms;
  transition-timing-function: cubic-bezier(0.5, 0, 0, 1);
  will-change: opacity, transform;
}

/* Visible */
.reveal.is-visible,
.stagger.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* Variantes (sin pisarse) */
.fade-up {
  transform: translate3d(0, 24px, 0);
}

.fade-left {
  transform: translate3d(-28px, 0, 0);
}

.fade-right {
  transform: translate3d(28px, 0, 0);
}

.zoom-in {
  transform: scale(0.96);
}

/* Cuando ya son visibles, vuelven a neutral */
.reveal.is-visible.fade-up,
.reveal.is-visible.fade-left,
.reveal.is-visible.fade-right {
  transform: translate3d(0, 0, 0);
}

.reveal.is-visible.zoom-in {
  transform: scale(1);
}

/* Stagger más rápido (se siente “vivo”) */
.stagger {
  transition-duration: 480ms;
  transition-timing-function: ease;
}

.pulse-animation {
  animation: pulseHint 1.6s ease-in-out infinite;
}

@keyframes pulseHint {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

/* Accesibilidad */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .stagger {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* =========================================
   8. RESPONSIVE
   ========================================= */
@media (max-width: 768px) {
  .hero-grid, .catalog-layout, .testimonials-grid { grid-template-columns: 1fr; gap: 2rem; }
  
  .hero-content { order: 1; text-align: center; }
  .hero-visual { order: 2; margin-bottom: 2rem; }
  
  .hero-actions { justify-content: center; }
  .demo-badge { margin: 0 auto 1.5rem; }
  .browser-mockup { transform: none; } /* Quitar 3D en móvil para rendimiento */
  
  .hide-mobile { display: none; }
  .demo-controls { gap: 8px; }
  .brand-text { display: none; } /* Ahorrar espacio en header */
  
  .catalog-info { text-align: center; }
  .decoration-line { margin: 2rem auto; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .stagger {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* =========================================
   8. RESPONSIVE FIX (MOBILE POLISH)
   ========================================= */
@media (max-width: 768px) {

    /* --- 1. TOPBAR REORGANIZADA --- */
    .demo-topbar {
        height: auto; /* Dejar que la altura se adapte al contenido */
        padding: 12px 0;
    }

    .topbar-inner {
        flex-wrap: wrap; /* Permite que los elementos bajen de línea */
        gap: 12px;
    }

    /* Fila 1: Logo a la izquierda, Botón Tour a la derecha */
    .demo-brand {
        flex: 1; /* Empuja el botón a la derecha */
    }

    #btnReplayTour {
        margin-left: auto; /* Asegura posición derecha */
    }
    
    /* Fila 2: Los controles bajan y ocupan todo el ancho */
    .demo-controls {
        width: 100%;
        order: 3; /* Fuerza visualmente que vaya al final */
        justify-content: space-between;
        gap: 10px;
        padding-top: 10px;
        border-top: 1px solid var(--border); /* Línea separadora sutil */
    }

    .control-divider { display: none; } /* Ocultamos la línea vertical divisoria */

    /* Hacemos que los Selects compartan el espacio 50% / 50% */
    .control-group {
        flex: 1; 
        min-width: 0; /* Evita que el flexbox se rompa con textos largos */
    }

    .control-group label { display: none; } /* Ocultamos iconos de label para ganar espacio */

    .select-wrapper, select {
        width: 100%;
    }

    select {
        padding: 8px 12px;
        font-size: 0.85rem;
        height: 40px; /* Altura táctil cómoda */
    }


    /* --- 2. HERO SECTION --- */
    .hero-section {
        padding-top: 1rem;
        text-align: center; /* Todo centrado se ve mejor en móvil */
    }

    .hero-content h1 {
        font-size: 2.2rem; /* Reducimos un poco el título gigante */
        margin-bottom: 1rem;
    }

    .hero-lead {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .hero-actions {
        justify-content: center; /* Botones centrados */
        flex-direction: column;  /* Botones uno debajo del otro para más fácil clic */
        gap: 10px;
        width: 100%;
    }

    .hero-actions .btn {
        width: 100%; /* Botones de ancho completo */
    }

    /* --- 3. MOCKUP (El navegador falso) --- */
    .browser-mockup {
        margin-top: 2rem;
        /* Un pequeño truco para que parezca que ocupa más pantalla */
        margin-left: -10px;
        margin-right: -10px;
        border-radius: 8px;
    }

    .url-bar {
        font-size: 0.7rem; /* URL más pequeña para que no se corte */
    }

    /* --- 4. AJUSTES GENERALES --- */
    .info-grid, .catalog-grid, .testimonials-grid {
        gap: 1rem; /* Menos espacio entre tarjetas */
    }
    
    /* Catálogo en móvil: 1 columna o 2 pequeñas */
    .catalog-grid {
        grid-template-columns: 1fr; /* Una columna para que las fotos se vean bien */
    }
}