/* ==========================================================================
   APPBLOCKS - CSS ESTÁTICO DE ALTO RENDIMIENTO (ETAPA 6)
   Apps para problemas reales • Blanco Puro Tecnológico • Azul Primario
   0 CDNs • Carga instantánea < 50ms • Totalmente Accesible
   ========================================================================== */

:root {
  /* Fondo Base Blanco y Superficies Neutras */
  --bg-base: #ffffff;
  --bg-page: #ffffff;
  --bg-surface: #ffffff;
  --bg-surface-subtle: #f8fafc;
  --bg-surface-alt: #f1f5f9;
  --bg-tech-dark: #0f172a;
  
  /* Bordes Limpios */
  --border-subtle: #e2e8f0;
  --border-medium: #cbd5e1;
  --border-focus: #2563eb;
  --border-tech: rgba(37, 99, 235, 0.3);
  
  /* Tipografía de Alto Contraste */
  --text-primary: #0f172a;
  --text-body: #334155;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;
  --text-inverse: #ffffff;
  
  /* Color Principal de Interacción: AZUL APPBLOCKS */
  --brand-blue: #2563eb;
  --brand-blue-hover: #1d4ed8;
  --brand-blue-soft: #eff6ff;
  --brand-blue-border: #bfdbfe;
  
  /* Acentos Moderados de Marca (Bloques 3D) */
  --accent-green: #10b981;
  --accent-green-soft: #ecfdf5;
  --accent-green-border: #a7f3d0;
  
  --accent-yellow: #f59e0b;
  --accent-yellow-soft: #fffbeb;
  --accent-yellow-border: #fde68a;
  
  --accent-red: #f43f5e;
  --accent-red-soft: #fff1f2;
  --accent-red-border: #fecdd3;
  
  --accent-purple: #8b5cf6;
  --accent-purple-soft: #f5f3ff;
  --accent-purple-border: #ddd6fe;

  --accent-cyan: #06b6d4;
  --accent-cyan-soft: #ecfeff;
  --accent-cyan-border: #a5f3fc;
  
  /* Sombras Suaves y Matemáticas */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 2px 4px 0 rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 8px -1px rgba(15, 23, 42, 0.07), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 24px -4px rgba(15, 23, 42, 0.08), 0 4px 8px -2px rgba(15, 23, 42, 0.04);
  --shadow-blue: 0 10px 25px -4px rgba(37, 99, 235, 0.22);

  /* Radios de Curvatura Matemáticos */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-2xl: 28px;
  --radius-full: 9999px;
  
  /* Fuentes */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Reset y Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  background-color: var(--bg-page);
  color: var(--text-body);
  font-family: var(--font-sans);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-image: radial-gradient(#e2e8f0 1px, transparent 1px);
  background-size: 28px 28px;
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
}

/* Tipografía */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.025em;
  word-break: break-word;
  overflow-wrap: break-word;
}

h1 { font-size: 2rem; font-weight: 900; letter-spacing: -0.035em; }
h2 { font-size: 1.5rem; font-weight: 800; }
h3 { font-size: 1.25rem; font-weight: 700; }
h4 { font-size: 1.05rem; font-weight: 700; }

@media (min-width: 640px) {
  h1 { font-size: 2.5rem; }
  h2 { font-size: 1.85rem; }
}

@media (min-width: 768px) {
  h1 { font-size: 3.25rem; }
  h2 { font-size: 2.15rem; }
}

p {
  color: var(--text-body);
  word-break: break-word;
  overflow-wrap: break-word;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.2s ease;
}

/* Contenedores y Layout */
.container {
  width: 100%;
  max-width: 76rem; /* 1216px */
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
  box-sizing: border-box;
}

.container-narrow {
  width: 100%;
  max-width: 52rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
  box-sizing: border-box;
}

