/* ============================================================
   MAC — Estilos
   Consume tokens.css. Mobile-first con breakpoint en 860px.
   ============================================================ */

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3 { margin: 0; line-height: var(--lh-tight); font-weight: var(--fw-bold); letter-spacing: -0.01em; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Elementos compartidos ---------- */

.eyebrow {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semi);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 var(--sp-3);
}
.eyebrow--onDark { color: #ff9ea1; }

.ico { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Botones ---------- */
.btn {
  --btn-py: 0.7rem; --btn-px: 1.25rem;
  display: inline-flex; align-items: center; gap: var(--sp-2);
  padding: var(--btn-py) var(--btn-px);
  font-family: inherit; font-size: var(--fs-sm); font-weight: var(--fw-semi);
  border: 1.5px solid transparent; border-radius: var(--radius);
  cursor: pointer; transition: background var(--transition), color var(--transition), border-color var(--transition);
  white-space: nowrap;
}
.btn--sm { --btn-py: 0.5rem; --btn-px: 0.9rem; }
.btn .ico { font-size: 1.05em; stroke-width: 2; }

.btn--primary { background: var(--accent); color: var(--white); border-color: var(--accent); }
.btn--primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

.btn--ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--ghost.btn--onDark { color: var(--white); border-color: rgba(255,255,255,.5); }
.btn--ghost.btn--onDark:hover { border-color: var(--white); background: rgba(255,255,255,.1); }

/* ============ TOPBAR ============ */
.topbar {
  background: var(--black);
  color: var(--mist);
  font-size: var(--fs-xs);
}
.topbar__inner {
  display: flex; align-items: center;
  min-height: 40px;
}
.topbar__contact {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: var(--sp-2) var(--sp-5);
  width: 100%;
}
.topbar__contact li a { display: inline-flex; align-items: center; gap: var(--sp-2); transition: color var(--transition); }
.topbar__contact li a:hover { color: var(--white); }
.topbar__hours { display: inline-flex; align-items: center; gap: var(--sp-2); }
.topbar__contact .ico { color: var(--accent); font-size: 1.1em; }

/* ============ NAVBAR ============ */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-5);
  min-height: 84px;
}
.nav__logo img { height: 52px; width: auto; }
.nav__links { display: flex; gap: var(--sp-2); margin-left: auto; }
.nav__links a {
  padding: var(--sp-2) var(--sp-3);
  font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--graphite);
  border-radius: var(--radius-sm); transition: color var(--transition);
}
.nav__links a:hover { color: var(--ink); }
.nav__links a.is-active { color: var(--accent); font-weight: var(--fw-semi); }

.nav__actions { display: flex; align-items: center; gap: var(--sp-3); }

.nav__toggle {
  display: none;
  flex-direction: column; justify-content: center; gap: 5px;
  width: 42px; height: 42px; padding: 0 9px;
  background: none; border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer;
}
.nav__toggle span { height: 2px; background: var(--ink); border-radius: 2px; transition: transform var(--transition), opacity var(--transition); }
.nav.is-open .nav__toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.is-open .nav__toggle span:nth-child(2) { opacity: 0; }
.nav.is-open .nav__toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ HERO ============ */
.hero {
  position: relative;
  min-height: clamp(440px, 62vh, 620px);
  display: flex; align-items: center;
  overflow: hidden;
  background: var(--black);
}
.hero__media { position: absolute; inset: 0; z-index: 0; }
.hero__video { width: 100%; height: 100%; object-fit: cover; }
.hero__video--mobile { display: none; }
.hero__scrim {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 90% at center, rgba(14,15,17,.78) 0%, rgba(14,15,17,.45) 65%, rgba(14,15,17,.55) 100%);
}
.hero__content {
  position: relative; z-index: 1; color: var(--white);
  padding-block: var(--sp-8); max-width: 720px;
  margin-inline: auto; text-align: center;
}
.hero__title { font-size: var(--fs-3xl); margin-bottom: var(--sp-4); }
.hero__sub { font-size: var(--fs-md); color: rgba(255,255,255,.82); margin: 0 auto var(--sp-6); max-width: 46ch; }
.hero__cta { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-3); }
.hero__cta .btn { --btn-py: 0.85rem; --btn-px: 1.6rem; font-size: var(--fs-base); }

