/*
 * root.css — Design tokens globales
 *
 * ── Instrucciones ─────────────────────────────────────────────────────────
 *  Este archivo define ÚNICAMENTE variables CSS (:root).
 *  No contiene clases, selectores ni estilos concretos — solo tokens.
 *
 *  Reglas:
 *  1. Nunca uses valores hardcodeados en otros CSS — siempre var(--token)
 *  2. Para agregar un color nuevo, defínelo aquí primero
 *  3. Los tokens de spacing siguen escala de 4px
 *  4. Si necesitas un valor que no existe aquí, agrégalo con su nombre semántico
 *
 * ─────────────────────────────────────────────────────────────────────── */

:root {
  /* ── Paleta ────────────────────────────────────────────────────────── */
  --background: #0a0a0c;
  --surface: #111114;
  --surface-2: #16161a;
  --line: #1f1f23;
  --line-2: #2a2a30;
  --text: #ededef;
  --muted: #9a9aa2;
  --dim: #5e5e66;
  --accent: #c8f169;
  --accent-ink: #0a0a0c;
  --danger: #ff5b5b;

  /* ── Tipografía ────────────────────────────────────────────────────── */
  --font-display: "Archivo", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --size-xxs: 0.65rem;
  --size-xs: 0.74rem;
  --size-sm: 0.87rem;
  --size-md: 1rem;
  --size-lg: 1.2rem;
  --size-xl: clamp(2.9rem, 7vw, 5.4rem);
  --size-2xl: clamp(3.6rem, 8vw, 6.4rem);

  --weight-regular: 400;
  --weight-medium: 600;
  --weight-bold: 700;
  --weight-black: 900;

  --leading-tight: 1.2;
  --leading-normal: 1.5;
  --leading-loose: 1.75;

  /* ── Espaciado (escala 4px) ────────────────────────────────────────── */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  /* ── Layout ────────────────────────────────────────────────────────── */
  --pad: clamp(1rem, 5vw, 4rem); /* padding lateral global */
  --header-h: 64px; /* altura del header sticky */

  /* ── Z-index ───────────────────────────────────────────────────────── */
  --z-header: 100;
  --z-cart: 200;
  --z-modal: 300;

  /* ── Bordes ────────────────────────────────────────────────────────── */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* ── Sombras ───────────────────────────────────────────────────────── */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);

  /* ── Transiciones ──────────────────────────────────────────────────── */
  --dur-fast: 0.12s;
  --dur-base: 0.22s;
  --dur-slow: 0.4s;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --transition: var(--dur-base) var(--ease);
}

/* ── Base ─────────────────────────────────────────────────────────────── */
body {
  font-family: var(--font-body);
  font-size: var(--size-md);
  color: var(--text);
  background: var(--background);
  line-height: var(--leading-normal);
}

/* ── Utilidad: padding lateral global ─────────────────────────────────── */
.general__padding {
  padding-inline: var(--pad);
  width: 100%;
}
/* ── Botones ─────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.3rem;
  font-family: var(--font-mono);
  font-size: var(--size-xs);
  font-weight: var(--weight-medium);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  transition:
    background var(--dur-fast),
    color var(--dur-fast),
    border-color var(--dur-fast);
  white-space: nowrap;
  cursor: pointer;
}

/* Primario — fondo accent */
.btn--primary,
.btn:not([class*="btn--"]) {
  background: var(--accent);
  color: var(--accent-ink);
  border: 1px solid var(--accent);
}

.btn--primary:hover,
.btn:not([class*="btn--"]):hover {
  background: transparent;
  color: var(--accent);
}

/* Ghost — borde visible, fondo transparente */
.btn--ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line-2);
}

.btn--ghost:hover {
  color: var(--text);
  border-color: var(--text);
}

/* Danger */
.btn--danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
}

.btn--danger:hover {
  background: var(--danger);
  color: var(--background);
}

/* Tamaños */
.btn--sm {
  padding: 0.4rem 0.9rem;
  font-size: var(--size-xxs);
}

.btn--lg {
  padding: 0.85rem 1.8rem;
  font-size: var(--size-sm);
}

/* Full width */
.btn--full {
  width: 100%;
  justify-content: center;
}

/* Disabled */
.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.btn [data-lucide] {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
