/* ==========================================================================
   Tienda de recargas: hoja de estilos
   Idea visual: cada producto es un cupón con línea perforada (portada | talón de precio).
   ========================================================================== */

@font-face {
  font-family: "Unbounded";
  src: url("/assets/fonts/unbounded-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
}

@font-face {
  font-family: "Onest";
  src: url("/assets/fonts/onest-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;

  /* Paleta (tema claro) */
  --paper: #F4F5FB;        /* fondo de página */
  --surface: #FFFFFF;      /* tarjetas, cabecera, formularios */
  --ink: #15172B;          /* texto principal */
  --ink-2: #4A4E6A;
  --ink-3: #6E7392;
  --line: #DDE0EE;
  --indigo: #4338E0;
  --indigo-deep: #2F25B8;
  --indigo-soft: #E7E5FC;
  --sun: #FFC93C;
  --sun-soft: #FFF3CF;
  --mint: #18B57A;
  --mint-soft: #DDF5EA;
  --mint-text: #0B7A50;
  --danger: #D93A55;
  --on-color: #FFFFFF;     /* texto sobre fondos de color */
  --on-primary: #FFFFFF;   /* texto sobre el color principal */
  --on-accent: #15172B;    /* texto sobre el color de acento */
  --primary-text: #D6D3FB; /* texto secundario sobre el color principal */
  --band: #15172B;         /* franjas oscuras y pie */
  --band-text: #B9BDD6;
  --band-line: #2A2D47;
  --shadow: rgba(21, 23, 43, 0.5);

  /* Tonos de portada */
  --tone-indigo: #4338E0;
  --tone-violet: #7B3FE4;
  --tone-sun: #F2A900;
  --tone-rose: #E2456E;
  --tone-mint: #12A36C;
  --tone-sky: #1F8FE0;

  /* Tipografía */
  --font-display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --font-body: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Escala (1.25) */
  --t-xs: 0.75rem;
  --t-sm: 0.875rem;
  --t-md: 1rem;
  --t-lg: 1.25rem;
  --t-xl: 1.5625rem;
  --t-2xl: 1.953rem;

  /* Radios: grande para contenedores, medio para controles, pequeño para chips */
  --r-lg: 20px;
  --r-md: 12px;
  --r-sm: 8px;

  --wrap: 1200px;
  --gutter: 16px;
  --notch: var(--paper);
  --focus: 0 0 0 3px var(--paper), 0 0 0 5px var(--indigo);
}

/* Tema oscuro: sigue al sistema salvo que el visitante elija "claro",
   o se fuerza si elige "oscuro" con el botón de la cabecera. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #0E1020;
    --surface: #181B30;
    --ink: #ECEEF8;
    --ink-2: #B4B8D2;
    --ink-3: #9196B4;
    --line: #2B2F4A;
    --indigo: #7068FF;
    --indigo-deep: #8C86FF;
    --indigo-soft: #24245A;
    --sun-soft: #3A3014;
    --mint-soft: #123A2B;
    --mint-text: #4BE0A5;
    --band: #070814;
    --band-line: #22253D;
    --shadow: rgba(0, 0, 0, 0.7);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0E1020;
  --surface: #181B30;
  --ink: #ECEEF8;
  --ink-2: #B4B8D2;
  --ink-3: #9196B4;
  --line: #2B2F4A;
  --indigo: #7068FF;
  --indigo-deep: #8C86FF;
  --indigo-soft: #24245A;
  --sun-soft: #3A3014;
  --mint-soft: #123A2B;
  --mint-text: #4BE0A5;
  --band: #070814;
  --band-line: #22253D;
  --shadow: rgba(0, 0, 0, 0.7);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--t-md);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
}

h1 { font-size: clamp(1.75rem, 1.2rem + 2.6vw, 3.25rem); font-weight: 700; }
h2 { font-size: clamp(1.15rem, 1rem + 0.8vw, var(--t-xl)); font-weight: 600; }
h3 { font-size: var(--t-md); font-weight: 600; }

p { margin: 0; }

a { color: var(--indigo); text-decoration-thickness: 1px; text-underline-offset: 3px; }

img, svg { display: block; }

button, input, select { font: inherit; color: inherit; }

:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-sm); }

.icon { width: 22px; height: 22px; flex: none; }
.icon-sm { width: 18px; height: 18px; }
.icon-xs { width: 14px; height: 14px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.muted { color: var(--ink-2); }

.note {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--t-sm);
  color: var(--ink-3);
  margin-top: 12px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 16px; top: -60px;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  border-radius: var(--r-sm);
}
.skip-link:focus { top: 12px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border: 1.5px solid transparent;
  border-radius: var(--r-md);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.btn-primary { background: var(--indigo); color: var(--on-primary); }
.btn-primary:hover { background: var(--indigo-deep); }
.btn-sun { background: var(--sun); color: var(--on-accent); }
.btn-sun:hover { filter: brightness(0.95); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink-3); }
.btn-block { width: 100%; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--ink-3);
  cursor: pointer;
}
.icon-btn:hover { background: var(--paper); color: var(--danger); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: var(--t-sm);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.chip:hover { border-color: var(--indigo); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--r-sm);
  background: var(--indigo-soft);
  color: var(--indigo-deep);
  font-size: var(--t-xs);
  font-weight: 600;
}
.tag-mint { background: var(--mint-soft); color: var(--mint-text); }

.link-more { font-weight: 600; font-size: var(--t-sm); text-decoration: none; }
.link-more:hover { text-decoration: underline; }

/* ---------- Cabecera ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.header-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  flex: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--indigo);
  color: var(--on-primary);
  overflow: hidden;
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.brand-mark.has-logo { background: transparent; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; letter-spacing: -0.02em; }

.search {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  max-width: 560px;
}
.search > .icon { position: absolute; left: 14px; color: var(--ink-3); pointer-events: none; }
.search input {
  width: 100%;
  height: 44px;
  padding: 0 16px 0 44px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  background: var(--paper);
}
.search input:focus { outline: none; border-color: var(--indigo); background: var(--surface); }

.header-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.header-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
}
.header-link:hover { background: var(--paper); }
.cart-count {
  display: grid;
  place-items: center;
  min-width: 22px; height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--sun);
  color: var(--on-accent);
  font-size: var(--t-xs);
  font-weight: 700;
}

.category-nav { border-top: 1px solid var(--line); }
.category-nav-inner {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.category-nav-inner::-webkit-scrollbar { display: none; }
.category-nav a {
  padding: 11px 12px;
  border-bottom: 2.5px solid transparent;
  color: var(--ink-2);
  font-size: var(--t-sm);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.category-nav a:hover { color: var(--ink); }
.category-nav a.is-active { color: var(--ink); border-bottom-color: var(--indigo); }

/* ---------- Cupón (pieza central) ---------- */
.voucher {
  --tone: var(--tone-indigo);
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 1px 0 var(--line), 0 10px 24px -18px var(--shadow);
  transition: transform 0.18s ease;
}
.voucher:hover { transform: translateY(-3px); }
.voucher:focus-visible { box-shadow: var(--focus); border-radius: 16px; }

.voucher-cover {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  border-radius: 16px 16px 0 0;
  background-color: var(--tone);
  /* textura de "serie" impresa en el cupón */
  background-image: repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.07) 0 2px, transparent 2px 12px);
  color: var(--on-color);
  overflow: hidden;
}
.voucher-icon { width: 46%; height: auto; max-width: 96px; stroke-width: 1.3; }

