/* =========================================================
   TechStore — estilo gamer neón RGB (rediseño 2026-11)
   Copias anteriores:
   - Original:  C:\xampp\htdocs\tienda_computadoras_respaldo_2026-11-11\css\modern-home.css
   - Etapa 1:   C:\xampp\htdocs\tienda_computadoras_respaldo_etapa1_2026-11-11\css\modern-home.css
   ========================================================= */
@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:ital,wght@0,600;0,700;0,800;1,700;1,800;1,900&family=Barlow:wght@400;500;600&family=JetBrains+Mono:wght@500;700&display=swap');

:root {
  --negro: #050508;
  --negro-2: #0a0a10;
  --panel: #0e0e16;
  --panel-2: #14141e;
  --linea: rgba(255, 255, 255, 0.08);
  --linea-2: rgba(255, 255, 255, 0.16);
  --texto: #f5f5fa;
  --texto-2: #a9a9bd;
  --texto-3: #6c6c82;
  --magenta: #ff2bd6;
  --violeta: #8b5cff;
  --cian: #00e5ff;
  --verde: #39ff88;
  --rgb: linear-gradient(90deg, #ff2bd6, #8b5cff, #00e5ff, #39ff88, #ffb000, #ff2bd6);
  --corte: 16px;
  --chaflan: polygon(var(--corte) 0, 100% 0, 100% calc(100% - var(--corte)), calc(100% - var(--corte)) 100%, 0 100%, 0 var(--corte));
  --chaflan-chico: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  --rapido: cubic-bezier(0.2, 0.8, 0.2, 1);
  --golpe: cubic-bezier(0.16, 1, 0.3, 1);
  --margen: clamp(16px, 4vw, 40px);
  --titulo: 'Barlow Condensed', Impact, 'Arial Narrow', sans-serif;
  --letra: 'Barlow', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--letra);
  background: var(--negro);
  color: var(--texto);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--margen);
}

svg.ico {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* Animaciones base */
@keyframes correr { to { background-position: 200% 0; } }
@keyframes correrv { to { background-position: 0 300%; } }
@keyframes rotar { to { transform: rotate(360deg); } }
@keyframes aparecer { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

.gradient-text,
.rgb-texto {
  background: var(--rgb);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: correr 4s linear infinite;
  padding-right: 0.06em;
}

/* ===================== Barrido de luz al abrir la portada ===================== */
.arranque {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--negro);
  pointer-events: none;
  animation: apagar 0.5s 0.75s var(--golpe) forwards;
}

.arranque::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  background: var(--rgb);
  background-size: 200% 100%;
  box-shadow: 0 0 24px var(--magenta), 0 0 60px var(--cian);
  transform: scaleX(0);
  animation: barrido 0.7s var(--golpe) forwards;
}

@keyframes barrido { to { transform: scaleX(1); } }
@keyframes apagar { to { opacity: 0; visibility: hidden; } }

/* ===================== Barra superior ===================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(5, 5, 8, 0.78);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
}

.navbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--rgb);
  background-size: 200% 100%;
  animation: correr 6s linear infinite;
  opacity: 0.7;
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 84px;
}

.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 1.4rem;
  transition: transform 0.3s var(--golpe);
}

.logo a { display: flex; }
.logo:hover { transform: scale(1.04); }

.logo-image {
  display: block;
  height: 58px;
  width: auto;
}

.logo-icon { font-size: 1.6rem; }

.logo-text {
  background: var(--rgb);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  gap: 4px;
}

.nav-links a {
  position: relative;
  font: 700 1.02rem/1 var(--titulo);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--texto-2);
  text-decoration: none;
  padding: 12px 14px;
  transition: color 0.2s;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 4px;
  height: 2px;
  background: var(--rgb);
  background-size: 200% 100%;
  animation: correr 3s linear infinite;
  box-shadow: 0 0 10px var(--magenta);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--golpe);
}

.nav-links a:hover { color: var(--texto); }
.nav-links a:hover::after { transform: scaleX(1); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Botones de lupa y carrito: la forma cortada va en una capa de fondo
   para que el número del carrito no quede recortado */
.search-btn,
.cart-btn {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 10px;
  background: none;
  border: 0;
  color: var(--texto);
  text-decoration: none;
  font-size: 1.05rem;
  cursor: pointer;
  transition: color 0.2s, transform 0.2s var(--rapido);
}

