/**
 * EXPONEXUS 360 — SHOWROOM & CATALOG STYLESHEET (LIGHT THEME LUXURY)
 * Estética Editorial en Colores Claros: Pearl White (#ffffff), Pure Snow (#f8fafc),
 * Frosted Glass Translúcido, Sombras Suaves y Tipografía Oscura de Alta Gama.
 */

/* ==========================================================================
   1. CONTENEDOR GENERAL DEL CATÁLOGO (LIGHT THEME)
   ========================================================================== */
.showcase-catalog-view {
  position: relative;
  width: 100%;
  min-height: 100vh;
  padding: 80px 24px 140px 24px;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 50%, #ffffff 100%);
  color: #0f172a;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
}

.catalog-viewport {
  max-width: 1360px;
  margin: 0 auto;
}

/* ==========================================================================
   2. CABECERA EDITORIAL & FILTROS POR CATEGORÍAS
   ========================================================================== */
.catalog-hero-header {
  text-align: center;
  margin-bottom: 40px;
}

.catalog-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(14, 165, 233, 0.25);
  border-radius: 9999px;
  color: #0284c7;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 16px;
  box-shadow: 0 2px 10px rgba(14, 165, 233, 0.08);
}

.catalog-main-title {
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0f172a;
  margin: 0 0 12px 0;
  line-height: 1.15;
}

.text-gradient-sky {
  background: linear-gradient(135deg, #0284c7 0%, #8b5cf6 50%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.catalog-hero-subtitle {
  font-size: 1.12rem;
  color: #475569;
  max-width: 820px;
  margin: 0 auto 32px auto;
  line-height: 1.6;
}

/* Barra de Píldoras de Filtro (10 Categorías) */
.catalog-category-filter-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 48px;
}

.category-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  color: #334155;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.category-filter-pill:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.category-filter-pill.active {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  border-color: #0ea5e9;
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.35);
  transform: translateY(-2px);
}

/* ==========================================================================
   3. SECCIONES Y BLOQUES DE CATEGORÍA
   ========================================================================== */
.catalog-category-block {
  margin-bottom: 64px;
  animation: fadeIn 0.4s ease-out;
}

.category-section-header {
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 2px solid #e2e8f0;
}

.category-section-title {
  font-size: 1.65rem;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 6px 0;
}

.category-section-title i {
  color: #0284c7;
}

.category-section-desc {
  font-size: 0.95rem;
  color: #64748b;
  margin: 0;
}

/* Grid de Tarjetas de Demos */
.catalog-grid-demos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 24px;
}

/* ==========================================================================
   4. TARJETAS DE DEMO (PEARL FROSTED GLASS)
   ========================================================================== */
.catalog-demo-card {
  position: relative;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.28s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.catalog-demo-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.08);
  border-color: #cbd5e1;
}

.demo-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.demo-tag {
  display: inline-block;
  padding: 4px 10px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
}

.demo-title {
  font-size: 1.22rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 8px 0;
}

.demo-desc {
  font-size: 0.88rem;
  color: #64748b;
  line-height: 1.5;
  margin: 0 0 18px 0;
  flex-grow: 1;
}

/* Escenario interactivo de cada demo */
.demo-interactive-stage {
  position: relative;
  width: 100%;
  height: 270px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.demo-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Barra de controles interactivos sobre la demo */
.demo-stage-controls {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  gap: 8px;
  justify-content: center;
  z-index: 10;
}

.demo-btn-pill {
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid #cbd5e1;
  border-radius: 9999px;
  color: #0f172a;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.demo-btn-pill:hover {
  background: #0ea5e9;
  border-color: #0ea5e9;
  color: #ffffff;
  transform: translateY(-1px);
}

/* ==========================================================================
   5. COMPONENTES ESPECÍFICOS (HOLOGRAMAS, THEREMIN, RAYOS X, PIE MENU)
   ========================================================================== */

/* Tarjeta Holográfica de Lámina Iridiscente */
.holo-foil-card {
  position: relative;
  width: 82%;
  height: 84%;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.12);
  border: 1px solid #e2e8f0;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.12s ease-out;
  transform-style: preserve-3d;
}

.holo-foil-sheen {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    transparent 0%,
    rgba(255, 0, 119, 0.4) 25%,
    rgba(0, 240, 255, 0.45) 45%,
    rgba(255, 215, 0, 0.4) 65%,
    transparent 100%
  );
  background-size: 200% 200%;
  background-position: var(--holo-x, 50%) var(--holo-y, 50%);
  mix-blend-mode: color-dodge;
  pointer-events: none;
  opacity: 0.85;
}

.holo-foil-content {
  position: relative;
  height: 100%;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
  z-index: 2;
}

/* Escáner de Rayos X */
.xray-scanner-stage {
  position: relative;
  width: 100%;
  height: 100%;
  background: url('https://images.unsplash.com/photo-1546868871-7041f2a55e12?w=800&auto=format&fit=crop&q=80') center/cover no-repeat;
  cursor: crosshair;
}

