/* ══════════════════════════════════════════════════════════
   Rep Theme — theme.css v1.0
   Cuatro paletas de color via class en <body>
══════════════════════════════════════════════════════════ */

/* ─── PALETA BASE: Dark (rojo oscuro + header carbón) ─── */
:root,
body.palette-dark {
  --rep-accent:       #cc1b1b;
  --rep-accent-d:     #a81515;
  --rep-accent-bg:    #fff0f0;
  --rep-accent-text:  #fff;

  --rep-bg:           #f2f2f2;
  --rep-surface:      #fff;
  --rep-surface-alt:  #f8f8f8;
  --rep-text:         #1a1a1a;
  --rep-text2:        #555;
  --rep-muted:        #999;
  --rep-border:       #e0e0e0;

  --rep-header-bg:    #1a1a1a;
  --rep-header-text:  #fff;
  --rep-header-link:  #bbb;
  --rep-header-hover: #fff;

  --rep-footer-bg:    #111;
  --rep-footer-text:  #888;
  --rep-footer-link:  #aaa;

  --rep-sh:           0 2px 8px rgba(0,0,0,.09);
  --rep-sh-h:         0 6px 20px rgba(0,0,0,.14);
  --rep-r:            10px;
  --rep-r-sm:         6px;
  --rep-max:          880px;
  --rep-hdr-h:        64px;
  --rep-fs-base:      16px;
  --rep-f:            'DM Sans', system-ui, -apple-system, sans-serif;
  --rep-archive-cols: 3;
  --rep-container:    1320px;  /* Ancho del container en todo el site (como container-xxl) */
}

/* ─── PALETA: Light (rojo claro + fondo blanco) ────────── */
body.palette-light {
  --rep-accent:       #e03535;
  --rep-accent-d:     #c42828;
  --rep-accent-bg:    #fff5f5;

  --rep-bg:           #f7f7f9;
  --rep-surface:      #ffffff;
  --rep-surface-alt:  #f0f0f4;
  --rep-text:         #111827;
  --rep-text2:        #4b5563;
  --rep-muted:        #9ca3af;
  --rep-border:       #e5e7eb;

  --rep-header-bg:    #ffffff;
  --rep-header-text:  #111827;
  --rep-header-link:  #4b5563;
  --rep-header-hover: #e03535;

  --rep-footer-bg:    #1f2937;
  --rep-footer-text:  #9ca3af;
  --rep-footer-link:  #d1d5db;

  --rep-sh:           0 1px 4px rgba(0,0,0,.07);
  --rep-sh-h:         0 4px 16px rgba(0,0,0,.10);
}

/* ─── PALETA: Grey (rojo apagado + grises corporativos) ── */
body.palette-grey {
  --rep-accent:       #a82828;
  --rep-accent-d:     #8c1f1f;
  --rep-accent-bg:    #f9eded;

  --rep-bg:           #f4f4f4;
  --rep-surface:      #ffffff;
  --rep-surface-alt:  #ebebeb;
  --rep-text:         #2c2c2c;
  --rep-text2:        #606060;
  --rep-muted:        #a0a0a0;
  --rep-border:       #d8d8d8;

  --rep-header-bg:    #2c2c2c;
  --rep-header-text:  #f0f0f0;
  --rep-header-link:  #c0c0c0;
  --rep-header-hover: #ffffff;

  --rep-footer-bg:    #2c2c2c;
  --rep-footer-text:  #909090;
  --rep-footer-link:  #c0c0c0;

  --rep-sh:           0 2px 8px rgba(0,0,0,.08);
  --rep-sh-h:         0 5px 18px rgba(0,0,0,.12);
}

/* ─── PALETA: Cream (terracota + crema/arena) ───────────── */
body.palette-cream {
  --rep-accent:       #b83030;
  --rep-accent-d:     #962626;
  --rep-accent-bg:    #fdf3f0;

  --rep-bg:           #faf6f0;
  --rep-surface:      #fffdf8;
  --rep-surface-alt:  #f4ece0;
  --rep-text:         #2d1f1f;
  --rep-text2:        #5c4030;
  --rep-muted:        #9a8070;
  --rep-border:       #e0d0c0;

  --rep-header-bg:    #2d1f1f;
  --rep-header-text:  #faf0e6;
  --rep-header-link:  #c8b8a8;
  --rep-header-hover: #ffffff;

  --rep-footer-bg:    #2d1f1f;
  --rep-footer-text:  #9a8070;
  --rep-footer-link:  #c8b8a8;

  --rep-sh:           0 2px 8px rgba(45,31,31,.09);
  --rep-sh-h:         0 5px 18px rgba(45,31,31,.14);
}

