/* ============ TOKENS / TEMA ============ */
:root {
  --radius: 0px;
  --background: #0f0f0f;
  --foreground: #f7f7f7;
  --card: #161616;
  --secondary: #232323;
  --muted-foreground: #9c9c9c;
  --border: #383838;
  --terminal: #a6e88f;   /* verde terminal */
  --signal: #e0745a;     /* rojo/naranja señal */
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --font-display: "Anton", "Archivo Black", "Arial Black", sans-serif;
  --font-label: "Rajdhani", "JetBrains Mono", sans-serif;
}

* { box-sizing: border-box; border-color: var(--border); }
html { -webkit-font-smoothing: antialiased; }

body {
  margin: 0;
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-label);
  font-weight: 600;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  margin: 0;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; background: none; color: inherit; border: none; cursor: pointer; }
img { display: block; max-width: 100%; }

::selection { background: var(--terminal); color: var(--background); }

.muted { color: var(--muted-foreground); }
.hide-mobile { display: none; }
@media (min-width: 640px) { .hide-mobile { display: inline; } }
.pr-4 { padding-right: 1rem; }

/* ============ UTILIDADES DE SISTEMA ============ */

.scanlines { position: relative; }
.scanlines::after {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0,0,0,0.4) 0px, rgba(0,0,0,0.4) 1px,
    transparent 1px, transparent 3px
  );
  opacity: 0.35;
  z-index: 20;
}

.noise { position: relative; min-height: 100vh; }
.noise::before {
  content: "";
  position: absolute; inset: -50%;
  pointer-events: none;
  z-index: 15;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.6s steps(2) infinite;
}

.grid-lines {
  position: absolute; inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--border) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.25;
}

.glitch-text {
  position: relative;
  text-shadow:
    1.5px 0 0 rgba(224,116,90,0.8),
    -1.5px 0 0 rgba(166,232,143,0.7);
  animation: glitch-shift 4s infinite steps(1);
}

.marquee-track {
  display: inline-flex;
  white-space: nowrap;
  animation: marquee 28s linear infinite;
}

.hover-invert { transition: background-color 0.12s linear, color 0.12s linear; }
.hover-invert:hover { background: var(--foreground); color: var(--background); }

.caret::after { content: "_"; animation: blink 1.05s steps(1) infinite; }

@keyframes grain {
  0% { transform: translate(0,0); }
  50% { transform: translate(-3%,2%); }
  100% { transform: translate(2%,-3%); }
}
@keyframes glitch-shift {
  0%, 92%, 100% { transform: translate(0); }
  93% { transform: translate(-2px,1px); }
  95% { transform: translate(2px,-1px); }
  97% { transform: translate(-1px,-1px); }
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* ============ SPLASH ============ */
.splash {
  position: fixed; inset: 0; z-index: 100;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 2rem;
  background: var(--background);
  transition: opacity 0.4s ease;
}
.splash.closing { opacity: 0; pointer-events: none; }
.splash-logo {
  width: 20rem;
  filter: invert(1) brightness(2);
}
@media (min-width: 640px) { .splash-logo { width: 26rem; } }
@media (min-width: 1024px) { .splash-logo { width: 30rem; } }

/* ============ BOTONES ============ */
.btn-outline {
  border: 1px solid var(--foreground);
  padding: 0.6rem 2rem;
  font-size: 0.65rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
}
.btn-outline-solid {
  margin-top: 2rem;
  border: 1px solid var(--foreground);
  padding: 1rem 2.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  display: inline-block;
}
.border-btn {
  border: 1px solid var(--border);
  padding: 0.25rem 0.5rem;
}

/* ============ SYSTEM BAR ============ */
.system-bar {
  position: fixed; inset-inline: 0; top: 0; z-index: 50;
  border-bottom: 1px solid var(--border);
  background: rgba(15,15,15,0.85);
  backdrop-filter: blur(6px);
}
.system-bar-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.75rem 1rem;
  font-size: 11px; font-weight: 700; letter-spacing: 0.25em; text-transform: uppercase;
}
#clock { font-family: var(--font-mono); font-weight: 400; }
.system-bar-left { display: flex; align-items: center; gap: 0.75rem; }
.logo-mark { height: 1.25rem; width: 1.25rem; }
.system-bar-nav { display: flex; align-items: center; gap: 1rem; }
.nav-link { padding: 0.25rem 0.5rem; }

