/**
 * editorial-system.css — Sistema visual de los rediseños Superdesign · rolando.cl
 * 2026-10-06 — Integra la paleta canon La Resistencia con los layouts editoriales
 * 2026-10-08 — Header + footer reescritos al canon La Resistencia (serif, night, gold)
 *              Body reset para neutralizar site-redesign y resistencia-system
 *
 * NO reemplaza tokens.css (ese sigue siendo el sistema de tokens base).
 * Este archivo agrega los componentes visuales (brand mark, header sticky dark,
 * hero editorial, book-visual 3D, CTAs sangre, footer, sidebar admin).
 *
 * Variables clave (definidas en tokens.css):
 *   --ink #0B0B0A · --paper #E8DDC8 · --whisper #F5EFE2 · --brass #B89B5E
 *   --copper #8A5A36 · --blood #C13542 · --ash #2A2825 · --smoke #5A554C
 */

/* ============================================================
   0. BODY RESET (carga AL FINAL · gana a site-redesign y resistencia-system)
   ============================================================ */
html { scroll-behavior: smooth; }
html, body {
  background: var(--paper) !important;
  color: var(--ash) !important;
  font-family: var(--font-sans, 'Inter', system-ui, -apple-system, sans-serif) !important;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body::before, body::after { display: none !important; content: none !important; }
* { box-sizing: border-box; }
img { max-width: 100%; display: block; }
a { color: inherit; }

/* ============================================================
   1. BRAND MARK
   ============================================================ */
.brand-mark {
  display: grid;
  place-items: center;
  background: transparent;
  color: #d7b56a;
  font-family: var(--font-serif, 'Cormorant Garamond', Georgia, serif);
  font-weight: 700;
  letter-spacing: -0.01em;
  width: 42px;
  height: 42px;
  font-size: 18px;
  border: 1px solid rgba(215, 181, 106, 0.42);
  border-radius: 2px;
  flex-shrink: 0;
  transition: border-color 0.2s ease, color 0.2s ease;
  background-color: rgba(255, 250, 240, 0.08);
}
.brand-mark:hover {
  border-color: #d7b56a;
  color: #f0d891;
}
.brand-mark.brand-mark-sm { width: 36px; height: 36px; font-size: 16px; }
.brand-mark.brand-mark-xs { width: 28px; height: 28px; font-size: 13px; border-radius: 1px; }
.brand-mark.brand-mark-grayscale { filter: grayscale(1) opacity(0.7); }

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s ease;
}
.brand-link:hover { opacity: 0.85; }
.brand-link .brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.brand-link .brand-text .name {
  font-family: var(--font-serif, 'Cormorant Garamond', Georgia, serif);
  font-size: clamp(20px, 2.1vw, 34px);
  font-weight: 600;
  letter-spacing: 0.08em;
  color: inherit;
}
.brand-link:hover .name { color: #d7b56a; }
.brand-link .brand-text .signature {
  font-family: var(--font-sans, 'Inter', sans-serif);
  font-size: 11px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: #d7b56a;
  margin-top: 5px;
  opacity: 0.95;
}

/* ============================================================
   2. HEADER (canon La Resistencia · sticky, night, serif, gold)
   ============================================================
   Header canónico de todo el sitio. Inspirado en /la-resistencia/
   Tipografía: Cormorant Garamond serif 18px para el menú.
   Color: night #061923 con .96 alpha + border gold.
   Breakpoint: 1280px (antes 1024) — el menú serif necesita más espacio.
*/
.editorial-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(6, 25, 35, 0.96);
  color: #f7f0e3;
  border-bottom: 1px solid rgba(215, 181, 106, 0.2);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.16);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
}
.editorial-header .nav-inner {
  width: min(1380px, calc(100% - 56px));
  min-height: 86px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.editorial-header .nav-list {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(16px, 2.1vw, 34px);
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-serif, 'Cormorant Garamond', Georgia, serif);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}
.editorial-header .nav-list a {
  color: #f7f0e3;
  opacity: 0.92;
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 6px;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}
.editorial-header .nav-list a:hover,
.editorial-header .nav-list a.active {
  color: #d7b56a;
  border-bottom-color: #d7b56a;
  opacity: 1;
}
.editorial-header .nav-list a.nav-resaltado {
  border: 1px solid rgba(215, 181, 106, 0.42);
  border-radius: 6px;
  padding: 9px 18px;
  color: #d7b56a;
  background: rgba(185, 146, 71, 0.05);
}
.editorial-header .nav-list a.nav-resaltado:hover,
.editorial-header .nav-list a.nav-resaltado.active {
  background: rgba(185, 146, 71, 0.12);
}
.editorial-header .nav-mobile {
  display: none;
  background: transparent;
  border: 1px solid rgba(215, 181, 106, 0.32);
  border-radius: 4px;
  color: #f7f0e3;
  padding: 8px;
  cursor: pointer;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
}
.editorial-header .nav-mobile svg { display: block; }
.editorial-header .signature,
.editorial-footer .signature { display: none !important; }
.columnas-body .col-grid .col-card:nth-child(n+11):not(.is-revealed) { display: none !important; }
.columnas-body .col-grid .col-card:first-child { display: grid !important; grid-column: span 2; grid-template-columns: 1.15fr .85fr; }
@media (max-width: 640px) {
  .columnas-body .col-grid .col-card:first-child { grid-column: auto; grid-template-columns: 1fr; }
}