/* ════════════════════════════════════════════════════════
   RESET & BASE
════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: var(--rep-fs-base); scroll-behavior: smooth; }

/* Evitar el espacio causado por el skip-link o el margin de wpadminbar */
body > .skip-link { position: fixed; } /* saca el skip-link del flujo para evitar espacio */

/* Admin bar: WP agrega margin-top:32px/46px a html cuando está visible.
   El header sticky debe compensar ese offset. */

body {
  background:   var(--rep-bg);
  color:        var(--rep-text);
  font-family:  var(--rep-f);
  font-size:    1rem;
  line-height:  1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  /* Header siempre fixed — compensar su altura */
  padding-top: var(--rep-hdr-h);
}
/* Admin bar: solo desktop */
/* WordPress ya agrega margin-top:32px al <html>; el body solo compensa el header */
/* Mobile: sin admin bar, padding normal */
@media screen and (max-width: 782px) { body.admin-bar { padding-top: var(--rep-hdr-h); } }
/* Padding lateral del container: 16px en celular, 24px desde tablet */
:root { --rep-gutter: 16px; }
@media (min-width: 768px) { :root { --rep-gutter: 24px; } }

a { color: var(--rep-accent); text-decoration: none; transition: color .15s; }
a:hover { text-decoration: underline; text-decoration-thickness: 1px; }

img, video { max-width: 100%; height: auto; display: block; }

/* Light: header shadow */
body.palette-light .site-header { box-shadow: 0 1px 0 var(--rep-border), 0 2px 8px rgba(0,0,0,.06); }

/* ════════════════════════════════════════════════════════
   HEADER
════════════════════════════════════════════════════════ */
.site-header {
  background: var(--rep-header-bg);
  height:     var(--rep-hdr-h);
  z-index:    200;
  box-shadow: 0 2px 6px rgba(0,0,0,.22);
  transition: box-shadow .2s;
  position:   fixed;
  top:        0;
  left:       0;
  right:      0;
}
/* Admin bar: solo en desktop (≥783px) */
@media screen and (min-width: 783px) {
  body.admin-bar .site-header { top: 32px; }
}
/* En mobile: ocultar wpadminbar completamente */
@media screen and (max-width: 782px) {
  #wpadminbar { display: none !important; }
  html { margin-top: 0 !important; }
  body.admin-bar .site-header { top: 0; }
  body.admin-bar { padding-top: var(--rep-hdr-h) !important; }
}


.site-header.scrolled { box-shadow: 0 4px 16px rgba(0,0,0,.3); }

.site-header__inner {
  max-width:   var(--rep-container, 1320px);
  margin:      0 auto;
  padding:     0 var(--rep-gutter, 16px);
  height:      100%;
  display:     flex;
  align-items: center;
  gap:         24px;
}
/* Logo ocupa solo lo necesario, el nav va a la derecha */
.site-header__logo { flex-shrink: 0; }
.site-header__inner > .site-header__nav { margin-left: auto; }
body .site-header--full .site-header__inner { max-width: none; }

/* Logo */
.site-header__logo {
  display:      flex;
  align-items:  center;
  gap:          10px;
  text-decoration: none;
  flex-shrink:  0;
}
.site-header__logo img { max-height: 40px; max-width: 180px; object-fit: contain; width: auto; }
.site-header__logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.site-header__logo-name {
  color:       var(--rep-header-text);
  font-size:   1rem;
  font-weight: 700;
  letter-spacing: -.01em;
  transition:  color .15s;
}
.site-header__logo:hover .site-header__logo-name { color: var(--rep-accent); text-decoration: none; }
.site-header__logo-tag { color: var(--rep-header-link); font-size: .65rem; text-transform: uppercase; letter-spacing: .08em; }

/* Nav principal */
.site-header__nav { display: none; }
@media(min-width:768px) { .site-header__nav { display: flex; align-items: center; gap: 4px; } }

