/* ============================================================
   Alma de Yeso — Fase 2 (dirección visual)
   Mobile-first. Solo transform y opacity en animaciones.
   ============================================================ */
:root {
  --bg: #0a0a0a;
  --surface: #141414;
  --cream: #efe6d8;
  --soft: #d9cdb8;
  --brown: #5a4636;
  --muted: #8a7e6e;
  --border: #2a2420;
  /* Compatibilidad con nombres anteriores (no usar --brown como texto) */
  --text: var(--cream);
  --accent: var(--soft);
  --fondo: var(--bg);
  --superficie: var(--surface);
  --superficie-2: #1d1a15;
  --texto: var(--cream);
  --texto-suave: var(--muted);
  --acento: var(--soft);
  --acento-hover: #ece4d2;
  --borde: var(--border);
  --negro: #000;
  --whatsapp: #25d366;
  --error: #e07878;
  --radio: 12px;
  --radio-sm: 4px;
  --radio-md: 12px;
  --radio-lg: 24px;
  --radio-pill: 999px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.45);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.55);
  --max: 1120px;
  --header-h: 64px;
  --fuente-titulos: "Cormorant Garamond", Georgia, serif;
  --fuente-texto: "Outfit", system-ui, sans-serif;
  --fs-h1: 2.5rem;
  --fs-h2: 1.875rem;
  --fs-h3: 1.375rem;
  --fs-texto: 1rem;
  --fs-sm: 0.875rem;
  --fs-xs: 0.75rem;
  --sp-xs: 0.25rem;
  --sp-sm: 0.5rem;
  --sp-md: 1rem;
  --sp-lg: 1.5rem;
  --sp-xl: 2.5rem;
  --sp-xxl: 4rem;
}

@media (min-width: 768px) {
  :root {
    --fs-h1: 3.5rem;
    --fs-h2: 2.25rem;
    --fs-h3: 1.5rem;
    --fs-texto: 1.125rem;
    --fs-sm: 1rem;
    --fs-xs: 0.875rem;
  }
}

* { box-sizing: border-box; }

/* Ninguna regla puede anular el atributo hidden (BUG visor: el modal
   con display:flex quedaba visible aunque hidden estuviera puesto). */
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--cream);
  font-family: var(--fuente-texto);
  font-weight: 300;
  font-size: var(--fs-texto);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

h1, h2, h3 {
  font-family: var(--fuente-titulos);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 0.6em;
  letter-spacing: 0.01em;
  color: var(--cream);
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

p { margin: 0 0 1em; color: var(--muted); }

a { color: var(--soft); }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.contenedor {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

.etiqueta {
  display: block;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: var(--fs-xs);
  color: var(--soft);
  margin-bottom: var(--sp-sm);
}
.subtitulo {
  text-align: center;
  max-width: 34rem;
  margin: 0 auto var(--sp-xl);
  color: var(--muted);
  font-size: var(--fs-sm);
}

.titulo-seccion {
  font-family: var(--fuente-titulos);
  font-weight: 500;
  text-align: center;
  padding-bottom: var(--sp-md);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--sp-lg);
}
.titulo-seccion.titulo-izq { text-align: left; }

section { padding: var(--sp-xl) 0; }

/* ---------- Header ---------- */
.sitio-header {
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  background: var(--bg);
  border-bottom: 1px solid transparent;
}
.sitio-header.con-sombra { border-bottom-color: var(--border); }

.header-interior {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: var(--sp-md);
}

.btn-menu {
  order: 1;
  background: none;
  border: 0;
  color: var(--cream);
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: none;
}

.marca {
  order: 2;
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: var(--fuente-titulos);
  font-weight: 500;
  font-size: 1.25rem;
  color: var(--cream);
  text-decoration: none;
  letter-spacing: 0.02em;
}
.marca-texto > span { color: var(--soft); font-style: italic; }
.marca-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--soft);
  object-fit: cover;
  flex: none;
}

.nav-principal { display: none; }

.header-acciones {
  order: 3;
  display: flex;
  align-items: center;
  flex: none;
}