@media (min-width: 640px) {
  .container, .container-narrow {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

/* Espaciado Generoso */
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4.5rem; padding-bottom: 4.5rem; }
.py-20 { padding-top: 5.5rem; padding-bottom: 5.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }
.mb-16 { margin-bottom: 4rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }

.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.space-y-8 > * + * { margin-top: 2rem; }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-blue { color: var(--brand-blue); }
.text-emerald { color: var(--accent-green); }
.text-muted { color: var(--text-muted); }

/* Header Semántico */
.site-header {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 50;
  transition: all 0.2s ease;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.25rem;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 2rem;
}

@media (min-width: 768px) {
  .nav-links { display: flex; }
}

.nav-link {
  color: var(--text-body);
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 0.4rem 0.2rem;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.nav-link:hover, .nav-link.active {
  color: var(--brand-blue);
  border-bottom-color: var(--brand-blue);
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  padding: 0.6875rem 1.375rem;
  font-size: 0.9375rem;
  line-height: 1.2;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--brand-blue);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
  background-color: var(--brand-blue-hover);
  box-shadow: var(--shadow-blue);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: #ffffff;
  color: var(--text-primary);
  border-color: var(--border-medium);
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover {
  background-color: var(--bg-surface-subtle);
  border-color: var(--brand-blue-border);
  color: var(--brand-blue);
}

.btn-tech-dark {
  background-color: var(--bg-tech-dark);
  color: #ffffff;
}

.btn-tech-dark:hover {
  background-color: #1e293b;
  transform: translateY(-1px);
}

.btn-lg {
  padding: 0.85rem 1.75rem;
  font-size: 1.05rem;
  border-radius: var(--radius-lg);
}

.btn-block {
  display: flex;
  width: 100%;
}

/* ==========================================================================
   PDP HERO ACTION BUTTONS: 3 Botones Alineados en PC, Fluidos en Móvil
   Mismo tamaño de tipografía, misma altura, colores correctos y precios alineados
   ========================================================================== */
.pdp-hero-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.75rem;
  width: 100%;
}

@media (min-width: 768px) {
  .pdp-hero-actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
  }
}

.btn-pdp-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 48px;
  height: 48px;
  padding: 0.75rem 1.35rem;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1;
  border-radius: var(--radius-md);
  box-sizing: border-box;
  text-align: center;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (max-width: 767px) {
  .btn-pdp-action {
    width: 100%;
    white-space: normal;
  }
}

/* 1. Botón Primario: Comprar Licencia Vitalicia / Acceso Gratis */
.btn-pdp-action.btn-primary {
  background-color: var(--brand-blue);
  color: #ffffff;
  border-color: var(--brand-blue);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-pdp-action.btn-primary:hover {
  background-color: var(--brand-blue-hover);
  border-color: var(--brand-blue-hover);
  box-shadow: var(--shadow-blue);
  transform: translateY(-1px);
}

/* Estructura óptica de precios y paréntesis en botones */
.pdp-btn-price {
  display: inline-flex;
  align-items: baseline;
  gap: 0.25rem;
  font-weight: 700;
  font-size: 0.9375rem;
  color: #ffffff;
  vertical-align: baseline;
}

.pdp-btn-price .price-val {
  font-weight: 800;
  color: #ffffff;
  font-size: 1em;
}

.pdp-btn-price .price-val-old {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: line-through;
  font-size: 0.85em;
}

.pdp-btn-arrow {
  display: inline-block;
  transition: transform 0.15s ease;
  font-weight: 700;
}

.btn-pdp-action:hover .pdp-btn-arrow {
  transform: translateX(2px);
}

/* 2. Botón Secundario: Añadir al Carrito (Comprar Múltiples) */
.btn-pdp-action.btn-pdp-cart {
  background-color: #ffffff;
  color: var(--text-body);
  border-color: var(--border-medium);
  box-shadow: var(--shadow-xs);
}

.btn-pdp-action.btn-pdp-cart:hover {
  background-color: var(--bg-surface-subtle);
  border-color: var(--brand-blue);
  color: var(--brand-blue);
  transform: translateY(-1px);
}

.btn-pdp-action.btn-pdp-cart:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* 3. Botón Secundario: Probar Demo en Vivo */
.btn-pdp-action.btn-pdp-demo {
  background-color: #ffffff;
  color: var(--text-primary);
  border-color: var(--border-medium);
  box-shadow: var(--shadow-xs);
}

.btn-pdp-action.btn-pdp-demo:hover {
  background-color: var(--bg-surface-subtle);
  border-color: var(--brand-blue-border);
  color: var(--brand-blue);
  transform: translateY(-1px);
}

/* Insignias y Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
}

.badge-blue {
  background-color: var(--brand-blue-soft);
  color: var(--brand-blue);
  border-color: var(--brand-blue-border);
}

.badge-green {
  background-color: var(--accent-green-soft);
  color: var(--accent-green);
  border-color: var(--accent-green-border);
}

.badge-yellow {
  background-color: var(--accent-yellow-soft);
  color: var(--accent-yellow);
  border-color: var(--accent-yellow-border);
}

.badge-mono {
  font-family: var(--font-mono);
  background: var(--bg-surface-alt);
  color: var(--text-muted);
  border-color: var(--border-subtle);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--accent-green);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
  animation: pulse-dot 2.5s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* Píldoras de Beneficios Rápidos (Hero Pills) */
.hero-benefit-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.5rem;
  margin-bottom: 2rem;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background-color: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.4rem 0.9rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-body);
  box-shadow: var(--shadow-xs);
}

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