.xray-inner-layer {
  position: absolute;
  inset: 0;
  background: #0f172a url('https://images.unsplash.com/photo-1518770660439-4636190af475?w=800&auto=format&fit=crop&q=80') center/cover no-repeat;
  clip-path: circle(0px at 50% 50%);
  transition: clip-path 0.05s ease-out;
  filter: hue-rotate(180deg) contrast(1.4);
}

.xray-lens-cursor {
  position: absolute;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 2px dashed #00f0ff;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.6), inset 0 0 15px rgba(0, 240, 255, 0.3);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

/* Theremin Táctil */
.theremin-interactive-pad {
  position: relative;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  background: #ffffff;
}

.theremin-instructions {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  font-size: 0.76rem;
  font-weight: 700;
  color: #64748b;
  pointer-events: none;
  z-index: 5;
}

/* Sonar Pulse Wave */
.sonar-stage {
  position: relative;
  width: 100%;
  height: 100%;
  background: #f8fafc;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sonar-wave-ring {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid #0ea5e9;
  transform: translate(-50%, -50%);
  animation: sonarExpand 1.2s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
  pointer-events: none;
}

@keyframes sonarExpand {
  0% { width: 10px; height: 10px; opacity: 1; border-color: #0ea5e9; }
  100% { width: 340px; height: 340px; opacity: 0; border-color: #ec4899; }
}

/* Menú Radial en Abanico (Pie Menu) */
.pie-menu-wrapper {
  position: relative;
  width: 160px;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pie-menu-center-btn {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  border: none;
  color: #ffffff;
  font-size: 1.3rem;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(14, 165, 233, 0.4);
  z-index: 10;
  transition: transform 0.2s ease;
}

.pie-menu-center-btn:hover {
  transform: scale(1.1);
}

.pie-menu-item {
  position: absolute;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
  opacity: 0;
  transform: scale(0);
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
}

.pie-menu-wrapper.active .pie-item-1 { opacity: 1; transform: translate(0, -65px) scale(1); }
.pie-menu-wrapper.active .pie-item-2 { opacity: 1; transform: translate(60px, -25px) scale(1); }
.pie-menu-wrapper.active .pie-item-3 { opacity: 1; transform: translate(45px, 50px) scale(1); }
.pie-menu-wrapper.active .pie-item-4 { opacity: 1; transform: translate(-45px, 50px) scale(1); }
.pie-menu-wrapper.active .pie-item-5 { opacity: 1; transform: translate(-60px, -25px) scale(1); }

/* Configurador de Materiales 3D */
.product-material-selector {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 6px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  padding: 4px 8px;
  border-radius: 20px;
  border: 1px solid #cbd5e1;
  z-index: 10;
}

.product-mat-btn {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px #cbd5e1;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.product-mat-btn:hover {
  transform: scale(1.2);
}

.product-mat-btn.active {
  box-shadow: 0 0 0 2px #0ea5e9;
  transform: scale(1.2);
}

/* Lupa Óptica de Imagen */
.magnifier-demo-container {
  position: relative;
  width: 100%;
  height: 100%;
  background: url('https://images.unsplash.com/photo-1523275335684-37898b6baf30?w=800&auto=format&fit=crop&q=80') center/cover no-repeat;
  cursor: crosshair;
}

.magnifier-lens {
  position: absolute;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 3px solid #0ea5e9;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  background: url('https://images.unsplash.com/photo-1523275335684-37898b6baf30?w=1600&auto=format&fit=crop&q=90') no-repeat;
  background-size: 400% 400%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  display: none;
  z-index: 20;
}

/* Tarjeta Fotográfica 3D Parallax */
.photo-parallax-card {
  position: relative;
  width: 85%;
  height: 80%;
  border-radius: 16px;
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform 0.15s ease-out;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.photo-layer-bg {
  position: absolute;
  inset: -20px;
  background: url('https://images.unsplash.com/photo-1579783902614-a3fb3927b675?w=800&auto=format&fit=crop&q=80') center/cover no-repeat;
  transition: transform 0.15s ease-out;
}

.photo-layer-fg {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0) 40%, rgba(15,23,42,0.8) 100%);
  transition: transform 0.15s ease-out;
}

.photo-layer-text {
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px;
  color: #ffffff;
  transition: transform 0.15s ease-out;
}

.photo-layer-text h4 {
  margin: 0 0 4px 0;
  font-size: 1.25rem;
  font-weight: 800;
}

.photo-layer-text p {
  margin: 0;
  font-size: 0.82rem;
  color: #cbd5e1;
}

/* Escenario Parallax Multi-Capa */
.multi-parallax-stage {
  position: relative;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #e0f2fe 0%, #bae6fd 60%, #e2e8f0 100%);
  overflow: hidden;
}

.parallax-depth-layer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s ease-out;
  pointer-events: none;
}

.layer-mountains {
  bottom: -40px;
  top: auto;
  width: 120%;
  height: 160px;
  background: #94a3b8;
  clip-path: polygon(0 100%, 0 60%, 25% 20%, 45% 70%, 70% 30%, 100% 80%, 100% 100%);
  opacity: 0.7;
}

.layer-architecture {
  bottom: 0;
  top: auto;
  width: 110%;
  height: 100px;
  background: #334155;
  clip-path: polygon(0 100%, 0 40%, 15% 40%, 15% 10%, 30% 10%, 30% 60%, 60% 60%, 60% 20%, 85% 20%, 85% 50%, 100% 50%, 100% 100%);
}

.layer-floating-badge {
  background: #ffffff;
  padding: 12px 24px;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.15);
  font-weight: 800;
  color: #0f172a;
  border: 1px solid #e2e8f0;
}

/* Comparador Visual Antes / Después */
.before-after-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  user-select: none;
  cursor: ew-resize;
  touch-action: none;
}