/* ============ CARDS DE VALOR ============ */
.values { background: var(--bg-alt); padding-block: var(--sp-8); }
.values__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-5); }
.vcard {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: var(--sp-6); box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.vcard:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.vcard__ico { width: 40px; height: 40px; stroke: var(--accent); stroke-width: 1.6; fill: none; stroke-linecap: round; stroke-linejoin: round; margin-bottom: var(--sp-4); }
.vcard__title { font-size: var(--fs-lg); margin-bottom: var(--sp-2); }
.vcard__text { color: var(--text-muted); font-size: var(--fs-sm); margin: 0; }

.vcard--accent { background: var(--accent); border-color: var(--accent); }
.vcard--accent .vcard__ico { stroke: var(--white); }
.vcard--accent .vcard__title { color: var(--white); }
.vcard--accent .vcard__text { color: rgba(255,255,255,.9); }

/* ============ SOBRE NOSOTROS ============ */
.about { padding-block: var(--sp-9); }
.about__grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-8);
  align-items: center;
}
.about__media img {
  width: 100%; height: 100%; min-height: 320px;
  object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
.about__title { font-size: var(--fs-2xl); margin-bottom: var(--sp-4); }
.about__text { color: var(--text-muted); max-width: 52ch; }
.about__text + .about__text { margin-top: var(--sp-3); }

.about__stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-5);
  margin-top: var(--sp-6); padding-top: var(--sp-6);
  border-top: 1px solid var(--border);
}
.stat { display: flex; flex-direction: column; justify-content: flex-end; gap: var(--sp-1); }
.stat__num { font-family: var(--font-mono); font-size: var(--fs-md); font-weight: var(--fw-semi); line-height: var(--lh-snug); color: var(--accent); }
.stat__label { font-size: var(--fs-xs); color: var(--text-muted); }

/* ============ MARCAS (IMSA / ROYAL) ============ */
.brands { background: var(--black); padding-block: var(--sp-9); }
.brands__title { color: var(--white); font-size: var(--fs-2xl); max-width: 42ch; margin-bottom: var(--sp-7); }

.brands__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-5); }

.bcard {
  display: flex; flex-direction: column; background: var(--ink); border: 1px solid var(--graphite);
  border-radius: var(--radius-lg);
  overflow: hidden; transition: transform var(--transition), border-color var(--transition);
}
.bcard:hover { transform: translateY(-3px); border-color: var(--white); }
.bcard__img { width: 100%; aspect-ratio: 752 / 319; object-fit: cover; }
.bcard__body { padding: var(--sp-6); flex: 1; display: flex; flex-direction: column; }
.bcard__title { color: var(--white); font-size: var(--fs-lg); margin-bottom: var(--sp-2); }
.bcard__text { color: var(--mist); font-size: var(--fs-sm); margin: 0 0 var(--sp-4); max-width: 40ch; }
.bcard__link { color: var(--accent); font-size: var(--fs-sm); font-weight: var(--fw-semi); margin-top: auto; }

/* ============ LÍNEAS DE PRODUCTO ============ */
.lines { background: var(--bg-alt); padding-block: var(--sp-9); }
.lines__title { font-size: var(--fs-2xl); margin-bottom: var(--sp-3); }
.lines__sub { color: var(--text-muted); max-width: 73ch; margin: 0 0 var(--sp-7); }

.lines__grid { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-5); }
.lines__grid[hidden] { display: none; }