.voucher-region {
  position: absolute;
  top: 10px; left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(21, 23, 43, 0.35);
  color: var(--on-color);
  font-size: 0.6875rem;
  font-weight: 600;
}
.voucher-badge {
  position: absolute;
  top: 10px; right: 10px;
  padding: 3px 8px;
  border-radius: var(--r-sm);
  background: var(--sun);
  color: var(--on-accent);
  font-size: 0.6875rem;
  font-weight: 700;
}

/* Talón: separado por la línea perforada y dos muescas laterales */
.voucher-stub {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  padding: 14px 14px 16px;
  border-top: 2px dashed var(--line);
}
.voucher-stub::before,
.voucher-stub::after {
  content: "";
  position: absolute;
  top: -10px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--notch);
}
.voucher-stub::before { left: -9px; }
.voucher-stub::after { right: -9px; }

.voucher-name {
  font-weight: 600;
  font-size: var(--t-sm);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.voucher-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-top: auto;
}
.voucher-price strong { font-family: var(--font-display); font-size: var(--t-lg); font-weight: 700; letter-spacing: -0.02em; }
.voucher-price small { color: var(--ink-3); font-size: var(--t-xs); font-weight: 500; }

/* Tonos */
.tone-indigo { --tone: var(--tone-indigo); }
.tone-violet { --tone: var(--tone-violet); }
.tone-sun    { --tone: var(--tone-sun); }
.tone-rose   { --tone: var(--tone-rose); }
.tone-mint   { --tone: var(--tone-mint); }
.tone-sky    { --tone: var(--tone-sky); }

.voucher-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
}

.voucher-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(200px, 230px);
  gap: 16px;
  overflow-x: auto;
  padding: 4px 4px 16px;
  margin: 0 -4px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
.voucher-row > .voucher { scroll-snap-align: start; }

/* ---------- Inicio ---------- */
.hero { background: var(--surface); border-bottom: 1px solid var(--line); overflow: hidden; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 40px;
  padding-top: 56px;
  padding-bottom: 56px;
}
.hero-copy { min-width: 0; }
.hero-copy h1 { max-width: 12ch; }
.hero-lead { max-width: 46ch; margin-top: 16px; color: var(--ink-2); font-size: var(--t-lg); line-height: 1.5; }

.search-hero { max-width: 560px; margin-top: 28px; }
.search-hero input { height: 58px; padding-right: 120px; font-size: var(--t-md); border-radius: 14px; }
.search-hero .btn { position: absolute; right: 6px; min-height: 46px; }

.quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