@media (max-width: 1280px) {
  .editorial-header .nav-list { display: none; }
  .editorial-header .nav-mobile { display: inline-flex; }
  .editorial-header[data-nav-open="true"] .nav-list {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: rgba(6, 25, 35, 0.98);
    padding: 12px 32px 24px;
    gap: 0;
    border-bottom: 1px solid rgba(215, 181, 106, 0.2);
  }
  .editorial-header[data-nav-open="true"] .nav-list a,
  .editorial-header[data-nav-open="true"] .nav-list a.nav-resaltado {
    display: block;
    border: 0;
    border-bottom: 1px solid rgba(215, 181, 106, 0.16);
    border-radius: 0;
    padding: 14px 0;
    font-size: 18px;
  }
}
@media (max-width: 480px) {
  .editorial-header .nav-inner { width: calc(100% - 32px); min-height: 72px; }
  .editorial-header .brand-link { gap: 12px; }
  .editorial-header .brand-link .brand-text .name { font-size: 18px; }
  .editorial-header .brand-link .brand-text .signature { font-size: 9px; letter-spacing: 0.18em; }
}

/* Paper header (variante clara para landing de La Resistencia) */
.editorial-header.editorial-header-paper {
  background: rgba(245, 240, 231, 0.96);
  color: var(--ink, #0B0B0A);
  border-bottom: 1px solid rgba(11, 11, 10, 0.10);
}
.editorial-header.editorial-header-paper .nav-list a { color: var(--ink, #0B0B0A); }
.editorial-header.editorial-header-paper .nav-list a:hover,
.editorial-header.editorial-header-paper .nav-list a.active {
  color: var(--blood, #C13542);
  border-bottom-color: var(--blood, #C13542);
}
.editorial-header.editorial-header-paper .nav-list a.nav-resaltado {
  color: var(--blood, #C13542);
  border-color: var(--blood, #C13542);
  background: rgba(193, 53, 66, 0.05);
}
.editorial-header.editorial-header-paper .nav-mobile {
  color: var(--ink, #0B0B0A);
  border-color: rgba(11, 11, 10, 0.18);
}

/* ============================================================
   3. HERO (canon La Resistencia · gradient 90deg + watermark + flourish)
   ============================================================ */
.editorial-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(90deg, rgba(245, 240, 231, 0.96) 0%, rgba(232, 239, 242, 0.9) 42%, rgba(202, 219, 228, 0.82) 100%);
  isolation: isolate;
  padding: 64px 16px 48px;
}
.editorial-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../img/libros/la-resistencia-cover-1200.webp") center right 15% / 58% auto no-repeat;
  opacity: 0.16;
  filter: grayscale(18%) blur(0.5px);
  z-index: -2;
}
.editorial-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(245, 240, 231, 0.3), rgba(245, 240, 231, 0.96) 94%), radial-gradient(60% 70% at 80% 40%, rgba(255, 255, 255, 0.12), transparent 65%);
  z-index: -1;
}
.editorial-hero .hero-inner {
  max-width: var(--wrap-wide);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  gap: 48px;
  align-items: center;
  min-height: 720px;
}
@media (max-width: 1120px) {
  .editorial-hero .hero-inner { grid-template-columns: 1fr; gap: 26px; min-height: auto; }
  .editorial-hero .hero-book { order: -1; align-self: center; }
}
@media (max-width: 880px) {
  .editorial-hero { padding: 40px 16px 36px; }
  .editorial-hero .hero-inner { padding: 0; }
}
.editorial-hero .hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-top: 8px;
}
.editorial-hero .flourish {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
  color: var(--blood);
}
.editorial-hero .flourish::before,
.editorial-hero .flourish::after {
  content: "";
  width: 150px;
  max-width: 22vw;
  height: 1px;
  background: linear-gradient(90deg, transparent, #b99247);
}
.editorial-hero .flourish::after {
  background: linear-gradient(90deg, #b99247, transparent);
}
.editorial-hero .flourish span {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, #c73739 0 28%, #7d1419 31% 100%);
  box-shadow: 0 0 0 3px rgba(142, 31, 36, 0.08);
  display: block;
}
.editorial-hero .award-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 6px 12px;
  background: rgba(184, 155, 94, 0.10);
  border: 1px solid rgba(184, 155, 94, 0.22);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--copper);
}
.editorial-hero h1 {
  font-family: var(--font-serif, 'Cormorant Garamond', Georgia, serif);
  font-size: clamp(48px, 7.3vw, 112px);
  font-weight: 600;
  line-height: 0.94;
  letter-spacing: -0.035em;
  color: var(--ink);
  margin: 0 0 28px;
  max-width: 720px;
}
html body .editorial-hero h1 { color: var(--ink) !important; }
.editorial-hero h1 em {
  color: var(--blood);
  font-style: normal;
}
.editorial-hero .hero-lead {
  font-family: var(--font-serif, 'Cormorant Garamond', Georgia, serif);
  font-size: clamp(22px, 2.1vw, 31px);
  line-height: 1.28;
  color: var(--smoke);
  max-width: 620px;
  margin: 0 0 32px;
  font-style: normal;
}
.editorial-hero .hero-lead em {
  color: var(--ink);
  font-style: italic;
}
.editorial-hero .hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 52px;
}
.editorial-hero .hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  margin-top: 0;
  color: var(--smoke);
}
.editorial-hero .hero-facts .fact {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 150px;
  font-family: var(--font-serif, 'Cormorant Garamond', Georgia, serif);
  font-size: 17px;
  line-height: 1.2;
}
.editorial-hero .hero-facts .fact svg {
  width: 28px;
  height: 28px;
  color: var(--ink);
  stroke-width: 1.5;
  flex-shrink: 0;
}
.editorial-hero .hero-facts .fact strong {
  display: block;
  font-family: var(--font-sans, 'Inter', sans-serif);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.editorial-hero .hero-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  width: 100%;
  border-top: 1px solid var(--fog);
  padding-top: 24px;
}
.editorial-hero .hero-meta .meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.editorial-hero .hero-meta .meta-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mist);
}
.editorial-hero .hero-meta .meta-value {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--ink);
  font-weight: 500;
  letter-spacing: -0.01em;
}
}