.lcard {
  flex: 0 1 calc((100% - 2 * var(--sp-5)) / 3);
  display: flex; flex-direction: column;
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.lcard:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
/* Los tracks van minmax(0,1fr) y NO auto: con tracks auto el grid area se dimensiona
   según la imagen, y entonces el max-width/max-height:100% del img se resuelve contra
   sí mismo. Es un ciclo, el navegador descarta el límite, la imagen se planta a su
   tamaño natural (1080px) y la recorta el overflow:hidden de la card. Con 1fr el area
   toma el tamaño (definido) del contenedor y recién ahí el contain hace su trabajo. */
.lcard__media { background: var(--white); aspect-ratio: 4 / 3; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; padding: var(--sp-5); border-bottom: 1px solid var(--border); }
.lcard__media img { width: 100%; height: 100%; object-fit: contain; }

/* Cards de producto (categoria.html): fotos reales verticales, ya vienen con margen
   parejo desde el auto-recorte del pipeline (tools/procesar-fotos.py) -> marco vertical
   y sin padding (el margen ya está en la foto), object-fit:cover para llenar el marco
   entero en vez del 4:3 + padding grande pensado para los covers de línea. */
.lcard--product .lcard__media { aspect-ratio: 4 / 5; padding: 0; }
.lcard--product .lcard__media img { width: 100%; height: 100%; object-fit: cover; }

/* Cards de categoría (familia.html): mismas fotos cuadradas de assets/categorias/ que la
   landing, pero acá sin el padding/contain de línea — llenan el ancho entero de la card,
   igual criterio que --product (cover, sin aire). Aparte de --product a propósito: no se
   toca .lcard__media pelado porque ese contain+padding es una decisión de diseño ya
   cerrada para la grilla de líneas de la landing (ver PLAN.md). */
.lcard--category .lcard__media { padding: 0; }
.lcard--category .lcard__media img { object-fit: cover; }
.lcard__body { padding: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-2); flex: 1; }
.lcard__title { font-size: var(--fs-md); }
.lcard__text { color: var(--text-muted); font-size: var(--fs-sm); margin: 0; }
.lcard__link { color: var(--accent); font-size: var(--fs-sm); font-weight: var(--fw-semi); margin-top: var(--sp-1); }

/* Pills de variantes (presentación o color) en las cards de producto. Empujadas al fondo del
   body (margin-top:auto) para que el "Ver producto →" quede alineado entre cards de distinto
   alto de descripción. */
.pills { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin: var(--sp-2) 0 0; padding: 0; list-style: none; margin-top: auto; }
.pill {
  font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--text-muted);
  border: 1px solid var(--border); border-radius: 999px; padding: 2px var(--sp-3);
  white-space: nowrap;
}
/* En la ficha de producto las pills no viven en un flex column: el margin-top:auto
   que las empuja al fondo de la card no aplica y hay que neutralizarlo. */
.pills--static { margin-top: 0; }

/* ============ CATÁLOGO EN CONSTRUCCIÓN ============ */
.construction { padding-block: var(--sp-9); min-height: 60vh; display: flex; align-items: center; }
.construction__inner { max-width: 640px; margin-inline: auto; text-align: center; }
.construction__ico { width: 48px; height: 48px; stroke: var(--accent); stroke-width: 1.6; fill: none; stroke-linecap: round; stroke-linejoin: round; margin: 0 auto var(--sp-5); }
.construction__title { font-size: var(--fs-2xl); margin-bottom: var(--sp-4); }
.construction__text { color: var(--text-muted); margin: 0 auto var(--sp-6); max-width: 53ch; }
.construction__cta { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-3); }

/* ============ POR QUÉ ELEGIRNOS + CTA ============ */
.why-cta { background: var(--accent); padding-block: var(--sp-9); }
.why-cta__title { color: var(--white); font-size: var(--fs-2xl); max-width: 46ch; margin-bottom: var(--sp-6); }

.why-cta__list { max-width: 62ch; display: flex; flex-direction: column; gap: var(--sp-4); margin-bottom: var(--sp-7); }
.why-cta__item {
  display: flex; align-items: flex-start; gap: var(--sp-3);
  font-size: var(--fs-md); color: var(--white);
}
.why-cta__check {
  flex-shrink: 0; width: 22px; height: 22px; margin-top: 2px;
  fill: none; stroke: var(--white); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

.why-cta__action {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-5);
  padding-top: var(--sp-6); border-top: 1px solid rgba(255,255,255,.25);
}
.why-cta__action-text { color: rgba(255,255,255,.88); font-size: var(--fs-md); margin: 0; max-width: 40ch; }

.btn--onDark { background: var(--white); color: var(--accent); border-color: var(--white); flex-shrink: 0; }
.btn--onDark:hover { background: rgba(255,255,255,.9); }

/* ============ FOOTER ============ */
.footer { background: var(--black); color: var(--mist); padding-top: var(--sp-9); }
.footer__grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1.3fr 1fr; gap: var(--sp-6);
  padding-bottom: var(--sp-8);
}

.footer__logo { height: 64px; width: auto; margin-bottom: var(--sp-4); }
.footer__tagline { font-size: var(--fs-sm); color: var(--mist); white-space: nowrap; margin: 0; }