.site-nav { list-style: none; display: flex; gap: 2px; align-items: center; flex-wrap: nowrap; }
.site-nav > li { position: relative; }
.site-nav a {
  color:       var(--rep-header-link);
  font-size:   .86rem;
  font-weight: 500;
  padding:     7px 13px;
  border-radius: var(--rep-r-sm);
  transition:  color .15s, background .15s;
  display:     inline-flex;
  align-items: center;
  gap:         5px;
  white-space: nowrap;
  position:    relative;
}
/* Icono Material Symbols en el nav desktop */
.site-nav__icon {
  font-size: 18px;
  line-height: 1;
  font-variation-settings: 'FILL' 0, 'wght' 300;
  transition: font-variation-settings .15s;
}
.site-nav .current-menu-item > a .site-nav__icon,
.site-nav a:hover .site-nav__icon {
  font-variation-settings: 'FILL' 1, 'wght' 600;
}
/* Badge del carrito en nav desktop */
.nav-cart-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  background: var(--rep-accent);
  color: #fff;
  font-size: .55rem;
  font-weight: 800;
  border-radius: 8px;
  padding: 0 3px;
  line-height: 16px;
  text-align: center;
  pointer-events: none;
  /* El badge flota encima sin afectar el layout del botón */
  display: none;
  align-items: center;
  justify-content: center;
  transition: transform .25s cubic-bezier(.34,1.56,.64,1);
}
/* Solo mostrar cuando tiene contenido (lo controla JS via style.display) */
.nav-cart-badge[style*="inline-flex"] { display: inline-flex !important; }
.nav-cart-badge.bump { transform: scale(1.6); }
.site-nav a:hover,
.site-nav .current-menu-item > a,
.site-nav .current-menu-ancestor > a {
  color: var(--rep-header-hover);
  background: rgba(255,255,255,.1);
  text-decoration: none;
}
body.palette-light .site-nav a:hover,
body.palette-light .site-nav .current-menu-item > a {
  background: var(--rep-accent-bg);
  color: var(--rep-accent);
}

/* Dropdown */
.site-nav .sub-menu {
  display:    none;
  position:   absolute;
  top:        calc(100% + 6px);
  left:       0;
  min-width:  200px;
  background: var(--rep-surface);
  border:     1px solid var(--rep-border);
  border-radius: var(--rep-r);
  box-shadow: var(--rep-sh-h);
  z-index:    300;
  list-style: none;
  padding:    6px;
}
.site-nav li:hover > .sub-menu { display: block; }
.site-nav .sub-menu a { color: var(--rep-text); font-size: .84rem; border-radius: 6px; padding: 8px 12px; }
.site-nav .sub-menu a:hover { background: var(--rep-accent-bg); color: var(--rep-accent); }

/* Header right: search + ham */
.site-header__right { display: flex; align-items: center; gap: 10px; }
.site-header__right:not(:has(*)) { display: none; } /* vacío: que no sume espacio a la derecha */
.site-header__search { display: none; }
.site-header__search.active { display: flex; }
.header-search-form { display: flex; align-items: center; gap: 6px; }
.header-search-input {
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
  border-radius: 20px; padding: 7px 16px; color: #fff; font-size: .85rem;
  outline: none; transition: background .2s, border-color .2s; width: 200px;
}
.header-search-input::placeholder { color: rgba(255,255,255,.55); }
.header-search-input:focus { background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.4); }
body.palette-light .header-search-input { background: var(--rep-bg); border-color: var(--rep-border); color: var(--rep-text); }
body.palette-light .header-search-input::placeholder { color: var(--rep-muted); }

/* Botón hamburguesa */
/* Hamburger removido — se usa mobile bottom nav en su lugar */
.nav-toggle { display: none !important; }

/* Mobile nav */
/* Panel mobile legacy (ocultado) */
.mobile-nav-panel { display: none !important; }

/* ─── Bottom Navigation Bar (mobile ≤ 767px) ──────────── */
.mobile-bottom-nav {
  display: none; /* oculto en desktop */
}
@media(max-width:767px) {
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 300;
    background: var(--rep-header-bg);
    border-top: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 -4px 20px rgba(0,0,0,.25);
    padding-bottom: env(safe-area-inset-bottom, 0);
    height: calc(58px + env(safe-area-inset-bottom, 0));
    align-items: stretch;
  }
  /* Espacio para que el contenido no quede tapado (solo con sesión iniciada: sin sesión no hay barra) */
  body.logged-in { padding-bottom: calc(58px + env(safe-area-inset-bottom, 0)); }
  /* Alto de la barra inferior: el plugin lo usa para ubicar sus barras fijas y avisos */
  body.logged-in { --rep-bnav-h: calc(58px + env(safe-area-inset-bottom, 0px)); }
  body.logged-in.admin-bar { padding-bottom: calc(58px + env(safe-area-inset-bottom, 0) + 46px); }
}

.mobile-bottom-nav__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 4px;
  text-decoration: none;
  color: var(--rep-header-link);
  font-size: .56rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  transition: color .15s;
}
.mobile-bottom-nav__item.active,
.mobile-bottom-nav__item:hover {
  color: var(--rep-accent);
  text-decoration: none;
}
.mobile-bottom-nav__icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}
.mobile-bottom-nav__icon .material-symbols-outlined {
  font-size: 24px;
  line-height: 1;
  font-variation-settings: 'FILL' 0, 'wght' 300;
  transition: font-variation-settings .15s;
}
.mobile-bottom-nav__item.active .mobile-bottom-nav__icon .material-symbols-outlined {
  font-variation-settings: 'FILL' 1, 'wght' 600;
}
.mobile-bottom-nav__label { line-height: 1; }

