/* CamiNomen · lupa y ventana del buscador (assets/busca.js). La comparten
   base.njk y home.njk, que tiene cabecera propia. */
/* ─── Buscar y volver ─────────────────────────────────────────────
   La lupa vive fuera del <nav>: si fuera dentro, en el móvil se
   escondería con el menú y buscar volvería a costar dos toques. En
   pantalla ancha va también al final del menú. Mismo motor y mismo
   aspecto que UrbiNomen (assets/busca.js). */
.nav-lupa, .bar-lupa {
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 999px; background: var(--bg);
  color: var(--ink); cursor: var(--cursor-plus); padding: 0;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.nav-lupa svg, .bar-lupa svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav-lupa:hover, .bar-lupa:hover { background: var(--red); border-color: var(--red); color: #fff; transform: scale(1.08); }
.nav-lupa { width: 32px; height: 32px; align-self: center; }
.nav-lupa svg { width: 16px; height: 16px; }
.bar-right { display: none; align-items: center; gap: .5rem; pointer-events: auto; align-self: center; }
.bar-lupa { width: 42px; height: 42px; }
.bar-lupa svg { width: 19px; height: 19px; }
@media (max-width: 640px) {
  .bar-right { display: flex; margin-right: 1rem; }
  .topbar .nav .nav-lupa { display: none; }
}

body.busca-abierta { overflow: hidden; }
.busca-overlay { position: fixed; inset: 0; z-index: 210; background: rgba(24,24,22,.38); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  display: flex; align-items: flex-start; justify-content: center; padding: max(4.5rem, 9vh) 1.2rem 2rem; opacity: 0; transition: opacity .2s; }
.busca-overlay.is-open { opacity: 1; }
.busca-overlay[hidden] { display: none; }
.busca-caja { width: 100%; max-width: 620px; position: relative; }
.busca-campo { display: flex; align-items: center; gap: .8rem; background: var(--bg); border: 1px solid var(--ink); border-radius: 4px; padding: 0 1.1rem; }
.busca-campo svg { width: 19px; height: 19px; flex-shrink: 0; fill: none; stroke: var(--ink2); stroke-width: 1.7; stroke-linecap: round; }
.busca-campo input { flex: 1; min-width: 0; background: transparent; border: none; outline: none; padding: 1.05rem 0; font-family: var(--ibarra); font-size: 1.15rem; color: var(--ink); }
.busca-campo input::placeholder { font-style: italic; color: var(--ink2); }
.busca-campo input::-webkit-search-cancel-button { -webkit-appearance: none; }
.busca-close { position: fixed; top: 1rem; right: 1.1rem; width: 2.6rem; height: 2.6rem; border: none; background: none; font-size: 2rem; line-height: 1; color: #fff; cursor: var(--cursor-plus); font-family: var(--ibarra); }
.busca-close:hover { color: var(--red-soft); }
/* La lista de resultados, compartida por la lupa y el campo del pie. */
.bs-list { list-style: none; margin: 0; padding: 0; position: absolute; left: 0; right: 0; top: calc(100% - 1px); background: var(--bg); border: 1px solid var(--ink); border-top: none; max-height: 60vh; overflow-y: auto; z-index: 20; box-shadow: 0 10px 28px rgba(0,0,0,.08); text-align: left; }
.bs-list[hidden] { display: none; }
.bs-list li { border-top: .5px solid var(--line); }
.bs-list li:first-child { border-top: none; }
.bs-list a { display: flex; flex-direction: column; align-items: flex-start; gap: .3rem; padding: .7rem 1.2rem; color: var(--ink); text-decoration: none; }
.bs-list a:hover, .bs-list a.is-focus { background: var(--cream2); }
.bs-name { font-family: var(--rioja); font-weight: 800; font-size: 1rem; line-height: 1.2; }
.bs-bar { font-family: var(--rioja); font-size: .72rem; letter-spacing: .13em; text-transform: uppercase; color: var(--ink2); white-space: normal; }
.bs-kind { color: var(--red); }
.bs-kind::after { content: ' · '; color: var(--ink3); }
.bs-vacio { padding: .9rem 1.2rem; font-family: var(--ibarra); font-size: .92rem; line-height: 1.45; color: var(--ink2); white-space: normal; }