.search-btn::before,
.cart-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(255, 255, 255, 0.04);
  clip-path: var(--chaflan-chico);
  transition: background 0.2s;
}

.search-btn::after,
.cart-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  padding: 1px;
  background: var(--linea-2);
  clip-path: var(--chaflan-chico);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  transition: background 0.2s;
}

.search-btn:hover,
.cart-btn:hover { color: var(--cian); }

.search-btn:hover::before,
.cart-btn:hover::before { background: rgba(0, 229, 255, 0.1); }

.search-btn:hover::after,
.cart-btn:hover::after { background: var(--cian); }

.search-btn:active,
.cart-btn:active { transform: scale(0.92); }

.cart-btn .badge {
  position: absolute;
  top: -7px;
  right: -9px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  margin: 0;
  border-radius: 0;
  background: var(--magenta);
  color: #fff;
  font: 700 0.7rem/20px var(--mono);
  text-align: center;
  clip-path: polygon(4px 0, 100% 0, 100% calc(100% - 4px), calc(100% - 4px) 100%, 0 100%, 0 4px);
  box-shadow: 0 0 14px var(--magenta);
  animation: latir 2.4s ease-in-out infinite;
}

@keyframes latir {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.5); }
}

.badge {
  background: var(--magenta);
  padding: 0.1rem 0.4rem;
  font-size: 0.75rem;
}

.login-btn {
  position: relative;
  margin-left: 6px;
  padding: 13px 20px;
  font: 800 0.95rem/1 var(--titulo);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #050508;
  background: var(--texto);
  text-decoration: none;
  clip-path: var(--chaflan-chico);
  transition: background 0.25s, box-shadow 0.25s;
}

.login-btn:hover {
  background: var(--cian);
  box-shadow: 0 0 30px rgba(0, 229, 255, 0.6);
}

/* Menú de usuario */
.user-menu { position: relative; }

.user-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  height: 44px;
  padding: 4px 14px 4px 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 0;
  color: var(--texto);
  font: 700 0.95rem/1 var(--titulo);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  clip-path: var(--chaflan-chico);
  transition: background 0.2s, color 0.2s;
}

.user-btn:hover {
  background: rgba(0, 229, 255, 0.1);
  color: var(--cian);
}

.user-avatar {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--rgb);
  background-size: 200% 100%;
  animation: correr 4s linear infinite;
  color: #050508;
  font: 900 1.05rem/1 var(--titulo);
  clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px);
}

.user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 10px;
  padding: 6px;
  min-width: 220px;
  background: rgba(14, 14, 22, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 2px solid var(--cian);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.9), 0 0 30px -10px rgba(0, 229, 255, 0.4);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.2s, transform 0.3s var(--golpe), visibility 0.2s;
}

.user-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.user-dropdown a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 11px 12px;
  color: var(--texto-2);
  text-decoration: none;
  font-size: 0.95rem;
  transition: background 0.2s, color 0.2s, padding 0.25s var(--rapido);
}

.user-dropdown a:last-child {
  margin-top: 4px;
  border-top: 1px solid var(--linea);
}

.user-dropdown a:hover {
  background: rgba(0, 229, 255, 0.08);
  color: var(--cian);
  padding-left: 18px;
}

/* ===================== Botones ===================== */
.btn-primary,
.btn-secondary {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 17px 28px;
  font: italic 800 1.05rem/1 var(--titulo);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  border: 0;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  clip-path: var(--chaflan);
  transition: transform 0.25s var(--rapido), filter 0.25s, color 0.25s, background 0.25s;
}

.btn-primary {
  color: #050508;
  background: var(--rgb);
  background-size: 200% 100%;
  animation: correr 4s linear infinite;
}

.btn-primary::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 40%;
  left: -60%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.75), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s var(--golpe);
  pointer-events: none;
}

.btn-primary:hover::after { left: 130%; }

.btn-primary:hover {
  transform: translateY(-2px);
  filter: drop-shadow(0 0 22px rgba(255, 43, 214, 0.6));
}

.btn-secondary {
  color: var(--texto);
  background: rgba(255, 255, 255, 0.04);
}

.btn-secondary::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  padding: 1px;
  background: var(--linea-2);
  clip-path: inherit;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  transition: background 0.25s;
}