/* Pila de cupones del hero: el momento memorable */
.hero-stack {
  --notch: var(--surface);
  position: relative;
  height: 400px;
}
.stack-card {
  position: absolute;
  width: 230px;
  top: 50%; left: 50%;
  transform-origin: 50% 120%;
}
.stack-1 { transform: translate(-115%, -50%) rotate(-10deg); z-index: 1; }
.stack-2 { transform: translate(-50%, -56%) rotate(0deg); z-index: 3; }
.stack-3 { transform: translate(15%, -46%) rotate(9deg); z-index: 2; }
.stack-card .voucher { box-shadow: 0 1px 0 var(--line), 0 24px 40px -20px var(--shadow); pointer-events: none; }

@media (prefers-reduced-motion: no-preference) {
  .stack-card { animation: deal 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  .stack-1 { animation-delay: 0.1s; }
  .stack-3 { animation-delay: 0.2s; }
  @keyframes deal {
    from { transform: translate(-50%, -40%) rotate(0deg); opacity: 0; }
  }
}

.promises { background: var(--band); color: var(--on-color); }
.promise-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 0 auto;
  padding-top: 20px;
  padding-bottom: 20px;
  list-style: none;
}
.promise-list li { display: flex; align-items: center; gap: 12px; }
.promise-list strong { display: block; font-size: var(--t-sm); }
.promise-list span { font-size: var(--t-xs); color: var(--band-text); }
.promise-icon {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border-radius: var(--r-md);
  background: var(--tone);
  color: var(--on-color);
  flex: none;
}
.promise-icon.tone-sun { color: var(--on-accent); }

.section { padding-top: 56px; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.section-band {
  --notch: var(--band);
  margin-top: 56px;
  padding-bottom: 48px;
  background: var(--band);
  color: var(--on-color);
}
.section-band .link-more { color: var(--sun); }

.category-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.category-tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 100%;
  padding: 18px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
}
.category-tile:hover { border-color: var(--tone); }
.category-icon {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  margin-bottom: 10px;
  border-radius: var(--r-md);
  background: var(--tone);
  color: var(--on-color);
}
.category-name { font-weight: 700; }
.category-blurb { color: var(--ink-2); font-size: var(--t-sm); }
.category-count { margin-top: auto; padding-top: 10px; color: var(--ink-3); font-size: var(--t-xs); font-weight: 600; }

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}
.steps li {
  padding: 24px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1.5px solid var(--line);
}
.steps p { margin-top: 6px; color: var(--ink-2); font-size: var(--t-sm); }
.step-num {
  display: inline-grid;
  place-items: center;
  width: 36px; height: 36px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--sun);
  color: var(--on-accent);
  font-family: var(--font-display);
  font-weight: 700;
}

.faq { display: grid; gap: 10px; max-width: 760px; }
.faq details, .info-blocks details {
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
}
.faq summary, .info-blocks summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker, .info-blocks summary::-webkit-details-marker { display: none; }
.faq-chevron { color: var(--ink-3); transition: transform 0.2s ease; }
details[open] > summary .faq-chevron { transform: rotate(180deg); }
.faq details p, .info-blocks details p { padding: 0 18px 18px; color: var(--ink-2); max-width: 70ch; }

.help-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 32px;
  border-radius: var(--r-lg);
  background: var(--indigo);
  color: var(--on-primary);
}
.help-banner p { margin-top: 6px; color: var(--primary-text); }

/* ---------- Páginas internas ---------- */
.page { padding-top: 20px; padding-bottom: 32px; }

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
  color: var(--ink-3);
  font-size: var(--t-sm);
}
.breadcrumb a { color: var(--ink-2); text-decoration: none; }
.breadcrumb a:hover { color: var(--indigo); text-decoration: underline; }
.breadcrumb [aria-current] { color: var(--ink); font-weight: 500; }

.page-head { margin-bottom: 20px; }
.page-head p { margin-top: 6px; }

.filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.chip-row {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 2px;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}
.filter-selects { display: flex; gap: 8px; flex: none; }
.select { position: relative; display: inline-flex; align-items: center; }
.select select {
  appearance: none;
  height: 40px;
  padding: 0 38px 0 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  font-size: var(--t-sm);
  cursor: pointer;
}
.select .icon { position: absolute; right: 12px; pointer-events: none; color: var(--ink-3); }

.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 32px; }
.page-btn {
  display: grid;
  place-items: center;
  min-width: 40px; height: 40px;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
.page-btn.is-active { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.empty {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 56px 16px;
  border: 1.5px dashed var(--line);
  border-radius: var(--r-lg);
  text-align: center;
}
.empty-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--indigo-soft); color: var(--indigo); }
.empty .btn { margin-top: 8px; }

/* Producto */
.product-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 40px;
  align-items: start;
}
.product-visual { position: sticky; top: 132px; }
.product-cover {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  border-radius: var(--r-lg);
  background-color: var(--tone);
  background-image: repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.07) 0 2px, transparent 2px 14px);
  color: var(--on-color);
}
.product-cover .voucher-region { top: 16px; left: 16px; font-size: var(--t-xs); padding: 5px 10px; }
.product-cover-icon { width: 38%; height: auto; stroke-width: 1.2; }