.btn-carrito {
  position: relative;
  background: none;
  border: 0;
  color: var(--cream);
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.contador {
  position: absolute;
  top: 2px;
  right: 0;
  background: var(--brown);
  color: var(--cream);
  font-size: 0.7rem;
  font-weight: 500;
  min-width: 1.25rem;
  height: 1.25rem;
  border-radius: var(--radio-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.3rem;
}

@media (min-width: 768px) {
  .header-interior { justify-content: space-between; }
  .btn-menu { display: none; }
  .marca { order: 1; flex: none; justify-content: flex-start; }
  .nav-principal {
    order: 2;
    display: flex;
    align-items: center;
    gap: var(--sp-lg);
  }
  .nav-principal a {
    color: var(--muted);
    text-decoration: none;
    font-size: var(--fs-sm);
  }
  .nav-principal a:hover { color: var(--cream); }
  .header-acciones { order: 3; }
}

/* Menú móvil */
.menu-movil {
  display: none;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  padding: 0.4rem 1.2rem 1rem;
}
.menu-movil.abierto { display: block; }
.menu-movil a {
  display: block;
  padding: 0.8rem 0.2rem;
  color: var(--cream);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}
.menu-movil a:last-child { border-bottom: 0; }
@media (min-width: 768px) {
  .menu-movil.abierto { display: none; }
}

/* ---------- Botones base ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: var(--radio-pill);
  padding: 0.85rem 1.7rem;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn:active { transform: scale(0.98); }

.btn-claro {
  background: var(--soft);
  color: #111;
}
.btn-claro:hover { background: var(--cream); }

.btn-linea {
  background: transparent;
  color: var(--cream);
  border-color: var(--border);
}
.btn-linea:hover { border-color: var(--soft); }
.btn-linea:disabled { opacity: 0.45; cursor: not-allowed; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  text-align: center;
  overflow: hidden;
  padding: var(--sp-xl) 0 var(--sp-xxl);
  background: var(--bg);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(55% 42% at 50% 22%, rgba(239, 230, 216, 0.06), transparent 70%);
  pointer-events: none;
}
.hero-interior {
  position: relative;
  z-index: 1;
  max-width: 44rem;
  display: grid;
  gap: var(--sp-lg);
  justify-items: center;
}
.hero-medallon { display: flex; justify-content: center; }
.hero-logo {
  width: min(260px, 62vw);
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--soft);
  display: block;
  box-shadow: var(--shadow-md);
}
.hero-contenido {
  display: grid;
  gap: var(--sp-md);
  justify-items: center;
  max-width: 30rem;
}
.hero-eslogan {
  font-family: var(--fuente-titulos);
  font-weight: 500;
  font-size: 1.125rem;
  letter-spacing: 0.04em;
  color: var(--soft);
  margin: 0;
}
.hero-botones { display: flex; justify-content: center; }
.btn-hero {
  background: transparent;
  border: 1px solid var(--soft);
  color: var(--cream);
  border-radius: var(--radio-pill);
  padding: 0.75rem 1.5rem;
  font-size: var(--fs-sm);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.btn-hero:hover { border-color: var(--cream); }
.hero-confianza {
  list-style: none;
  margin: var(--sp-sm) 0 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--soft);
}
.hero-confianza li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0 var(--sp-md);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.hero-confianza li + li { border-left: 1px solid var(--border); }
.hero-confianza svg { flex: none; }

@media (min-width: 768px) {
  .hero { text-align: left; }
  .hero-interior {
    grid-template-columns: 40% 1fr;
    align-items: center;
    max-width: var(--max);
    gap: var(--sp-xl);
  }
  .hero-contenido { justify-items: start; text-align: left; }
  .hero-botones, .hero-confianza { justify-content: flex-start; }
  .hero-confianza li:first-child { padding-left: 0; }
}

/* ---------- Catálogo ---------- */
.catalogo { background: var(--bg); }

.filtros {
  display: flex;
  gap: var(--sp-sm);
  overflow-x: auto;
  padding-bottom: var(--sp-sm);
  margin-bottom: var(--sp-md);
  scrollbar-width: thin;
}
.chip {
  flex: none;
  border-radius: var(--radio-pill);
  padding: 0.5rem 1rem;
  font-size: var(--fs-sm);
  font-weight: 400;
  cursor: pointer;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--soft);
}
.chip[aria-pressed="true"] {
  background: var(--brown);
  border-color: var(--brown);
  color: var(--cream);
}

.grilla-productos {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-md);
  list-style: none;
  margin: 0;
  padding: 0;
}
@media (min-width: 768px) {
  .grilla-productos { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1100px) {
  .grilla-productos { grid-template-columns: repeat(4, 1fr); }
}

.tarjeta {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radio-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.tarjeta-cuerpo {
  padding: var(--sp-md);
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
  flex: 1;
}
.tarjeta-media {
  aspect-ratio: 4 / 5;
  background: #0a0a0a;
  overflow: hidden;
  border-radius: var(--radio-md);
}
.tarjeta-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tarjeta-nombre {
  font-family: var(--fuente-titulos);
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--cream);
  margin: 0;
}
.tarjeta-medidas {
  font-size: var(--fs-sm);
  color: var(--muted);
  margin: 0;
}
.tarjeta-desc { display: none; font-size: var(--fs-sm); margin: 0; }
@media (min-width: 640px) {
  .tarjeta-desc { display: block; }
}
.badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 0.45rem;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--soft);
  font-size: 0.75rem;
  border-radius: var(--radio-pill);
  padding: 0.28rem 0.7rem;
}
.badge .punto {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: var(--radio-pill);
  flex: none;
}
.badge .punto-stock { background: var(--cream); }
.badge .punto-pedido { background: #c8a37e; }
.tarjeta-fila {
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
  margin-top: auto;
}
.precio { font-size: 1.125rem; font-weight: 500; color: var(--cream); }
.btn-agregar {
  width: 100%;
  background: var(--brown);
  border: 1px solid var(--brown);
  color: var(--cream);
  border-radius: var(--radio-pill);
  padding: 0.65rem 1rem;
  font-size: var(--fs-sm);
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  white-space: nowrap;
}
.btn-agregar:hover { filter: brightness(1.1); }
.agregar-largo { display: none; }
@media (min-width: 640px) {
  .agregar-corto { display: none; }
  .agregar-largo { display: inline; }
}

/* ---------- Nosotros / Pasos / Contacto ---------- */
.nosotros { background: var(--surface); padding: var(--sp-xl); }
.nosotros-grid { display: grid; gap: var(--sp-lg); }
.nosotros-parrafo { color: var(--soft); font-size: var(--fs-texto); }
.marco-foto {
  border: 1px solid var(--border);
  border-radius: var(--radio-md);
  overflow: hidden;
  background: var(--surface);
  margin: 0;
}
.marco-foto img { width: 100%; height: auto; object-fit: cover; display: block; }
@media (min-width: 768px) {
  .nosotros-grid { grid-template-columns: 1fr 1fr; align-items: center; }
  .marco-foto img { aspect-ratio: 4 / 5; height: 100%; }
}

.pasos {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--sp-md);
}
@media (min-width: 768px) {
  .pasos { grid-template-columns: repeat(3, 1fr); }
}
.pasos li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radio-md);
  padding: var(--sp-lg);
  text-align: center;
}
.paso-num {
  width: 32px; height: 32px;
  border-radius: var(--radio-pill);
  background: var(--brown);
  color: var(--cream);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-sm);
  font-weight: 500;
  margin-bottom: var(--sp-sm);
}
.pasos h3 { font-size: var(--fs-h3); margin-bottom: 0.4rem; }
.pasos p { font-size: var(--fs-sm); margin: 0; }

