.bw-step4{width:100%}

/* Preview */
.bw-step4__preview{
  width:100%;
  position:relative;
}
.bw-step4__caja{
  width:100%;
  height:auto;
  display:block;
}

/* Grid overlay */
.bw-step4__grid{
  position:absolute;
  inset:0;
  display:grid;
  grid-template-columns:repeat(var(--cols,9),1fr);
  grid-template-rows:repeat(var(--rows,4),1fr);
  padding: 1.8% 2.25% 12% 2.25%;
  pointer-events:none;
}

.bw-step4__slot{
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 0;
  box-sizing:border-box;
  height: 100%;
}

/* Padding por columna (grid 9 cols):
   - Col 1–4: 0% 11% 9% 0%
   - Col 5–9: 0% 0% 10% 12% */
.bw-step4__slot:nth-child(9n+1),
.bw-step4__slot:nth-child(9n+2),
.bw-step4__slot:nth-child(9n+3),
.bw-step4__slot:nth-child(9n+4){
  padding: 0% 11% 9% 0%;
}
.bw-step4__slot:nth-child(9n+5),
.bw-step4__slot:nth-child(9n+6),
.bw-step4__slot:nth-child(9n+7),
.bw-step4__slot:nth-child(9n+8),
.bw-step4__slot:nth-child(9n+9){
  padding: 0% 0% 10% 12%;
}

.bw-step4__img{
  width:72%;
  height:72%;
  object-fit:contain;
  user-select:none;
  -webkit-user-drag:none;
  transform-origin:center center;
  will-change: transform, opacity;
}

/* Animación de entrada (insert into box) */
.bw-step4__img.is-in{
  animation: bwLetterInsert 1.1s cubic-bezier(.2,.9,.25,1) both;
  transform-origin: center center;
  will-change: transform, opacity;
  width: 100%;
}

@keyframes bwLetterInsert{
  0%{
    transform: scale(2.1) rotateX(10deg);
    opacity: 0;
    filter: blur(4px);
  }
  60%{
    transform: scale(1.02) rotateX(0deg);
    opacity: 1;
    filter: blur(0);
  }
  82%{ transform: scale(1.01); }
  100%{ transform: scale(1); }
}

/* Bottom bar */
.bw-step4__bar{
  position: absolute;
  left: 2.5%;
  right: 2.5%;
  bottom: 1.5%;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 26px;
  row-gap: 0px;
  z-index: 5;
  width: auto;
  max-width: 870px;
  align-items: center;
}



.bw-step4__pill {
	grid-column: 1;
	grid-row: 1 / span 2;
	background: #fff;
	border-radius: 20px;
	overflow: hidden;
	display: grid;
	grid-template-rows: auto auto;
	margin-bottom: 10px;
}



.bw-step4__inputwrap{
  position: relative;
  min-width: 0;
  padding: 10px 18px 0px 18px;
  background: transparent;
}

.bw-step4__input{
  width: 100%;
  border-radius: 0;
  border: 0;
  height: 40px;
  padding: 0 92px 0 4px;
  outline: none;
  background: transparent;
  box-sizing: border-box;
  font-size: 16px;
  border-bottom: 1px solid #949494;
  color: #949494;
}

.bw-step4__counter{
  position: absolute;
  top: 16px;
  right: 18px;
  transform: none;
  height: auto;
  min-width: 0;
  padding: 0;
  border-radius: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  letter-spacing: .5px;
  background: transparent;
  color: #222;
  box-shadow: none;
  pointer-events: none;
  font-family: "Helvetica", Sans-serif;
}

.bw-step4__counter-max{
  color: #f5a623;
  font-size: 22px;
}

.bw-step4__price-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 18px 10px 18px;
  font-size: 12px;
  line-height: 1.2;
  font-family: "Helvetica", Sans-serif;
  font-weight: normal;
  color: #949494;
  background: transparent;
}

.bw-step4__price-value{
  font-weight: normal;
  color: #949494;
}

.bw-step4__btn{
  grid-column: 2;
  grid-row: 1 / span 2;
  background-color: #22211F;
  font-weight: 700;
  text-transform: uppercase;
  fill: #FFFFFF;
  color: #FFFFFF;
  border-style: none;
  padding: 0 55px;
  border-radius: 12px;
  cursor: pointer;
  height: 55px;
  margin-top: auto;
  margin-bottom: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bw-step4__btn:active{ transform:translateY(1px); }

@media (max-width: 768px){
  .bw-step4__bar {
	position: absolute;
	left: 2.5%;
	right: 2.5%;
	bottom: -75%;
	display: grid;
	grid-template-columns: 1fr auto;
	grid-template-rows: auto auto;
	column-gap: 26px;
	row-gap: 0px;
	z-index: 5;
	width: auto;
	max-width: 870px;
	align-items: center;
}
.bw-step4__btn{
    grid-column: 1;
    grid-row: 3;
    width: 100%;
    height: 56px;
    padding: 0 18px;
  }
}


/* Gate feedback when trying to advance with empty input */
.bw-step4--needs-input .bw-step4__pill{
  animation: bwShake 420ms ease-in-out;
}

@keyframes bwShake{
  0%,100%{ transform: translateX(0); }
  20%{ transform: translateX(-6px); }
  40%{ transform: translateX(6px); }
  60%{ transform: translateX(-4px); }
  80%{ transform: translateX(4px); }
}

@media (768px <= width <= 1485px){
  .bw-step4__bar {bottom: -19%;}
}