/* ============================================================
   4. BOOK VISUAL (3D stack con portada La Resistencia)
   ============================================================ */
.editorial-book {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
}
.editorial-book .book-stage {
  position: relative;
  display: inline-block;
  transition: transform 0.4s ease;
}
.editorial-book:hover .book-stage { transform: scale(1.03); }
.editorial-book .book-cover {
  position: relative;
  display: block;
  width: clamp(240px, 32vw, 380px);
  aspect-ratio: 2 / 3;
  filter: drop-shadow(20px 20px 32px rgba(0, 0, 0, 0.32))
          drop-shadow(-4px 0 12px rgba(0, 0, 0, 0.08));
  transform: rotateY(-12deg) rotateX(2deg);
  transform-style: preserve-3d;
}
.editorial-book .book-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.editorial-book .preventa-badge {
  position: absolute;
  bottom: -28px;
  right: -28px;
  width: 110px;
  height: 110px;
  border-radius: 999px;
  background: var(--blood);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.25;
  padding: 12px;
  transform: rotate(8deg);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
}
@media (max-width: 880px) {
  .editorial-book .preventa-badge {
    width: 88px;
    height: 88px;
    bottom: -16px;
    right: -16px;
    font-size: 9px;
  }
}

/* ============================================================
   5. BUTTONS / CTAs
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 58px;
  padding: 16px 28px;
  font-family: var(--font-serif, 'Cormorant Garamond', Georgia, serif);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn svg { width: 22px; height: 22px; flex: 0 0 auto; }
.btn-blood {
  background: #061923;
  color: #fff;
  border-color: #b99247;
  box-shadow: 0 10px 24px rgba(6, 25, 35, 0.18);
}
.btn-blood:hover {
  background: var(--blood);
  color: #fff;
  border-color: var(--blood);
  transform: translateY(-1px);
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.38);
  color: var(--ink);
  border-color: rgba(11, 31, 43, 0.45);
}
.btn-ghost:hover {
  background: #fff;
  color: var(--ink);
  border-color: #b99247;
}
.btn-brass {
  background: var(--brass);
  color: var(--ink);
}
.btn-brass:hover {
  background: var(--copper);
  color: var(--paper);
  transform: translateY(-2px);
}
.btn-pill { border-radius: 999px; padding: 14px 24px; }
.btn-block { display: flex; width: 100%; }
.btn-sm { padding: 10px 16px; font-size: 11px; }
.btn-lg { padding: 16px 28px; font-size: 18px; }

/* ============================================================
   6. DIVIDER / PULL QUOTE
   ============================================================ */