@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1.15fr 1fr;
    gap: 3.5rem;
  }
}

.hero-mockup-wrap {
  position: relative;
  border-radius: var(--radius-2xl);
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

.hero-mockup-img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-xl);
  display: block;
}

/* Video Facade & Player (Core Web Vitals Optimized) */
.hero-video-facade {
  position: relative;
  width: 100%;
  max-width: 720px;
  cursor: pointer;
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: block;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-video-facade:hover {
  transform: translateY(-2px);
}

.hero-video-facade:focus-visible {
  outline: 3px solid var(--brand-blue);
  outline-offset: 4px;
}

.hero-video-play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.0);
  transition: background 0.2s ease;
  pointer-events: none;
}

.hero-video-facade:hover .hero-video-play-overlay {
  background: rgba(15, 23, 42, 0.04);
}

.hero-video-play-btn {
  pointer-events: auto;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  border: none;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 20px -5px rgba(37, 99, 235, 0.5), 0 4px 6px -2px rgba(15, 23, 42, 0.1);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  opacity: 0.92;
}

.hero-video-facade:hover .hero-video-play-btn,
.hero-video-facade:focus-within .hero-video-play-btn {
  transform: scale(1.1);
  opacity: 1;
  box-shadow: 0 14px 28px -4px rgba(37, 99, 235, 0.6), 0 6px 10px -2px rgba(15, 23, 42, 0.15);
}

/* Marco activo de video que preserva el diseño del navegador */
.hero-video-active-frame {
  position: relative;
  width: 100%;
  max-width: 720px;
  background: #ffffff;
  border: 1.5px solid var(--border-medium);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: fadeInVideo 0.25s ease-out;
}

@keyframes fadeInVideo {
  from { opacity: 0; transform: scale(0.99); }
  to { opacity: 1; transform: scale(1); }
}

.hero-video-active-header {
  height: 38px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  padding: 0 1rem;
  position: relative;
}

.hero-video-traffic-lights {
  display: flex;
  gap: 6px;
  z-index: 2;
}