/* ============ HERO ============ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  padding: 4rem 1rem 0;
}
.hero-content {
  position: relative; z-index: 10;
  display: flex; flex-direction: column;
  align-items: center; text-align: center;
}
.hero-logo {
  width: 14rem;
  mix-blend-mode: lighten;
}
@media (min-width: 640px) { .hero-logo { width: 19rem; } }
@media (min-width: 768px) { .hero-logo { width: 22rem; } }

.hero-title {
  margin-top: 2rem;
  font-size: 13vw;
  line-height: 0.82;
  font-weight: 900;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}
@media (min-width: 640px) { .hero-title { font-size: 9vw; } }

.hero-sub {
  margin-top: 1.5rem;
  max-width: 28rem;
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--muted-foreground);
  text-transform: uppercase;
}

.boot-box {
  margin-top: 2.5rem;
  min-height: 6rem;
  width: 100%; max-width: 24rem;
  border: 1px solid var(--border);
  background: var(--card);
  padding: 1rem;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--terminal);
}

/* ============ TICKER ============ */
.ticker {
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--secondary);
  padding: 0.5rem 0;
}

/* ============ SECCIONES GENERALES ============ */
.section { padding: 5rem 1rem; }
.section-header {
  margin-bottom: 2.5rem;
  display: flex; align-items: flex-end; justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
}
.section-title {
  font-size: 1.875rem; font-weight: 900;
  letter-spacing: -0.03em; text-transform: uppercase;
}
@media (min-width: 640px) { .section-title { font-size: 3rem; } }
.tag-live {
  font-size: 10px; letter-spacing: 0.3em;
  color: var(--signal); text-transform: uppercase;
}
.small-tag { font-size: 10px; letter-spacing: 0.3em; text-transform: uppercase; }

/* ============ CATEGORÍAS DE PRODUCTO ============ */
.category-block { margin-bottom: 3.5rem; }
.category-block:last-child { margin-bottom: 0; }

.category-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1rem;
}
.category-title {
  font-size: 1.1rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--terminal);
}
@media (min-width: 640px) { .category-title { font-size: 1.4rem; } }

.category-nav { display: flex; gap: 0.5rem; }
.cat-arrow {
  width: 2rem; height: 2rem;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
  font-size: 16px; line-height: 1;
}

/* ============ DROP GRID / CATEGORY ROW ============ */
.category-row {
  display: flex;
  gap: 1px;
  background: var(--border);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.category-row::-webkit-scrollbar { display: none; }

.drop-item {
  background: var(--background);
  flex: 0 0 100%;
  scroll-snap-align: start;
  cursor: pointer;
}
@media (min-width: 640px) { .drop-item { flex: 0 0 50%; } }
@media (min-width: 1024px) { .drop-item { flex: 0 0 25%; } }

/* sin marco: la foto de frente y de espalda se cruzan en hover */
.drop-media { position: relative; overflow: hidden; background: var(--card); aspect-ratio: 4 / 5; }
.drop-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  transition: opacity 0.35s ease, transform 0.5s ease;
}
.drop-img-front { position: relative; }
.drop-img-back { opacity: 0; }
.drop-item:hover .drop-img-back { opacity: 1; }
.drop-item:hover .drop-img-front { opacity: 0; }
.drop-item:hover .drop-img { transform: scale(1.04); }

.drop-status {
  position: absolute; top: 0.75rem; left: 0.75rem; z-index: 2;
  font-size: 9px; letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--signal);
}
.drop-info {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.85rem 0.15rem 0;
  font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase;
}
.drop-name { line-height: 1.3; }
.drop-sku { font-size: 9px; margin-top: 0.2rem; letter-spacing: 0.2em; }

/* ============ CAMPAIGN ============ */
.campaign { position: relative; }
.campaign-img {
  height: 70vh; width: 100%; object-fit: cover;
  opacity: 0.6; filter: grayscale(1);
}
.campaign-overlay {
  position: absolute; inset: 0; z-index: 10;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 0 1rem; text-align: center;
}
.campaign-text {
  font-family: var(--font-display);
  font-size: 2.25rem; line-height: 0.9; font-weight: 400;
  letter-spacing: -0.02em; text-transform: uppercase; margin: 0;
}
@media (min-width: 640px) { .campaign-text { font-size: 4.5rem; } }
.campaign-sub {
  margin-top: 1.5rem; font-size: 10px; letter-spacing: 0.4em;
  color: var(--muted-foreground); text-transform: uppercase;
}