.editorial-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--mist), transparent);
  border: 0;
  margin: 0 auto;
  max-width: var(--wrap);
}
.editorial-pull-quote {
  background: var(--ink);
  color: var(--paper);
  padding: 96px 32px;
  text-align: center;
  border-top: 1px solid rgba(184, 155, 94, 0.22);
  border-bottom: 1px solid rgba(184, 155, 94, 0.22);
}
.editorial-pull-quote .pq-mark {
  font-family: var(--font-display);
  font-size: 56px;
  color: var(--brass);
  line-height: 0.6;
  margin-bottom: 24px;
}
.editorial-pull-quote blockquote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.4;
  max-width: 760px;
  margin: 0 auto 24px;
  opacity: 0.94;
}
.editorial-pull-quote .pq-cite {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass);
}
.editorial-pull-quote .pq-cite .line {
  width: 32px;
  height: 1px;
  background: var(--brass);
}

/* ============================================================
   7. FOOTER (canon La Resistencia · night profundo + gold border)
   ============================================================ */
.editorial-footer {
  background: #04121a;
  color: rgba(247, 240, 227, 0.72);
  padding: 64px 32px 56px;
  border-top: 1px solid rgba(215, 181, 106, 0.18);
}
.editorial-footer .footer-inner {
  max-width: var(--wrap-wide);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr auto 1fr;
  gap: 32px;
  align-items: center;
}
@media (max-width: 880px) {
  .editorial-footer .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 28px;
  }
  .editorial-footer .footer-brand { align-items: center; }
}
.editorial-footer .footer-brand {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.editorial-footer .footer-brand .brand-link .name { color: #f7f0e3; }
.editorial-footer .footer-brand .brand-link .signature { color: #d7b56a; opacity: 0.95; }
.editorial-footer .footer-copy {
  font-family: var(--font-serif, 'Cormorant Garamond', Georgia, serif);
  font-size: 15px;
  letter-spacing: 0.01em;
  text-transform: none;
  color: rgba(247, 240, 227, 0.72);
  margin: 0;
}
.editorial-footer .footer-brand nav[aria-label="Enlaces del sitio"],
.editorial-footer .footer-nav-sitio {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 8px;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.editorial-footer .footer-brand nav[aria-label="Enlaces del sitio"] a,
.editorial-footer .footer-nav-sitio a {
  color: rgba(215, 181, 106, 0.78) !important;
  font-family: var(--font-mono, 'JetBrains Mono', monospace) !important;
  font-size: 10px !important;
  letter-spacing: 0.16em !important;
  text-transform: uppercase !important;
  text-decoration: none;
  transition: color 0.18s ease;
}
.editorial-footer .footer-brand nav[aria-label="Enlaces del sitio"] a:hover,
.editorial-footer .footer-nav-sitio a:hover { color: #d7b56a !important; }
@media (max-width: 880px) {
  .editorial-footer .footer-brand nav[aria-label="Enlaces del sitio"],
  .editorial-footer .footer-nav-sitio { justify-content: center; }
}
.editorial-footer .footer-social {
  display: flex;
  gap: 14px;
  justify-content: center;
}
.editorial-footer .footer-social a {
  color: rgba(247, 240, 227, 0.72);
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(215, 181, 106, 0.24);
  border-radius: 999px;
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}

/* Shared reading and utility templates */
.legal-page,.thanks-page,.not-found-page{background:var(--color-paper);color:var(--color-text-on-paper)}
.legal-document{width:min(760px,calc(100% - 2rem));margin:auto;padding:clamp(4rem,9vw,8rem) 0;font:1.08rem/1.72 var(--font-serif)}
.legal-document h1{font-size:clamp(3rem,7vw,5.5rem);line-height:.95}.legal-document h2{font-size:clamp(1.8rem,4vw,2.6rem);margin-top:1.8em}.legal-document h3{font:700 .78rem var(--font-sans);letter-spacing:.12em;text-transform:uppercase;color:var(--color-copper);margin-top:2.2rem}.legal-document a{color:var(--color-copper)}.legal-document table{width:100%;border-collapse:collapse;margin:1.5rem 0;font: .9rem/1.45 var(--font-sans)}.legal-document th,.legal-document td{padding:.75rem;border:1px solid var(--color-border);text-align:left;vertical-align:top}.legal-document .box,.legal-document .summary-box{padding:1.25rem;background:rgba(255,255,255,.45);border-left:3px solid var(--color-gold)}
.thanks-main{width:min(720px,calc(100% - 2rem));margin:auto;padding:clamp(5rem,12vw,10rem) 0;text-align:center}.thanks-main h1{font-size:clamp(3rem,8vw,6rem);line-height:.95}.thanks-main .actions{justify-content:center}
.not-found-main{width:min(680px,calc(100% - 2rem));margin:auto;padding:clamp(5rem,12vw,10rem) 0;text-align:center}.not-found-main .e404-mark{font:600 clamp(6rem,20vw,12rem)/.8 var(--font-display);color:var(--color-gold)}.not-found-main h1{font-size:clamp(2.5rem,6vw,4.5rem)}.not-found-main .e404-cta{display:inline-flex;align-items:center;min-height:48px;padding:.75rem 1.1rem;margin:.35rem;background:var(--color-blood);color:#fff;text-decoration:none;border-radius:var(--radius)}.not-found-main .secondary{background:var(--color-night)}
@media(max-width:640px){.legal-document{font-size:1rem}.legal-table-scroll{overflow-x:auto}.legal-document table{min-width:620px}}
.editorial-footer .footer-social a:hover {
  color: #d7b56a;
  border-color: #d7b56a;
}
.editorial-footer .footer-legal {
  display: flex;
  gap: 18px;
  justify-content: flex-end;
  font-family: var(--font-sans, 'Inter', sans-serif);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: none;
}
@media (max-width: 880px) {
  .editorial-footer .footer-legal { justify-content: center; flex-wrap: wrap; }
}
.editorial-footer .footer-legal a {
  color: rgba(247, 240, 227, 0.62);
  text-decoration: none;
  transition: color 0.18s ease;
}
.editorial-footer .footer-legal a:hover { color: #d7b56a; }
.editorial-footer .footer-colophon {
  max-width: var(--wrap-wide);
  margin: 28px auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(247, 240, 227, 0.08);
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-align: center;
  text-transform: uppercase;
  color: rgba(247, 240, 227, 0.42);
}

/* ============================================================
   8. PAGE GRAIN OVERLAY (textura sutil sobre el paper)
   ============================================================ */
.grain::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.04;
  z-index: 50;
  background-image: url("https://www.transparenttextures.com/patterns/paper-fibers.png");
}

/* ============================================================
   9. ADMIN SIDEBAR (estilo Superdesign · 220px fixed)
   ============================================================ */
.admin-shell {
  display: flex;
  min-height: calc(100vh - 0px);
  background: var(--paper);
  color: var(--ash);
  font-family: var(--font-sans);
}
.admin-sidebar {
  width: 220px;
  background: var(--ink);
  color: var(--paper);
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  z-index: 30;
  border-right: 1px solid rgba(232, 221, 200, 0.06);
}
.admin-sidebar .admin-brand {
  padding: 28px;
  border-bottom: 1px solid rgba(232, 221, 200, 0.06);
}
.admin-sidebar .admin-brand h1 {
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.05;
  margin: 0 0 6px;
  color: var(--paper);
}
.admin-sidebar .admin-brand .admin-sig {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass);
}
.admin-sidebar nav {
  flex: 1;
  padding: 14px 0;
}
.admin-sidebar nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.admin-sidebar nav li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 28px;
  font-size: 14px;
  color: var(--mist);
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
  border-left: 3px solid transparent;
}
.admin-sidebar nav li a:hover {
  color: var(--paper);
  background: var(--ink-soft);
}
.admin-sidebar nav li a.active {
  color: var(--brass);
  background: var(--ink-soft);
  border-left-color: var(--brass);
}
.admin-sidebar .admin-foot {
  padding: 22px 28px;
  border-top: 1px solid rgba(232, 221, 200, 0.08);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mist);
}
.admin-sidebar .admin-foot a {
  color: var(--paper);
  text-decoration: none;
  display: inline-block;
  margin-top: 6px;
}
.admin-sidebar .admin-foot a:hover { color: var(--brass); }

.admin-main {
  margin-left: 220px;
  flex: 1;
  min-height: 100vh;
  padding: 32px 36px 56px;
  background: var(--paper);
}
@media (max-width: 880px) {
  .admin-sidebar { position: relative; width: 100%; inset: auto; flex-direction: row; align-items: stretch; }
  .admin-sidebar .admin-brand { padding: 12px 16px; flex: 1; }
  .admin-sidebar nav { flex: 2; padding: 8px 0; overflow-x: auto; }
  .admin-sidebar nav ul { display: flex; gap: 4px; }
  .admin-sidebar nav li a { padding: 10px 14px; border-left: 0; border-bottom: 3px solid transparent; font-size: 12px; }
  .admin-sidebar nav li a.active { border-left-color: transparent; border-bottom-color: var(--brass); }
  .admin-sidebar .admin-foot { display: none; }
  .admin-main { margin-left: 0; padding: 24px 16px 40px; }
}

/* ============================================================
   10. STAT CARDS / DASHBOARD
   ============================================================ */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--bone);
  border: 1px solid var(--fog);
  border-radius: 4px;
  padding: 22px 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -8px rgba(11, 11, 10, 0.18);
}
.stat-card .stat-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mist);
  margin-bottom: 10px;
}
.stat-card .stat-value {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1;
}
.stat-card .stat-trend {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--smoke);
  margin-top: 10px;
}