.btn-secondary:hover {
  color: var(--cian);
  background: rgba(0, 229, 255, 0.08);
}

.btn-secondary:hover::before { background: var(--cian); }

.btn-primary:active,
.btn-secondary:active { transform: scale(0.96); }

.btn-arrow {
  display: inline-block;
  transition: transform 0.3s var(--golpe);
}

.btn-primary:hover .btn-arrow { transform: translateX(6px); }

/* ===================== Portada ===================== */
.hero-section {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 140px 0 110px;
  overflow: hidden;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.hero-bg .brillo {
  position: absolute;
  border-radius: 50%;
  opacity: 0.55;
  will-change: transform;
}

.hero-bg .brillo-1 {
  width: 900px;
  height: 900px;
  left: -280px;
  top: -360px;
  background: radial-gradient(circle, rgba(139, 92, 255, 0.55), transparent 62%);
  animation: deriva1 14s ease-in-out infinite;
}

.hero-bg .brillo-2 {
  width: 800px;
  height: 800px;
  right: -260px;
  top: 10%;
  background: radial-gradient(circle, rgba(255, 43, 214, 0.42), transparent 62%);
  animation: deriva2 16s ease-in-out infinite;
}

.hero-bg .brillo-3 {
  width: 700px;
  height: 700px;
  left: 30%;
  bottom: -420px;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.35), transparent 62%);
  animation: deriva1 18s ease-in-out infinite reverse;
}

@keyframes deriva1 { 50% { transform: translate(120px, 80px) scale(1.1); } }
@keyframes deriva2 { 50% { transform: translate(-140px, 60px) scale(0.92); } }

.hero-bg .piso {
  position: absolute;
  left: -50%;
  right: -50%;
  bottom: -10%;
  height: 62%;
  transform: perspective(520px) rotateX(64deg);
  transform-origin: 50% 100%;
  background-image:
    linear-gradient(rgba(0, 229, 255, 0.38) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 43, 214, 0.32) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: linear-gradient(to top, #000 10%, transparent 85%);
  mask-image: linear-gradient(to top, #000 10%, transparent 85%);
  animation: avanzar 2.2s linear infinite;
}

@keyframes avanzar { to { background-position: 0 64px; } }

.hero-bg .lineas-scan {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 4px);
  pointer-events: none;
}

.hero-bg .foco {
  position: absolute;
  left: 0;
  top: 0;
  width: 700px;
  height: 700px;
  margin: -350px 0 0 -350px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.16), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
  will-change: transform;
}

.hero-section:hover .foco { opacity: 1; }

.hero-content {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}

.badge-new {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px 9px 12px;
  margin-bottom: 26px;
  font: 600 0.82rem/1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--texto);
  background: rgba(57, 255, 136, 0.08);
  border-left: 3px solid var(--verde);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%);
}

.badge-new .punto {
  width: 8px;
  height: 8px;
  background: var(--verde);
  box-shadow: 0 0 12px var(--verde);
  animation: parpadeo 1.2s steps(2) infinite;
}

@keyframes parpadeo { 50% { opacity: 0.2; } }

.hero-title {
  font-family: var(--titulo);
  font-style: italic;
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(3.2rem, 7vw, 7.6rem);
  line-height: 0.84;
  letter-spacing: -0.01em;
  margin-bottom: 26px;
}

.hero-title .linea {
  display: block;
  overflow: hidden;
  padding: 0 0.06em 0.04em 0;
}

.hero-title .linea > span {
  display: inline-block;
  transform: translateY(105%) skewY(6deg);
  animation: subir 0.9s var(--golpe) forwards;
}

.hero-title .linea:nth-child(1) > span { animation-delay: 0.85s; }
.hero-title .linea:nth-child(2) > span { animation-delay: 0.97s; }

.hero-title .linea > .gradient-text {
  animation: subir 0.9s var(--golpe) 0.97s forwards, correr 4s linear infinite;
  filter: drop-shadow(0 0 26px rgba(255, 43, 214, 0.4));
}

.hero-title .linea > .glitch {
  animation: subir 0.9s var(--golpe) 0.85s forwards, glitch 0.55s steps(2) 1.6s 1;
}

@keyframes subir { to { transform: none; } }