.fact-list {
  display: grid;
  gap: 12px;
  margin: 20px 0 0;
  padding: 18px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1.5px solid var(--line);
  list-style: none;
  font-size: var(--t-sm);
  color: var(--ink-2);
}
.fact-list li { display: flex; gap: 10px; }
.fact-list .icon { color: var(--indigo); }
.fact-list strong { color: var(--ink); }

.product-main h1 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.25rem); }
.product-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.buy-form {
  margin-top: 24px;
  padding: 24px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1.5px solid var(--line);
}
.field-group { margin: 0 0 24px; padding: 0; border: 0; }
.field-group legend {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 0;
  font-weight: 700;
}
.step-pill {
  display: inline-grid;
  place-items: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-display);
  font-size: var(--t-xs);
}

.package-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.package { position: relative; cursor: pointer; }
.package input { position: absolute; opacity: 0; pointer-events: none; }
.package-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 100%;
  padding: 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.package:hover .package-body { border-color: var(--ink-3); }
.package-label { font-weight: 600; font-size: var(--t-sm); }
.package-price { color: var(--ink-2); font-size: var(--t-sm); }
.package input:checked + .package-body {
  border-color: var(--indigo);
  background: var(--indigo-soft);
  box-shadow: inset 0 0 0 1px var(--indigo);
}
.package input:checked + .package-body .package-price { color: var(--indigo-deep); font-weight: 600; }
.package input:focus-visible + .package-body { box-shadow: var(--focus); }

.field { display: grid; gap: 6px; }
.field-label { font-size: var(--t-sm); font-weight: 600; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap .icon { position: absolute; left: 14px; color: var(--ink-3); pointer-events: none; }
.input-wrap input {
  width: 100%;
  height: 50px;
  padding: 0 14px 0 46px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
}
.input-wrap input:focus { outline: none; border-color: var(--indigo); box-shadow: 0 0 0 3px var(--indigo-soft); }
.field-help { display: flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--ink-3); font-size: var(--t-sm); }

.buy-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-top: 2px dashed var(--line);
}
.buy-total { text-align: right; }
.buy-total > span { display: block; color: var(--ink-3); font-size: var(--t-sm); }
.buy-total strong { font-family: var(--font-display); font-size: var(--t-xl); letter-spacing: -0.02em; }

.qty {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
}
.qty input {
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  text-align: center;
  font-weight: 600;
  -moz-appearance: textfield;
}
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-btn {
  display: grid;
  place-items: center;
  width: 40px; height: 44px;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
}
.qty-btn:hover { color: var(--indigo); }
.qty-sm input, .qty-sm .qty-btn { height: 38px; }
.qty-sm .qty-btn { width: 34px; }

.buy-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; }

.info-blocks { display: grid; gap: 10px; margin-top: 20px; }

/* Carrito */
.cart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: start;
}
.cart-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.cart-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.cart-thumb {
  display: grid;
  place-items: center;
  width: 64px; height: 64px;
  border-radius: var(--r-md);
  background: var(--tone);
  color: var(--on-color);
}
.cart-info { display: grid; gap: 2px; min-width: 0; }
.cart-name { color: var(--ink); font-weight: 600; text-decoration: none; }
.cart-name:hover { color: var(--indigo); }
.cart-package { font-size: var(--t-sm); color: var(--ink-2); }
.cart-detail { font-size: var(--t-xs); color: var(--ink-3); }
.cart-price { font-family: var(--font-display); font-size: var(--t-md); white-space: nowrap; }

.summary {
  position: sticky;
  top: 132px;
  padding: 24px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1.5px solid var(--line);
}
.summary dl { margin: 16px 0 20px; }
.summary dl div { display: flex; justify-content: space-between; padding: 8px 0; color: var(--ink-2); }
.summary dd { margin: 0; font-weight: 600; color: var(--ink); }
.summary-total { margin-top: 8px; border-top: 2px dashed var(--line); padding-top: 16px !important; }
.summary-total dt { color: var(--ink); font-weight: 700; }
.summary-total dd { font-family: var(--font-display); font-size: var(--t-lg); }
.summary .link-more { display: block; margin-top: 16px; text-align: center; }

/* Acceso */
.auth-page { display: grid; place-items: center; padding-top: 40px; padding-bottom: 56px; }
.auth-card {
  width: 100%;
  max-width: 440px;
  padding: 28px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1.5px solid var(--line);
}
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 28px;
  padding: 4px;
  border-radius: var(--r-md);
  background: var(--paper);
}
.auth-tabs a {
  padding: 10px;
  border-radius: var(--r-sm);
  color: var(--ink-2);
  font-weight: 600;
  text-align: center;
  text-decoration: none;
}
.auth-tabs a.is-active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px var(--shadow); }
.auth-card h1 { font-size: var(--t-xl); }
.auth-card > .muted { margin-top: 6px; }
.auth-form { display: grid; gap: 16px; margin-top: 24px; }
.auth-forgot { justify-self: end; margin-top: -6px; font-size: var(--t-sm); }
.auth-switch { margin-top: 20px; text-align: center; color: var(--ink-2); }
.auth-card .note { justify-content: center; text-align: center; }