.footer__heading { color: var(--white); font-size: var(--fs-sm); font-weight: var(--fw-semi); margin-bottom: var(--sp-4); }

.footer__links { display: flex; flex-direction: column; gap: var(--sp-3); font-size: var(--fs-sm); }
.footer__links li { display: flex; align-items: flex-start; gap: var(--sp-2); }
.footer__links a { display: inline-flex; align-items: flex-start; gap: var(--sp-2); transition: color var(--transition); }
.footer__links a:hover { color: var(--white); }
.footer__links .ico { color: var(--accent); flex-shrink: 0; margin-top: 0.15em; }
.footer__links--static li { color: var(--mist); }

.footer__bottom { border-top: 1px solid var(--graphite); }
.footer__bottom-inner { padding-block: var(--sp-4); }
.footer__bottom p { margin: 0; font-size: var(--fs-xs); color: var(--slate); }

/* ============ BREADCRUMB ============ */
.breadcrumb { padding-block: var(--sp-4); border-bottom: 1px solid var(--border); }
.breadcrumb .container { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); font-size: var(--fs-sm); color: var(--text-muted); }
.breadcrumb a { color: var(--text-muted); transition: color var(--transition); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span:last-child { color: var(--text); }

/* ============ HEADER DE CATEGORÍA ============ */
.cat-hero { padding-block: var(--sp-7) var(--sp-6); }
.cat-hero__title { font-size: var(--fs-2xl); margin-bottom: var(--sp-3); }
.cat-hero__sub { color: var(--text-muted); max-width: 65ch; margin: 0; }

.cat-grid-section { padding-bottom: var(--sp-9); }

/* ============ FICHA DE PRODUCTO ============ */
.product { padding-block: var(--sp-8) var(--sp-9); }
.product__grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: var(--sp-8); align-items: start; }

.product__main {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg);
  aspect-ratio: 4 / 5; overflow: hidden;
}
.product__main img { width: 100%; height: 100%; object-fit: cover; display: block; }

.product__thumbs { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-4); }
.product__thumb {
  width: 68px; height: 68px; padding: var(--sp-1);
  background: var(--white); border: 1.5px solid var(--border); border-radius: var(--radius);
  cursor: pointer; transition: border-color var(--transition);
}
.product__thumb img { width: 100%; height: 100%; object-fit: contain; }
.product__thumb.is-active { border-color: var(--accent); }
.product__thumb:hover { border-color: var(--mist); }

.product__title { font-size: var(--fs-2xl); margin-bottom: var(--sp-3); }
.product__desc { color: var(--text-muted); max-width: 50ch; margin-bottom: var(--sp-6); }

.product__variants { margin-bottom: var(--sp-6); }
.product__variants-label { font-size: var(--fs-sm); font-weight: var(--fw-semi); margin-bottom: var(--sp-3); }
.product__variants-options { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.variant-btn {
  padding: var(--sp-2) var(--sp-4); border: 1.5px solid var(--border); border-radius: var(--radius);
  background: var(--white); color: var(--text); font-size: var(--fs-sm); font-family: var(--font-sans);
  cursor: pointer; transition: border-color var(--transition), color var(--transition);
}
.variant-btn:hover { border-color: var(--ink); }
.variant-btn.is-active { border-color: var(--accent); color: var(--accent); font-weight: var(--fw-semi); }

.product__cta { margin-bottom: var(--sp-5); }

/* ============ WHATSAPP FLOTANTE ============ */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center;
  background: #25d366; box-shadow: var(--shadow-lg);
  transition: transform var(--transition);
}
.wa-float:hover { transform: scale(1.06); }
.wa-float svg { width: 30px; height: 30px; fill: var(--white); }

/* ============================================================
   MOBILE
   ============================================================ */
