/* ============================================================================
   RESUMO.CSS  —  Resumo do pedido, botão do WhatsApp e barra flutuante de total
   ============================================================================ */


/* ----------------------------------------------------------------------------
   RESUMO FINANCEIRO
   ---------------------------------------------------------------------------- */

/* Lista dos itens escolhidos (ex: "2x Gás P13 ..... R$ 210,00") */
.resumo__itens {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  font-size: 0.95rem;
}

.resumo__itens li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
}

.resumo__itens li span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;   /* nomes longos quebram em vez de estourar a tela */
}

.resumo__itens li span:last-child {
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

/* Mensagem quando ainda não há produtos */
.resumo__vazio {
  color: var(--cor-texto-suave);
}

.frete-gratis {
  margin: 14px 0;
  padding: 12px;
  border: 1px solid var(--cor-borda);
  border-radius: 10px;
  background: var(--cor-fundo);
}

.frete-gratis__cabecalho {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 0.85rem;
}

.frete-gratis__cabecalho strong {
  font-weight: 700;
}

.frete-gratis__cabecalho span {
  flex-shrink: 0;
  color: var(--cor-texto-suave);
  font-variant-numeric: tabular-nums;
}

.frete-gratis__trilho {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--cor-borda);
}

.frete-gratis__progresso {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--cor-principal);
  transition: width 0.2s ease;
}

.resumo__linha {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
  font-size: 0.95rem;
}

.resumo__linha--total {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px dashed var(--cor-borda-campo);
  font-size: 1.25rem;
  font-weight: 800;
}


/* ----------------------------------------------------------------------------
   BOTÃO "FINALIZAR NO WHATSAPP"
   Tamanho ajustado: altura confortável para o dedo (52px), fonte de 16px e
   ícone de 22px. Para ajustar, mude as 3 variáveis abaixo.
   ---------------------------------------------------------------------------- */
.botao-whatsapp {
  --botao-altura: 52px;
  --botao-fonte: 1rem;
  --botao-icone: 22px;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: var(--botao-altura);
  margin-top: 16px;
  padding: 0 20px;
  border: 0;
  border-radius: var(--raio);
  background: var(--cor-whatsapp);
  color: #ffffff;
  font-size: var(--botao-fonte);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  box-shadow: 0 2px 8px rgba(22, 136, 63, 0.3);
  transition: background 0.15s, transform 0.1s;
}

.botao-whatsapp:hover {
  background: var(--cor-whatsapp-escura);
}

.botao-whatsapp:active {
  transform: scale(0.98);
}

.botao-whatsapp__icone {
  flex-shrink: 0;
  width: var(--botao-icone);
  height: var(--botao-icone);
  fill: currentColor;
}


/* ----------------------------------------------------------------------------
   BARRA FLUTUANTE DE TOTAL (fixa no rodapé da tela)
   ---------------------------------------------------------------------------- */
.barra-total {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  /* Soma o espaço da "barrinha" de gestos do iPhone (safe-area) */
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: #ffffff;
  border-top: 1px solid var(--cor-borda);
  box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.1);
}

.barra-total__info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.2;
}

.barra-total__quantidade {
  font-size: 0.8rem;
  color: var(--cor-texto-suave);
}

.barra-total__valor {
  font-size: 1.2rem;
}

.barra-total__botao {
  flex-shrink: 0;
  min-height: 46px;
  padding: 0 20px;
  border: 0;
  border-radius: 10px;
  background: var(--cor-principal);
  color: #ffffff;
  font-weight: 700;
}


/* ----------------------------------------------------------------------------
   TELAS MAIORES
   ---------------------------------------------------------------------------- */
@media (min-width: 640px) {
  /* No computador o botão não precisa ocupar a largura toda */
  .botao-whatsapp {
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
  }
}