@keyframes glitch {
  0% { text-shadow: 4px 0 var(--magenta), -4px 0 var(--cian); }
  20% { text-shadow: -5px 0 var(--magenta), 5px 0 var(--cian); }
  40% { text-shadow: 3px 2px var(--magenta), -3px -2px var(--cian); }
  60% { text-shadow: -2px 0 var(--magenta), 2px 0 var(--cian); }
  100% { text-shadow: none; }
}

.hero-subtitle {
  font-size: clamp(1rem, 1.3vw, 1.14rem);
  color: var(--texto-2);
  max-width: 520px;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 52px;
}

.hero-actions .btn-primary,
.hero-actions .btn-secondary {
  padding: 19px 30px;
  font-size: 1.08rem;
}

.hero-stats {
  display: flex;
  gap: 34px;
}

.stat-item {
  position: relative;
  padding-left: 14px;
}

.stat-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  background: var(--rgb);
  background-size: 100% 300%;
  animation: correrv 3s linear infinite;
}

.stat-number {
  font: italic 800 2.5rem/1 var(--titulo);
  letter-spacing: 0.01em;
}

.stat-label {
  margin-top: 6px;
  font: 500 0.76rem var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--texto-3);
}

/* Entradas de la portada (esperan al barrido de luz) */
.hero-section .entra {
  opacity: 0;
  animation: aparecer 0.8s var(--golpe) forwards;
  animation-delay: calc(var(--i, 0) * 100ms + 0.9s);
}

/* Si la persona ya vio el barrido en esta visita, todo entra más rápido */
.sin-intro .hero-section .entra { animation-delay: calc(var(--i, 0) * 80ms + 0.1s); }
.sin-intro .hero-title .linea:nth-child(1) > span,
.sin-intro .hero-title .linea > .glitch { animation-delay: 0.05s, 0.8s; }
.sin-intro .hero-title .linea:nth-child(2) > span,
.sin-intro .hero-title .linea > .gradient-text { animation-delay: 0.15s, 0s; }

/* Tarjetas 3D de la portada */
.hero-visual {
  position: relative;
  height: 560px;
  perspective: 1100px;
}

.hero-visual .anillo {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 440px;
  height: 440px;
  margin: -220px 0 0 -220px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent, rgba(255, 43, 214, 0.7), rgba(139, 92, 255, 0.7), rgba(0, 229, 255, 0.8), transparent 75%);
  -webkit-mask: radial-gradient(circle, transparent 66%, #000 67%, #000 68.5%, transparent 69.5%);
  mask: radial-gradient(circle, transparent 66%, #000 67%, #000 68.5%, transparent 69.5%);
  animation: rotar 9s linear infinite;
  opacity: 0.85;
}

.hero-visual .anillo.dos {
  width: 540px;
  height: 540px;
  margin: -270px 0 0 -270px;
  animation-duration: 15s;
  animation-direction: reverse;
  opacity: 0.35;
}

.grupo-3d {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transition: transform 0.5s var(--rapido);
}

.floating-card {
  position: absolute;
  width: min(240px, 54%);
  transform-style: preserve-3d;
  animation: flotar 6s ease-in-out infinite;
}

.card-1 { left: 0; top: 2%; --rot: -8deg; --z: 20px; }
.card-2 { right: 0; top: 37%; --rot: 6deg; --z: 80px; animation-delay: -2s; z-index: 2; }
.card-3 { left: 12%; bottom: 0; --rot: -3deg; --z: 50px; animation-delay: -4s; }

@keyframes flotar {
  0%, 100% { transform: translateZ(var(--z)) rotate(var(--rot)) translateY(0); }
  50% { transform: translateZ(var(--z)) rotate(var(--rot)) translateY(-16px); }
}

/* Marco con borde RGB que gira (portada, categorías y productos) */
.marco {
  position: relative;
  padding: 1px;
  overflow: hidden;
  isolation: isolate;
  clip-path: var(--chaflan);
  background: var(--linea-2);
}

.marco::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: -1;
  width: 260%;
  aspect-ratio: 1;
  background: conic-gradient(from 0deg, #ff2bd6, #8b5cff, #00e5ff, #39ff88, #ffb000, #ff2bd6);
  transform: translate(-50%, -50%) rotate(0deg);
  animation: rotar-marco 4s linear infinite;
  opacity: var(--brillo-marco, 0);
  transition: opacity 0.35s;
}

@keyframes rotar-marco { to { transform: translate(-50%, -50%) rotate(360deg); } }

.marco > .interior {
  position: relative;
  height: 100%;
  clip-path: var(--chaflan);
  background: var(--panel);
}

.floating-card .marco {
  --brillo-marco: 1;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.9);
}