/* Pedido y errores (páginas del flujo de pago) */
.site-main > .card { margin: 32px auto; }
.card {
  width: calc(100% - 32px);
  max-width: 480px;
  padding: 32px 24px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1.5px solid var(--line);
  text-align: center;
}
.card h1 { font-size: var(--t-xl); margin: 8px 0; }
.product-icon { font-size: 48px; }
.details { margin: 20px 0; padding: 0; text-align: left; border-top: 2px dashed var(--line); }
.details div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.details dt { color: var(--ink-2); }
.details dd { margin: 0; font-weight: 600; text-align: right; }
.card .btn { margin: 8px 0; }
.card .note { justify-content: center; }
.btn-secondary { background: var(--surface); color: var(--indigo); border-color: var(--indigo); }
.status-paid h1 { color: var(--mint); }
.status-failed h1 { color: var(--danger); }
.price { font-family: var(--font-display); font-size: var(--t-2xl); margin: 16px 0; }
.price span { font-size: var(--t-md); color: var(--ink-3); }
.grid { display: grid; gap: 24px; justify-items: center; padding: 32px 16px; }

/* ---------- Pie ---------- */
.site-footer { margin-top: 64px; background: var(--band); color: var(--band-text); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 32px;
  padding-top: 48px;
  padding-bottom: 32px;
}
.footer-about p { margin-top: 14px; max-width: 34ch; font-size: var(--t-sm); }
.brand-light { color: var(--on-color); }
.site-footer h2 { margin-bottom: 12px; color: var(--on-color); font-family: var(--font-body); font-size: var(--t-sm); font-weight: 700; letter-spacing: 0; }
.site-footer ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; font-size: var(--t-sm); }
.site-footer a { color: var(--band-text); text-decoration: none; }
.site-footer a:hover { color: var(--on-color); text-decoration: underline; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
  padding-bottom: 24px;
  border-top: 1px solid var(--band-line);
  font-size: var(--t-xs);
}
.footer-pay { display: flex; align-items: center; gap: 6px; color: var(--sun); }

