/* Paleta tomada del diseño del banner */
:root {
  --ft-vino: #5C1622;
  --ft-dorado: #F0A500;
  --ft-dorado-oscuro: #d18f00;
  --ft-crema: #F4F2F0;
  --fb-azul: #1877F2;
}

body {
  background: var(--ft-crema);
  color: #23201f;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.cabecera {
  background: linear-gradient(135deg, var(--ft-vino), #7d1f2f);
}

.tarjeta {
  position: relative;
  background: #fff;
  border-radius: 1rem;
  padding: 1.5rem 1.25rem 1.25rem;
  box-shadow: 0 2px 14px rgba(0, 0, 0, .07);
}

/* Numero del paso, en el borde superior izquierdo de cada tarjeta */
.paso-num {
  position: absolute;
  top: -14px;
  left: 18px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ft-dorado);
  color: var(--ft-vino);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
}

/* Los pasos siguientes se ven, pero no se pueden usar hasta completar el anterior */
.seccion-bloqueada {
  opacity: .5;
  pointer-events: none;
  filter: grayscale(.4);
}

.btn-marca {
  background: var(--ft-dorado);
  border-color: var(--ft-dorado);
  color: var(--ft-vino);
  font-weight: 700;
}

.btn-marca:hover,
.btn-marca:focus {
  background: var(--ft-dorado-oscuro);
  border-color: var(--ft-dorado-oscuro);
  color: var(--ft-vino);
}

.btn-facebook {
  background: var(--fb-azul);
  border-color: var(--fb-azul);
  color: #fff;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-facebook:hover,
.btn-facebook:focus {
  background: #145dbf;
  border-color: #145dbf;
  color: #fff;
}

.previa-envoltura {
  position: relative;
  max-width: 420px;
  margin: 0 auto;
}

.previa-velo {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .45);
  border-radius: 1rem;
}

.banner-final {
  width: 100%;
  height: auto;
}

.pagina-compartir .banner-final {
  max-width: 420px;
}

/* En movil la vista previa queda arriba: se limita su alto para que el
   formulario siga siendo visible sin tener que hacer mucho scroll. */
@media (max-width: 991.98px) {
  .previa-envoltura {
    max-width: 280px;
  }
}

/* ---------------------------------------------------- separador "o" del paso 1 */
.separador-o {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: .75rem 0;
  color: #9a9a9a;
  font-size: .85rem;
}

.separador-o::before,
.separador-o::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e2e0de;
}

/* ------------------------------------------------------ recortador circular */
.recorte-marco {
  position: relative;
  width: 320px;
  max-width: 100%;
  aspect-ratio: 1;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 1rem;
  background: #2b2b2b;
  cursor: grab;
  touch-action: none; /* el arrastre lo maneja el JS, no el scroll del navegador */
}

.recorte-marco:active {
  cursor: grabbing;
}

.recorte-marco canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* Oscurece todo menos el circulo: muestra exactamente lo que entrara al banner */
.recorte-mascara {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: rgba(0, 0, 0, .55);
  -webkit-mask: radial-gradient(circle at 50% 50%, transparent 49.5%, #000 50%);
  mask: radial-gradient(circle at 50% 50%, transparent 49.5%, #000 50%);
}

.recorte-mascara::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .85);
}

/* --------------------------------------------------------------- WhatsApp */
.btn-whatsapp {
  background: #25D366;
  border-color: #25D366;
  color: #fff;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-whatsapp:hover,
.btn-whatsapp:focus {
  background: #1da851;
  border-color: #1da851;
  color: #fff;
}

/* ------------------------------------------------- los dos caminos al compartir */
.camino {
  border: 1px solid #e6e3e0;
  border-radius: .75rem;
  padding: 1rem;
  background: #fcfbfa;
}

.camino-titulo {
  font-weight: 700;
  font-size: .95rem;
  color: var(--ft-vino);
  margin-bottom: .35rem;
}

/* --------------------------------------------------- selector de diseño */
.disenos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: .6rem;
}

.diseno {
  cursor: pointer;
  text-align: center;
  font-size: .72rem;
  color: #6b6b6b;
}

.diseno input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.diseno img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: top;
  border-radius: .5rem;
  border: 3px solid transparent;
  background: #ecebe9;
}

.diseno input:checked + img {
  border-color: var(--ft-dorado);
  box-shadow: 0 0 0 2px rgba(240, 165, 0, .35);
}

.diseno span {
  display: block;
  margin-top: .25rem;
  line-height: 1.2;
}

.diseno input:checked ~ span {
  color: var(--ft-vino);
  font-weight: 700;
}