.hero-video-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}
.hero-video-dot.red { background: #ef4444; }
.hero-video-dot.yellow { background: #f59e0b; }
.hero-video-dot.green { background: #10b981; }

.hero-video-header-title {
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  pointer-events: none;
}

.hero-video-body-ratio {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* Proporción panorámica estándar 16:9 */
  background: #000000;
}

.hero-video-iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.video-noscript-fallback {
  margin-top: 0.75rem;
  text-align: center;
}

/* Sección "¿Qué es AppBlocks?" */
.what-is-card {
  background-color: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 768px) {
  .what-is-card {
    grid-template-columns: 180px 1fr 1fr;
    padding: 3rem 2.5rem;
  }
}

.what-is-checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.what-is-check-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}

.what-is-check-item span.chk {
  color: var(--accent-green);
  font-weight: 800;
}

/* Comparativa: Del Problema a la Solución */
.comparison-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}

@media (min-width: 768px) {
  .comparison-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.comparison-card {
  border-radius: var(--radius-xl);
  padding: 2.25rem 2rem;
  border: 1px solid;
  position: relative;
}

.comparison-card-problem {
  background-color: #ffffff;
  border-color: #fecdd3;
}

.comparison-card-solution {
  background-color: #ffffff;
  border-color: var(--brand-blue-border);
  box-shadow: var(--shadow-md);
}

.comparison-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.comparison-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.comparison-item-problem {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.9375rem;
  color: var(--text-body);
}

.comparison-item-problem span.cross {
  color: var(--accent-red);
  font-weight: 900;
  font-size: 1.1rem;
  line-height: 1;
}

.comparison-item-solution {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.9375rem;
  color: var(--text-body);
}

.comparison-item-solution span.chk {
  color: var(--brand-blue);
  font-weight: 900;
  font-size: 1.1rem;
  line-height: 1;
}

/* Sección de Beneficios de Plataforma (6 Cards) */
.benefits-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .benefits-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .benefits-grid { grid-template-columns: repeat(3, 1fr); }
}

.benefit-card {
  background-color: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow-xs);
  transition: all 0.2s ease;
}