/* ============================================================
   11. AUDIT TERMINAL (Superdesign · brass border, paper text)
   ============================================================ */
.audit-terminal {
  background: var(--ink);
  color: var(--paper);
  border: 1px solid rgba(184, 155, 94, 0.32);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.55;
  padding: 24px 28px;
  min-height: 420px;
  max-height: 70vh;
  overflow-y: auto;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.4);
}
.audit-terminal .audit-line {
  display: flex;
  gap: 10px;
  align-items: baseline;
  margin: 4px 0;
  white-space: pre-wrap;
}
.audit-terminal .audit-prompt {
  color: var(--brass);
  flex-shrink: 0;
}
.audit-terminal .audit-cmd {
  color: var(--whisper);
}
.audit-terminal .audit-out {
  color: #b8b1a3;
  white-space: pre-wrap;
  padding-left: 0;
  margin: 4px 0 14px;
}
.audit-terminal .audit-out.ok { color: #b3dfb4; }
.audit-terminal .audit-out.error { color: #ffb1b1; }
.audit-terminal .audit-out.dim { color: #6e6a62; }
.audit-terminal form {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(184, 155, 94, 0.18);
}
.audit-terminal input.audit-input {
  flex: 1;
  background: transparent;
  border: 0;
  color: var(--whisper);
  font-family: var(--font-mono);
  font-size: 13px;
  outline: none;
  caret-color: var(--brass);
}
.audit-terminal .audit-legend {
  font-size: 10px;
  color: #6e6a62;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed rgba(184, 155, 94, 0.18);
}
.audit-terminal .audit-legend code { color: var(--brass); }

/* ============================================================
   12. CARD (lista admin y catálogo de obras)
   ============================================================ */
.editorial-card {
  background: var(--bone);
  border: 1px solid var(--fog);
  border-radius: 4px;
  padding: 24px;
  display: flex;
  gap: 20px;
  align-items: stretch;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.editorial-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -10px rgba(11, 11, 10, 0.2);
}
.editorial-card .card-cover {
  width: 100px;
  flex-shrink: 0;
  aspect-ratio: 2 / 3;
  background: rgba(11, 11, 10, 0.08);
  overflow: hidden;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}
.editorial-card .card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.editorial-card .card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 4px 0;
}
.editorial-card .card-title {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 4px;
}
.editorial-card .card-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blood);
  margin-bottom: 6px;
}
.editorial-card .card-eyebrow.dim { color: var(--mist); }
.editorial-card .card-desc {
  font-size: 13px;
  color: var(--smoke);
  line-height: 1.5;
  margin: 10px 0;
}
.editorial-card .card-price {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
}