@media (max-width: 860px) {
  .topbar { display: none; }

  .nav__links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--white); border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: var(--sp-2);
    display: none;
  }
  .nav.is-open .nav__links { display: flex; }
  .nav__links a { padding: var(--sp-3); border-radius: var(--radius-sm); }
  .nav__toggle { display: flex; }
  .nav__inner { min-height: 72px; }
  .nav__logo img { height: 42px; }

  .hero__video--desktop { display: none; }
  .hero__video--mobile { display: block; }
  .hero__scrim { background: linear-gradient(180deg, rgba(14,15,17,.55) 0%, rgba(14,15,17,.8) 100%); }
  .hero { min-height: clamp(480px, 80vh, 640px); }
  .hero__title { font-size: var(--fs-2xl); }

  .values__grid { grid-template-columns: 1fr; }

  .about__grid { grid-template-columns: 1fr; gap: var(--sp-6); }
  .about__media img { min-height: 240px; }
  .about__stats { grid-template-columns: 1fr; gap: var(--sp-4); }

  .brands__grid { grid-template-columns: 1fr; }

  .lcard { flex-basis: 100%; }

  .product__grid { grid-template-columns: 1fr; gap: var(--sp-6); }

  .why-cta__action { flex-direction: column; align-items: flex-start; }

  .footer__grid { grid-template-columns: 1fr 1fr; gap: var(--sp-7) var(--sp-5); }
  .footer__brand { grid-column: 1 / -1; }

  .footer__links--nav { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0; row-gap: var(--sp-2); }
  .footer__links--nav li:not(:last-child)::after { content: "·"; margin: 0 var(--sp-2); color: var(--graphite); }
}

@media (min-width: 861px) and (max-width: 1080px) {
  .lcard { flex-basis: calc((100% - var(--sp-5)) / 2); }
  .brands__grid { grid-template-columns: 1fr 1fr; }
  .topbar { display: none; }
}

@media (max-width: 460px) {
  .hero__cta { flex-direction: column; align-items: stretch; }
  .hero__cta .btn { justify-content: center; }

  .footer__grid { grid-template-columns: 1fr; }
}

/* ============================================================
   PLAQUETAS — grilla densa agrupada por grupo + buscador + lightbox
   ============================================================ */
.plaq-tools {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: var(--sp-3); margin-bottom: var(--sp-6);
}
.plaq-search {
  display: flex; align-items: center; gap: var(--sp-2);
  flex: 1 1 320px; max-width: 460px;
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0 var(--sp-3); background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.plaq-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--red-tint); }
.plaq-search .ico { width: 18px; height: 18px; color: var(--text-muted); flex: none; }
.plaq-search input {
  border: 0; outline: 0; background: transparent; width: 100%;
  font-family: var(--font-sans); font-size: var(--fs-base);
  padding: var(--sp-3) 0; color: var(--text);
}
.plaq-count { color: var(--text-muted); font-size: var(--fs-sm); margin: 0; white-space: nowrap; }

/* Barra de pestañas por grupo */
.plaq-tabs {
  display: flex; flex-wrap: wrap; gap: var(--sp-2);
  margin-bottom: var(--sp-6); padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--border);
}
.plaq-tabs[hidden] { display: none; }   /* si no, display:flex pisa el atributo hidden */
.plaq-tab {
  font-family: var(--font-sans); font-size: var(--fs-sm); font-weight: var(--fw-medium);
  color: var(--text-muted); background: var(--white);
  border: 1px solid var(--border); border-radius: 999px;
  padding: var(--sp-2) var(--sp-4); cursor: pointer;
  display: inline-flex; align-items: center; gap: var(--sp-2);
  transition: color var(--transition), background var(--transition), border-color var(--transition);
}
.plaq-tab:hover { border-color: var(--mist); color: var(--text); }
.plaq-tab.is-active { background: var(--ink); border-color: var(--ink); color: var(--white); }
.plaq-tab__n { font-family: var(--font-mono); font-size: var(--fs-xs); opacity: 0.7; }

.plaq-group { margin-bottom: var(--sp-6); }
.plaq-group__title {
  font-size: var(--fs-lg); display: flex; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-4);
}
.plaq-group__title--sm { font-size: var(--fs-md); padding-bottom: var(--sp-2); border-bottom: 1px solid var(--border); }
.plaq-group__n {
  font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: var(--fw-medium);
  color: var(--text-muted); background: var(--surface);
  border-radius: 999px; padding: 2px 8px;
}
.plaq-group__note { color: var(--text-muted); font-size: var(--fs-sm); margin: 0 0 var(--sp-4); max-width: 75ch; }

.plaq-grid {
  display: grid; gap: var(--sp-4);
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.plaq-card {
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; background: var(--white); cursor: pointer;
  display: flex; flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.plaq-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--mist); }
.plaq-card__media { aspect-ratio: 4 / 5; background: var(--white); position: relative; }
.plaq-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Dos caras: el reverso vive encima del frente y aparece al pasar el mouse. En touch no
   hay hover — ahi se llega a las dos caras abriendo el lightbox. */