.benefit-card:hover {
  border-color: var(--brand-blue-border);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.benefit-icon-box {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-md);
  background-color: var(--brand-blue-soft);
  color: var(--brand-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

/* 3 Pasos Sencillos */
.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}

@media (min-width: 768px) {
  .steps-grid { grid-template-columns: repeat(3, 1fr); }
}

.step-card {
  background-color: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 2.25rem 1.75rem;
  text-align: center;
  box-shadow: var(--shadow-xs);
  position: relative;
}

.step-number {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background-color: var(--brand-blue-soft);
  color: var(--brand-blue);
  font-size: 1.25rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem auto;
}

/* Tipos de Negocio (Business Pills) */
.business-pills-wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.business-pill {
  background-color: #ffffff;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-full);
  padding: 0.6rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-primary);
  box-shadow: var(--shadow-xs);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.business-pill:hover {
  border-color: var(--brand-blue);
  color: var(--brand-blue);
  background-color: var(--brand-blue-soft);
  transform: translateY(-1px);
}

/* Tarjetas de Mini Apps (Rejilla y Cards) */
.grid-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .grid-cards { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .grid-cards { grid-template-columns: repeat(3, 1fr); }
}

.app-card {
  background-color: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-card:hover {
  border-color: var(--brand-blue-border);
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.app-card-thumb {
  width: 100%;
  height: 11rem;
  background-color: var(--bg-surface-subtle);
  border-bottom: 1px solid var(--border-subtle);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.app-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.app-card:hover .app-card-thumb img {
  transform: scale(1.03);
}

.app-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.app-card-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.app-card-desc {
  font-size: 0.875rem;
  color: var(--text-body);
  line-height: 1.5;
  margin-bottom: 1.25rem;
  flex: 1;
}

.app-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.875rem;
}

/* Precios */
.price-free {
  font-weight: 800;
  color: var(--accent-green);
  font-size: 1rem;
}

.price-current {
  font-weight: 900;
  color: var(--text-primary);
  font-size: 1.15rem;
}

.price-old {
  text-decoration: line-through;
  color: var(--text-subtle);
  font-size: 0.875rem;
  margin-left: 0.25rem;
}

/* Sección Destacada de Mini Apps Gratuitas */
.free-spotlight-box {
  background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 60%, #eff6ff 100%);
  border: 1px solid var(--accent-green-border);
  border-radius: var(--radius-2xl);
  padding: 3rem 2rem;
  box-shadow: var(--shadow-sm);
}

/* FAQs Accordion */
.faq-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 768px) {
  .faq-grid { grid-template-columns: 1fr 1fr; }
}

.faq-card {
  background-color: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-xs);
  transition: all 0.2s;
}

.faq-card:hover {
  border-color: var(--brand-blue-border);
}

.faq-question {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.faq-answer {
  font-size: 0.9rem;
  color: var(--text-body);
  line-height: 1.6;
}

/* Final CTA Banner (AppBlocks Blue Gradient) */
.final-cta-banner {
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 60%, #3b82f6 100%);
  border-radius: var(--radius-2xl);
  padding: 3.5rem 2rem;
  color: #ffffff;
  text-align: center;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.final-cta-banner h2 {
  color: #ffffff;
  font-size: 2.25rem;
  font-weight: 900;
  margin-bottom: 1rem;
}

.final-cta-banner p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.15rem;
  max-width: 38rem;
  margin: 0 auto 2rem auto;
}

.btn-white {
  background-color: #ffffff;
  color: var(--brand-blue);
  font-weight: 800;
  padding: 0.85rem 2rem;
  font-size: 1.05rem;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.btn-white:hover {
  background-color: #f8fafc;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* Breadcrumbs */
.breadcrumb-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.breadcrumb-separator {
  color: var(--text-subtle);
}

.breadcrumb-current {
  color: var(--text-primary);
  font-weight: 600;
}

/* Sticky Conversion Bar (Bottom) */
.sticky-cta-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-subtle);
  padding: 0.65rem 1rem;
  z-index: 40;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
  transform: translateY(100%);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.sticky-cta-bar.visible {
  transform: translateY(0);
}

.sticky-cta-container {
  max-width: 76rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  width: 100%;
  box-sizing: border-box;
}

.sticky-cta-info {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  flex: 1;
}

.sticky-cta-icon {
  width: 2.25rem;
  height: 2.25rem;
  min-width: 2.25rem;
  border-radius: var(--radius-sm);
  background: var(--brand-blue-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.sticky-cta-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.sticky-cta-title {
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.sticky-cta-category {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.sticky-cta-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.sticky-cta-price {
  text-align: right;
  display: none;
}

@media (min-width: 640px) {
  .sticky-cta-price {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
  }
}

.sticky-cta-btn {
  padding: 0.6rem 1.15rem;
  font-size: 0.875rem;
  font-weight: 700;
  white-space: nowrap;
  border-radius: var(--radius-md);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.sticky-text-mobile {
  display: inline;
}

.sticky-text-desktop {
  display: none;
}

@media (min-width: 860px) {
  .sticky-text-mobile {
    display: none;
  }
  .sticky-text-desktop {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
  }
}

/* Footer Semántico */
.site-footer {
  background-color: #ffffff;
  border-top: 1px solid var(--border-subtle);
  padding: 3.5rem 0 2.5rem 0;
  margin-top: auto;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

@media (min-width: 768px) {
  .footer-inner {
    grid-template-columns: 1.5fr 1fr 1fr;
  }
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-link {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-link:hover {
  color: var(--brand-blue);
}

/* Entity Definition Box (AEO) */
.entity-definition-box {
  background-color: #ffffff;
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--brand-blue);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-body);
  margin-bottom: 2rem;
}

/* Barra de Filtros del Catálogo */
.catalog-toolbar {
  background-color: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 1.25rem;
  margin-bottom: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
}

.search-input {
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 0.65rem 1rem;
  font-size: 0.9375rem;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s;
}

.search-input:focus {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px var(--brand-blue-soft);
}

.filter-select {
  background: #ffffff;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 0.65rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  outline: none;
  cursor: pointer;
}

.filter-select:focus {
  border-color: var(--brand-blue);
}

/* ==========================================================================
   APPBLOCKS - CARRITO MULTI-APP & DRAWER (ETAPA 9)
   Experiencia sutil, limpia y secundaria orientada a conversión
   ========================================================================== */

/* Botón Secundario de Carrito en PDP */
.btn-cart-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  background: transparent;
  color: var(--text-body);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 0.65rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 0.65rem;
  text-decoration: none;
}

.btn-cart-secondary:hover {
  background: var(--bg-surface-subtle);
  border-color: var(--brand-blue);
  color: var(--brand-blue);
}

.btn-cart-secondary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Trigger del Carrito en Header */
.cart-header-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-md);
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.cart-header-btn:hover {
  background: var(--bg-surface-subtle);
  border-color: var(--border-medium);
  color: var(--brand-blue);
}

.cart-header-badge {
  position: absolute;
  top: -0.35rem;
  right: -0.35rem;
  background: var(--brand-blue);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 800;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.25rem;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
  transition: transform 0.2s ease;
}

.cart-header-badge.hidden {
  display: none;
}

/* Drawer Backdrop & Panel */
.cart-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  z-index: 9990;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.cart-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 26rem; /* 416px */
  background: #ffffff;
  z-index: 9999;
  box-shadow: -8px 0 32px rgba(15, 23, 42, 0.12);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cart-drawer.open {
  transform: translateX(0);
}

.cart-drawer-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-drawer-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cart-close-btn {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: color 0.2s;
}

.cart-close-btn:hover {
  color: var(--text-primary);
}

.cart-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem 1.5rem;
}

.cart-empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.cart-empty-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  opacity: 0.7;
}

.cart-items-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  list-style: none;
}

.cart-item-card {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.2rem;
}

.cart-item-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.cart-item-price {
  font-size: 0.9375rem;
  font-weight: 800;
  color: var(--text-primary);
  white-space: nowrap;
}

.cart-remove-btn {
  background: transparent;
  border: none;
  color: var(--text-subtle);
  font-size: 0.75rem;
  cursor: pointer;
  padding: 0.2rem;
  transition: color 0.2s;
  display: flex;
  align-items: center;
}

.cart-remove-btn:hover {
  color: var(--accent-red);
}

.cart-drawer-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface-subtle);
}

.cart-subtotal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-size: 1.05rem;
}

.cart-subtotal-label {
  font-weight: 600;
  color: var(--text-body);
}

.cart-subtotal-value {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--text-primary);
}

