/* ══════════════════════════════════════════════════════════
   Vocabulario editorial — overrides sobre alfabeto-editorial.css
   Cards de palabras + filtros (búsqueda, nivel, categoría) + paginación.
   ══════════════════════════════════════════════════════════ */

.vocabulario-editorial {
  /* Hereda toda la base de .alfabeto-editorial, .lectura-editorial.
   * Añadimos aquí lo específico del vocabulario. */
}
.vocabulario-editorial.alfabeto-editorial,
.vocabulario-editorial {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  overflow-x: hidden;
  max-width: 100%;
}

/* Mismo "min-width: 0" en grid items que en alfabeto */
.vocabulario-editorial .af-hero-grid > *,
.vocabulario-editorial .af-explorer-grid > *,
.vocabulario-editorial .af-strokes-grid > *,
.vocabulario-editorial .af-blocks-grid > *,
.vocabulario-editorial .af-method-grid > *,
.vocabulario-editorial .af-words-grid > *,
.vocabulario-editorial .af-practice-grid > *,
.vocabulario-editorial .af-quiz-grid > *,
.vocabulario-editorial .af-letter-grid--vocab > *,
.vocabulario-editorial .af-stats-grid > *,
.vocabulario-editorial .af-stats-table > * {
  min-width: 0;
}

/* Mismo .af-explorer con overflow-x: hidden + position: relative para
 * contener el .af-detail-bg cuando el sticky cae en mobile. */
.vocabulario-editorial .af-explorer {
  position: relative;
  overflow: hidden;
}

/* ─── Vocab cards (rejilla principal) ──────────────────── */
.vocabulario-editorial .af-letter-grid--vocab {
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 0;
}
.vocabulario-editorial .af-letter--vocab {
  padding: 14px 14px 12px;
  min-height: 104px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 4px;
  text-align: left;
}
.vocabulario-editorial .af-letter-char--vocab {
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.1;
  letter-spacing: -.02em;
}
.vocabulario-editorial .af-letter--vocab .af-letter-rom {
  font-size: 10px;
  margin-top: 0;
  letter-spacing: .04em;
  text-transform: lowercase;
  color: var(--text-muted);
}
.vocabulario-editorial .af-letter-es {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  line-height: 1.3;
  color: var(--text);
  font-weight: 500;
  letter-spacing: -.005em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
}
.vocabulario-editorial .af-letter--vocab.is-active .af-letter-es {
  color: #fff;
  border-top-color: rgba(255,255,255,.25);
}

/* ─── Búsqueda ─────────────────────────────────────────── */
.vocabulario-editorial .vc-search-wrap {
  position: relative;
  margin-bottom: 14px;
}
.vocabulario-editorial .vc-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 18px;
  pointer-events: none;
}
.vocabulario-editorial .vc-search {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 12px 14px 12px 40px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .03em;
  transition: border-color .15s;
}
.vocabulario-editorial .vc-search:focus {
  outline: none;
  border-color: var(--accent);
}
.vocabulario-editorial .vc-search::placeholder {
  color: var(--text-dim);
}

/* ─── Filtro de nivel ──────────────────────────────────── */
.vocabulario-editorial .vc-level-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.vocabulario-editorial .vc-level-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-right: 4px;
}
.vocabulario-editorial .vc-level-btn {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 2px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
  transition: border-color .15s, color .15s, background .15s;
}
.vocabulario-editorial .vc-level-btn:hover {
  color: var(--text);
  border-color: var(--text-dim);
}
.vocabulario-editorial .vc-level-btn.is-active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(232, 67, 45, .08);
}

/* ─── Filtros de categoría (reusa .af-filter de alfabeto) */
.vocabulario-editorial .vc-cat-filters {
  margin-bottom: 8px;
  /* Permite scroll horizontal en móvil cuando hay muchas categorías */
  flex-wrap: wrap;
}

/* ─── Stats de la búsqueda ─────────────────────────────── */
.vocabulario-editorial .vc-stats {
  margin: 18px 0 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.vocabulario-editorial .vc-stats strong {
  color: var(--text);
  font-weight: 500;
}

/* ─── Empty / loading ──────────────────────────────────── */
.vocabulario-editorial .vc-empty,
.vocabulario-editorial .vc-loading {
  grid-column: 1 / -1;
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  border: 1px dashed var(--border);
  background: var(--surface);
}

/* ─── Load more ────────────────────────────────────────── */
.vocabulario-editorial .vc-load-more {
  margin: 28px auto 0;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--text);
  padding: 14px 22px;
  border-radius: 3px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  max-width: 320px;
  transition: background .15s, color .15s;
}
.vocabulario-editorial .vc-load-more:hover {
  background: var(--accent);
  color: #fff;
}
.vocabulario-editorial .vc-load-more span:last-child { color: var(--accent); }
.vocabulario-editorial .vc-load-more:hover span:last-child { color: #fff; }

/* ─── Detail card · vocabulario ────────────────────────── */
.vocabulario-editorial .af-detail-char--vocab {
  font-size: clamp(64px, 8vw, 120px);
  line-height: 1;
  letter-spacing: -.025em;
  margin-top: 12px;
  margin-bottom: 8px;
  text-wrap: pretty;
}
.vocabulario-editorial .af-detail-bg {
  font-size: clamp(180px, 22vw, 320px);
}

/* ─── Quiz · vocabulario ───────────────────────────────── */
.vocabulario-editorial .af-quiz-char--vocab {
  font-size: clamp(80px, 10vw, 140px);
  line-height: 1.05;
  letter-spacing: -.025em;
  text-wrap: pretty;
  padding: 12px 0;
}

/* ─── Responsive ───────────────────────────────────────── */
@media (max-width: 1100px) {
  .vocabulario-editorial .af-letter-grid--vocab { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 860px) {
  .vocabulario-editorial .af-letter-grid--vocab {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }
  .vocabulario-editorial .af-letter--vocab {
    padding: 12px 10px 10px;
    min-height: 96px;
    gap: 3px;
  }
  .vocabulario-editorial .af-letter-char--vocab { font-size: 20px; }
  .vocabulario-editorial .af-letter-es {
    padding-top: 6px;
    font-size: 11px;
    line-height: 1.25;
  }

  .vocabulario-editorial .vc-level-bar { gap: 4px; }
  .vocabulario-editorial .vc-level-btn { padding: 5px 10px; font-size: 9px; }

  .vocabulario-editorial .af-detail-char--vocab { font-size: 56px; }
  .vocabulario-editorial .af-quiz-char--vocab { font-size: 64px; }
}