.plaq-card__reverso {
  position: absolute; inset: 0; opacity: 0;
  transition: opacity var(--transition);
}
@media (hover: hover) {
  .plaq-card:hover .plaq-card__reverso { opacity: 1; }
}
.plaq-card__media--empty {
  display: grid; place-items: center; text-align: center;
  color: var(--mist); font-size: var(--fs-sm); line-height: var(--lh-snug);
  background: var(--surface); border-bottom: 1px dashed var(--line);
}
.plaq-card__body { padding: var(--sp-3); display: flex; flex-direction: column; gap: var(--sp-2); flex: 1; }
.plaq-card__title {
  font-size: var(--fs-sm); font-weight: var(--fw-semi); line-height: var(--lh-snug);
  display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--sp-2);
}
.plaq-tag {
  font-size: var(--fs-xs); font-weight: var(--fw-medium); color: var(--red-dark);
  background: var(--red-tint); border-radius: var(--radius-sm); padding: 1px 6px;
  text-transform: uppercase; letter-spacing: var(--tracking-wide);
}
.plaq-card__meta { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); }
.plaq-code {
  font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--text-muted);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 2px 6px; white-space: nowrap;
}
.plaq-card__wa { font-size: var(--fs-xs); font-weight: var(--fw-semi); color: var(--accent); white-space: nowrap; }
.plaq-card__wa:hover { color: var(--accent-hover); }

.plaq-empty { color: var(--text-muted); text-align: center; padding: var(--sp-7) 0; }

/* Lightbox (ampliar foto) */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(14, 15, 17, 0.86);
  display: grid; place-items: center; padding: var(--sp-5);
}
.lightbox[hidden] { display: none; }
.lightbox__fig { margin: 0; max-width: 92vw; text-align: center; }
.lightbox__fig img {
  max-width: 100%; max-height: 78vh; border-radius: var(--radius);
  background: var(--white); box-shadow: var(--shadow-lg);
}
/* Frente y reverso lado a lado (apilados en pantallas angostas, ver el @media de abajo). */
.lightbox__caras {
  display: flex; gap: var(--sp-4); justify-content: center;
  max-width: min(88vw, 620px); margin-inline: auto;
}
.lightbox__caras--2 { max-width: min(92vw, 1040px); }
.lightbox__cara { min-width: 0; }
.lightbox__caras--2 .lightbox__cara img { max-height: 62vh; }
.lightbox__rotulo {
  display: block; margin-top: var(--sp-2); color: var(--white);
  font-size: var(--fs-xs); text-transform: uppercase;
  letter-spacing: var(--tracking-wide); opacity: 0.75;
}
.lightbox__fig figcaption { color: var(--white); margin-top: var(--sp-3); font-size: var(--fs-base); }
.lightbox__close {
  position: absolute; top: var(--sp-4); right: var(--sp-5);
  background: none; border: 0; color: var(--white);
  font-size: 2.5rem; line-height: 1; cursor: pointer; opacity: 0.8;
}
.lightbox__close:hover { opacity: 1; }

@media (max-width: 860px) {
  /* Pestañas: en vez de apilarse en varias filas, tira horizontal scrolleable */
  .plaq-tabs {
    flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none;                         /* Firefox */
    margin-inline: calc(-1 * var(--gutter));       /* sangra al borde de la pantalla */
    padding-inline: var(--gutter);
    scroll-padding-inline: var(--gutter);
  }
  .plaq-tabs::-webkit-scrollbar { display: none; } /* WebKit */
  .plaq-tab { flex: 0 0 auto; }                    /* no se achican ni se parten */
}

@media (max-width: 560px) {
  .plaq-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--sp-3); }
  /* Las dos caras siguen lado a lado: compararlas es justamente el punto. */
  .lightbox__caras--2 { gap: var(--sp-2); }
  .lightbox__caras--2 .lightbox__cara img { max-height: 46vh; }
}

/* Índice de familia: estado sin categorías publicadas todavía */
.fam-empty { text-align: center; padding: var(--sp-7) 0; display: flex; flex-direction: column; align-items: center; gap: var(--sp-5); }
.fam-empty p { color: var(--text-muted); max-width: 55ch; margin: 0; }