.cart-paypal-container {
  min-height: 44px;
}

.cart-security-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--text-subtle);
  margin-top: 0.75rem;
}

/* Toast de Notificación al Agregar */
.cart-toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--accent-green);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-lg);
  z-index: 9998;
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 24rem;
  transform: translateY(120%);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.cart-toast.show {
  transform: translateY(0);
  opacity: 1;
}

.cart-toast-text {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.cart-toast-btn {
  background: var(--brand-blue);
  color: #ffffff;
  border: none;
  padding: 0.4rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
}

.cart-toast-btn:hover {
  background: var(--brand-blue-hover);
}

/* ==========================================================================
   AJUSTES RESPONSIVOS Y FLUIDEZ EN CELULARES (MOBILE OPTIMIZATIONS)
   Evita desbordes horizontales, mejora espaciados y fluidez táctil
   ========================================================================== */
@media (max-width: 640px) {
  /* Header y Logo en teléfonos */
  .header-inner {
    height: 3.75rem;
    gap: 0.5rem;
  }
  
  .logo-wrap img {
    height: 28px !important;
    width: auto !important;
    max-width: 135px;
  }
  
  /* Reducir padding de cards y cajas en móvil para mayor amplitud */
  .what-is-card,
  .comparison-card,
  .free-spotlight-box,
  .step-card,
  .benefit-card,
  .entity-definition-box {
    padding: 1.35rem 1.15rem;
  }
  
  .what-is-checklist {
    gap: 0.65rem;
  }
  
  .what-is-check-item {
    font-size: 0.875rem;
  }
  
  /* Botón Play de Video en móvil proporcionado */
  .hero-video-play-btn {
    width: 50px;
    height: 50px;
  }
  
  .hero-video-play-btn svg {
    width: 20px;
    height: 20px;
  }
  
  /* Barra de herramientas del Catálogo */
  .catalog-toolbar {
    padding: 0.85rem;
    gap: 0.75rem;
  }
  
  .catalog-toolbar > div {
    width: 100%;
  }
  
  .search-input,
  .filter-select {
    width: 100%;
    box-sizing: border-box;
  }
  
  /* Píldoras de Beneficios adaptativas */
  .hero-benefit-pills {
    gap: 0.45rem;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
  }
  
  .hero-pill {
    font-size: 0.75rem;
    padding: 0.35rem 0.65rem;
  }
  
  /* Carrito Drawer y Toast en Móvil */
  .cart-drawer {
    width: 100vw;
    max-width: 100vw;
  }
  
  .cart-drawer-header,
  .cart-drawer-body,
  .cart-drawer-footer {
    padding: 1rem 1.15rem;
  }
  
  .cart-toast {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    max-width: calc(100vw - 2rem);
  }
  
  /* Footer en móvil */
  .site-footer {
    padding: 2.5rem 0 2rem 0;
  }
  
  .footer-inner {
    gap: 2rem;
  }
  
  /* Breadcrumbs limpios */
  .breadcrumb-nav {
    flex-wrap: wrap;
    font-size: 0.8125rem;
    gap: 0.35rem;
  }
}

/* ==========================================================================
   Google Consent Mode v2 & Cookie Consent Banner
   ========================================================================== */
.cookie-consent-banner {
  position: fixed;
  bottom: 1.25rem;
  left: 1.25rem;
  right: 1.25rem;
  max-width: 600px;
  margin: 0 auto;
  background-color: var(--bg-surface, #ffffff);
  border: 1px solid var(--border-medium, #cbd5e1);
  border-radius: var(--radius-lg, 12px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
  z-index: 9999;
  padding: 1.25rem;
  font-family: inherit;
  color: var(--text-primary, #0f172a);
  animation: cookieBannerFadeIn 0.25s ease-out;
  box-sizing: border-box;
}

@keyframes cookieBannerFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cookie-banner-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 700;
  margin: 0 0 0.35rem 0;
  color: var(--text-primary, #0f172a);
}

.cookie-banner-desc {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-secondary, #475569);
  margin: 0 0 0.85rem 0;
}

.cookie-policy-link {
  color: var(--brand-blue, #2563eb);
  text-decoration: underline;
  font-weight: 500;
}

.cookie-preferences-panel {
  background-color: var(--bg-surface-subtle, #f8fafc);
  border: 1px solid var(--border-light, #e2e8f0);
  border-radius: var(--radius-md, 8px);
  padding: 0.75rem 0.85rem;
  margin-bottom: 0.85rem;
}

.cookie-pref-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cookie-pref-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--text-secondary, #475569);
  cursor: pointer;
}

.cookie-pref-item input[type="checkbox"] {
  margin-top: 0.15rem;
  accent-color: var(--brand-blue, #2563eb);
}

.cookie-banner-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.cookie-btn {
  font-size: 0.8125rem !important;
  padding: 0.45rem 0.9rem !important;
  font-weight: 600 !important;
  border-radius: var(--radius-md, 6px) !important;
  cursor: pointer;
}

.cookie-btn-link {
  background: transparent;
  border: none;
  color: var(--text-subtle, #64748b);
  font-size: 0.8125rem;
  cursor: pointer;
  padding: 0.4rem 0.6rem;
  text-decoration: underline;
  transition: color 0.15s ease;
}

.cookie-btn-link:hover {
  color: var(--text-primary, #0f172a);
}

@media (max-width: 640px) {
  .cookie-consent-banner {
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
    padding: 1rem;
  }
  .cookie-banner-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .cookie-btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
  .cookie-btn-link {
    text-align: center;
  }
}