/* Barra inferior (solo móvil) */
.bottom-nav { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .category-grid { grid-template-columns: repeat(3, 1fr); }
  .hero-grid { grid-template-columns: 1fr; gap: 8px; padding-top: 40px; padding-bottom: 24px; }
  .hero-copy h1 { max-width: 16ch; }
  .hero-stack { height: 300px; }
  .stack-card { width: 190px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .product-layout, .cart-layout { grid-template-columns: 1fr; gap: 24px; }
  .product-visual, .summary { position: static; }
  .product-cover { aspect-ratio: 16 / 9; }
  .fact-list { display: none; }
  .filters { flex-direction: column; align-items: stretch; }
  .filter-selects .select, .filter-selects select { flex: 1; width: 100%; }
}

@media (max-width: 720px) {
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .site-header { position: static; }
  .quick-chips { flex-wrap: nowrap; overflow-x: auto; margin-right: calc(var(--gutter) * -1); padding-right: var(--gutter); scrollbar-width: none; }
  .category-grid li:last-child:nth-child(odd) { grid-column: 1 / -1; }

  .header-bar { flex-wrap: wrap; height: auto; gap: 10px; padding-top: 10px; padding-bottom: 10px; }
  .header-bar .search { order: 3; flex-basis: 100%; max-width: none; }
  .header-link span:not(.cart-count) { display: none; }
  .header-link { padding: 8px; }
  .header-link-account { display: none; }

  .promise-list { grid-template-columns: 1fr; gap: 12px; }
  .category-grid { grid-template-columns: 1fr 1fr; }
  .category-tile { padding: 14px; }
  .category-blurb { display: none; }
  .steps { grid-template-columns: 1fr; }
  .help-banner { flex-direction: column; align-items: flex-start; padding: 24px; }
  .voucher-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .voucher-stub { padding: 12px 12px 14px; }
  .voucher-price strong { font-size: var(--t-md); }
  .voucher-row { grid-auto-columns: 46%; gap: 12px; }

  .hero-stack { height: 240px; }
  .stack-card { width: 150px; }
  .stack-card .voucher-name { font-size: var(--t-xs); }
  .search-hero input { height: 52px; padding-right: 16px; }
  .search-hero .btn { display: none; }

  .buy-form { padding: 18px; }
  .buy-actions { grid-template-columns: 1fr; }
  .buy-actions .btn-primary { order: -1; }

  .cart-item { grid-template-columns: 52px minmax(0, 1fr) auto; grid-template-areas: "thumb info remove" "thumb qty price"; gap: 8px 12px; }
  .cart-thumb { grid-area: thumb; width: 52px; height: 52px; align-self: start; }
  .cart-info { grid-area: info; }
  .cart-item .qty { grid-area: qty; justify-self: start; }
  .cart-price { grid-area: price; justify-self: end; }
  .cart-item .icon-btn { grid-area: remove; justify-self: end; align-self: start; }

  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; }

  .bottom-nav {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 60;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--surface);
    border-top: 1px solid var(--line);
  }
  .bottom-nav a {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 2px;
    padding: 9px 0 8px;
    color: var(--ink-3);
    font-size: 0.6875rem;
    font-weight: 600;
    text-decoration: none;
  }
  .bottom-nav a.is-active { color: var(--indigo); }
  .bottom-nav .dot { position: absolute; top: 7px; left: calc(50% + 8px); width: 8px; height: 8px; border-radius: 50%; background: var(--sun); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ---------- Botón de tema claro / oscuro ---------- */
.theme-toggle {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.theme-toggle:hover { background: var(--paper); }
/* Muestra la luna en tema claro (para pasar a oscuro) y el sol en tema oscuro */
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

/* ---------- Compra de prueba ---------- */
.test-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border: 2px dashed var(--sun);
  border-radius: var(--r-lg);
  background: var(--sun-soft);
  color: var(--ink);
}
.test-banner-icon {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  flex: none;
  border-radius: var(--r-md);
  background: var(--sun);
  color: var(--on-accent);
}
.test-banner p { color: var(--ink-2); font-size: var(--t-sm); }
.test-banner .btn { margin-left: auto; }
.test-checklist { display: grid; gap: 10px; margin: 0 0 20px; padding: 0; list-style: none; counter-reset: paso; }
.test-checklist li { display: flex; gap: 10px; color: var(--ink-2); font-size: var(--t-sm); }
.test-checklist li::before {
  counter-increment: paso;
  content: counter(paso);
  display: grid;
  place-items: center;
  width: 24px; height: 24px;
  flex: none;
  border-radius: 50%;
  background: var(--indigo-soft);
  color: var(--indigo);
  font-weight: 700;
  font-size: var(--t-xs);
}
.alert {
  display: flex;
  gap: 10px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: var(--sun-soft);
  color: var(--ink);
  font-size: var(--t-sm);
}

@media (max-width: 720px) {
  .test-banner { flex-wrap: wrap; }
  .test-banner .btn { margin-left: 0; width: 100%; }
}
.test-banner-title { font-size: var(--t-md); }
.buy-form > .alert { margin-bottom: 20px; }
.footer-contact { display: flex; align-items: center; gap: 6px; margin-top: 10px !important; }

/* ---------- Instalador ---------- */
.install-body { background: var(--paper); }
.install-header { padding: 16px; border-bottom: 1px solid var(--line); background: var(--surface); }
.install-header .brand { margin: 0 auto; display: flex; width: 100%; max-width: 760px; }
.install-main { flex: 1; padding: 32px 16px 56px; }
.install-card {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 28px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.install-wide { max-width: 760px; }
.install-card h1 { font-size: var(--t-xl); }
.install-card > .muted { margin-top: 6px; }
.install-card code {
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--paper);
  font-size: 0.9em;
  word-break: break-all;
}
.code-block { display: inline-block; margin-top: 6px; padding: 6px 8px !important; }
.install-steps { margin: 20px 0; }
.install-form { display: grid; gap: 8px; margin-top: 24px; }
.install-form .field-group { margin-bottom: 20px; }
.install-form legend { font-family: var(--font-display); font-size: var(--t-md); }
.install-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; margin-top: 12px; }
.field-wrap { display: grid; gap: 6px; align-content: start; }
.field-wrap .field-help, .field-wrap .field-error { margin-top: 0; }
.plain-input, .select-block select {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
}
.plain-input:focus, .select-block select:focus { outline: none; border-color: var(--indigo); box-shadow: 0 0 0 3px var(--indigo-soft); }
.plain-input[aria-invalid="true"] { border-color: var(--danger); }
.select-block { display: flex; width: 100%; }
.optional { color: var(--ink-3); font-weight: 400; }
.field-error { display: flex; align-items: center; gap: 6px; margin-top: -8px; color: var(--danger); font-size: var(--t-sm); }
.color-field {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 48px;
  padding: 0 8px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  color: var(--ink-2);
  font-size: var(--t-sm);
}
.color-field input { width: 44px; height: 34px; padding: 0; border: 0; background: none; cursor: pointer; }
.alert-error { background: rgba(217, 58, 85, 0.12); color: var(--ink); margin-top: 16px; }
.install-card > .alert { margin-top: 16px; }
.req-list { display: grid; gap: 10px; margin: 20px 0; padding: 0; list-style: none; }
.req-list li { display: flex; gap: 10px; padding: 12px; border-radius: var(--r-md); background: var(--paper); }
.req-list li div { display: grid; gap: 2px; }
.req-list li span { color: var(--ink-2); font-size: var(--t-sm); }
.req-list .is-ok .icon { color: var(--mint); }
.req-list .is-bad .icon { color: var(--danger); }
.install-subtitle { margin: 24px 0 14px; font-size: var(--t-lg); }
.install-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.install-card .product-icon { font-size: 40px; }
@media (max-width: 640px) {
  .install-grid { grid-template-columns: 1fr; }
  .install-card { padding: 20px; }
}