.contacto { background: var(--bg); border-top: 1px solid var(--border); }
.contacto-grid { display: grid; gap: 1rem; margin-bottom: 3rem; }
@media (min-width: 768px) {
  .contacto-grid { grid-template-columns: repeat(3, 1fr); }
}
.contacto-tarjeta {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radio-md);
  padding: 1.4rem;
  text-decoration: none;
}
.contacto-tarjeta h3 { font-size: 1.35rem; margin-bottom: 0.3rem; color: var(--cream); }
.contacto-tarjeta p { margin: 0; font-size: 0.92rem; }
.pie {
  border-top: 1px solid var(--border);
  padding-top: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}
.pie strong { font-family: var(--fuente-titulos); font-weight: 500; color: var(--cream); font-size: 1.05rem; }
@media (min-width: 900px) {
  .pie { flex-direction: row; justify-content: space-between; text-align: left; align-items: center; }
}

/* ---------- Drawer carrito ---------- */
.velo {
  position: fixed;
  inset: 0;
  background: #000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 280ms cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 60;
}
.velo.visible { opacity: 0.6; visibility: visible; }

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100dvh;
  width: 100%;
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 70;
  transform: translateX(100%);
  transition: transform 280ms cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-md);
}
@media (min-width: 768px) {
  .drawer { width: 400px; }
}
.drawer.abierto { transform: translateX(0); }

