/* visual-app.css — Linkgua Visual, vanilla — paridad con React/Havana */

:root {
  --dorado: #C8A96E;
  --fondo:  #F0E8D2;
  --ink:    #1a1a1a;
  --muted:  #555;
  --bg:     #fff;
  --header-bg: #F0E8D2;
  --header-h:  3.75rem;
  --radius: 2px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --gap: 3px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
}

/* ── Header ───────────────────────────────────────────────────── */
.vg-header {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--header-h);
  background: var(--header-bg);
  border-bottom: 1px solid rgba(0,0,0,.08);
}

.vg-header-inner {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.vg-page-inner {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
}

.vg-brand {
  text-decoration: none;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.vg-nav {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}
.vg-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
  white-space: nowrap;
}
.vg-nav a:hover { color: var(--ink); }

.vg-header-search {
  flex: 1;
  max-width: 440px;
  margin: 0 auto;
  position: relative;
}
.vg-header-search input {
  width: 100%;
  border: none;
  border-bottom: 1px solid rgba(0,0,0,.18);
  background: transparent;
  padding: 0.35rem 0;
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--ink);
  outline: none;
}
.vg-header-search input::placeholder { color: #aaa; }

.vg-search-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid rgba(0,0,0,.1);
  box-shadow: 0 4px 16px rgba(0,0,0,.1);
  z-index: 200;
  border-radius: 3px;
  overflow: hidden;
}
.vg-sd-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.65rem;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid rgba(0,0,0,.05);
  transition: background 0.1s;
}
.vg-sd-row:last-of-type { border-bottom: none; }
.vg-sd-row:hover { background: #f7f4ef; }
.vg-sd-thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  flex-shrink: 0;
  border-radius: 2px;
  background: #eee;
}
.vg-sd-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.vg-sd-title {
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #1a1a1a;
}
.vg-sd-artist {
  font-size: 0.72rem;
  color: #888;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vg-sd-all {
  display: block;
  width: 100%;
  padding: 0.5rem 0.65rem;
  background: none;
  border: none;
  border-top: 1px solid rgba(0,0,0,.08);
  text-align: left;
  font-size: 0.76rem;
  color: var(--tlapalli-dorado, #C8A96E);
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 0.02em;
}
.vg-sd-all:hover { background: #f7f4ef; }

.vg-header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
  flex-shrink: 0;
}
.vg-header-right a {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}
.vg-header-right a:hover { color: var(--ink); }

/* ── Hero / breadcrumb ────────────────────────────────────────── */
.vg-breadcrumb {
  padding: 1rem 0 0;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.vg-breadcrumb a { color: var(--muted); text-decoration: none; }
.vg-breadcrumb a:hover { color: var(--ink); }
.vg-breadcrumb span { margin: 0 0.4rem; }

.vg-hero {
  padding: 1rem 0 1.25rem;
  border-bottom: 1px solid rgba(0,0,0,.08);
  margin-bottom: 0;
}
.vg-hero-eyebrow {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 0.4rem;
  font-weight: 400;
}
.vg-hero-title {
  font-size: 42px;
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 0.5rem;
}
.vg-hero-country {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.75rem;
}
.vg-hero-books {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.9rem;
  line-height: 1.5;
}
.vg-hero-books a {
  color: var(--dorado);
  text-decoration: none;
}
.vg-hero-books a:hover { text-decoration: underline; }

.vg-hero-desc {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: #333;
  max-width: 72ch;
  line-height: 1.7;
  display: none;
  overflow: hidden;
}
.vg-hero-desc.has-text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.vg-hero-desc.expanded  { display: block; -webkit-line-clamp: unset; }

.vg-hero-readmore {
  display: none;
  margin-top: 0.4rem;
  background: none;
  border: none;
  font-size: 0.8rem;
  color: var(--dorado);
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  letter-spacing: 0.03em;
}
.vg-hero-readmore:hover { text-decoration: underline; }
.vg-hero-readmore.visible { display: inline; }

/* ── Loading ──────────────────────────────────────────────────── */
.vg-loading {
  display: flex;
  justify-content: center;
  padding: 3rem 0;
}
.vg-loading[hidden] { display: none; }
.vg-spinner {
  width: 28px;
  height: 28px;
  border: 2px solid rgba(0,0,0,.08);
  border-top-color: var(--dorado);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Language button ──────────────────────────────────────────── */
.vg-lang-btn {
  background: none;
  border: none;
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.vg-lang-btn:hover { color: var(--ink); }

/* ── MIS IMÁGENES ─────────────────────────────────────────────── */
.vg-mis-imagenes {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.vg-mis-imagenes:hover { color: var(--ink); }

/* ── User button ──────────────────────────────────────────────── */
.vg-user-btn {
  display: flex;
  align-items: center;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.1s;
}
.vg-user-btn:hover { color: var(--ink); }

/* ── Container (max-width = catálogo React) ───────────────────── */
.vg-container {
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 48px;
}

/* ── Grid ─────────────────────────────────────────────────────── */
.vg-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap);
  padding: 3px 3px 0;
  transition: opacity 0.15s;
}

@media (max-width: 1000px) {
  .vg-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .vg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 400px) {
  .vg-grid { grid-template-columns: 1fr; }
}

/* ── Card ─────────────────────────────────────────────────────── */
.vg-card {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 0;
  overflow: hidden;
  background: linear-gradient(90deg, #F0E8D2 25%, #FAF5EC 50%, #F0E8D2 75%);
  background-size: 200% 100%;
  animation: vg-skeleton 1.5s ease-in-out infinite;
  cursor: pointer;
  border: none;
  padding: 0;
  display: block;
  width: 100%;
  text-decoration: none;
  color: inherit;
}
/* Gradient overlay — siempre visible */
.vg-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
    rgba(0,0,0,.50) 0%,
    rgba(0,0,0,.05) 35%,
    transparent 60%);
  pointer-events: none;
  z-index: 1;
}
.vg-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.vg-card:hover img { transform: scale(1.04); }
.vg-card:focus-visible { outline: 2px solid var(--dorado); outline-offset: -2px; }

/* Texto sobre la tarjeta */
.vg-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.6rem 0.65rem 0.7rem;
  z-index: 2;
  text-align: left;
}
.vg-card-title {
  font-size: 0.78rem;
  font-weight: 400;
  color: #fff;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.2rem;
}
.vg-card-artist {
  display: block;
  font-size: 0.68rem;
  font-style: italic;
  color: rgba(255,255,255,.7);
  margin-bottom: 0.3rem;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.vg-card-badge {
  display: inline-block;
  background: rgba(0,0,0,.45);
  color: #fff;
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 5px;
  margin-bottom: 0.2rem;
}
.vg-card-info {
  font-size: 0.6rem;
  color: rgba(255,255,255,.55);
  letter-spacing: 0.03em;
}

/* ── Paginación ───────────────────────────────────────────────── */
.vg-pagination--top {
  padding: 0.75rem 1rem 0.5rem;
}
.vg-pagination--top .vg-pager-meta { display: none; }

.vg-pagination {
  padding: 1.75rem 1rem 2.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.vg-pager {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: center;
}
.vg-pager-btn {
  min-width: 36px;
  padding: 6px 11px;
  border: 1px solid rgba(0,0,0,.12);
  background: none;
  font-size: 13px;
  font-weight: 500;
  border-radius: 0;
  cursor: pointer;
  font-family: inherit;
  color: var(--ink);
  line-height: 1;
  transition: background 0.1s, color 0.1s;
}
.vg-pager-btn:hover:not(:disabled):not(.vg-pager-btn--active) {
  background: rgba(0,0,0,.04);
}
.vg-pager-btn:disabled { opacity: 0.3; cursor: default; }
.vg-pager-btn--active {
  background: #111;
  color: #fff;
  border-color: #111;
}
.vg-pager-ellipsis {
  padding: 0 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 36px;
}
.vg-pager-meta {
  font-size: 0.7rem;
  color: var(--muted);
}

/* ── Lightbox ─────────────────────────────────────────────────── */
.vg-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(18,18,16,.82);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.vg-lightbox[hidden] { display: none; }

.vg-lb-close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: rgba(255,255,255,.6);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.4rem 0.6rem;
  line-height: 1;
  z-index: 10;
}
.vg-lb-close:hover { color: #fff; }

.vg-lb-content {
  display: flex;
  flex-direction: row;
  max-width: 1120px;
  max-height: 88vh;
  width: 94vw;
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
}
.vg-lb-img-wrap {
  flex: 0 0 58%;
  background: #1a1a18;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.vg-lb-img {
  max-width: 100%;
  max-height: 88vh;
  object-fit: contain;
  display: block;
}
.vg-lb-info {
  flex: 1;
  padding: 3rem 2.5rem 2.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.vg-lb-title {
  font-size: 1.375rem;
  font-weight: 300;
  color: var(--ink);
  line-height: 1.25;
}
.vg-lb-artist-name {
  font-size: 0.8rem;
  font-weight: 300;
  color: var(--dorado);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.vg-lb-meta-row {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.25rem;
}
.vg-lb-counter {
  font-size: 0.7rem;
  color: #aaa;
  margin-top: auto;
  padding-top: 1.5rem;
}
.vg-lb-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255,255,255,.5);
  font-size: 2.5rem;
  cursor: pointer;
  padding: 0.5rem;
  line-height: 1;
  transition: color 0.1s;
  z-index: 10;
}
.vg-lb-nav--prev { left: 1rem; }
.vg-lb-nav--next { right: 1rem; }
.vg-lb-nav:hover:not(:disabled) { color: #fff; }
.vg-lb-nav:disabled { opacity: 0.15; cursor: default; }

/* ── Mobile lightbox ──────────────────────────────────────────── */
@media (max-width: 700px) {
  .vg-lb-content { flex-direction: column; max-height: 95vh; }
  .vg-lb-img-wrap { flex: 0 0 55%; }
  .vg-lb-info { padding: 1rem 1.25rem; }
  .vg-lb-nav { font-size: 1.75rem; }
  .vg-header-search { display: none; }
}

/* ── Catálogo: hero ───────────────────────────────────────────── */
.vg-cat-hero {
  padding: 2rem 0 0.75rem;
  border-bottom: 1px solid rgba(0,0,0,.08);
}
.vg-cat-hero-title {
  font-size: 42px;
  font-weight: 300;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.1;
  margin-bottom: 0.3rem;
}
.vg-cat-hero-sub {
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

/* ── Catálogo: pills ──────────────────────────────────────────── */
.vg-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 1.25rem 0 1rem;
}
.vg-pill {
  background: transparent;
  border: 1px solid #bbb;
  border-radius: 2px;
  padding: 6px 16px;
  font-size: 12px;
  font-family: inherit;
  color: #222;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.04em;
  text-decoration: none;
  display: inline-block;
}
.vg-pill:hover { border-color: #222; color: #222; }
.vg-pill--active {
  background: #222;
  color: #C8A96E;
  border-color: #222;
}

/* ── Catálogo: grid de colecciones ───────────────────────────── */
.vg-cat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem 1rem;
  padding: 1rem 0 2rem;
  transition: opacity 0.15s;
}
@media (max-width: 1000px) { .vg-cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .vg-cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 360px)  { .vg-cat-grid { grid-template-columns: 1fr; } }

/* ── Catálogo: tarjeta de colección ─────────────────────────── */
.vg-cat-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--fondo);
  transition: transform 0.18s ease;
}
.vg-cat-card:hover { transform: translateY(-2px); }
.vg-cat-card:focus-visible { outline: 2px solid var(--dorado); outline-offset: 2px; }

.vg-cat-card-img {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(90deg, #F0E8D2 25%, #FAF5EC 50%, #F0E8D2 75%);
  background-size: 200% 100%;
  animation: vg-skeleton 1.5s ease-in-out infinite;
}
.vg-cat-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.28s ease;
}
.vg-cat-card:hover .vg-cat-card-img img { transform: scale(1.04); }

.vg-cat-card-body {
  padding: 0.6rem 0.5rem 0.75rem;
}
.vg-cat-card-title {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.35;
  margin-bottom: 0.2rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.vg-cat-card-count {
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* ── Footer ───────────────────────────────────────────────────── */
.vg-footer {
  background: #1a1a18;
  color: rgba(255,255,255,.6);
  padding: 3rem 1.5rem 2rem;
  margin-top: 4rem;
  font-size: 0.8rem;
  line-height: 1.6;
}
.vg-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
}
.vg-footer h4 {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,.35);
  margin-bottom: 0.75rem;
}
.vg-footer a {
  display: block;
  color: rgba(255,255,255,.55);
  text-decoration: none;
  padding: 0.15rem 0;
}
.vg-footer a:hover { color: #fff; }
.vg-footer-bottom {
  max-width: 1200px;
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: 0.7rem;
  color: rgba(255,255,255,.25);
}

/* ── Página /imagen/:slug ─────────────────────────────────────── */
.vid-loading, .vid-not-found {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; min-height: 40vh; gap: 16px;
  color: var(--muted); font-size: 14px;
}
.vid-not-found-sub { font-size: 13px; color: var(--muted); margin: 0; }
.vid-page { max-width: 1200px; margin: 0 auto; padding: 24px 16px 64px; }
.vid-topbar {
  display: flex; align-items: center; gap: 12px; margin-bottom: 24px;
}
.vid-back {
  background: none; border: none; cursor: pointer; font-size: 18px;
  color: var(--muted); padding: 4px 8px; border-radius: 4px;
  transition: background .15s;
}
.vid-back:hover { background: #f0ece4; }
.vid-collection-link {
  font-size: 13px; color: var(--muted); text-decoration: none;
  text-transform: uppercase; letter-spacing: .06em;
}
.vid-collection-link:hover { color: var(--dorado); }
.vid-layout {
  display: grid; grid-template-columns: 1fr 360px; gap: 48px; align-items: start;
}
@media (max-width: 900px) { .vid-layout { grid-template-columns: 1fr; } }
.vid-imgwrap {
  position: relative; background: #f5f2ee; border-radius: 4px;
  overflow: hidden; min-height: 300px;
}
.vid-img { width: 100%; height: auto; display: block; }
.vid-imgactions {
  position: absolute; top: 10px; right: 10px;
  display: flex; flex-direction: column; gap: 6px;
}
.vid-imgbtn {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.9); border: none; cursor: pointer;
  font-size: 15px; display: flex; align-items: center; justify-content: center;
  text-decoration: none; color: #333;
  transition: background .15s; backdrop-filter: blur(4px);
}
.vid-imgbtn:hover { background: #fff; }
.vid-imgbtn--ai  { color: var(--dorado); }
.vid-imgbtn--saved { color: var(--dorado); }
.vid-meta { display: flex; flex-direction: column; gap: 14px; }
.vid-title { font-size: 22px; font-weight: 400; line-height: 1.3; margin: 0; }
.vid-artist { font-size: 15px; color: var(--dorado); text-decoration: none; font-weight: 500; }
.vid-artist:hover { text-decoration: underline; }
.vid-book { font-size: 13px; color: var(--muted); margin: 0; }
.vid-book-link { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.vid-book-link:hover { color: var(--ink); }
.vid-context { font-size: 13px; color: var(--muted); margin: 0; }
.vid-license {
  display: inline-block; font-size: 11px; font-weight: 500;
  padding: 2px 9px; border-radius: 20px; letter-spacing: .02em;
}
.vid-desc { font-size: 14px; line-height: 1.65; margin: 0; }
.vid-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.vid-tag {
  font-size: 12px; padding: 3px 10px;
  border: 1px solid #ddd; border-radius: 20px;
  text-decoration: none; color: var(--muted);
  transition: border-color .15s, color .15s;
}
.vid-tag:hover { border-color: var(--dorado); color: var(--dorado); }
.vid-similar-section { margin-top: 56px; }
.vid-similar-title {
  font-size: 16px; font-weight: 400; color: var(--muted);
  text-transform: uppercase; letter-spacing: .06em; margin: 0 0 20px;
}
.vid-similar-loading { font-size: 13px; color: var(--muted); }
.vid-similar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.vid-similar-grid--nf { margin: 12px 0; }
.vid-sim-card {
  display: block; text-decoration: none; color: inherit;
  border-radius: 4px; overflow: hidden; background: #f5f2ee;
}
.vid-sim-card img { width: 100%; height: 140px; object-fit: cover; display: block; }
.vid-sim-title {
  display: block; font-size: 11px; color: var(--muted);
  padding: 5px 6px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.vg-browse-img {
  width: 100%;
  height: 140px;
  overflow: hidden;
  background: linear-gradient(90deg, #F0E8D2 25%, #FAF5EC 50%, #F0E8D2 75%);
  background-size: 200% 100%;
  animation: vg-skeleton 1.5s ease-in-out infinite;
}
.vg-browse-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 4px 4px 0 0; }

@keyframes vg-skeleton {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Browse pages (/artistas /paises /temas /siglos) ── */
.vg-browse-hero { padding: 48px 48px 16px; }
.vg-browse-eyebrow {
  font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase;
  color: #999; margin-bottom: 6px;
}
.vg-browse-h1 {
  font-size: 42px; font-weight: 300; letter-spacing: -0.01em;
  margin: 0 0 6px; line-height: 1.1;
}
.vg-browse-sub { font-size: 15px; color: #666; margin: 0; }

.vg-browse-note {
  padding: 16px 48px 18px;
  border-bottom: 1px solid #e8e4df;
}
.vg-browse-note a {
  font-size: 13px; color: #666; text-decoration: none;
  border-bottom: 1px dotted #ccc;
}
.vg-browse-note a:hover { color: #222; border-color: #999; }

.vg-browse-toolbar {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 48px;
  border-bottom: 1px solid #e8e4df;
  flex-wrap: wrap;
}
.vg-browse-back {
  padding: 7px 14px; border: 1px solid #ccc; border-radius: 2px;
  background: transparent; font-size: 12px; letter-spacing: 0.04em;
  color: #666; text-decoration: none; white-space: nowrap;
  transition: border-color 0.15s, color 0.15s;
}
.vg-browse-back:hover { border-color: #888; color: #222; }

.vg-browse-sort {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: #666; letter-spacing: 0.04em;
}
.vg-browse-sort-btn {
  padding: 5px 12px; border: 1px solid #ccc; border-radius: 2px;
  background: transparent; font-size: 12px; font-family: inherit;
  letter-spacing: 0.04em; cursor: pointer; color: #666;
  transition: all 0.15s;
}
.vg-browse-sort-btn:hover { border-color: #888; color: #222; }
.vg-browse-sort-active { background: #222 !important; color: #fff !important; border-color: #222 !important; }

.vg-browse-search {
  margin-left: auto; padding: 7px 12px;
  border: 1px solid #ccc; border-radius: 2px;
  font-size: 13px; font-family: inherit;
  background: #fff; color: #222; width: 220px;
  transition: border-color 0.15s;
}
.vg-browse-search:focus { outline: none; border-color: #222; }

.vg-browse-letters {
  position: sticky; top: 0; z-index: 20;
  background: rgba(250, 248, 245, 0.95);
  backdrop-filter: blur(8px);
  padding: 10px 48px;
  display: flex; flex-wrap: wrap; gap: 2px;
  border-bottom: 1px solid #e8e4df;
}
.vg-bi-lbtn {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 400; color: #999;
  border: 1px solid transparent; border-radius: 2px;
  background: transparent; cursor: pointer; font-family: inherit;
  transition: all 0.15s;
}
.vg-bi-lbtn:hover { color: #222; border-color: #bbb; }
.vg-bi-lbtn-active { color: #222 !important; border-color: #222 !important; background: #f5f0eb !important; }

.vg-browse-grid-wrap { }

.vg-bi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  margin-bottom: 24px;
}
.vg-bi-card {
  position: relative; overflow: hidden; display: block;
  aspect-ratio: 1 / 1; text-decoration: none; color: #fff;
  background: #d4c5a9;
}
.vg-bi-img {
  width: 100%; height: 100%; overflow: hidden;
}
.vg-bi-img img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.6s ease;
}
.vg-bi-card:hover .vg-bi-img img { transform: scale(1.03); }
.vg-bi-label {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 32px 16px 14px;
  background: linear-gradient(transparent, rgba(0,0,0,0.5));
}
.vg-bi-name { font-size: 13px; font-weight: 400; letter-spacing: 0.02em; line-height: 1.2; }
.vg-bi-count { font-size: 11px; opacity: 0.7; margin-top: 2px; }

.vg-bi-letter-head {
  font-size: 28px; font-weight: 300; color: #222;
  margin: 0 0 12px; padding-top: 48px;
  border-bottom: 1px solid #e8e4df; padding-bottom: 8px;
  display: flex; align-items: baseline; gap: 8px;
}
.vg-bi-letter-count {
  font-size: 12px; font-weight: 400; color: #999; letter-spacing: 0.04em;
}

@media (max-width: 768px) {
  .vg-browse-hero { padding: 32px 24px 10px; }
  .vg-browse-h1 { font-size: 28px; }
  .vg-browse-note { padding: 12px 24px 14px; }
  .vg-browse-toolbar { padding: 12px 24px; }
  .vg-browse-letters { padding: 10px 24px; }
  .vg-bi-grid { grid-template-columns: repeat(2, 1fr); }
  .vg-browse-search { width: 100%; margin-left: 0; }
}

.vg-tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  padding: 2rem 48px;
  align-items: baseline;
}
@media (max-width: 768px) {
  .vg-tags-cloud { padding: 1.5rem 24px; }
}

/* ── TagIndexPage (/tags) ── */
.vg-ti-nav {
  position: fixed; top: 56px; left: 0; right: 0; z-index: 20;
  display: flex; flex-wrap: wrap; gap: 4px;
  padding: 10px 48px;
  background: rgba(253,251,247,0.96); backdrop-filter: blur(8px);
  border-bottom: 1px solid #e8e4df;
  opacity: 0; transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}
.vg-ti-nav--visible { opacity: 1; transform: none; pointer-events: auto; }
.vg-ti-nav-letter {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  border: 1px solid #e5e5e5; border-radius: 2px;
  font-size: 0.8rem; font-weight: 450; color: #1a1a1a;
  text-decoration: none; transition: border-color .15s, background .15s;
}
.vg-ti-nav-letter:hover { border-color: #C8A96E; background: #fdf8f0; }
.vg-ti-section { padding: 0 48px; }
.vg-ti-h2 { font-size: 1.5rem; font-weight: 400; margin: 0 0 24px; color: #1a1a1a; }
.vg-ti-desc { font-size: 0.95rem; color: #555; max-width: 680px; line-height: 1.6; margin: 8px 0 0; }
.vg-ti-col-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px; margin-bottom: 0;
}
.vg-ti-col-card {
  display: flex; flex-direction: column;
  text-decoration: none;
  border: 1px solid #e5e5e5; border-radius: 2px;
  overflow: hidden; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.vg-ti-col-card:hover { border-color: #C8A96E; box-shadow: 0 2px 8px rgba(200,169,110,0.15); }
.vg-ti-col-img { width: 100%; aspect-ratio: 16/9; overflow: hidden; flex-shrink: 0; }
.vg-ti-col-img img { width: 100%; height: 100%; object-fit: cover; }
.vg-ti-clear-btn {
  margin-left: 8px; padding: 6px 12px;
  border: 1px solid #ddd; border-radius: 2px;
  background: #fff; font-size: 0.85rem; cursor: pointer;
}
.vg-ti-clear-btn:hover { border-color: #C8A96E; }
.vg-ti-index { padding: 0 48px 80px; }
@media (max-width: 768px) {
  .vg-ti-nav { padding: 8px 16px; }
  .vg-ti-section { padding: 0 24px; }
  .vg-ti-index { padding: 0 24px 60px; }
  .vg-ti-col-grid { grid-template-columns: repeat(2, 1fr); }
}