/* ============ ARCHIVE ============ */
.archive-box { border: 1px solid var(--border); background: var(--card); padding: 0.5rem; }
.archive-img { width: 100%; object-fit: contain; opacity: 0.9; filter: grayscale(1) invert(1) contrast(1.25); }

/* ============ ACCESS ============ */
.access-section { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 5rem 1rem; }
.access-inner { margin: 0 auto; max-width: 36rem; text-align: center; }
.access-title { font-size: 1.5rem; font-weight: 900; letter-spacing: -0.03em; text-transform: uppercase; }
@media (min-width: 640px) { .access-title { font-size: 2.25rem; } }
.access-sub { margin-top: 1rem; font-size: 11px; letter-spacing: 0.25em; color: var(--muted-foreground); text-transform: uppercase; }
.access-form { margin-top: 2rem; display: flex; border: 1px solid var(--border); }
.access-prompt { display: flex; align-items: center; padding: 0 0.75rem; color: var(--terminal); font-family: var(--font-mono); }
.access-input {
  width: 100%; background: transparent; border: none; outline: none;
  padding: 1rem; font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--foreground); font-family: inherit;
}
.access-input::placeholder { color: var(--muted-foreground); }
.access-btn { border-left: 1px solid var(--border); padding: 0 1.5rem; font-size: 10px; letter-spacing: 0.3em; text-transform: uppercase; }

/* ============ FOOTER ============ */
.footer { padding: 2.5rem 1rem; font-size: 10px; letter-spacing: 0.3em; text-transform: uppercase; }
.footer-inner {
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  gap: 1rem;
}
@media (min-width: 640px) { .footer-inner { flex-direction: row; } }

/* ============ OVERLAY (compartido: cart / product / checkout) ============ */
.overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(0,0,0,0.7);
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
}
.overlay.open { opacity: 1; pointer-events: auto; }

.modal-close {
  position: absolute; top: 0.75rem; right: 0.75rem;
  width: 2rem; height: 2rem;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
  font-size: 18px; line-height: 1;
  background: var(--background);
  z-index: 2;
}

/* ============ CART DRAWER ============ */
.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 70;
  width: 100%; max-width: 24rem;
  background: var(--background);
  border-left: 1px solid var(--border);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}
.cart-drawer.open { transform: translateX(0); }
.cart-drawer-header {
  position: relative;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 1rem;
  border-bottom: 1px solid var(--border);
}
.cart-drawer-title { font-size: 1.1rem; letter-spacing: 0.05em; text-transform: uppercase; }
.cart-items { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: 1rem; }
.cart-empty { text-align: center; padding: 2rem 0; font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase; }

.cart-line { display: flex; gap: 0.75rem; }
.cart-line-img { width: 4.5rem; height: 5.5rem; object-fit: cover; background: var(--card); flex-shrink: 0; }
.cart-line-info { flex: 1; min-width: 0; }
.cart-line-name { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; }
.cart-line-size { font-size: 10px; margin-top: 0.25rem; letter-spacing: 0.15em; text-transform: uppercase; }
.cart-line-qty { display: flex; align-items: center; gap: 0.6rem; margin-top: 0.6rem; font-family: var(--font-mono); font-size: 11px; }
.cart-line-qty button {
  width: 1.5rem; height: 1.5rem; border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
}
.cart-line-right { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; font-size: 11px; }
.cart-line-remove { font-size: 9px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--muted-foreground); text-decoration: underline; }

.cart-footer { border-top: 1px solid var(--border); padding: 1rem; }
.cart-subtotal { display: flex; justify-content: space-between; font-size: 12px; letter-spacing: 0.15em; text-transform: uppercase; margin-bottom: 1rem; }
.cart-checkout-btn { width: 100%; }
.cart-checkout-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.cart-checkout-btn:disabled:hover { background: none; color: var(--foreground); }

/* ============ PRODUCT QUICK-VIEW MODAL ============ */
.product-modal {
  position: fixed; z-index: 71;
  top: 50%; left: 50%;
  transform: translate(-50%, -48%);
  width: min(94vw, 62rem);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--background);
  border: 1px solid var(--border);
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.product-modal.open { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%); }
.product-modal-inner { display: flex; flex-direction: column; }
@media (min-width: 768px) { .product-modal-inner { flex-direction: row; } }

.product-slider { position: relative; background: var(--card); flex: 0 0 50%; }
.slider-viewport { overflow: hidden; aspect-ratio: 4 / 5; }
.slider-track { display: flex; height: 100%; transition: transform 0.35s ease; }
.slide { flex: 0 0 100%; height: 100%; }
.slide img { width: 100%; height: 100%; object-fit: cover; }