.floating-card .interior {
  padding: 10px;
  background: linear-gradient(180deg, #15151f, #0b0b12);
}

.floating-card .foto {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  display: grid;
  place-items: center;
  margin-bottom: 10px;
  background: #000;
  color: var(--texto-3);
  clip-path: var(--chaflan-chico);
}

.floating-card .foto svg.ico { width: 40px; height: 40px; }

.floating-card .foto img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.floating-card .fila {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 2px 4px 4px;
}

.card-title {
  font: italic 800 1.12rem/1.1 var(--titulo);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.card-price {
  font: 700 0.85rem var(--mono);
  color: var(--cian);
  text-shadow: 0 0 12px rgba(0, 229, 255, 0.6);
  white-space: nowrap;
}

/* ===================== Secciones de la portada ===================== */
.categories-section,
.features-section {
  position: relative;
  padding: 120px 0;
}

.categories-section .section-header,
.products-section .section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 50px;
  text-align: left;
}

.section-header .etiqueta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font: 500 0.78rem var(--mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cian);
}

.section-header .etiqueta::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--cian);
  box-shadow: 0 0 10px var(--cian);
}

.categories-section .section-header h2,
.products-section .section-header h2 {
  font: italic 900 clamp(2.6rem, 5.6vw, 4.6rem)/0.9 var(--titulo);
  text-transform: uppercase;
  letter-spacing: -0.005em;
}

.categories-section .section-header p,
.products-section .section-header p {
  color: var(--texto-2);
  max-width: 300px;
  padding-bottom: 6px;
}

/* Categorías */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.category-item {
  display: block;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.category-item .marco { height: 100%; --brillo-marco: 0; }
.category-item:hover .marco { --brillo-marco: 1; }

.category-item .interior {
  display: flex;
  flex-direction: column;
  min-height: 230px;
  padding: 28px 26px 24px;
  overflow: hidden;
  background: linear-gradient(160deg, var(--panel-2), var(--panel) 60%);
}

.category-item .interior::before {
  content: "";
  position: absolute;
  right: -80px;
  top: -80px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent), transparent 65%);
  opacity: 0.12;
  transition: opacity 0.4s, transform 0.6s var(--golpe);
}

.category-item:hover .interior::before {
  opacity: 0.38;
  transform: scale(1.3);
}

.category-item .num {
  position: absolute;
  right: 20px;
  top: 14px;
  font: italic 900 4.4rem/1 var(--titulo);
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.1);
  transition: -webkit-text-stroke-color 0.3s, transform 0.5s var(--golpe);
}

.category-item:hover .num {
  -webkit-text-stroke-color: var(--accent);
  transform: translateX(-6px);
}

.category-icon {
  position: relative;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  margin-bottom: auto;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  clip-path: var(--chaflan-chico);
  transition: background 0.3s, color 0.3s;
}

.category-icon svg.ico {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 0 6px var(--accent));
}

.category-item:hover .category-icon {
  background: var(--accent);
  color: #050508;
}

.category-item:hover .category-icon svg.ico { filter: none; }

.category-item h3 {
  position: relative;
  margin-top: 30px;
  font: italic 800 1.75rem/1 var(--titulo);
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.category-item p {
  position: relative;
  margin-top: 6px;
  color: var(--texto-2);
  font-size: 0.95rem;
}

.category-count {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--linea);
  font: 500 0.78rem var(--mono);
  letter-spacing: 0.06em;
  color: var(--accent);
}

.category-count .flecha {
  font-size: 1.1rem;
  color: var(--texto);
  opacity: 0;
  transform: translateX(-8px);
  transition: transform 0.35s var(--golpe), opacity 0.3s;
}

.category-item:hover .category-count .flecha {
  opacity: 1;
  transform: none;
}

.category-card {
  text-decoration: none;
  color: inherit;
  display: block;
}

/* Productos destacados */
.products-section {
  position: relative;
  padding: 180px 0;
  background: var(--negro-2);
  clip-path: polygon(0 70px, 100% 0, 100% calc(100% - 70px), 0 100%);
}