/* ---------- Cuentas de compradores (v1.1.0) ---------- */
.flash {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 0 0;
  padding: 12px 16px;
  border-radius: var(--r-md);
  background: var(--mint-soft);
  color: var(--ink);
  font-size: var(--t-sm);
  font-weight: 600;
}
.flash .icon { color: var(--mint-text); }
.auth-card > .alert { margin-top: 20px; }
.auth-form .field-error { margin-top: 0; }
.input-wrap input[aria-invalid="true"] { border-color: var(--danger); }
.input-wrap-password input { padding-right: 92px; }
.pass-toggle {
  position: absolute;
  right: 6px;
  height: 38px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--indigo);
  font-size: var(--t-sm);
  font-weight: 600;
  cursor: pointer;
}
.pass-toggle:hover { background: var(--indigo-soft); }
.header-link-account.is-signed .icon { color: var(--indigo); }

.account-page { max-width: 820px; padding-top: 28px; padding-bottom: 56px; }
.account-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.account-head h1 { font-size: var(--t-2xl); }
.account-head .muted { margin-top: 6px; word-break: break-word; }
.account-section { margin-top: 32px; }
.account-section > h2 { margin-bottom: 14px; }
.empty-compact { padding: 28px 20px; border: 1.5px dashed var(--line); border-radius: var(--r-lg); }

.order-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.order-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
}
.order-row:hover { border-color: var(--indigo); }
.order-main { display: grid; gap: 2px; flex: 1; min-width: 0; }
.order-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-main .muted { font-size: var(--t-sm); }
.order-side { display: grid; justify-items: end; gap: 4px; }
.order-amount { font-weight: 700; white-space: nowrap; }
.order-chevron { color: var(--ink-3); }
.status-pill {
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--indigo-soft);
  color: var(--indigo-deep);
  font-size: var(--t-xs);
  font-weight: 700;
  white-space: nowrap;
}
.pill-ok { background: var(--mint-soft); color: var(--mint-text); }
.pill-warn { background: var(--sun-soft); color: var(--ink); }
.pill-off { background: var(--paper); color: var(--ink-3); }

.account-box { border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.account-box summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.account-box summary::-webkit-details-marker { display: none; }
.account-box[open] summary { border-bottom: 1px solid var(--line); }
.account-box .auth-form { max-width: 420px; margin: 0; padding: 20px 16px; }
.account-box .btn { justify-self: start; }

@media (max-width: 560px) {
  .order-row { padding: 12px; gap: 10px; }
  .order-chevron { display: none; }
  .account-head form, .account-head .btn { width: 100%; }
}

/* ---------- Verificar correo y recuperar contraseña (v1.2.0) ---------- */
.auth-center { text-align: center; }
.auth-center > .muted { margin-top: 10px; }
.auth-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--indigo-soft);
  color: var(--indigo);
}
.auth-icon .icon { width: 30px; height: 30px; }
.auth-icon-warn { background: var(--sun-soft); color: var(--ink); }
.auth-email { color: var(--ink); word-break: break-all; }
.auth-tips {
  display: grid;
  gap: 8px;
  margin: 20px 0 0;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: var(--paper);
  list-style: none;
  text-align: left;
  font-size: var(--t-sm);
  color: var(--ink-2);
}
.auth-tips li { display: flex; align-items: flex-start; gap: 8px; }
.auth-tips .icon { margin-top: 2px; color: var(--indigo); }
.auth-actions { display: grid; gap: 10px; margin-top: 20px; }
.auth-center .alert { margin-top: 16px; text-align: left; }

/* ---------- Preguntas de seguridad, recuperar con código y eliminar cuenta (v1.3.0) ---------- */
.auth-card-wide { max-width: 520px; }
.sq-group {
  display: grid;
  gap: 14px;
  margin: 4px 0 0;
  padding: 16px;
  border: 1.5px dashed var(--line);
  border-radius: var(--r-md);
  background: var(--paper);
}
.sq-group legend {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 6px;
  font-weight: 700;
}
.sq-group legend .icon { color: var(--indigo); }
.sq-help { margin: 0; color: var(--ink-2); font-size: var(--t-sm); line-height: 1.5; }
.sq-group .input-wrap input { background: var(--surface); }
.input-wrap input[type="date"] { min-width: 0; color: var(--ink); }

.auth-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  counter-reset: none;
}
.auth-steps li {
  display: grid;
  justify-items: center;
  gap: 6px;
  color: var(--ink-3);
  font-size: var(--t-xs);
  font-weight: 600;
  text-align: center;
}
.auth-steps li > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: var(--surface);
  font-family: var(--font-display);
}
.auth-steps li > span .icon { width: 14px; height: 14px; }
.auth-steps .is-current { color: var(--ink); }
.auth-steps .is-current > span { border-color: var(--indigo); background: var(--indigo); color: var(--on-primary); }
.auth-steps .is-done > span { border-color: var(--mint); background: var(--mint-soft); color: var(--mint-text); }

.code-input {
  font-family: var(--font-display);
  font-size: var(--t-lg) !important;
  letter-spacing: 0.4em;
}
.code-input::placeholder { letter-spacing: 0.4em; }
.auth-resend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 18px;
  font-size: var(--t-sm);
}
.link-button {
  padding: 4px 2px;
  border: 0;
  background: none;
  color: var(--indigo);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}