/* Badge en bottom nav */
.mobile-nav-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  min-width: 16px;
  height: 16px;
  background: var(--rep-accent);
  color: #fff;
  font-size: .55rem;
  font-weight: 800;
  border-radius: 8px;
  display: inline-flex; /* sin !important: el JS lo oculta cuando el carrito está vacío */
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
  pointer-events: none;
}

/* ════════════════════════════════════════════════════════
   LAYOUT BASE
════════════════════════════════════════════════════════ */
.site-main { flex: 1; min-width: 0; }

/* Cuando el contenido ES el shortcode (page-plugin.php),
   el .rep-wrap ocupa todo el main sin interferencias del theme */
.site-main > .rep-wrap {
  /* El shortcode toma el 100% del área disponible */
  display: block;
  width: 100%;
}

.content-wrap {
  max-width:  var(--rep-container, 1320px);
  margin:     0 auto;
  padding:    40px var(--rep-gutter, 16px) 64px;
}
@media(min-width:640px) { .content-wrap { padding-top: 48px; padding-bottom: 72px; } }

/* Sin sidebar: content-area ocupa el ancho completo */
.content-area { min-width: 0; width: 100%; }

/* Con sidebar */
body.has-sidebar .content-wrap { max-width: calc(var(--rep-max) + 320px + 48px); }
body.has-sidebar .content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}
@media(min-width:900px) {
  body.has-sidebar.sidebar-right  .content-grid { grid-template-columns: 1fr 300px; }
  body.has-sidebar.sidebar-left   .content-grid { grid-template-columns: 300px 1fr; }
  body.has-sidebar.sidebar-left   .sidebar { order: -1; }
}

/* Full width — no max-width */
.content-wrap.full-width { max-width: none; padding-left: 0; padding-right: 0; }
.content-wrap.no-title-padding { padding-top: 0; }

/* ════════════════════════════════════════════════════════
   SIDEBAR
════════════════════════════════════════════════════════ */
.sidebar { min-width: 0; }
.widget { margin-bottom: 28px; background: var(--rep-surface); border-radius: var(--rep-r); padding: 20px; box-shadow: var(--rep-sh); }
.widget-title { font-size: .92rem; font-weight: 700; margin-bottom: 14px; text-transform: uppercase; letter-spacing: .07em; color: var(--rep-text2); }
.widget ul { list-style: none; }
.widget ul li { padding: 5px 0; border-bottom: 1px solid var(--rep-border); font-size: .88rem; }
.widget ul li:last-child { border: none; }

/* ════════════════════════════════════════════════════════
   ENTRY META
════════════════════════════════════════════════════════ */
.entry-meta { font-size: .76rem; color: var(--rep-muted); margin-bottom: 10px; text-transform: uppercase; letter-spacing: .07em; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.entry-meta a { color: var(--rep-muted); }
.entry-meta a:hover { color: var(--rep-accent); }
.entry-sep { opacity: .5; }

/* ════════════════════════════════════════════════════════
   SINGLE POST
════════════════════════════════════════════════════════ */
.single-post .post-hero { border-radius: var(--rep-r); overflow: hidden; margin-bottom: 32px; aspect-ratio: 16/6; }
.single-post .post-hero img { width: 100%; height: 100%; object-fit: cover; }

.post-header { margin-bottom: 28px; }
.post-title { font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 800; line-height: 1.2; letter-spacing: -.02em; margin-bottom: 12px; }

.post-content { background: var(--rep-surface); border-radius: var(--rep-r); padding: 32px; box-shadow: var(--rep-sh); }
@media(max-width:600px) { .post-content { padding: 20px; } }

.post-content h2 { font-size: 1.4rem; font-weight: 700; margin: 32px 0 12px; }
.post-content h3 { font-size: 1.15rem; font-weight: 700; margin: 24px 0 10px; }
.post-content h4 { font-size: 1rem; font-weight: 700; margin: 20px 0 8px; }
.post-content p { margin-bottom: 18px; }
.post-content ul, .post-content ol { padding-left: 24px; margin-bottom: 18px; }
.post-content li { margin-bottom: 6px; }
.post-content blockquote {
  border-left: 4px solid var(--rep-accent);
  margin: 24px 0; padding: 14px 22px;
  background: var(--rep-accent-bg); border-radius: 0 var(--rep-r) var(--rep-r) 0;
  font-style: italic; font-size: .97rem; color: var(--rep-text2);
}
.post-content code { background: var(--rep-surface-alt); padding: 2px 7px; border-radius: 4px; font-size: .88em; font-family: monospace; }
.post-content pre { background: #1a1a1a; color: #e0e0e0; padding: 18px 22px; border-radius: var(--rep-r); overflow-x: auto; margin: 20px 0; font-size: .88rem; }
.post-content pre code { background: none; padding: 0; color: inherit; }
.post-content img { border-radius: var(--rep-r-sm); margin: 20px 0; }
.post-content table { width: 100%; border-collapse: collapse; margin-bottom: 20px; font-size: .9rem; }
.post-content th { background: var(--rep-surface-alt); font-weight: 600; padding: 10px 14px; border: 1px solid var(--rep-border); text-align: left; }
.post-content td { padding: 9px 14px; border: 1px solid var(--rep-border); }
.post-content tr:nth-child(even) td { background: var(--rep-surface-alt); }
.post-content .wp-block-image { margin: 24px 0; }
.post-content .alignleft { float: left; margin: 8px 20px 8px 0; }
.post-content .alignright { float: right; margin: 8px 0 8px 20px; }
.post-content .aligncenter { margin: 20px auto; }
.post-content::after { content: ''; display: table; clear: both; }

/* Navegación post anterior/siguiente */
.post-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--rep-border); }
.post-nav-item { flex: 1; }
.post-nav-item.next { text-align: right; }
.post-nav-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--rep-muted); display: block; margin-bottom: 4px; }
.post-nav-title { font-size: .9rem; font-weight: 600; color: var(--rep-text); line-height: 1.35; }
.post-nav-title:hover { color: var(--rep-accent); text-decoration: none; }

