.ckmBodyModalAberto {
  overflow: hidden;
}

.ckmCamadaModalCompra {
  position: fixed;
  inset: 0;
  z-index: 10060;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(17, 24, 39, 0.58);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.ckmCamadaModalCompra.ckmModalAberto {
  opacity: 1;
  pointer-events: auto;
}

.ckmFolhaModalCompra {
  position: relative;
  width: 100%;
  max-width: 430px;
  max-height: 92vh;
  background: #ffffff;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -18px 42px rgba(15, 23, 42, 0.22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(104%);
  transition: transform 0.24s ease;
}

.ckmCamadaModalCompra.ckmModalAberto .ckmFolhaModalCompra {
  transform: translateY(0);
}

.ckmHandleModalCompra {
  width: 40px;
  height: 4px;
  margin: 8px auto 5px;
  border-radius: 999px;
  background: #d9e0e8;
  flex: 0 0 auto;
}

.ckmBotaoFecharCompra {
  position: absolute;
  top: 14px;
  right: 12px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ckmBotaoFecharCompra svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
}

.ckmConteudoModalCompra {
  flex: 1;
  overflow-y: auto;
  padding: 8px 14px 14px;
}

.ckmTopoModalCompra {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 12px;
  align-items: center;
  padding-right: 34px;
}

.ckmImagemProdutoCompra {
  width: 86px;
  height: 86px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid #edf1f5;
  background: #f8fafc;
}

.ckmInfoTopoCompra {
  min-width: 0;
}

.ckmLinhaPrecoCompra {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.ckmBadgeDescontoCompra {
  min-height: 25px;
  padding: 3px 8px;
  border-radius: 6px;
  background: #ff2f61;
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
}

.ckmTextoAPartirCompra {
  color: #667085;
  font-size: 13px;
}

.ckmLinhaPrecoCompra strong {
  color: #d71955;
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
}

.ckmPrecoAntigoCompra {
  margin-top: 7px;
  color: #8a94a6;
  font-size: 13px;
  text-decoration: line-through;
}

.ckmEconomiaCompra {
  display: inline-flex;
  margin-top: 8px;
  max-width: 100%;
  padding: 7px 10px;
  border-radius: 7px;
  background: #ffe8ef;
  color: #f2305f;
  font-size: 12px;
  font-weight: 800;
}

.ckmFaixaOfertaCompra {
  margin-top: 14px;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 10px;
  background: linear-gradient(90deg, #ff3f48, #ff8a00);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  font-weight: 800;
}

.ckmFaixaOfertaCompra strong {
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.ckmSecaoCompra {
  margin-top: 18px;
}

.ckmCabecalhoSecaoCompra {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: start;
}

.ckmCabecalhoSecaoCompra h2,
.ckmCabecalhoSimplesCompra h3,
.ckmSecaoQuantidadeCompra h3,
.ckmResumoKitCompra h3 {
  color: #111827;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
}

.ckmCabecalhoSecaoCompra p,
.ckmCabecalhoSimplesCompra p,
.ckmSecaoQuantidadeCompra p {
  margin-top: 4px;
  color: #667085;
  font-size: 12px;
  line-height: 1.3;
}

#ckmContadorCoresCompra {
  min-height: 28px;
  padding: 6px 9px;
  border-radius: 999px;
  background: #f3f6fa;
  color: #111827;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.ckmAvisoCompra {
  min-height: 20px;
  margin-top: 8px;
  color: #f2305f;
  font-size: 12px;
  font-weight: 700;
}

.ckmAvisoCompra.ckmAvisoPositivo {
  color: #12a66a;
}

.ckmGridCoresCompra {
  margin-top: 9px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.ckmCardCorCompra {
  position: relative;
  min-width: 0;
  border: 1px solid #e4e9f0;
  border-radius: 12px;
  background: #ffffff;
  padding: 6px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.ckmCardCorCompra.ckmCorSelecionada {
  border-color: #ff3b66;
  box-shadow: 0 0 0 1px #ff3b66;
}

.ckmCardCorCompra.ckmCorEsgotada {
  opacity: 0.54;
}

.ckmImagemCorCompra {
  width: 100%;
  aspect-ratio: 1 / 0.88;
  border-radius: 9px;
  object-fit: contain;
  background: #f3f6fa;
}

.ckmSeloEsgotadoCompra {
  position: absolute;
  top: 13px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: #98a2b3;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.ckmNomeCorCompra {
  min-height: 28px;
  margin-top: 6px;
  color: #111827;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ckmControleCorCompra {
  margin-top: 6px;
  height: 31px;
  border-radius: 999px;
  background: #f6f8fb;
  display: grid;
  grid-template-columns: 30px 1fr 30px;
  align-items: center;
}

.ckmControleCorCompra button,
.ckmControleQuantidadeKit button {
  height: 31px;
  color: #536174;
  font-size: 18px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ckmControleCorCompra button:disabled,
.ckmControleQuantidadeKit button:disabled {
  color: #c3cbd6;
  cursor: not-allowed;
}

.ckmControleCorCompra button.ckmBotaoMaisNoLimite {
  color: #aab4c2;
}

.ckmControleCorCompra span,
.ckmControleQuantidadeKit span {
  color: #111827;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.ckmCabecalhoSimplesCompra {
  margin-bottom: 10px;
}

.ckmGridTamanhosCompra {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.ckmBotaoTamanhoCompra {
  height: 40px;
  border: 1px solid #d9e1ea;
  border-radius: 9px;
  background: #ffffff;
  color: #111827;
  font-size: 14px;
  font-weight: 800;
}

.ckmBotaoTamanhoCompra.ckmTamanhoSelecionado {
  border-color: #ff3b66;
  background: #fff1f5;
  color: #f2305f;
  box-shadow: 0 0 0 1px #ff3b66;
}

.ckmSecaoQuantidadeCompra {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.ckmControleQuantidadeKit {
  width: 112px;
  height: 36px;
  border: 1px solid #e4e9f0;
  border-radius: 7px;
  background: #f8fafc;
  display: grid;
  grid-template-columns: 34px 1fr 34px;
  align-items: center;
}

.ckmResumoKitCompra {
  margin-top: 16px;
  padding: 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #edf1f5;
}

.ckmResumoKitCompra p {
  margin-top: 6px;
  color: #4b5563;
  font-size: 12px;
  line-height: 1.42;
}

.ckmRodapeModalCompra {
  flex: 0 0 auto;
  padding: 12px 14px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid #eef1f4;
  background: #ffffff;
}

.ckmBotaoFinalCompra {
  width: 100%;
  height: 50px;
  border-radius: 999px;
  background: #ff2f61;
  color: #ffffff;
  font-size: 15px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(255, 47, 97, 0.22);
}

.ckmBotaoFinalCompra:disabled {
  background: #f4a4b8;
  box-shadow: none;
  cursor: not-allowed;
}

@media (max-width: 360px) {
  .ckmConteudoModalCompra {
    padding-left: 12px;
    padding-right: 12px;
  }

  .ckmTopoModalCompra {
    grid-template-columns: 78px 1fr;
    gap: 10px;
  }

  .ckmImagemProdutoCompra {
    width: 78px;
    height: 78px;
  }

  .ckmLinhaPrecoCompra strong {
    font-size: 21px;
  }

  .ckmGridCoresCompra {
    gap: 7px;
  }

  .ckmNomeCorCompra {
    font-size: 11px;
  }
}