.link-button:hover { color: var(--indigo-deep); }
.link-button:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }

.account-alert { align-items: center; flex-wrap: wrap; margin-top: 20px; }
.account-alert > span { flex: 1; min-width: 220px; }
.account-alert .btn { flex-shrink: 0; }
.account-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding: 14px 16px;
}
.account-row-text { display: grid; gap: 4px; }
.account-row-text strong { display: flex; align-items: center; gap: 8px; }
.account-row-text .muted { font-size: var(--t-sm); }

.account-danger { border-color: rgba(217, 58, 85, 0.35); }
.account-danger summary { color: var(--danger); }
.danger-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 12px 14px 12px 32px;
  border-radius: var(--r-md);
  background: rgba(217, 58, 85, 0.08);
  color: var(--ink-2);
  font-size: var(--t-sm);
  line-height: 1.5;
}
.danger-list strong { color: var(--ink); }
.account-danger .auth-form > .alert { margin-top: 0; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #FFFFFF; }
.btn-danger:hover { filter: brightness(0.92); }

@media (max-width: 560px) {
  .auth-steps li { font-size: 0.6875rem; }
  .account-row .btn, .account-alert .btn { width: 100%; }
}

/* ---------- Catálogo real: imágenes, ofertas, agotados y página de pago (v1.5.0) ---------- */
.voucher.has-image .voucher-cover { background-image: none; }
.voucher-img, .product-cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.voucher.has-image .voucher-region { background: rgba(21, 23, 43, 0.6); }
.voucher-badge-sale { background: var(--danger); color: #FFFFFF; }
.voucher-badge-off { background: var(--ink); color: var(--paper); }
.voucher.is-sold-out .voucher-cover > :not(.voucher-badge) { opacity: 0.55; }
.voucher.is-sold-out .voucher-price strong { color: var(--ink-3); }

.product-cover { overflow: hidden; }
.product-cover.has-image { background-image: none; }
.product-cover.has-image .voucher-region { background: rgba(21, 23, 43, 0.6); }
.product-desc { margin-top: 14px; color: var(--ink-2); line-height: 1.6; white-space: normal; }
.tag-sale { background: var(--danger); color: #FFFFFF; }

.package.is-off { cursor: not-allowed; }
.package.is-off .package-body { opacity: 0.55; border-style: dashed; }
.package-compare { margin-left: 6px; color: var(--ink-3); font-weight: 400; }

.buy-fields { display: grid; gap: 14px; }
.buy-fields .field-help { margin-top: 0; }
.buy-fields .field-error { margin-top: 0; }
.buy-form .field-group .alert { margin-bottom: 0; }
.qty-block { display: grid; gap: 6px; }
.qty-label { color: var(--ink-3); font-size: var(--t-sm); }
.buy-form > .btn-block { margin-top: 4px; }

.checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 380px);
  gap: 24px;
  align-items: start;
  margin-top: 20px;
}
.checkout-form { margin-top: 0; }
.checkout-form .note { justify-content: flex-start; }
.checkout-note { height: auto; padding: 12px 14px; resize: vertical; font: inherit; }
.checkout-summary h2 { font-size: var(--t-lg); }
.checkout-item { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.checkout-item > div { display: grid; gap: 2px; min-width: 0; }
.checkout-item .muted { font-size: var(--t-sm); }
.checkout-value { max-width: 60%; text-align: right; word-break: break-all; }
.cart-thumb { --tone: var(--tone-indigo); flex-shrink: 0; overflow: hidden; }
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 900px) {
  .checkout-layout { grid-template-columns: 1fr; }
  .checkout-summary { position: static; order: -1; }
}

/* ── v1.6.0: verificar el ID del jugador y estado de la recarga ─────────── */
.player-check { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 10px; }
.player-check .btn-sm { min-height: 38px; padding: 0 14px; font-size: var(--t-sm); }
.player-check-result { margin: 0; font-size: var(--t-sm); font-weight: 600; color: var(--ink-2); }
.player-check-result:empty { display: none; }
.player-check-result.is-ok { color: var(--mint-text); }
.player-check-result.is-bad { color: var(--danger); }
.player-check-result.is-warn { color: var(--ink-2); }
.checkout-player dd { display: inline-flex; align-items: center; gap: 4px; color: var(--mint-text); }
.delivery-note { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; padding: 10px 14px; border-radius: var(--r-md); background: var(--paper); font-weight: 600; }
.delivery-note.is-ok { background: var(--mint-soft); color: var(--mint-text); }
.delivery-note.is-warn { background: var(--sun-soft); }

/* ── v1.7.0: códigos de tarjetas de regalo y claves de juegos ───────────── */
.codes-list { display: grid; gap: 8px; margin: 16px 0 4px; padding: 0; list-style: none; text-align: left; }
.code-item {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px;
  padding: 12px 14px; border: 1.5px dashed var(--line); border-radius: var(--r-md); background: var(--paper);
}
.code-value { flex: 1 1 200px; min-width: 0; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-weight: 700; word-break: break-all; user-select: all; }
.code-item .btn-sm { min-height: 36px; padding: 0 14px; font-size: var(--t-sm); }