/* Tags al pie */
.post-tags { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--rep-border); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.post-tags-label { font-size: .76rem; color: var(--rep-muted); text-transform: uppercase; letter-spacing: .07em; }
.post-tag { background: var(--rep-surface-alt); color: var(--rep-text2); font-size: .76rem; padding: 3px 10px; border-radius: 20px; border: 1px solid var(--rep-border); transition: all .15s; }
.post-tag:hover { background: var(--rep-accent-bg); color: var(--rep-accent); border-color: var(--rep-accent); text-decoration: none; }

/* ════════════════════════════════════════════════════════
   PAGE (genérica)
════════════════════════════════════════════════════════ */
.page-header { margin-bottom: 28px; }
.page-title { font-size: clamp(1.5rem, 3.5vw, 2.2rem); font-weight: 800; line-height: 1.2; letter-spacing: -.02em; }
.page-content .post-content { padding: 28px; }

/* Page sin título — quita el h1, sirve para páginas que contienen shortcodes full-screen */
/* ── Page: Sin título ───────────────────────────────────── */
/* Clase en el wrap via template (content-wrap--no-title) */
.content-wrap--no-title {
  padding-top: 0;
  padding-bottom: 0;
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}
/* También via post_class body (retrocompat) */
.page-no-title .content-wrap { padding-top: 0; padding-bottom: 0; }

/* ── Page: Ancho completo ───────────────────────────────── */
/* Clase en el wrap via template (content-wrap.full-width) */
.content-wrap.full-width {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
  padding-top: 0;
  padding-bottom: 0;
}
.page-header--fw { padding: 40px 0 0; }
.page-header__inner { max-width: var(--rep-max); margin: 0 auto; padding: 0 20px; }

/* Retrocompat — post_class en article */
.page-content-fw .page-header { max-width: var(--rep-max); margin: 0 auto; padding: 40px 20px 0; }

/* ════════════════════════════════════════════════════════
   ARCHIVE / BLOG / SEARCH
════════════════════════════════════════════════════════ */
.archive-header, .search-header { margin-bottom: 32px; }
.archive-title, .search-title { font-size: clamp(1.3rem, 3vw, 1.9rem); font-weight: 800; margin-bottom: 8px; }
.archive-desc, .search-desc { color: var(--rep-text2); font-size: .92rem; }
.search-form-wrap { margin: 20px 0 32px; }