/* ============================================================
   13. UTILITY (utilizado en checkout mobile)
   ============================================================ */
.editorial-section {
  background: var(--paper);
  padding: 32px 24px;
}
.editorial-section .section-inner {
  max-width: var(--wrap);
  margin: 0 auto;
}
.editorial-form label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mist);
  margin-bottom: 8px;
}
.editorial-form input,
.editorial-form select,
.editorial-form textarea {
  width: 100%;
  background: var(--whisper);
  border: 1px solid var(--fog);
  padding: 14px 16px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--ink);
  transition: border-color 0.2s ease;
}
.editorial-form input:focus,
.editorial-form select:focus,
.editorial-form textarea:focus {
  outline: none;
  border-color: var(--brass);
}
.editorial-form .form-row { margin-bottom: 14px; }
.editorial-form .form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ============================================================
   14. SCROLL-SMOOTH + ANTI-ALIAS
   ============================================================ */
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

/* Accesibilidad global del sistema editorial. */
.skip-link {
  position: fixed;
  z-index: 10000;
  top: 12px;
  left: 16px;
  padding: 12px 16px;
  background: var(--color-paper, #E8DDC8);
  color: var(--color-night, #061923);
  font: 700 13px/1.2 var(--font-sans, sans-serif);
  transform: translateY(-180%);
  transition: transform 0.18s ease;
  min-height: 44px;
  box-sizing: border-box;
}
.skip-link:focus { transform: translateY(0); }

:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid #D7B56A;
  outline-offset: 3px;
}

.editorial-footer .footer-social a {
  min-width: 44px;
  min-height: 44px;
}
.editorial-footer .footer-nav-sitio a,
.editorial-footer .footer-legal a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  min-width: 44px;
  justify-content: center;
}
body.nav-open { overflow: hidden; }

