:root {
  --violeta: #5b2cff;
  --naranja: #ff7a00;
  --verde: #12b76a;
  --rosa: #ff2e88;
  --amarillo: #ffd60a;
  --fondo: #14102b;
  --texto: #ffffff;
  --gris: #3a3557;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--fondo);
  color: var(--texto);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

body { display: flex; flex-direction: column; min-height: 100dvh; }

.oculto { display: none !important; }

.barra {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: linear-gradient(90deg, var(--violeta), var(--rosa));
}
.barra h1 { margin: 0; font-size: 1.15rem; }
.logo { font-size: 1.6rem; }

/* Inicio */
.inicio {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background: radial-gradient(circle at 30% 20%, #3b1d9c 0, var(--fondo) 60%);
}
.inicio-caja { width: 100%; max-width: 420px; text-align: center; }
.inicio-caja h2 { font-size: 2rem; line-height: 1.15; margin: 0 0 12px; }
.inicio-caja p { opacity: .9; }
.estado { min-height: 1.4em; color: var(--amarillo); font-weight: 600; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 16px;
  padding: 14px 18px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  text-decoration: none;
}
.btn-grande { width: 100%; padding: 20px; font-size: 1.25rem; margin-top: 14px; border-radius: 20px; }
.btn-violeta { background: var(--violeta); box-shadow: 0 6px 0 #3a17b8; }
.btn-naranja { background: var(--naranja); box-shadow: 0 6px 0 #b85700; }
.btn-verde { background: var(--verde); }
.btn-gris { background: var(--gris); }
.btn:active { transform: translateY(3px); box-shadow: none; }

/* Probador */
.probador { flex: 1; display: flex; flex-direction: column; min-height: 0; }

.escena {
  position: relative;
  flex: 1;
  min-height: 0;
  background: #000;
  overflow: hidden;
}
#video { display: none; }
#lienzo { width: 100%; height: 100%; object-fit: cover; display: block; }

.aviso {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,.65);
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 600;
  white-space: nowrap;
}

.info {
  position: absolute;
  left: 12px;
  bottom: 12px;
  max-width: calc(100% - 110px);
  background: rgba(20,16,43,.82);
  border: 2px solid var(--violeta);
  border-radius: 16px;
  padding: 10px 14px;
}
.info-nombre { font-weight: 800; font-size: 1.1rem; }
.info-medidas { opacity: .85; font-size: .95rem; margin-top: 2px; }
.calce {
  display: inline-block;
  margin-top: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: .9rem;
}
.calce.justo { background: var(--verde); }
.calce.grande { background: var(--naranja); }
.calce.chico { background: var(--rosa); }

.btn-foto {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 5px solid #fff;
  background: var(--rosa);
  font-size: 2rem;
  cursor: pointer;
}
.btn-volver {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: rgba(0,0,0,.6);
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
}

.filtros {
  display: flex;
  gap: 8px;
  padding: 10px 16px 0;
  overflow-x: auto;
}
.filtro {
  flex: none;
  border: 0;
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 700;
  font-size: .95rem;
  background: var(--gris);
  color: #fff;
  cursor: pointer;
}
.filtro.activo { background: var(--amarillo); color: #1a1a1a; }

.carrusel {
  display: flex;
  gap: 12px;
  padding: 12px 16px 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}
.tarjeta {
  flex: none;
  width: 132px;
  scroll-snap-align: start;
  border: 3px solid transparent;
  border-radius: 18px;
  background: #fff;
  color: #1a1a1a;
  padding: 8px;
  cursor: pointer;
  text-align: center;
}
.tarjeta canvas { width: 100%; height: 56px; display: block; }
.tarjeta b { display: block; font-size: 1rem; margin-top: 4px; }
.tarjeta small { color: #555; font-weight: 600; }
.tarjeta.activa { border-color: var(--rosa); box-shadow: 0 0 0 3px var(--amarillo); }

/* Modal */
.modal {
  border: 0;
  border-radius: 20px;
  padding: 12px;
  background: var(--fondo);
  color: #fff;
  width: min(92vw, 520px);
}
.modal::backdrop { background: rgba(0,0,0,.7); }
.modal img { width: 100%; border-radius: 14px; display: block; }
.modal-botones { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.modal-botones .btn { flex: 1; }

@media (min-width: 900px) {
  .escena { max-height: 72vh; }
}