.products-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
}

.products-section .products-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.products-section .products-grid > a {
  display: block;
  color: inherit;
  text-decoration: none;
  perspective: 900px;
}

.products-section .product-card {
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.2s ease-out;
}

.products-section .product-card .marco { height: 100%; --brillo-marco: 0; }
.products-section .products-grid > a:hover .marco { --brillo-marco: 1; }

.products-section .product-card .interior {
  display: flex;
  flex-direction: column;
  padding: 10px;
}

.products-section .product-image {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #000;
  color: var(--texto-3);
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
}

.products-section .product-image svg.ico { width: 40px; height: 40px; }

.products-section .product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--golpe);
}

.products-section .products-grid > a:hover .product-image img { transform: scale(1.07); }

.products-section .product-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.18) 50%, transparent 65%);
  transform: translateX(-100%);
  transition: transform 0.9s var(--golpe);
}

.products-section .products-grid > a:hover .product-image::after { transform: translateX(100%); }

.products-section .product-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 18px 10px 8px;
}

.products-section .product-category {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font: 500 0.72rem var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--texto-3);
}

.products-section .product-category::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--magenta);
  box-shadow: 0 0 8px var(--magenta);
}

.products-section .product-title {
  margin-bottom: 20px;
  font: italic 800 1.45rem/1.05 var(--titulo);
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.products-section .product-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.products-section .product-price {
  font: 700 1.3rem var(--mono);
  color: var(--cian);
  text-shadow: 0 0 16px rgba(0, 229, 255, 0.45);
  white-space: nowrap;
}

.products-section .product-btn {
  padding: 12px 16px;
  border: 0;
  background: rgba(255, 255, 255, 0.06);
  color: var(--texto);
  font: italic 800 0.92rem/1 var(--titulo);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  transition: color 0.25s, background 0.25s;
}

.products-section .products-grid > a:hover .product-btn {
  color: #050508;
  background: var(--rgb);
  background-size: 200% 100%;
  animation: correr 3s linear infinite;
}

/* Características */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.feature-card {
  position: relative;
  padding: 30px 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent);
  clip-path: var(--chaflan);
  transition: background 0.3s;
}

.feature-card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: var(--rgb);
  background-size: 200% 100%;
  animation: correr 5s linear infinite;
  transform: scaleX(0.18);
  transform-origin: left;
  transition: transform 0.5s var(--golpe);
}

.feature-card:hover::before { transform: scaleX(1); }
.feature-card:hover { background: linear-gradient(180deg, rgba(0, 229, 255, 0.07), transparent); }

.feature-icon {
  color: var(--cian);
  margin-bottom: 20px;
}

.feature-icon svg.ico {
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 0 8px rgba(0, 229, 255, 0.6));
}

.feature-card h3 {
  margin-bottom: 6px;
  font: italic 800 1.3rem/1.05 var(--titulo);
  text-transform: uppercase;
}

.feature-card p {
  color: var(--texto-3);
  font-size: 0.93rem;
}

/* ===================== Pie de página ===================== */
.footer {
  position: relative;
  padding: 90px 0 34px;
  background: #030305;
  overflow: hidden;
}

.footer::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: var(--rgb);
  background-size: 200% 100%;
  animation: correr 6s linear infinite;
}

.footer::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 900px;
  height: 300px;
  margin-left: -450px;
  background: radial-gradient(ellipse at top, rgba(139, 92, 255, 0.18), transparent 70%);
  pointer-events: none;
}

.footer .container { position: relative; z-index: 1; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 60px;
}

.footer-brand .logo-image { height: 64px; }

.footer-brand p {
  color: var(--texto-3);
  margin: 18px 0 24px;
  max-width: 280px;
}

.social-links {
  display: flex;
  gap: 10px;
}

.social-link {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--texto-2);
  background: rgba(255, 255, 255, 0.04);
  text-decoration: none;
  font-size: 1.1rem;
  clip-path: var(--chaflan-chico);
  transition: color 0.2s, background 0.2s, transform 0.25s var(--rapido);
}

.social-link:hover {
  color: #050508;
  background: var(--magenta);
  transform: translateY(-3px);
}

.social-link svg.ico { width: 18px; height: 18px; }

