/* =========================================================
   MAIN.CSS - GLITCH CODE (BASADO EN TU DISEÑO ORIGINAL)
========================================================== */

:root {
  --color-primary: #0E0E0E;
  --color-secondary: #007BFF;
  --color-accent: #A8FF00;
  --color-background: #5A5A5A;
  --color-text-light: #FFFFFF;
  --color-text-dark: #0E0E0E;
  --color-card: #151515;
  --color-green-price: #00FF55;
  --font-heading: 'Orbitron', sans-serif;
  --font-body: 'Poppins', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

/* =========================================================
   BODY: FONDO GRIS CON PUNTOS (Tu diseño exacto)
========================================================= */
body {
  font-family: var(--font-body);
  background-color: var(--color-background);
  background-image:
    radial-gradient(#2a2a2a 1px, transparent 1px),
    radial-gradient(#1a1a1a 0.5px, transparent 0.5px);
  background-size: 20px 20px, 50px 50px;
  background-position: 0 0, 25px 25px;
  color: var(--color-text-light);
  padding-top: 4.5rem;
  min-height: 100vh;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: transparent; font-family: inherit; }

/* =========================================================
   HEADER Y FOOTER (Negro sólido, sin puntos)
========================================================= */
.header-fixed, footer {
  background-color: var(--color-primary) !important;
  background-image: none !important;
}

.header-fixed {
  position: fixed; top: 0; left: 0; width: 100%;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  z-index: 1000;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.8);
}
.header-inner {
  max-width: 1280px; margin: 0 auto; padding: 1rem 1.5rem;
  display: flex; justify-content: space-between; align-items: center;
}
.logo {
  font-family: var(--font-heading); font-size: 1.5rem; font-weight: 700;
  color: var(--color-secondary); letter-spacing: 1px; text-transform: uppercase;
}

/* Navegación Desktop */
.header-nav { display: none; gap: 2rem; align-items: center; }
@media (min-width: 1024px) { .header-nav { display: flex; } }
.nav-item { position: relative; }
.nav-link { font-size: 1rem; font-weight: 600; color: var(--color-text-light); transition: color 0.3s; padding: 0.5rem 0.75rem; }
.nav-link:hover, .nav-item:hover > .nav-link { color: var(--color-secondary); }

/* Dropdowns */
.dropdown-menu {
  display: none; position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%); background: var(--color-card);
  padding: 1rem; border-radius: 0.5rem; min-width: 200px;
  border: 1px solid rgba(0, 123, 255, 0.3); box-shadow: 0 10px 30px rgba(0,0,0,0.8);
  flex-direction: column; gap: 0.5rem; z-index: 10;
}
.nav-item:hover .dropdown-menu { display: flex; }
.dropdown-menu a { font-size: 0.85rem; color: #ccc; transition: 0.2s; font-weight: 400; padding: 0; }
.dropdown-menu a:hover { color: var(--color-secondary); }
.dropdown-label { font-size: 0.75rem; color: var(--color-accent); font-weight: 700; text-transform: uppercase; margin-top: 0.5rem; }
.dropdown-divider { height: 1px; background: rgba(255,255,255,0.05); margin: 0.25rem 0; }

/* Iconos Header */
.header-icons { display: flex; align-items: center; gap: 1.2rem; }
.icon { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; transition: 0.3s; }
.icon:hover { color: var(--color-secondary); }

/* Hamburguesa y Menú Móvil */
.hamburger-btn { display: flex; flex-direction: column; gap: 4px; z-index: 1001; }
.hamburger-btn span { display: block; width: 24px; height: 2px; background: #fff; transition: 0.3s; }
@media (min-width: 1024px) { .hamburger-btn { display: none; } }

.mobile-nav {
  position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
  background: var(--color-primary); display: flex; flex-direction: column;
  padding: 6rem 2rem 2rem; gap: 1rem; transform: translateX(100%);
  transition: transform 0.4s ease; z-index: 999; overflow-y: auto;
}
.mobile-nav.open { transform: translateX(0); }
.mobile-nav a { font-size: 1.2rem; font-weight: 600; color: #fff; }
.mobile-cat-label { font-size: 0.8rem; color: var(--color-secondary); font-family: var(--font-heading); margin-top: 1rem; }

/* =========================================================
   COMPONENTES GLOBALES (Botones, Secciones, Tarjetas)
========================================================= */
.section-shell {
  background: #fff; color: var(--color-text-dark);
  box-shadow: 0 0 30px rgba(0,0,0,.35); margin: 2rem auto;
  border-radius: 1rem; overflow: hidden; max-width: 1280px;
}
.section-shell.product-dark { background: var(--color-primary); color: #fff; }

.cta-btn, .submit-btn {
  display: inline-block; background-color: var(--color-secondary); color: #fff;
  font-weight: 600; padding: 0.9rem 2rem; border-radius: 9999px; text-decoration: none;
  transition: 0.25s ease; box-shadow: 0 4px 10px rgba(0,123,255,.3); text-transform: uppercase;
  font-family: var(--font-body); letter-spacing: 1px;
}
.cta-btn:hover, .submit-btn:hover { background-color: #0093ff; transform: translateY(-2px); }

.section-title { font-family: var(--font-heading); font-size: clamp(1.6rem, 3vw, 2.5rem); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 1rem; }

/* Tarjetas */
.product-card, .blog-card {
  background: #fff; border-radius: 0.8rem; overflow: hidden;
  transition: 0.3s ease; box-shadow: 0 10px 20px rgba(0,0,0,.15);
  color: var(--color-text-dark); display: flex; flex-direction: column;
}
.product-card:hover, .blog-card:hover { transform: translateY(-5px); box-shadow: 0 14px 25px rgba(0,0,0,.22); }
.product-card img { width: 100%; height: 250px; object-fit: cover; }

/* =========================================================
   HERO INTERNOS
========================================================= */
.page-hero, .contact-hero, .legal-hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, #1a1a2e 100%);
  color: #fff; text-align: center; padding: 4rem 1.5rem; position: relative; overflow: hidden;
}
.page-hero::before, .contact-hero::before, .legal-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 20% 20%, rgba(0,123,255,.1) 0, transparent 30%),
              radial-gradient(circle at 80% 80%, rgba(168,255,0,.08) 0, transparent 30%);
}
.hero-inner { position: relative; max-width: 800px; margin: 0 auto; }
.hero-title { font-family: var(--font-heading); font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 1rem; text-shadow: 0 0 10px rgba(0,123,255,.45); }
.hero-subtitle { color: rgba(255,255,255,.82); line-height: 1.6; }

/* =========================================================
   CARRITO Y WISHLIST (LATERALES)
========================================================= */
.cart-toggle { position: relative; display: flex; align-items: center; justify-content: center; }
.cart-count {
  position: absolute; top: -6px; right: -10px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: var(--color-accent); color: #000; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

.cart-drawer { position: fixed; inset: 0; z-index: 2000; pointer-events: none; }
.cart-drawer.open { pointer-events: auto; }
.cart-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.55); opacity: 0; transition: 0.25s; }
.cart-drawer.open .cart-backdrop { opacity: 1; }
.cart-panel {
  position: absolute; top: 0; right: 0; width: min(420px, 100%); height: 100%;
  background: #111; color: #fff; display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform 0.3s ease; box-shadow: -10px 0 30px rgba(0,0,0,0.35);
}
.cart-drawer.open .cart-panel { transform: translateX(0); }

.cart-header, .cart-footer { padding: 1rem 1.25rem; border-bottom: 1px solid rgba(255,255,255,0.08); }
.cart-footer { border-bottom: none; border-top: 1px solid rgba(255,255,255,0.08); margin-top: auto; }
.cart-header { display: flex; align-items: center; justify-content: space-between; }
.cart-header h3 { margin: 0; font-family: var(--font-heading); text-transform: uppercase; letter-spacing: 1px; }
.cart-close { color: #fff; font-size: 1.25rem; cursor: pointer; }

.cart-items { padding: 1rem; overflow-y: auto; display: flex; flex-direction: column; gap: 1rem; flex: 1; }
.cart-item, .wishlist-item { display: grid; grid-template-columns: 82px 1fr auto; gap: 12px; align-items: center; background: #181818; border: 1px solid rgba(255,255,255,0.08); border-radius: 14px; padding: 12px; }
.cart-item img, .wishlist-item img { width: 82px; height: 82px; object-fit: contain; background: #fff; border-radius: 10px; padding: 6px; }
.cart-item-name { font-weight: 700; margin-bottom: 4px; }
.cart-item-meta { font-size: 0.85rem; color: #9ca3af; line-height: 1.4; }
.cart-item-price { font-weight: 700; color: var(--color-accent); white-space: nowrap; }
.cart-total-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; font-size: 1.05rem; font-weight: 600; }
.cart-empty { color: #9ca3af; text-align: center; padding: 2rem 1rem; }

.wishlist-btn { position: absolute; top: 10px; right: 10px; z-index: 10; width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.9); border: none; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0,0,0,0.15); transition: 0.2s; }
.wishlist-btn:hover { transform: scale(1.15); }
.wishlist-btn svg { width: 18px; height: 18px; fill: none; stroke: #aaa; stroke-width: 2; transition: 0.2s; }
.wishlist-btn.active svg { fill: #e53e3e; stroke: #e53e3e; }
.wishlist-btn--dark { background: rgba(30, 30, 30, 0.85); }
.wishlist-btn--dark svg { stroke: #ccc; }
.wishlist-btn--dark.active svg { fill: #e53e3e; stroke: #e53e3e; }
.wishlist-remove { background: transparent; color: #9ca3af; font-size: 1.1rem; cursor: pointer; transition: 0.2s; }
.wishlist-remove:hover { color: #e53e3e; }

/* =========================================================
   PÁGINA DE PRODUCTO
========================================================= */
.gallery-main { border-radius: 12px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,.45); background: #fff; display: flex; align-items: center; justify-content: center; aspect-ratio: 1/1; position: relative; }
#mainImage { transition: opacity .3s ease, transform .3s ease; cursor: zoom-in; }
#mainImage.fade-out { opacity: .5; transform: scale(.95); }
.gallery-thumbs-container { display: flex; gap: 1rem; overflow-x: auto; padding-bottom: .5rem; scrollbar-width: thin; }
.gallery-thumb { width: 80px; height: 80px; border-radius: 8px; cursor: pointer; border: 2px solid transparent; background: #fff; padding: 4px; transition: .2s ease; opacity: .65; flex-shrink: 0; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: contain; }
.gallery-thumb.active, .gallery-thumb:hover { border-color: var(--color-secondary); opacity: 1; transform: translateY(-2px); }

.product-info-sticky { position: sticky; top: 6rem; }
.product-title { font-family: var(--font-heading); text-transform: uppercase; letter-spacing: .5px; }
.price-tag { color: var(--color-green-price); font-family: var(--font-heading); text-shadow: 0 0 10px rgba(0,255,85,.3); }

.option-btn { border: 1px solid #444; background: transparent; color: #fff; border-radius: 999px; transition: .2s ease; }
.option-btn:hover { border-color: var(--color-secondary); background: rgba(0,123,255,.1); }
.option-btn.selected { background-color: var(--color-secondary); border-color: var(--color-secondary); color: #fff; font-weight: 600; box-shadow: 0 0 15px rgba(0,123,255,.35); }

.btn-add-cart { background-color: var(--color-accent); color: #000; font-family: var(--font-heading); font-weight: 800; letter-spacing: 1px; text-transform: uppercase; transition: .2s ease; }
.btn-add-cart:hover { transform: translateY(-2px); box-shadow: 0 0 20px rgba(168,255,0,.4); background-color: #bfff40; }

.rating-bar-bg { background: #333; height: 8px; border-radius: 4px; overflow: hidden; width: 100%; }
.rating-bar-fill { background: var(--color-secondary); height: 100%; border-radius: 4px; }

/* =========================================================
   CHECKOUT
========================================================= */
.checkout-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; max-width: 1200px; margin: 2rem auto; padding: 0 1.5rem; }
@media (min-width: 900px) { .checkout-grid { grid-template-columns: 1.2fr 1fr; } }
.checkout-section { background: var(--color-card); padding: 2rem; border-radius: 0.75rem; margin-bottom: 1.5rem; border: 1px solid rgba(255,255,255,0.05); }
.payment-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 0.75rem; }
.payment-method-btn { background: #1a1a1a; border: 1px solid #333; border-radius: 0.5rem; padding: 1rem; color: #fff; display: flex; flex-direction: column; align-items: center; gap: 0.5rem; transition: 0.2s; }
.payment-method-btn.selected { border-color: var(--color-secondary); background: rgba(0, 123, 255, 0.1); }
.confirm-btn { width: 100%; background: var(--color-accent); color: #000; font-family: var(--font-heading); font-weight: 800; font-size: 1rem; letter-spacing: 1px; text-transform: uppercase; padding: 1.1rem 2rem; border: none; border-radius: .75rem; cursor: pointer; transition: .2s ease; margin-top: 1.5rem; }
.confirm-btn:hover { background: #bfff40; transform: translateY(-2px); box-shadow: 0 0 20px rgba(168,255,0,.4); }

/* =========================================================
   CONTACTO
========================================================= */
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; padding: 2rem; background: #fff; color: #111; }
@media (min-width: 768px) { .contact-grid { grid-template-columns: 1.2fr 1fr; } }
.form-section { background: #fff; color: #111; padding: 2rem; border: 1px solid #eee; border-radius: .8rem; box-shadow: 0 0 30px rgba(0,0,0,.12); }
.info-section { background: var(--color-primary); color: #fff; padding: 2rem; border-radius: .8rem; box-shadow: 0 0 30px rgba(0,0,0,.12); }
.info-label { font-weight: 600; color: var(--color-secondary); font-size: .85rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: .5rem; }
.info-content { color: rgba(255,255,255,.9); line-height: 1.6; }
.form-label { display: block; font-weight: 600; margin-bottom: .5rem; font-size: .95rem; }
.form-input, .form-textarea, .form-select { width: 100%; padding: .9rem 1rem; border: 2px solid #e5e5e5; border-radius: .5rem; font-family: var(--font-body); font-size: 1rem; background: #fafafa; transition: .2s ease; }
.form-input:focus, .form-textarea:focus, .form-select:focus { outline: none; border-color: var(--color-secondary); box-shadow: 0 0 0 3px rgba(0,123,255,.15); background: #fff; }

/* =========================================================
   LEGALES
========================================================= */
.legal-shell { background: #fff; color: #111; margin: 2rem; border: 1px solid #ececec; border-radius: .8rem; box-shadow: 0 0 30px rgba(0,0,0,.12); overflow: hidden; }
.legal-header { padding: 1.75rem 2rem 1.25rem; border-bottom: 1px solid #e5e7eb; }
.legal-title { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 700; margin-bottom: .75rem; color: var(--color-primary); text-transform: uppercase; letter-spacing: 2px; }
.legal-tabs-row { display: flex; gap: .5rem; padding: .75rem 1.5rem; border-bottom: 1px solid #e5e7eb; background: #f9fafb; overflow-x: auto; }
.legal-tab { flex-shrink: 0; padding: .6rem 1.1rem; border-radius: 9999px; border: 1px solid transparent; background: transparent; font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #4b5563; transition: .2s ease; display: inline-flex; align-items: center; gap: .4rem; }
.legal-tab-bullet { width: 6px; height: 6px; border-radius: 9999px; background: #d1d5db; }
.legal-tab.active { background: var(--color-primary); color: #fff; border-color: var(--color-secondary); }
.legal-tab.active .legal-tab-bullet { background: var(--color-accent); box-shadow: 0 0 0 4px rgba(168,255,0,.2); }
.legal-body { padding: 1.75rem 2rem 2.25rem; }
.legal-panel { display: none; }
.legal-panel.active { display: block; }
.legal-panel h2 { font-family: var(--font-heading); font-size: 1.1rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 1rem; color: var(--color-primary); }
.legal-panel p, .legal-panel li { font-size: .92rem; line-height: 1.7; color: #374151; }
.legal-highlight { padding: .85rem 1rem; border-radius: .5rem; background: #f3f4ff; border: 1px solid #e5e7eb; font-size: .85rem; color: #4b5563; margin-bottom: 1.25rem; }

/* =========================================================
   BLOG
========================================================= */
.blog-card-img { width: 100%; height: 200px; object-fit: cover; }
.blog-card-body { padding: 1.5rem; }
.blog-tag { color: var(--color-secondary); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; margin-bottom: 0.5rem; display: block; }
.blog-card-title { font-size: 1.2rem; margin-bottom: 0.5rem; font-weight: 700; }
.blog-card-excerpt { color: #555; font-size: 0.9rem; margin-bottom: 1rem; }
.blog-card-link { color: var(--color-secondary); font-weight: 600; font-size: 0.9rem; }

/* =========================================================
   FOOTER
========================================================= */
footer { background: #111; color: #fff; margin-top: 3rem; border-top: 1px solid rgba(255,255,255,.08); }
.footer-logo { font-family: var(--font-heading); font-size: 1.25rem; color: var(--color-secondary); margin-bottom: .5rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;}

/* =========================================================
   HERO / CARRUSEL DE LA HOME (CORREGIDO)
   ========================================================= */
.hero-home {
  position: relative;
  width: 100%;
  height: 80vh;
  background: #000;
  overflow: hidden;
}

.carousel-track {
  height: 100%;
  width: 100%;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0; /* Todas ocultas por defecto */
  transition: opacity 1s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* El contenedor que centra el texto sobre la imagen */
.carousel-overlay {
  background: rgba(0, 0, 0, 0.5); /* Oscurece un poco la foto para leer mejor */
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
}

/* Color de acento de Glitch Code (puedes ajustar el Hex si tienes uno específico) */
.carousel-text {
  font-family: var(--font-heading); /* Orbitron */
  font-weight: 900;
  font-size: clamp(1.5rem, 5vw, 3.5rem);
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 4px;
  /* Brillo sutil con tu azul oficial */
  text-shadow: 0 0 15px rgba(0, 123, 255, 0.4); 
  margin-bottom: 2rem;
  text-align: center;
}

.carousel-btn {
  font-family: var(--font-heading);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  /* USAMOS TU VARIABLE --color-secondary (#007bff) */
  background-color: var(--color-secondary);
  color: #ffffff; /* Texto en blanco para este azul */
  padding: 1rem 2.5rem;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 2px solid var(--color-secondary);
}

.carousel-btn:hover {
  background-color: transparent;
  color: var(--color-secondary);
  box-shadow: 0 0 20px rgba(0, 123, 255, 0.6);
  transform: translateY(-3px);
}

/* Dots con el azul de la página */
.dot.active {
  background: var(--color-secondary) !important;
  box-shadow: 0 0 10px rgba(0, 123, 255, 0.5);
}

/* La diapositiva activa */
.carousel-slide.active {
  opacity: 1;
  z-index: 1;
}

/* Estilo para los puntitos (dots) */
.carousel-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  border: 1px solid white;
  cursor: pointer;
  transition: all 0.3s;
}


/* =========================================================
   BLOQUES HORIZONTALES DE MARKETING (EXPLORA LA VENTAJA)
   ========================================================= */
.marketing-scroll-container {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 1rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.marketing-scroll-container::-webkit-scrollbar { display: none; }

.marketing-scroll-item {
  min-width: 280px;      /* Tamaño corregido para que se vean como tarjetas */
  max-width: 350px;
  flex: 0 0 auto;
  height: 380px;
  background-color: #111;
  background-size: cover;
  background-position: center;
  border-radius: 1rem;
  overflow: hidden;
  position: relative;
  scroll-snap-align: start;
  display: flex;
  align-items: flex-end;
  text-decoration: none;
  box-shadow: 0 10px 20px rgba(0,0,0,.3);
}

.marketing-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 70%); /* Sombra inferior para legibilidad */
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  color: #fff;
  z-index: 2; /* Asegura que el texto y el degradado pisen a la imagen */
  width: 100%;
}

.marketing-block-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.marketing-link {
  color: var(--color-accent);
  font-weight: 600;
  font-family: var(--font-body);
}


/* Hacer que los iconos del header parezcan botones */
.header-icons svg {
  cursor: pointer;
  transition: transform 0.2s ease, color 0.2s ease;
}

.header-icons svg:hover {
  color: var(--color-secondary);
  transform: scale(1.1);
}

/* Forzar que el modal esté por encima de TODO */
#authModal.gc-popup-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background: rgba(0, 0, 0, 0.8) !important;
  display: none; /* Se cambia a flex con JS */
  align-items: center !important;
  justify-content: center !important;
  z-index: 999999 !important;
  backdrop-filter: blur(5px);
}