.post-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}
@media(min-width:480px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media(min-width:720px) { .post-grid { grid-template-columns: repeat(var(--rep-archive-cols, 3), 1fr); } }

.post-card {
  background:    var(--rep-surface);
  border-radius: var(--rep-r);
  overflow:      hidden;
  box-shadow:    var(--rep-sh);
  transition:    box-shadow .2s, transform .15s;
  display:       flex;
  flex-direction: column;
}
.post-card:hover { box-shadow: var(--rep-sh-h); transform: translateY(-2px); }

.post-card__img { overflow: hidden; aspect-ratio: 16/9; background: var(--rep-surface-alt); }
.post-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.post-card:hover .post-card__img img { transform: scale(1.05); }

.post-card__body { padding: 16px 18px 20px; flex: 1; display: flex; flex-direction: column; }
.post-card__meta { font-size: .7rem; color: var(--rep-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .07em; }
.post-card__title { font-size: 1rem; font-weight: 700; line-height: 1.35; margin-bottom: 8px; flex: 1; }
.post-card__title a { color: var(--rep-text); }
.post-card__title a:hover { color: var(--rep-accent); text-decoration: none; }
.post-card__excerpt { font-size: .84rem; color: var(--rep-text2); line-height: 1.65; margin-bottom: 14px; }
.read-more { font-size: .82rem; font-weight: 600; color: var(--rep-accent); display: inline-flex; align-items: center; gap: 3px; }
.read-more:hover { text-decoration: none; gap: 6px; }

/* ════════════════════════════════════════════════════════
   PAGINACIÓN GLOBAL
════════════════════════════════════════════════════════ */
.pagination { margin-top: 36px; display: flex; justify-content: center; }
.pagination .nav-links { display: flex; gap: 6px; flex-wrap: wrap; }
.pagination .page-numbers {
  padding: 8px 14px; border-radius: var(--rep-r-sm);
  border: 1.5px solid var(--rep-border);
  background: var(--rep-surface); color: var(--rep-text);
  font-size: .88rem; font-weight: 500;
  transition: all .15s; min-width: 38px; text-align: center;
}
.pagination .page-numbers:hover:not(.current) { border-color: var(--rep-accent); color: var(--rep-accent); text-decoration: none; }
.pagination .page-numbers.current { background: var(--rep-accent); border-color: var(--rep-accent); color: var(--rep-accent-text); }
.pagination .page-numbers.dots { border: none; background: none; cursor: default; }

/* ════════════════════════════════════════════════════════
   404
════════════════════════════════════════════════════════ */
.error-404 { min-height: 65vh; display: flex; align-items: center; justify-content: center; text-align: center; }
.error-404__code { font-size: clamp(5rem, 20vw, 10rem); font-weight: 900; color: var(--rep-accent); line-height: 1; letter-spacing: -.04em; }
.error-404__title { font-size: clamp(1.3rem, 4vw, 2rem); font-weight: 700; margin: 12px 0; }
.error-404__msg { color: var(--rep-text2); font-size: .97rem; margin-bottom: 32px; max-width: 420px; }
.btn-primary { display: inline-flex; align-items: center; gap: 6px; background: var(--rep-accent); color: var(--rep-accent-text); padding: 13px 28px; border-radius: var(--rep-r); font-weight: 700; font-size: .95rem; transition: background .15s; }
.btn-primary:hover { background: var(--rep-accent-d); color: var(--rep-accent-text); text-decoration: none; }

/* ════════════════════════════════════════════════════════
   SEARCH FORM
════════════════════════════════════════════════════════ */
.search-form { display: flex; gap: 8px; }
.search-form .search-field {
  flex: 1; padding: 11px 16px;
  border: 1.5px solid var(--rep-border); border-radius: var(--rep-r);
  background: var(--rep-surface); color: var(--rep-text);
  font-size: .95rem; outline: none;
  transition: border-color .2s;
}
.search-form .search-field:focus { border-color: var(--rep-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--rep-accent) 12%, transparent); }
.search-form .search-submit {
  background: var(--rep-accent); color: #fff; border: none;
  padding: 11px 22px; border-radius: var(--rep-r);
  font-size: .9rem; font-weight: 700; cursor: pointer;
  transition: background .15s;
}
.search-form .search-submit:hover { background: var(--rep-accent-d); }

/* ════════════════════════════════════════════════════════
   COMMENTS
════════════════════════════════════════════════════════ */
.comments-area { margin-top: 40px; background: var(--rep-surface); border-radius: var(--rep-r); padding: 28px; box-shadow: var(--rep-sh); }
.comments-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 20px; }
.comment-list { list-style: none; }
.comment-list .comment { padding: 16px 0; border-bottom: 1px solid var(--rep-border); }
.comment-list .comment:last-child { border: none; }
.comment-author .fn { font-weight: 600; font-size: .9rem; }
.comment-meta { font-size: .74rem; color: var(--rep-muted); margin-bottom: 8px; }
.comment-content p { font-size: .9rem; color: var(--rep-text2); line-height: 1.7; }
.comment-reply-link { font-size: .78rem; font-weight: 600; color: var(--rep-accent); }

.comment-reply-title { font-size: 1rem; font-weight: 700; margin: 28px 0 14px; }
.comment-form label { display: block; font-size: .82rem; font-weight: 600; margin-bottom: 5px; margin-top: 14px; }
.comment-form input[type=text],
.comment-form input[type=email],
.comment-form input[type=url],
.comment-form textarea {
  width: 100%; border: 1.5px solid var(--rep-border); border-radius: var(--rep-r-sm);
  padding: 10px 12px; font-size: .9rem; outline: none;
  background: var(--rep-surface); color: var(--rep-text);
  transition: border-color .2s; font-family: var(--rep-f);
}
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--rep-accent); }
.comment-form textarea { min-height: 110px; resize: vertical; }
.comment-form .submit { margin-top: 16px; }
.comment-form input[type=submit] {
  background: var(--rep-accent); color: #fff; border: none;
  border-radius: var(--rep-r); padding: 11px 24px;
  font-size: .9rem; font-weight: 700; cursor: pointer;
  transition: background .15s; font-family: var(--rep-f);
}
.comment-form input[type=submit]:hover { background: var(--rep-accent-d); }