#rf-cookie-banner {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 16px;
  right: 16px;
  bottom: 16px;
  max-width: 620px;
  margin: auto;
  padding: 16px 18px;
  background: var(--color-night, #061923);
  color: var(--color-text-on-dark, #F7F0E3);
  border: 1px solid rgba(215, 181, 106, .45);
  box-shadow: 0 16px 45px rgba(0, 0, 0, .35);
  font: 14px/1.45 var(--font-sans, sans-serif);
}
#rf-cookie-banner.show { display: block; }
#rf-cookie-banner strong { display: block; margin-bottom: 6px; font: 600 17px/1.2 var(--font-serif, serif); }
#rf-cookie-banner p { margin: 0 0 12px; color: #D7CFC2; }
#rf-cookie-banner > div { display: flex; gap: 8px; flex-wrap: wrap; }
#rf-cookie-banner button {
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid #D7B56A;
  background: #D7B56A;
  color: #061923;
  font: 700 11px/1 var(--font-sans, sans-serif);
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
}
#rf-cookie-banner button + button { background: transparent; color: #F7F0E3; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.editorial-header .brand-link,
.editorial-footer .brand-link,
.editorial-footer a,
.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.buy-drawer-close {
  min-width: 44px;
  min-height: 44px;
}

.editorial-footer .footer-social a {
  width: auto;
  min-width: 44px;
  padding-inline: 8px;
  justify-content: center;
  font-size: 10px;
}

/* ============================================================
   Refinamiento editorial (30-10-2026): sin el margen por defecto del
   navegador, utilidad sr-only común y enlaces sociales como texto.
   ============================================================ */
body { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.editorial-footer .footer-social { gap: 0.25rem 1.25rem; flex-wrap: wrap; justify-content: center; max-width: 100%; }
.editorial-footer .footer-social a {
  width: auto; height: auto; min-height: 44px; padding: 0;
  border: 0; border-radius: 0;
  font: 500 0.72rem var(--font-sans); letter-spacing: 0.14em; text-transform: uppercase;
}
.editorial-footer .footer-social a:hover { color: var(--color-gold); }