.slider-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 2.25rem; height: 2.25rem;
  display: flex; align-items: center; justify-content: center;
  background: rgba(15,15,15,0.65);
  border: 1px solid var(--border);
  font-size: 18px;
}
.slider-prev { left: 0.75rem; }
.slider-next { right: 0.75rem; }
.slider-dots {
  position: absolute; bottom: 0.75rem; left: 0; right: 0;
  display: flex; justify-content: center; gap: 0.4rem;
}
.slider-dot { width: 0.4rem; height: 0.4rem; border: 1px solid var(--foreground); background: transparent; }
.slider-dot.active { background: var(--foreground); }

.product-details {
  flex: 1;
  padding: 1.5rem;
  display: flex; flex-direction: column; gap: 1.25rem;
}
.pm-title { font-size: 1.4rem; letter-spacing: -0.01em; text-transform: uppercase; }
.product-price { font-family: var(--font-mono); font-size: 1.1rem; color: var(--terminal); }

.size-label { font-size: 10px; letter-spacing: 0.25em; text-transform: uppercase; color: var(--muted-foreground); margin-bottom: 0.6rem; }
.size-options { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.size-option {
  min-width: 2.75rem; padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
}
.size-option.selected { background: var(--foreground); color: var(--background); }
.size-option:disabled { opacity: 0.3; text-decoration: line-through; cursor: not-allowed; }

.qty-stepper { display: flex; align-items: center; gap: 1rem; font-family: var(--font-mono); }
.qty-stepper button {
  width: 2rem; height: 2rem; border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
}

.pm-error { min-height: 1em; font-size: 10px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--signal); margin: 0; }

.product-actions { display: flex; gap: 0.75rem; margin-top: auto; }
.product-actions .btn-outline-solid { margin-top: 0; flex: 1; text-align: center; }
.btn-solid { background: var(--foreground); color: var(--background); }
.btn-solid:hover { background: transparent; color: var(--foreground); }

/* ============ CHECKOUT MODAL ============ */
.checkout-modal {
  position: fixed; z-index: 71;
  top: 50%; left: 50%;
  transform: translate(-50%, -48%);
  width: min(92vw, 30rem);
  max-height: 90vh; overflow-y: auto;
  background: var(--background);
  border: 1px solid var(--border);
  padding: 1.75rem 1.5rem;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.checkout-modal.open { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%); }
.checkout-title { font-size: 1.4rem; letter-spacing: -0.02em; text-transform: uppercase; margin-bottom: 1.25rem; }

.checkout-summary { border: 1px solid var(--border); background: var(--card); padding: 0.9rem; margin-bottom: 1.25rem; font-size: 11px; letter-spacing: 0.05em; }
.checkout-line { display: flex; justify-content: space-between; padding: 0.3rem 0; text-transform: uppercase; }
.checkout-total { border-top: 1px solid var(--border); margin-top: 0.4rem; padding-top: 0.6rem; font-weight: 700; color: var(--terminal); }

.checkout-form { display: flex; flex-direction: column; gap: 0.65rem; }
.checkout-form input,
.checkout-form textarea {
  width: 100%; background: var(--card); border: 1px solid var(--border);
  color: var(--foreground); font-family: inherit; font-size: 12px;
  letter-spacing: 0.05em; padding: 0.75rem; outline: none; resize: none;
}
.checkout-form input::placeholder,
.checkout-form textarea::placeholder { color: var(--muted-foreground); text-transform: uppercase; font-size: 11px; letter-spacing: 0.1em; }
.checkout-form button { margin-top: 0.4rem; padding: 0.9rem; text-align: center; }
.checkout-note { margin-top: 1rem; font-size: 9px; letter-spacing: 0.15em; text-transform: uppercase; text-align: center; }

.checkout-confirm { text-align: center; padding: 2rem 0; }
.checkout-confirm-title { font-family: var(--font-display); font-size: 1.5rem; text-transform: uppercase; color: var(--terminal); margin-bottom: 0.5rem; }
.hidden { display: none !important; }

/* ============ TOAST ============ */
.toast {
  position: fixed; left: 50%; bottom: 1.5rem; z-index: 90;
  transform: translate(-50%, 0.5rem);
  background: var(--foreground); color: var(--background);
  padding: 0.75rem 1.25rem;
  font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.toast-visible { opacity: 1; transform: translate(-50%, 0); }