/* ════════════════════════════════════════════════════════
   FOOTER
════════════════════════════════════════════════════════ */
.site-footer { background: var(--rep-bg, #f2f2f2); color: var(--rep-muted, #999); border-top: 1px solid var(--rep-border, #e0e0e0); padding: 0; margin-top: auto; }
/* 1.2.16 · Footer chico y discreto, del mismo gris que el fondo de la página (1.2.15 lo había puesto blanco) */

.footer-widgets { padding: 24px 0 16px; border-bottom: 1px solid var(--rep-border, #e0e0e0); }
.footer-widgets__inner { max-width: var(--rep-container, 1320px); margin: 0 auto; padding: 0 var(--rep-gutter, 16px); display: grid; gap: 24px; grid-template-columns: 1fr; }
@media(min-width:640px)  { .footer-widgets__inner.cols-2 { grid-template-columns: repeat(2,1fr); } }
@media(min-width:900px)  { .footer-widgets__inner.cols-3 { grid-template-columns: repeat(3,1fr); } }
@media(min-width:1100px) { .footer-widgets__inner.cols-4 { grid-template-columns: repeat(4,1fr); } }

.footer-widgets .widget { background: none; box-shadow: none; padding: 0; margin-bottom: 0; font-size: .8rem; }
.footer-widgets .widget-title { color: var(--rep-text2, #555); font-size: .72rem; }
.footer-widgets .widget ul li { border-color: var(--rep-border, #e0e0e0); }
.footer-widgets .widget ul li a { color: var(--rep-muted, #999); font-size: .8rem; }
.footer-widgets .widget ul li a:hover { color: var(--rep-text, #1a1a1a); }

.footer-bottom { max-width: var(--rep-container, 1320px); margin: 0 auto; padding: 10px var(--rep-gutter, 16px); font-size: .72rem; line-height: 1.5; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 16px; }
.footer-bottom a { color: var(--rep-muted, #999); text-decoration: none; }
.footer-bottom a:hover { color: var(--rep-text, #1a1a1a); text-decoration: underline; }
.footer-nav { list-style: none; display: flex; gap: 14px; flex-wrap: wrap; margin: 0; padding: 0; }
/* Celular: todo centrado, uno debajo del otro */
@media(max-width:640px) {
  .footer-bottom { flex-direction: column; justify-content: center; text-align: center; padding-top: 8px; padding-bottom: 8px; }
  .footer-nav { justify-content: center; }
  .footer-widgets { text-align: center; }
}

/* ════════════════════════════════════════════════════════
   BREADCRUMBS
════════════════════════════════════════════════════════ */
.breadcrumbs { font-size: .78rem; color: var(--rep-muted); margin-bottom: 20px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.breadcrumbs a { color: var(--rep-muted); }
.breadcrumbs a:hover { color: var(--rep-accent); }
.breadcrumbs .sep { opacity: .5; }

/* ════════════════════════════════════════════════════════
   ACCESIBILIDAD
════════════════════════════════════════════════════════ */
.skip-link { position: absolute; top: -100px; left: 20px; background: var(--rep-accent); color: #fff; padding: 8px 18px; border-radius: 0 0 var(--rep-r) var(--rep-r); font-weight: 600; z-index: 9999; transition: top .2s; }
.skip-link:focus { top: 0; }

:focus-visible { outline: 2.5px solid var(--rep-accent); outline-offset: 3px; border-radius: 3px; }
:focus:not(:focus-visible) { outline: none; }

/* ════════════════════════════════════════════════════════
   UTILIDADES
════════════════════════════════════════════════════════ */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.no-results { color: var(--rep-muted); font-size: .92rem; padding: 48px 0; text-align: center; }
.no-results .icon { font-size: 3rem; margin-bottom: 12px; opacity: .5; }
.alignleft  { float: left;  margin: 4px 20px 4px 0; }
.alignright { float: right; margin: 4px 0 4px 20px; }
.aligncenter { margin: 16px auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: .78rem; color: var(--rep-muted); text-align: center; margin-top: 5px; }

/* Scrollbar global */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--rep-border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--rep-muted); }

/* ════════════════════════════════════════════════════════
   GUÍA DE USO — aviso tipo «notice» (1.2.15)
   Antes era una franja oscura pegada al header; ahora es un aviso claro dentro del
   contenido, con borde de color a la izquierda, que se puede cerrar.
════════════════════════════════════════════════════════ */
.rep-guia-bar {
  width: 100%;
  box-sizing: border-box;
  align-self: stretch;
  max-width: var(--rep-container, 1320px);
  margin: 14px auto 0;
  padding: 0 var(--rep-gutter, 16px);
  font-size: .84rem;
  font-family: var(--rep-f, system-ui, sans-serif);
  color: var(--rep-text2, #555);
}
/* 1.2.6 · Si el usuario la ocultó, la clase se pone en <html> desde el <head> (sin parpadeo al cargar) */
html.rep-guia-oculta .rep-guia-bar { display: none; }
@keyframes guiaSlideIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.rep-guia-bar__inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 10px 12px 14px;
  background: var(--rep-accent-bg, #fff0f0);
  border: 1px solid var(--rep-border, #e0e0e0);
  border-radius: var(--rep-r, 10px);
}
/* 1.2.17 · Mismo diseño que los avisos de la app («Uso sin conexión»): fondo suave del acento,
   ícono, título en negrita + texto gris y botón sólido */
.rep-guia-bar__ico {
  font-size: 24px;
  color: var(--rep-accent, #cc1b1b);
  flex-shrink: 0;
  font-family: 'Material Symbols Outlined';
  font-variation-settings: 'FILL' 0;
}
.rep-guia-bar__text { flex: 1; line-height: 1.4; min-width: 0; font-size: .78rem; color: var(--rep-muted, #999); display: flex; flex-direction: column; gap: 2px; }
.rep-guia-bar__text strong { color: var(--rep-text, #1a1a1a); font-size: .86rem; }
.rep-guia-bar__btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 9px 16px;
  background: var(--rep-accent, #cc1b1b);
  color: #fff;
  border: none;
  border-radius: var(--rep-r, 10px);
  font-size: .84rem; font-weight: 700;
  text-decoration: none; white-space: nowrap; flex-shrink: 0;
  transition: background .15s;
  cursor: pointer; font-family: var(--rep-f, system-ui);
}
.rep-guia-bar__btn:hover { background: var(--rep-accent-d, #a81515); color: #fff; text-decoration: none; }
.rep-guia-bar__btn .material-symbols-outlined { font-size: 16px; }
.rep-guia-bar__close {
  background: none; border: none; cursor: pointer;
  color: var(--rep-muted, #999); padding: 4px; flex-shrink: 0;
  display: flex; align-items: center; border-radius: 4px;
  transition: color .15s; line-height: 1;
}
.rep-guia-bar__close:hover { color: var(--rep-text, #1a1a1a); }
.rep-guia-bar__close .material-symbols-outlined { font-size: 18px; }

/* Celular */
@media(max-width:600px) {
  .rep-guia-bar { margin-top: 10px; font-size: .8rem; }
  .rep-guia-bar__text span { display: none; }
  .rep-guia-bar__inner { padding: 10px 6px 10px 12px; gap: 10px; }
  .rep-guia-bar__btn { padding: 8px 12px; font-size: .8rem; }
}

/* ─── 1.2.3 · Navegación entre páginas ───────────────────
   Transición suave (el header y la barra inferior quedan fijos mientras cambia
   el contenido) y una barra de carga fina si la página tarda. */
@view-transition { navigation: auto; }
.site-header { view-transition-name: rep-header; }
.mobile-bottom-nav { view-transition-name: rep-bnav; }
/* 1.2.6 · La página anterior queda visible hasta que la nueva está lista y la nueva aparece encima
   con un fundido corto: sin parpadeo en blanco ni desplazamiento del contenido. */
::view-transition-old(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { animation: rep-vt-in .12s ease-out both; mix-blend-mode: normal; }
@keyframes rep-vt-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
}
html.rep-nav-cargando::before {
  content: ""; position: fixed; top: 0; left: 0; height: 3px; width: 100%; z-index: 10000;
  background: var(--rep-accent); transform-origin: left; animation: rep-nav-barra 2.5s cubic-bezier(.1,.7,.2,1) forwards;
  box-shadow: 0 0 8px var(--rep-accent);
}
@keyframes rep-nav-barra { from { transform: scaleX(0); } to { transform: scaleX(.85); } }

/* ════════════════════════════════════════════════════════
   PANTALLA DE INGRESO / RECUPERAR CONTRASEÑA (1.2.24)
   Mismo fondo y disposición que wp-login.php.
════════════════════════════════════════════════════════ */
body.rep-ingreso { background:#f2f2f2; padding-top:0 !important; min-height:100vh; min-height:100dvh; }
body.rep-ingreso .site-main--ingreso { flex:1; display:flex; flex-direction:column; justify-content:center; }
