:root {
  --tapete: #0B4A3E;
  --tinta: #0C1F1B;
  --acento: #FFD93B;
  --papel: #F6F7F2;
  --blanco: #FFFFFF;
  --suave: #4F5E59;
  --borde: #8A9A94;
  --linea: #D9DDD3;
  --sobre-tapete: #D5E7E0;
  --borde-tapete: #9DBDB2;
  --whatsapp: #25D366;
  --peligro: #B42318;
  --mono: 'DM Mono', ui-monospace, monospace;
  --curva: cubic-bezier(.22, 1, .36, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

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

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--tapete);
  color: var(--blanco);
  font-family: 'Bricolage Grotesque', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.35;
}

/* La cuadrícula de la plancha de corte queda fija mientras los stickers se desplazan. */
body.catalogo::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background-color: var(--tapete);
  background-image:
    linear-gradient(rgba(255,255,255,.11) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.11) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
}

button, input, a { font: inherit; }
button { cursor: pointer; color: inherit; }
button:disabled { cursor: not-allowed; }
:focus-visible { outline: 3px solid #1F6FEB; outline-offset: 2px; }
body.catalogo :focus-visible { outline-color: var(--acento); }
.hoja :focus-visible { outline-color: #1F6FEB; }

.solo-lector {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.demo {
  margin: 0;
  padding: 8px 16px;
  background: var(--acento);
  color: var(--tinta);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

/* Catálogo */

.contenedor {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

.encabezado {
  padding-top: 28px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.marca {
  margin: 0;
  padding: 10px 18px 12px;
  background: var(--blanco);
  color: var(--tinta);
  border-radius: 16px;
  font-size: clamp(30px, 6vw, 44px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.02em;
  transform: rotate(-1.5deg);
  box-shadow: 0 6px 14px rgba(0,0,0,.32);
  overflow-wrap: anywhere;
}

.bajada { margin: 0; max-width: 34em; color: var(--sobre-tapete); font-size: 17px; }

.vidriera {
  flex: 1 0 auto;
  padding-top: 18px;
  padding-bottom: 40px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.buscador { position: relative; max-width: 520px; }
.buscador svg { position: absolute; left: 14px; top: 14px; pointer-events: none; }
.buscador input {
  width: 100%;
  height: 48px;
  padding: 0 14px 0 44px;
  border: 0;
  border-radius: 12px;
  background: var(--blanco);
  color: var(--tinta);
}

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0 -16px;
  padding: 3px 16px;
}
.chips::-webkit-scrollbar { display: none; }

.chip {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 16px;
  border: 1.5px solid var(--borde-tapete);
  border-radius: 999px;
  background: transparent;
  color: var(--blanco);
  font-weight: 700;
}
.chip[aria-pressed="true"] { border-color: transparent; background: var(--acento); color: var(--tinta); }

.grilla {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 28px 16px;
  padding-top: 6px;
}

.tarjeta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  animation: subir .45s var(--curva) both;
  animation-delay: calc(var(--i, 0) * 35ms);
}

.tarjeta-imagen { position: relative; aspect-ratio: 1; margin-bottom: 4px; }
.abrir-detalle {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: none;
}
.tarjeta-imagen img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 6px 7px rgba(0,0,0,.38));
  transform: rotate(var(--giro, 0deg));
  transition: transform .28s var(--curva);
  animation: aparecer .3s ease both;
}
.nombre-detalle {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font-weight: inherit;
  line-height: inherit;
  text-align: left;
  overflow-wrap: anywhere;
}
.tarjeta-imagen img.es-foto {
  object-fit: cover;
  padding: 7px;
  background: var(--blanco);
  border-radius: 20px;
  filter: none;
  box-shadow: 0 6px 12px rgba(0,0,0,.34);
  transform: none;
}
.agotado .tarjeta-imagen img { opacity: .4; }

.ver-foto {
  position: absolute;
  right: 0;
  bottom: 0;
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: var(--blanco);
  color: var(--tinta);
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0,0,0,.35);
}
/* Área táctil de 44px aunque el botón se vea más chico sobre la foto. */
.ver-foto::after { content: ''; position: absolute; inset: -4px; }

.tarjeta h2 { margin: 0; font-size: 16px; line-height: 1.2; font-weight: 700; overflow-wrap: anywhere; }
.precio { margin: 0 0 4px; color: var(--acento); font-family: var(--mono); font-size: 15px; }

.boton-agregar {
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  background: var(--acento);
  color: var(--tinta);
  font-weight: 700;
}

.contador {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  border-radius: 12px;
  background: var(--blanco);
  color: var(--tinta);
}
.contador button {
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  font-size: 22px;
  font-weight: 700;
}
.contador span { font-family: var(--mono); min-width: 20px; text-align: center; }

.sin-stock {
  margin: 0;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--borde-tapete);
  border-radius: 12px;
  color: var(--sobre-tapete);
  font-weight: 700;
}

.estado { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 24px 0; }
.estado p { margin: 0; font-size: 20px; font-weight: 700; }

.barra {
  position: sticky;
  bottom: 0;
  padding: 12px 16px;
  background: var(--tinta);
}
.barra button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  max-width: 1088px;
  min-height: 52px;
  margin: 0 auto;
  padding: 0 18px;
  border: 0;
  border-radius: 14px;
  background: var(--acento);
  color: var(--tinta);
  font-size: 17px;
  font-weight: 800;
}
.barra span:last-child { font-family: var(--mono); font-size: 16px; }

/* Hoja del pedido */

.hoja {
  width: 100%;
  max-width: 460px;
  height: 100dvh;
  max-height: none;
  margin: 0 0 0 auto;
  padding: 0;
  border: 0;
  background: var(--papel);
  color: var(--tinta);
}
.hoja[open] { display: flex; flex-direction: column; }
.hoja::backdrop { background: rgba(5,20,16,.62); }

.hoja-cabeza {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 8px 12px 16px;
  border-bottom: 1px solid var(--linea);
}
.hoja-cabeza h2 { margin: 0; font-size: 24px; line-height: 1.15; font-weight: 800; letter-spacing: -0.01em; }
.paso { margin: 0; color: var(--suave); font-family: var(--mono); font-size: 13px; }

.cerrar {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: transparent;
}

.hoja-cuerpo {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hoja-pie {
  flex: 0 0 auto;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--linea);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lineas { list-style: none; margin: 0; padding: 0; }
.linea {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #E3E6DD;
}
.linea img { flex: 0 0 auto; width: 60px; height: 60px; object-fit: contain; }
.linea-texto { flex: 1 1 auto; min-width: 0; }
.linea-texto p { margin: 0; }
.linea-nombre { font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.linea-precio { margin-top: 2px !important; color: var(--suave); font-family: var(--mono); font-size: 14px; }

.contador-borde {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  border: 1.5px solid var(--borde);
  border-radius: 12px;
  background: var(--blanco);
}
.contador-borde button {
  width: 40px;
  height: 44px;
  border: 0;
  background: transparent;
  font-size: 20px;
  font-weight: 700;
}
.contador-borde span { min-width: 20px; text-align: center; font-family: var(--mono); }

.total {
  margin: 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 18px;
  font-weight: 700;
}
.total span:last-child { font-family: var(--mono); }

.boton {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 18px;
  border: 0;
  border-radius: 14px;
  background: var(--tinta);
  color: var(--blanco);
  font-size: 17px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}
.boton:disabled { background: var(--linea); color: var(--suave); }
.boton-acento { background: var(--acento); color: var(--tinta); }
.boton-whatsapp { background: var(--whatsapp); color: var(--tinta); }
.boton-chico { min-height: 44px; font-size: 16px; font-weight: 700; }
.boton-suave { background: var(--blanco); border: 1.5px solid var(--borde); color: var(--tinta); font-weight: 700; }
.boton-peligro { background: var(--peligro); color: var(--blanco); }

.enlace {
  align-self: flex-start;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--tapete);
  font-weight: 700;
  text-decoration: underline;
}

.campo { display: flex; flex-direction: column; gap: 6px; }
.campo label, .campo legend, .etiqueta { font-weight: 700; }
.etiqueta { margin: 0; }
.campo input[type="text"], .campo input[type="tel"], .campo input[type="email"], .campo input[type="password"] {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1.5px solid var(--borde);
  border-radius: 12px;
  background: var(--blanco);
  color: var(--tinta);
}
.campo textarea {
  width: 100%;
  min-height: 96px;
  padding: 12px 14px;
  border: 1.5px solid var(--borde);
  border-radius: 12px;
  background: var(--blanco);
  color: var(--tinta);
  font: inherit;
  resize: vertical;
}
.campo-mono input { font-family: var(--mono); }
.campo-corto input { max-width: 200px; }
fieldset.campo { margin: 0; padding: 0; border: 0; }
legend { padding: 0 0 6px; }

.opciones { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.opcion {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 12px;
  border: 1.5px solid var(--borde);
  border-radius: 12px;
  background: var(--blanco);
  font-weight: 700;
  cursor: pointer;
}
.opcion:has(input:checked) { border-color: var(--tapete); box-shadow: inset 0 0 0 1px var(--tapete); }
input[type="radio"], input[type="checkbox"] { width: 20px; height: 20px; margin: 0; accent-color: var(--tapete); }

/* Vista previa con los colores de un chat de WhatsApp, en la tipografía del sistema como la app. */
.chat {
  overflow: hidden;
  border: 1px solid var(--linea);
  border-radius: 14px;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}
.chat-cabecera {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: #008069;
  color: var(--blanco);
}
.chat-avatar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #DFE5E7;
  color: #54656F;
  font-weight: 600;
}
.chat-nombre { font-weight: 600; overflow-wrap: anywhere; }
.chat-fondo {
  display: flex;
  justify-content: flex-end;
  padding: 14px 12px 14px 28px;
  background-color: #EFEAE2;
  background-image: radial-gradient(rgba(84,101,111,.13) 1px, transparent 1.5px);
  background-size: 14px 14px;
}
.chat-burbuja {
  position: relative;
  max-width: 100%;
  padding: 7px 9px 6px;
  border-radius: 8px 0 8px 8px;
  background: #D9FDD3;
  color: #111B21;
  font-size: 14.5px;
  line-height: 1.35;
  box-shadow: 0 1px .5px rgba(11,20,26,.13);
  overflow-wrap: anywhere;
}
/* La colita de la burbuja, arriba a la derecha. */
.chat-burbuja::after {
  content: '';
  position: absolute;
  top: 0;
  right: -8px;
  border-top: 10px solid #D9FDD3;
  border-right: 8px solid transparent;
}
#vista-mensaje { display: block; white-space: pre-wrap; }
.chat-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 2px;
  color: #54656F;
  font-size: 11px;
}

.nota { margin: 0; color: var(--suave); font-size: 14px; }
.nota-centro { text-align: center; }
.error { margin: 0; color: var(--peligro); font-size: 14px; font-weight: 600; }

/* Panel */

body.panel { background: var(--papel); color: var(--tinta); }

.panel-cabeza { background: var(--tinta); color: var(--blanco); }
.panel-cabeza-dentro {
  max-width: 720px;
  margin: 0 auto;
  padding: 12px 16px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.panel-titulo { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 8px; }
.panel-titulo h1 { margin: 0; font-size: 22px; line-height: 1.15; font-weight: 800; letter-spacing: -0.01em; }
.panel-titulo a {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border: 1.5px solid var(--borde-tapete);
  border-radius: 12px;
  color: var(--blanco);
  font-weight: 700;
  text-decoration: none;
}

.pestanas { display: flex; gap: 4px; }
.pestana {
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--blanco);
  font-weight: 700;
}
.pestana[aria-pressed="true"] { border-bottom-color: var(--acento); }
.panel-cabeza :focus-visible { outline-color: var(--acento); }

.panel-cuerpo {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 16px 48px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.panel-cuerpo h2 { margin: 0; font-size: 24px; line-height: 1.15; font-weight: 800; letter-spacing: -0.01em; }

.tarjeta-panel {
  padding: 14px;
  border-radius: 14px;
  background: var(--blanco);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.tarjeta-panel h3 { margin: 0; font-size: 18px; font-weight: 800; }

.cantidad { margin: 0; color: var(--suave); font-family: var(--mono); font-size: 14px; }

.aviso {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: #FFF3C4;
  color: var(--tinta);
  font-weight: 600;
}
.aviso-ok { background: #D9F2E3; }
.aviso-error { background: #FDE3DF; color: #7A1A10; }

.filas { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.fila { padding: 12px; border-radius: 14px; background: var(--blanco); display: flex; flex-direction: column; gap: 10px; }
.fila-datos { display: flex; align-items: center; gap: 12px; }
.fila-datos img { flex: 0 0 auto; width: 56px; height: 56px; object-fit: contain; }
.fila-apagada .fila-datos img { opacity: .4; }
.fila-texto { flex: 1 1 auto; min-width: 0; }
.fila-texto p { margin: 0; }
.fila-nombre { font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.fila-meta { margin-top: 2px !important; color: var(--suave); font-size: 14px; }
.fila-acciones { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.interruptor {
  flex: 1 1 130px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-weight: 600;
  cursor: pointer;
}

.subidas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 400px; }
.subida-grupo { display: flex; flex-direction: column; gap: 6px; }
.subida {
  position: relative;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 2px dashed var(--borde);
  border-radius: 20px;
  background: var(--blanco);
  text-align: center;
  font-weight: 700;
  cursor: pointer;
}
.subida:focus-within { outline: 3px solid #1F6FEB; outline-offset: 2px; }
.subida input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.subida img { width: 100%; height: 100%; object-fit: contain; }
.subida span { padding: 0 14px; }

.chips-form { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-form {
  min-height: 44px;
  padding: 0 14px;
  border: 1.5px solid var(--borde);
  border-radius: 999px;
  background: transparent;
  color: var(--tinta);
  font-weight: 700;
}
.chip-form[aria-pressed="true"] { border-color: transparent; background: var(--tinta); color: var(--blanco); }

.grupo-botones { display: flex; flex-wrap: wrap; gap: 8px; }
.crece { flex: 1 1 220px; }

.categoria-fila {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  border-bottom: 1px solid #E3E6DD;
}
.categoria-fila span:first-child { font-weight: 700; overflow-wrap: anywhere; }
.categoria-uso { flex: 0 0 auto; color: var(--suave); font-size: 14px; }

.fila-input { display: flex; gap: 8px; }
.fila-input input { flex: 1 1 auto; min-width: 0; }

.enlace-catalogo {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--papel);
  font-family: var(--mono);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.login {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  padding: 48px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.login h1 { margin: 0; font-size: 30px; line-height: 1.1; font-weight: 800; letter-spacing: -0.02em; }

/* Detalle del sticker */

.detalle {
  width: 100%;
  max-width: 820px;
  max-height: 92dvh;
  margin: auto auto 0;
  padding: 0;
  border: 0;
  border-radius: 24px 24px 0 0;
  overflow: hidden;
  background: var(--papel);
  color: var(--tinta);
}
.detalle[open] { display: flex; flex-direction: column; animation: entrar-abajo .38s var(--curva); }
.detalle.cerrando { animation: salir-abajo .22s ease-in forwards; }
.detalle::backdrop { background: rgba(5,20,16,.62); }
.detalle[open]::backdrop { animation: aparecer .3s ease; }
.detalle.cerrando::backdrop { animation: desaparecer .22s ease-in forwards; }

.detalle-cerrar {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
  border-radius: 999px;
  background: var(--blanco);
  color: var(--tinta);
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
}

.detalle-cuerpo { display: grid; min-height: 0; overflow-y: auto; }

.detalle-galeria {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 28px 20px 18px;
  background-color: var(--tapete);
  background-image:
    linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 24px 24px;
}

.detalle-imagen {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  filter: drop-shadow(0 8px 10px rgba(0,0,0,.4));
  animation: aparecer-zoom .32s var(--curva);
}
.detalle-imagen.es-foto {
  object-fit: cover;
  padding: 8px;
  background: var(--blanco);
  border-radius: 22px;
  filter: none;
  box-shadow: 0 8px 18px rgba(0,0,0,.36);
}

.ampliar {
  position: relative;
  display: block;
  width: 100%;
  max-width: 320px;
  padding: 0;
  border: 0;
  border-radius: 22px;
  background: none;
  cursor: zoom-in;
}
.ampliar-etiqueta {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--blanco);
  color: var(--tinta);
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0,0,0,.35);
}

.visor {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #050B09;
  color: var(--blanco);
}
.visor[open] { display: flex; flex-direction: column; animation: aparecer .24s ease; }
.visor.cerrando { animation: desaparecer .18s ease-in forwards; }
.visor :focus-visible { outline-color: var(--acento); }

.visor-marco { flex: 1 1 auto; min-height: 0; overflow: auto; }
.visor-zoom {
  display: block;
  width: 100%;
  height: 100%;
  padding: 16px;
  border: 0;
  background: none;
  cursor: zoom-in;
}
.visor-zoom img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  animation: aparecer-zoom .28s var(--curva);
}
.visor-marco.ampliada .visor-zoom { width: 220%; height: 220%; cursor: zoom-out; }
.visor-miniaturas { flex: 0 0 auto; justify-content: center; padding: 10px 16px 16px; }

.miniaturas { display: flex; gap: 8px; }
.miniatura {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 4px 14px 4px 4px;
  border: 2px solid transparent;
  border-radius: 14px;
  background: rgba(255,255,255,.14);
  color: var(--blanco);
  font-size: 14px;
  font-weight: 700;
}
.miniatura img { width: 44px; height: 44px; object-fit: cover; border-radius: 10px; background: var(--blanco); }
.miniatura[aria-pressed="true"] { border-color: var(--acento); background: rgba(0,0,0,.25); }
.detalle .miniatura:focus-visible { outline-color: var(--acento); }

.detalle-info { display: flex; flex-direction: column; gap: 8px; padding: 20px 20px 24px; }
.detalle-categoria { margin: 0; color: var(--suave); font-family: var(--mono); font-size: 14px; }
.detalle-info h2 { margin: 0; font-size: 28px; line-height: 1.1; font-weight: 800; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.detalle-precio { margin: 0 0 8px; color: var(--tapete); font-family: var(--mono); font-size: 22px; }
.detalle-descripcion { margin: 0 0 8px; color: var(--suave); line-height: 1.45; white-space: pre-line; overflow-wrap: anywhere; }
.detalle .contador { border: 1.5px solid var(--borde); }
.detalle .sin-stock { border-color: var(--borde); color: var(--suave); }
.detalle .boton-chico { margin-top: 4px; }

@media (min-width: 760px) {
  .detalle { margin: auto; border-radius: 24px; }
  .detalle[open] { animation-name: entrar-zoom; }
  .detalle.cerrando { animation-name: salir-zoom; }
  .detalle-cuerpo { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
  .detalle-galeria { justify-content: center; padding: 36px 28px; }
  .detalle-info { justify-content: center; padding: 56px 32px 32px; }
}

/* Animaciones */

.hoja[open] { animation: entrar-derecha .36s var(--curva); }
.hoja.cerrando { animation: salir-derecha .22s ease-in forwards; }
.hoja[open]::backdrop { animation: aparecer .3s ease; }
.hoja.cerrando::backdrop { animation: desaparecer .22s ease-in forwards; }

.barra { animation: subir-barra .36s var(--curva); }
.contador span, .contador-borde span { animation: latido .24s var(--curva); }
.estado { animation: subir .35s var(--curva) both; }
.aviso { animation: subir .3s var(--curva) both; }
.entrada .panel-cuerpo, .entrada .login { animation: subir .32s var(--curva) both; }

button, .boton {
  transition: transform .16s var(--curva), background-color .2s ease, border-color .2s ease, color .2s ease, filter .2s ease, opacity .2s ease;
}
.boton:not(:disabled):active, .boton-agregar:active, .chip:active, .chip-form:active,
.barra button:active, .contador button:active, .contador-borde button:active,
.ver-foto:active, .miniatura:active, .ampliar:active, .pestana:active, .cerrar:active {
  transform: scale(.96);
}
.abrir-detalle:active img:not(.es-foto) { transform: rotate(0deg) scale(.97); }

@keyframes aparecer { from { opacity: 0; } }
@keyframes desaparecer { to { opacity: 0; } }
@keyframes subir { from { opacity: 0; transform: translateY(12px); } }
@keyframes subir-barra { from { transform: translateY(100%); } }
@keyframes latido { 40% { transform: scale(1.28); } }
@keyframes aparecer-zoom { from { opacity: 0; transform: scale(.94); } }
@keyframes entrar-derecha { from { transform: translateX(100%); } }
@keyframes salir-derecha { to { transform: translateX(100%); } }
@keyframes entrar-abajo { from { transform: translateY(100%); } }
@keyframes salir-abajo { to { transform: translateY(100%); } }
@keyframes entrar-zoom { from { opacity: 0; transform: translateY(14px) scale(.96); } }
@keyframes salir-zoom { to { opacity: 0; transform: translateY(8px) scale(.97); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after, ::backdrop {
    animation: none !important;
    transition: none !important;
  }
}

@media (hover: hover) {
  .abrir-detalle:hover img:not(.es-foto) { transform: rotate(0deg) scale(1.05); }
  .nombre-detalle:hover { text-decoration: underline; }
  .miniatura:hover { background: rgba(255,255,255,.24); }
  .chip:hover, .boton-agregar:hover, .barra button:hover { filter: brightness(1.06); }
  .boton:not(:disabled):hover { filter: brightness(1.12); }
  .boton-suave:not(:disabled):hover { filter: none; background: var(--papel); }
  .subida:hover { border-color: var(--tinta); }
}