.before-layer, .after-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.before-layer {
  background: #f1f5f9;
  color: #475569;
}

.after-overlay {
  background: linear-gradient(135deg, #0ea5e9 0%, #6366f1 50%, #ec4899 100%);
  color: #ffffff;
  clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
  transition: clip-path 0.04s ease-out;
}

.ba-badge {
  position: absolute;
  top: 12px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.before-badge {
  left: 14px;
  background: #e2e8f0;
  color: #64748b;
  border: 1px solid #cbd5e1;
}

.after-badge {
  left: 14px;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.ba-content-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.ba-dummy-wireframe {
  width: 110px;
  height: 48px;
  background: #e2e8f0;
  border-radius: 8px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.ba-mock-line {
  height: 6px;
  background: #cbd5e1;
  border-radius: 3px;
}
.ba-mock-line.line-lg { width: 90%; }
.ba-mock-line.line-md { width: 70%; }
.ba-mock-line.line-sm { width: 45%; }

.ba-mock-3d-sphere {
  position: relative;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.ba-3d-icon {
  font-size: 1.35rem;
  color: #ffffff;
}

.ba-title {
  font-size: 1.2rem;
  font-weight: 800;
  margin: 0 0 4px 0;
}

.ba-desc {
  font-size: 0.82rem;
  margin: 0;
  opacity: 0.9;
}

.before-after-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  background: #ffffff;
  box-shadow: 0 0 14px rgba(0, 0, 0, 0.35);
  transform: translateX(-50%);
  cursor: ew-resize;
  z-index: 10;
}

.handle-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 38px;
  height: 38px;
  background: #ffffff;
  border: 2.5px solid #0ea5e9;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0ea5e9;
  font-size: 0.9rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  cursor: grab;
}

/* Polígono Morphing Blob SVG */
.morphing-blob-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
}

.morphing-blob-svg {
  width: 240px;
  height: 240px;
  filter: drop-shadow(0 12px 24px rgba(14, 165, 233, 0.25));
}

/* Tipografía Cinematográfica */
.kinetic-split-text {
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #0f172a;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.split-char {
  display: inline-block;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease;
  cursor: default;
}

.split-char:hover, .split-char.char-bounce {
  transform: translateY(-14px) scale(1.3);
  color: #0284c7;
}

.shimmer-luxury-text {
  font-size: 1.7rem;
  font-weight: 800;
  background: linear-gradient(90deg, #0f172a 0%, #0ea5e9 30%, #ec4899 50%, #0ea5e9 70%, #0f172a 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmerFlow 3.5s linear infinite;
  text-align: center;
}

@keyframes shimmerFlow {
  0% { background-position: 200% center; }
  100% { background-position: -200% center; }
}

.typewriter-badge {
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.3);
  padding: 8px 16px;
  border-radius: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.05rem;
  color: #0369a1;
  font-weight: 700;
}

/* Tarjetas 3D Tilt */
.catalog-tilt-card {
  position: relative;
  width: 85%;
  height: 80%;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  transform-style: preserve-3d;
  transition: transform 0.1s ease-out;
}

.card-sheen-overlay {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  pointer-events: none;
  transition: background 0.15s ease;
}

/* Botón Magnético */
.magnetic-action-btn {
  position: relative;
  padding: 14px 28px;
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  border: none;
  border-radius: 9999px;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(14, 165, 233, 0.35);
  overflow: hidden;
  transition: transform 0.15s ease-out, box-shadow 0.2s ease;
}

.magnetic-action-btn:hover {
  box-shadow: 0 12px 30px rgba(14, 165, 233, 0.5);
}

.button-ripple-effect {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: scale(0);
  animation: rippleSpread 0.6s linear;
  pointer-events: none;
}

@keyframes rippleSpread {
  to {
    transform: scale(1);
    opacity: 0;
  }
}

/* Animaciones */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in-up {
  animation: fadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Responsive */
@media (max-width: 768px) {
  .showcase-catalog-view {
    padding: 70px 16px 120px 16px;
  }
  .catalog-main-title {
    font-size: 2.1rem;
  }
  .catalog-grid-demos {
    grid-template-columns: 1fr;
  }
}