.drawer-cabeza {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.2rem;
  border-bottom: 1px solid var(--border);
}
.drawer-cabeza h2 { font-size: 1.6rem; margin: 0; text-align: left; }
.btn-cerrar {
  background: none;
  border: 1px solid var(--border);
  color: var(--cream);
  width: 38px; height: 38px;
  border-radius: var(--radio-sm);
  cursor: pointer;
  font-size: 1rem;
}

.drawer-cuerpo { overflow-y: auto; flex: 1; padding: 1.2rem; display: flex; flex-direction: column; gap: 1.4rem; }

.carrito-vacio { text-align: center; padding: 2rem 1rem; color: var(--muted); }
.carrito-vacio p { margin-bottom: 1.2rem; }

.lista-carrito { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.9rem; }
.item-carrito {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 0.8rem;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radio-md);
  padding: 0.7rem;
}
.item-carrito img { width: 64px; height: 64px; object-fit: cover; border-radius: var(--radio-sm); background: var(--bg); }
.item-info h4 { margin: 0 0 0.15rem; font-size: 0.95rem; font-weight: 500; color: var(--cream); }
.item-precio { font-size: 0.85rem; color: var(--muted); }
.item-controles { display: flex; flex-direction: column; align-items: flex-end; gap: 0.45rem; }
.cantidad { display: flex; align-items: center; gap: 0.5rem; }
.cantidad button {
  width: 28px; height: 28px;
  border-radius: var(--radio-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--cream);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}
.btn-quitar { background: none; border: 0; color: var(--muted); font-size: 0.78rem; cursor: pointer; text-decoration: underline; }

.carrito-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--cream);
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

.carrito-acciones .btn { width: 100%; }
#btn-vaciar-carrito {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: var(--fs-sm);
  font-weight: 400;
  text-decoration: underline;
  padding: 0.5rem;
}

.formulario h3 { font-size: 1.4rem; margin-bottom: 0.9rem; }
.campo { margin-bottom: 0.9rem; }
.campo label { display: block; font-size: 0.85rem; margin-bottom: 0.35rem; color: var(--cream); }
.campo input, .campo textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--muted);
  border-radius: var(--radio-sm);
  color: var(--cream);
  padding: 0.75rem 0.9rem;
  font-size: 0.95rem;
  font-family: inherit;
}
.campo input:focus, .campo textarea:focus { outline: 2px solid var(--soft); outline-offset: 1px; }
.campo textarea { resize: vertical; min-height: 64px; }
.campo-error { font-size: 0.78rem; color: var(--error); min-height: 1.1em; display: block; margin-top: 0.25rem; }
.campo input.invalido { border-color: var(--error); }
.aviso { font-size: 0.8rem; color: var(--muted); text-align: center; margin-top: 0.7rem; }

.btn-whatsapp {
  background: var(--brown);
  color: var(--cream);
  width: 100%;
  border: 0;
  font-size: 1rem;
  border-radius: var(--radio-pill);
  padding: 0.875rem 1.5rem;
}
.btn-whatsapp:hover { filter: brightness(1.1); }
.btn-whatsapp:disabled { opacity: 0.55; cursor: not-allowed; }

/* ---------- Flotante + toast ---------- */
.btn-flotante {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 50;
  width: 56px;
  height: 56px;
  border-radius: var(--radio-pill);
  background: var(--brown);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  text-decoration: none;
}
.btn-flotante svg { width: 28px; height: 28px; fill: var(--cream); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 5.5rem;
  transform: translate(-50%, 20px);
  background: var(--soft);
  color: #111;
  padding: 0.7rem 1.2rem;
  border-radius: var(--radio-pill);
  font-size: 0.88rem;
  font-weight: 500;
  opacity: 0;
  visibility: hidden;
  z-index: 80;
  max-width: calc(100vw - 2rem);
  text-align: center;
}
.toast.visible { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* ---------- Scroll reveal (solo con JS) ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
}
.js .reveal.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 560ms cubic-bezier(0.22, 1, 0.36, 1), transform 560ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* Red de seguridad: la grilla del catálogo nunca se oculta. El reveal es
   por tarjeta (.tarjeta.reveal), nunca del contenedor ni de secciones. */
