:root {
  --primario: #E03A24;
  --fondo: #0E0D0C;
  --superficie: #1A1817;
  --texto: #F5F1EC;
  --tenue: #9C948C;
  --radio: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--fondo);
  color: var(--texto);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom);
}

/* --- Cabecera --- */

.cabecera {
  text-align: center;
  padding: 32px 20px 20px;
}

.logo { max-height: 64px; width: auto; }

.cabecera h1 {
  margin: 0;
  font-size: 30px;
  letter-spacing: -0.02em;
}

.oculto-visual {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.claim {
  margin: 6px 0 0;
  color: var(--tenue);
  font-size: 15px;
}

/* --- Carta --- */

.lista { padding: 0 16px 40px; max-width: 720px; margin: 0 auto; }

.cargando { color: var(--tenue); text-align: center; padding: 40px 0; }

.seccion { margin-top: 28px; }

.cat {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--tenue);
  margin: 0 0 12px 4px;
  font-weight: 600;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.tarjeta {
  appearance: none;
  border: 1px solid #ffffff14;
  background: var(--superficie);
  color: inherit;
  border-radius: var(--radio);
  overflow: hidden;
  padding: 0;
  text-align: left;
  font: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: transform .15s ease, border-color .15s ease;
}

.tarjeta:active { transform: scale(.97); }
.tarjeta.destacado { border-color: var(--primario); }

.tarjeta.pendiente { opacity: .45; cursor: default; }

.foto {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  background: #241f1c;
}

/* Sin foto todavía: bloque liso, no icono roto */
.sin-foto .tarjeta-cuerpo { padding-top: 56px; }

.tarjeta-cuerpo {
  padding: 10px 12px 12px;
  display: grid;
  gap: 2px;
}

.nombre { font-weight: 600; font-size: 15px; }

.precio { color: var(--primario); font-weight: 700; font-size: 15px; }

.etiqueta {
  margin-top: 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--tenue);
}

.pie {
  text-align: center;
  color: var(--tenue);
  font-size: 13px;
  padding: 0 24px 32px;
}

/* --- Visor --- */

.visor {
  border: none;
  padding: 0;
  width: 100%;
  max-width: 560px;
  max-height: 100dvh;
  background: var(--superficie);
  color: var(--texto);
  border-radius: 18px;
  overflow: hidden;
}

.visor::backdrop { background: #000000d9; }

.cerrar {
  position: absolute;
  top: 10px; right: 10px;
  z-index: 2;
  width: 36px; height: 36px;
  border: none;
  border-radius: 50%;
  background: #00000073;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

model-viewer {
  width: 100%;
  height: 58dvh;
  background: #121010;
  display: block;
  --poster-color: transparent;
}

.btn-ar {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  background: var(--primario);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 13px 26px;
  font: 600 15px/1 inherit;
  cursor: pointer;
  box-shadow: 0 6px 20px #0000006b;
}

.barra {
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 3px;
  background: #ffffff1a;
}

.barra-fill {
  width: calc(var(--progress, 0) * 100%);
  height: 100%;
  background: var(--primario);
  transition: width .2s;
}

.ficha { padding: 16px 18px 20px; }

.ficha-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.ficha-top h2 { margin: 0; font-size: 21px; }
.ficha-top .precio { font-size: 19px; }

.desc { margin: 8px 0 0; color: var(--tenue); font-size: 15px; }

.ayuda { margin: 10px 0 0; font-size: 13px; color: var(--tenue); }

.btn-pedir {
  display: block;
  margin-top: 16px;
  text-align: center;
  background: var(--primario);
  color: #fff;
  text-decoration: none;
  border-radius: 10px;
  padding: 14px;
  font-weight: 600;
}

.btn-pedir[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