.footer-col h4 {
  margin-bottom: 18px;
  font: italic 800 1.05rem var(--titulo);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.footer-col ul {
  list-style: none;
  display: grid;
  gap: 12px;
}

.footer-col a {
  color: var(--texto-2);
  text-decoration: none;
  transition: color 0.2s, padding 0.25s var(--rapido);
}

.footer-col a:hover {
  color: var(--cian);
  padding-left: 6px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 28px;
  border-top: 1px solid var(--linea);
  color: var(--texto-3);
  font: 500 0.8rem var(--mono);
  letter-spacing: 0.04em;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  color: var(--texto-3);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--texto); }

/* ===================== Aparición al bajar ===================== */
/* Solo se esconden si el código de animación está activo (si falla, todo se ve igual) */
.js-anim .aparece {
  opacity: 0;
  transform: translateY(46px) skewY(2deg);
  transition: opacity 0.8s var(--golpe), transform 0.9s var(--golpe);
  transition-delay: calc(var(--i, 0) * 80ms);
}

.js-anim .aparece.visible {
  opacity: 1;
  transform: none;
}

/* ===================== Tablet ===================== */
@media (max-width: 1000px) {
  .hero-section {
    min-height: auto;
    padding: 140px 0 90px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .hero-visual {
    height: auto;
    perspective: none;
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin: 0 calc(-1 * var(--margen));
    padding: 10px var(--margen) 20px;
    scrollbar-width: none;
  }

  .hero-visual::-webkit-scrollbar { display: none; }
  .hero-visual .anillo { display: none; }

  .grupo-3d {
    position: static;
    display: contents;
    transform: none !important;
  }

  .floating-card {
    position: static;
    flex: 0 0 230px;
    width: auto;
    animation: none;
    scroll-snap-align: start;
  }

  .categories-grid,
  .products-section .products-grid { grid-template-columns: repeat(2, 1fr); }

  .features-grid { grid-template-columns: repeat(2, 1fr); }

  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

/* ===================== Celular ===================== */
@media (max-width: 720px) {
  .nav-content {
    flex-wrap: wrap;
    min-height: 64px;
    gap: 10px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .logo-image { height: 38px; }

  .nav-links {
    order: 3;
    width: calc(100% + 2 * var(--margen));
    margin: -4px calc(-1 * var(--margen)) -10px;
    padding: 0 calc(var(--margen) - 10px) 4px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .nav-links::-webkit-scrollbar { display: none; }

  .nav-links a {
    white-space: nowrap;
    font-size: 0.95rem;
    padding: 11px 10px;
  }

  .nav-actions {
    gap: 6px;
    margin-left: auto;
  }

  .search-btn,
  .cart-btn {
    min-width: 40px;
    height: 40px;
  }

  .login-btn {
    padding: 12px 10px;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    margin-left: 0;
  }

  .user-btn { height: 40px; padding-right: 4px; }
  .user-btn span:not(.user-avatar) { display: none; }

  .hero-section { padding-top: 160px; }

  .hero-actions .btn-primary,
  .hero-actions .btn-secondary {
    flex: 1;
    padding: 18px 14px;
    font-size: 1rem;
  }

  .hero-stats { gap: 20px; }
  .stat-number { font-size: 1.9rem; }

  .categories-section,
  .features-section { padding: 80px 0; }

  .products-section {
    padding: 120px 0;
    clip-path: polygon(0 36px, 100% 0, 100% calc(100% - 36px), 0 100%);
  }

  .categories-section .section-header,
  .products-section .section-header {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 30px;
  }

  .categories-grid { gap: 10px; }

  .category-item .interior {
    min-height: 190px;
    padding: 20px 18px 18px;
  }

  .category-item .num { font-size: 3rem; right: 12px; }
  .category-icon { width: 46px; height: 46px; }
  .category-item h3 { font-size: 1.3rem; margin-top: 22px; }
  .category-item p { font-size: 0.85rem; }

  .products-section .products-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .features-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .feature-card { padding: 22px 16px; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-brand .logo-image { height: 54px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 400px) {
  .categories-grid,
  .features-grid { grid-template-columns: 1fr; }
}

/* Si el teléfono o computador pide "reducir movimiento", se apagan las animaciones */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .arranque { display: none; }

  .hero-section .entra,
  .hero-title .linea > span {
    opacity: 1;
    transform: none;
  }

  .js-anim .aparece {
    opacity: 1;
    transform: none;
  }
}