#grilla-productos { opacity: 1; visibility: visible; }

/* ---------- Hover tarjeta solo con hover real ---------- */
@media (hover: hover) {
  .tarjeta { transition: transform 180ms ease-out; }
  .tarjeta:hover { transform: scale(1.02); }
}
.tarjeta:active { transform: scale(0.98); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- Esqueleto de carga del catálogo (Fase D1) ---------- */
.esqueleto {
  background: #1d1a15;
  border-radius: 8px;
  animation: alma-pulso 1.4s ease-in-out infinite;
}
.esqueleto-linea {
  height: 1rem;
  margin-bottom: 0.6rem;
}
.esqueleto-linea.corta { width: 55%; }
@keyframes alma-pulso {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .esqueleto { animation: none; }
}

/* ---------- Checkout seguro (Fase D2) ---------- */
.guardado-acciones {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.8rem;
}
.guardado-acciones .btn { width: 100%; }
.confirmacion h3 { font-size: 1.4rem; }
.confirmacion .lista-carrito { margin-bottom: 0.5rem; }

/* ---------- Visor 3D bajo demanda (Fase G) ---------- */
.tarjeta-media-btn {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: #0a0a0a;
  border-radius: var(--radio-md);
  overflow: hidden;
  cursor: zoom-in;
  aspect-ratio: 4 / 5;
}
.tarjeta-media-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.insignia-3d {
  position: absolute;
  right: 0.6rem;
  bottom: 0.6rem;
  background: var(--brown);
  color: var(--cream);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  border-radius: var(--radio-pill);
  padding: 0.25rem 0.7rem;
  pointer-events: none;
}
.visor-velo {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.82);
}
/* Defensa explícita: oculto es oculto aunque otra regla pida flex. */
.visor-velo[hidden] { display: none !important; }
/* Escudo anti-toque fantasma: transparente a pantalla completa, 400 ms. */
.visor-escudo {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: transparent;
}
.visor-caja {
  width: min(100%, 30rem);
  max-height: 92dvh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radio-md);
  padding: 1rem;
}
.visor-barra {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}
.visor-barra h3 { margin: 0; font-size: 1.4rem; }
.btn-cerrar {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--cream);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}
.visor-escena {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: #0a0a0a;
  min-height: 16rem;
}
.visor-foto {
  width: 100%;
  aspect-ratio: 4 / 5;
  max-height: 52dvh;
  object-fit: cover;
  display: block;
}
.visor-modelo model-viewer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  z-index: 1;
}
.visor-progreso {
  position: absolute;
  z-index: 2;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  height: 0.5rem;
  border-radius: var(--radio-pill);
  background: var(--border);
  overflow: hidden;
}
.visor-barra-progreso {
  width: 100%;
  height: 100%;
  background: var(--soft);
  transform: scaleX(0);
  transform-origin: left;
  border-radius: var(--radio-pill);
}
.visor-mensaje {
  position: absolute;
  z-index: 2;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  margin: 0;
  background: rgba(10, 10, 10, 0.88);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.8rem;
  font-size: 0.9rem;
  text-align: center;
}
.visor-mensaje .btn { margin-top: 0.6rem; }
.visor-confirmar {
  position: absolute;
  z-index: 2;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  background: rgba(10, 10, 10, 0.92);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.8rem;
  text-align: center;
}
.visor-confirmar p { margin: 0 0 0.6rem; font-size: 0.92rem; color: var(--cream); }
.visor-confirmar-fila { display: flex; gap: 0.6rem; }
.visor-confirmar-fila .btn { flex: 1; }
.visor-ayuda, .visor-aviso {
  font-size: 0.82rem;
  color: var(--muted);
  text-align: center;
  margin: 0.6rem 0 0;
}
