/* ============================================================
   1. ESTRUTURA DO DRAWER (MENU LATERAL) E OVERLAY
   ============================================================ */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: none;
  z-index: 1000;
}

.overlay.ativo {
  display: block;
}

.drawer {
    position: fixed !important;
    top: 0;
    right: -100%; /* Começa escondido à direita */
    width: 50%;
    height: 100vh;
    background: #fff;
    z-index: 10000 !important;
    display: flex;
    flex-direction: column;
    transition: right 0.4s ease-in-out;
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    visibility: hidden;
}

/* Área de conteúdo rolável */
.drawer-content {
    flex: 1;           /* Ocupa o espaço entre o topo e o rodapé */
    overflow-y: auto;  /* Habilita a rolagem */
    padding-top: 20px !important;
    padding-bottom: 120px !important;
    padding: 10px 20px 100px 20px !important;/* Adiciona respiro lateral e superior */
    display: flex;
    flex-direction: column;
    gap: 25px;     /* Espaçamento interno */
}

.etapa {
    display: flex;
    flex-direction: column;
    padding: 10px 20px 100px 20px !important; /* Substitua o gap de 15px por 20px para dar mais clareza no mobile */
    gap: 25px !important; 
    height: auto !important;
    min-height: auto !important;
    /* REMOVIDO: padding-bottom: 0 !important (Isso impedia o respiro final) */
    margin-bottom: 20px;
}

#etapaContainer {
    display: flex;
    flex-direction: column;
    height: auto !important;
    gap: 20px;
    width: 100%;
    
}

.drawer.ativo {
  right: 0;
  visibility: visible;
}

@media (max-width: 768px) {
  .drawer {
    width: 100%;
    max-width: none;
  }
}
/* ============================================================
   2. TOPO (STEPPER + BOTÃO FECHAR)
   ============================================================ */


.drawer-topo {
  position: relative;
  background: #fff;
  padding: 16px 48px 8px;
  border-bottom: 1px solid #eee;
}

.drawer-topo .stepper {
  margin-top: 32px;
}

.btn-fechar-carrinho {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  cursor: pointer;
}


@media (max-width: 600px) {
  .btn-fechar-carrinho {
    width: 24px;
    height: 24px;
  }
}

@media (max-width: 600px) {
  .drawer-topo .stepper {
    margin-top: 28px;
  }
}

/* =====================================================
   CONTROLE DE ETAPAS (SCROLL)
===================================================== */
/* UNIFICADO: Removemos o padding de 120px que causava o buraco */
#etapaCarrinho,
#etapaIdentificacao,
#etapaPagamento,
#etapaFinalizar {
    flex: 1;
    display: none;
    gap: 15px;
    position: relative;
    flex-direction: column !important;
    width: 100%;
    margin-bottom: 20px !important;
    padding-top: 20px !important;/* MANTENHA ISSO: Protege o conteúdo do botão fixo/rodapé */
    padding-bottom: 100px !important; 
    box-sizing: border-box;
    margin-top: 25px !important;
    padding: 15px !important;
    border-top: 1px dashed #783606;
}

/* Garante que o container de itens não corte o conteúdo */
#itens-carrinho {
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    padding-bottom: 20px !important;
    gap: 15px;
}

/* =====================================================
   STEPPER (PADRÃO SODIÊ)
===================================================== */
.stepper {
  display: flex;
  align-items: flex-start;
  width: 100%;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 70px;
  position: relative;
}

/* bolinha */
.step .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #C5DADB;
  z-index: 2;
  margin-bottom: 6px;
}

.line {
  flex: 1;
  height: 2px;
  background: #C5DADB;
  margin:  6px -15px 0;
  
}


/* texto abaixo */
.step .label {
  margin-top: 12px;
  font-size: 15px;
  color: #999;
  text-align: center;
  white-space: nowrap;
}

/* linha entre etapas */


/* estados ativos */
.step.completed .dot,
.step.active .dot {
  background: var(--marrom);
}

.step.completed .label,
.step.active .label {
  color: var(--marrom);
  font-weight: 600;
}

.step.completed + .line {
  background: var(--marrom);
}

@media (max-width: 600px) {
  .step .label {
    font-size: 11px;
    margin-top: 8px;
  }
}

/* =====================================================
   CARD PRODUTO
===================================================== */
.bloco-produto {
  display: none;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px !important;
  margin-bottom: 25px !important; /* Aumente este valor para dar mais distância */
  position: relative;
  width: 100%;
}

.card-produto {
  position: relative !important;
  background: #C5DADB;
  border-radius: 18px;
  display: flex;
  width: 100% !important;
  padding: 10px !important;
  gap: 15px; /* Cria um espaço fixo entre a imagem e o texto */
  align-items: flex-start;
  overflow: hidden;
}

.img-bolo {
  width: 100px !important; /* Tamanho fixo menor para a foto */
  height: 100px !important;
  object-fit: cover;
  border-radius: 8px;
}

.descricao {
  flex: 1; /* Faz esse bloco ocupar todo o resto da largura */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}

/* 4. Ajusta o texto para não transbordar */
#cartDescricao p {
  font-size: 13px !important; /* Diminui levemente a fonte se necessário */
  line-height: 1.2;
  margin-bottom: 5px;
  word-wrap: break-word;
}

.badges {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}





/* =====================================================
   PILLS
===================================================== */
.pill {
  display: inline-block;
  background: var(--marrom);
  color: #fff;
  font-size: 15px;
  padding: 8px 12px;
  border-radius: 18px;
  width: fit-content;
  margin-bottom: 10px !important;
}

/* =====================================================
   CONFIRMAÇÕES (Lado a Lado)
===================================================== */
/* VERSÃO UNIFICADA E CORRIGIDA */
.confirmacoes-container {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;          /* Permite quebrar linha se o celular for pequeno */
    align-items: center;
    justify-content: space-between;
    gap: 10px;                 /* Espaço entre os blocos rosa */
    margin-top: 10px;
    margin-bottom: 10px;
    width: 100%;
    box-sizing: border-box;   /* Garante que o padding não estoure a largura */
}

.check-box {
  flex: 1;             /* Faz os dois blocos terem exatamente o mesmo tamanho */
  background: var(--rosa);
  color: var(--marrom);
  padding: 8px 5px;    /* Espaço interno mais delicado */
  border-radius: 12px; /* Arredondamento combinando com o site */
  font-size: 13px;
  font-weight: 600;
  text-align: center;  /* Centraliza o texto dentro do bloco rosa */
  
  /* Importante: Mantenha o display flex para alinhar o Check ✔ e o texto */
  display: none;       /* Começa escondido */
  align-items: center;
  justify-content: center;
}

/* Classe que o JavaScript vai adicionar */
.check-box.visivel {
  display: flex !important; /* Quando visível, usa Flex para manter o alinhamento */
}

/* =====================================================
   OBSERVAÇÃO
===================================================== */
.observacao {  
    width: 100% !important;
    display: block !important;
    box-sizing: border-box !important;
    margin-bottom: 25px !important;
}

.observacao-textarea {
  width: 100%;
  min-height: 90px;
  border-radius: 14px;
  padding: 12px;
  border: 1px solid #ddd;
  font-size: 14px;
  resize: vertical;
}

.observacao-textarea:focus {
  outline: none;
  border-color: var(--marrom);
}

/* =====================================================
   RODAPÉ FIXO (CARRINHO)
===================================================== */
/* Ajuste para o fundo pattern não criar vácuo */




/* Se você usa a base lilás, garanta que ela não ultrapasse o limite */
.rodape-base {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%; /* Em vez de 10%, use o tamanho do container */
    background: #CEC6DB;
    z-index: 0;
}




/* REGRA PARA PÁGINA DE DOCES (Quando o peso some) */
/* Se a peso-box for escondida pelo JS, o total-card ocupa 100% */
.peso-box[style*="display: none"] + .total-card {
  flex: 0 0 100% !important;
}





.total-titulo {
  display: flex;
  align-items: center;
  
  font-size: 30px;
  color: var(--marrom);
}



/* =====================================================
    FORMULÁRIOS
===================================================== */

/* Estilos de Base para os Campos (Evita repetição) */
.form-bloco.floating input,
.etapa input, 
.etapa select, 
.etapa textarea {
    width: 100%;
    border-radius: 8px;
    outline: none;
    background-color: white;
    display: flex;
    gap: 15px; /* Espaço entre Data e Horário quando estão lado a lado */
    margin-bottom: 20px !important;
    flex-direction: column;
    align-items: flex-start;
}

/* Container do campo flutuante */
.form-bloco.floating {
    position: relative;
    margin-top: 15px;
    
}

.form-bloco.floating input {
    padding: 15px 12px;
    border: 1.5px solid #ccc;
    font-size: 16px;
    background: transparent;
    flex-direction: column;
    align-items: flex-start;
}

.form-bloco.floating label {
    position: absolute;
    left: 10px;
    top: 15px;
    color: #999;
    transition: 0.2s ease all;
    pointer-events: none;
    background: white;
    padding: 0 5px;
    display: inline-block;
    height: 10px;
    line-height: 10px;
}

.form-bloco.floating input:focus + label,
.form-bloco.floating input:not(:placeholder-shown) + label {
    top: -1px;
    font-size: 12px;
    color: #783606;
    font-weight: bold;
    z-index: 10;
}

.form-bloco.floating input:focus {
    border-color: #000;
}

/* Layout em Linha (Data/Hora) */
.form-linha {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 15px;
    width: 100%;
    display: flex;
    gap: 15px; /* Espaço entre Data e Horário quando estão lado a lado */
    margin-bottom: 20px !important;
}

.form-bloco {
    flex: 1;         /* Faz os campos dividirem o espaço no desktop */
    min-width: 250px; /* Impede que fiquem esmagados */
    display: flex;
    flex-direction: column;
}

.form-linha label {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--marrom);
}

.form-linha input, 
.form-linha select {
    padding: 12px;
    border: 1.5px solid #ccc;
    font-size: 14px;
    display: flex;
    gap: 15px; /* Espaço entre Data e Horário quando estão lado a lado */
    margin-bottom: 20px !important;
}

.container, .form-container {
    padding: 0 15px; /* Evita que o campo encoste no vidro do celular */
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .form-linha {
        flex-direction: column; /* Empilha Data sobre Horário */
        gap: 15px;             /* Espaçamento entre os blocos no celular */
    }

    .form-bloco {
        width: 100%;
    }

    /* Garante que o select não seja bloqueado por elementos vizinhos */
    #horarioPedido, #dataPedido {
        height: 45px;          /* Aumenta a área de toque (UX Sênior) */
        font-size: 16px;       /* Evita o zoom automático do iPhone ao clicar */
        z-index: 10;           /* Garante que esteja na camada da frente */
        position: relative;
    }
}

/* 2. Ajusta o input para empurrar o ícone para a direita */
#dataPedido {
    width: 100% !important;
    padding: 10px 12px !important;
    border: 1px solid #ccc !important;
    border-radius: 8px !important;
    background-color: #fff !important;
    box-sizing: border-box !important;
    position: relative !important; /* Essencial para o ícone se basear aqui */
    display: block !important; /* No iOS, block é mais estável que flex para inputs */
    text-align: left !important;
    font-size: 16px !important; /* Evita o zoom automático do iPhone ao focar */
}

/* O texto da data */
#dataPedido::-webkit-datetime-edit {
    display: inline-block !important;
    width: calc(100% - 30px) !important; /* Abre espaço para o ícone na direita */
}

/* O ícone (Estilo Sênior para iOS) */
#dataPedido::-webkit-calendar-picker-indicator {
    position: absolute !important;
    right: 12px !important; /* Fixa no final do bloco */
    top: 50% !important;
    transform: translateY(-50%) !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 20px !important;
    height: 20px !important;
    filter: invert(0.5); /* Fica cinza */
    opacity: 0.8;
    cursor: pointer;
    -webkit-appearance: none;
}

/* Bloco Azul do Endereço */
.endereco-box {
    background-color: #C5DADB;
    padding: 12px;
    border-radius: 12px;
    margin-top: 8px;
    color: #2c3e50;
    font-size: 14px;
    line-height: 1.4;
}

/* Ajustes Gerais das Etapas */
.etapa input, 
.etapa select, 
.etapa textarea {
    width: 100%;
    border-radius: 8px;
    padding: 12px;
    margin-top: 5px; /* Reduzi de 8px para 5px para o título não ficar longe do campo */
    border: 1px solid #ccc;
    background-color: white;
    font-size: 16px;
    box-sizing: border-box;
}

/* Ajuste para o primeiro item não ter margem no topo e grudar no header */
.etapa:first-of-type {
    margin-top: 15px;
}

.info-grupo {
    margin-bottom: 20px;
}


/* =====================================================
    RODAPÉ AÇÕES
===================================================== */
.rodape-acoes {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    max-width: 800px;
    background: #fff;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.08);
    z-index: 1002;
    gap: 10px;
}

.rodape-acoes.so-avancar {
    justify-content: flex-end;
}

.btn-secundario,
.btn-principal {
    background: var(--marrom);
    color: #fff;
    padding: 12px 18px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
}

/* =====================================================
    UTILITÁRIOS E AJUSTES DE ESPAÇAMENTO
===================================================== */
.hidden {
    display: none !important;
}

/* Aproximar os títulos das caixas de texto/seleção */
.label {
    margin-bottom: 4px;
    display: block;
}

/* Reduzir a distância entre blocos (Encomenda/Observação) */
.mt-lg { 
    margin-top: 15px !important; 
}

/* Ajustes de Cards e Seções */
.card {
    margin: 10px auto !important;
    padding: 20px !important;
}

/* Distância entre Título e Bloco de Descrição */
.etapa h3, .etapa .titulo-etapa {
    margin-top: 10px !important;
    margin-bottom: 5px !important; /* O gap da .etapa já vai completar o espaço */
    font-size: 1.2rem;
    color: #783606;
}

/* Distância entre Bloco Descrição e Título Observação */
.cart-item, .bloco-descricao {
    margin-bottom: 15px !important;
}

/* =====================================================
    OBSERVAÇÕES E TEXTAREA
===================================================== */
textarea, #observacaoPedido, .textarea-box {
    width: 100%;
    margin-top: 5px;
}

#observacaoPedido, .textarea-box {
    margin-bottom: -1px !important;
}

.label-observacao {
    margin-bottom: -30px !important;
    display: block;
}

/* =====================================================
    RODAPÉ DE VALORES (PESO/TOTAL)
===================================================== */
/* --- CONTAINER PAI --- */
.rodape {
    /* 1. Troca o branco pelo rosa */
    background: #FAD5DC !important; 
    
    /* 2. Tira o efeito de ficar grudado (sticky/fixo) */
    position: relative !important; 
    bottom: auto !important;
    
    /* 3. Remove o preenchimento que causava a "moldura" branca */
    padding: 0 !important; 
    
    /* 4. Garante o fechamento total */
    width: 100% !important;
    margin-top: 0 !important;
    z-index: 10;
    text-align: center;
}

.rodape-card {
    background: #FAD5DC !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 40px 20px !important; /* O padding agora fica no filho */
    box-sizing: border-box;
}

.rodape-linha {
    display: flex !important;
    flex-wrap: wrap !important; /* SE NÃO COUBER, ELE PULA LINHA EM VEZ DE SAIR DA TELA */
    justify-content: space-between !important;
    align-items: stretch !important;
    gap: 10px !important;
    width: 100% !important;
}

/* --- BLOCO PREFERÊNCIA --- */
.peso-box {
    flex: 1 1 160px !important; /* Cresce, diminui e tenta ter no mínimo 160px */
    border: 1.5px dashed #CEC6DB; /* var(--lilas) */
    background: #fff;
    padding: 10px;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.peso-box .titulo {
    font-size: 14px;
    font-weight: 600;
    color: #783606; /* var(--marrom) */
    margin-bottom: 5px;
}

/* --- BLOCO TOTAL --- */
.total-card {
    flex: 1 1 140px !important; /* Cresce, diminui e tenta ter no mínimo 140px */
    background: #C5DADB;
    padding: 10px;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* --- ÍCONE E TEXTOS --- */
.icon-small {
    width: 20px !important; /* DIMINUI O ÍCONE NO MOBILE */
    height: auto !important;
    object-fit: contain;
}

.total-label {
  
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 20px;
    color: #783606;
}

#valor_totalRodape {
    font-size: 30px !important; /* Tamanho destaque */
    color: #783606 !important; /* Cor marrom padrão do seu sistema */
    font-weight: 700 !important; /* Extra negrito */
    line-height: 1 !important;
    display: block !important;
}

/* --- AJUSTE MOBILE --- */
@media (max-width: 400px) {
    .rodape-linha {
        flex-direction: column !important; /* Empilha em celulares muito pequenos */
    }
    .peso-box, .total-card {
        width: 100% !important;
        flex: none !important;
    }
}




/* =====================================================
   ETAPA DE PAGAMENTO
===================================================== */

.titulo-pagamento-container {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    padding-left: 5px;
}

.btn-falso-titulo {
    background-color: var(--marrom);
    color: white;
    padding: 10px 20px;
    border-radius: 18px;
    font-weight: bold;
    font-size: 16px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 20px !important;
    display: block !important;
    margin-top: 10px !important;
}

/* Seleção do Método de Pagamento (PIX / Cartão) */
.opcoes-pagamento {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    margin-top: 15px !important;
    gap: 15px !important;
}

.btn-pagamento {
    width: 120px;
    height: 120px;
    border: 2px solid #eee;
    background: white;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.3s;
}

.btn-pagamento:hover {
    border-color: var(--marrom);
    transform: translateY(-3px);
}

.btn-pagamento img {
    width: 50px;
    margin-bottom: 10px;
}

.btn-pagamento span {
    font-weight: bold;
    color: #555;
}

/* =====================================================
   DETALHES DO PIX E FORMULÁRIOS
===================================================== */
.box-pagamento-detalhe {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    border: 1px dashed #ccc;
}

.input-pix {
    width: 100%;
    height: 60px;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px;
    font-size: 12px;
    resize: none;
    background: #fff;
}

.btn-copiar {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    margin-top: 10px;
    cursor: pointer;
}

.form-pagamento {
    margin-top: 20px;
    animation: fadeIn 0.5s ease;
}

/* Integração com Mercado Pago ou Outros Gateway */
#cardPaymentBrick_container {
    width: 100%;
    min-height: 400px;
}

/* =====================================================
   BOTÃO FINALIZAR
===================================================== */
.btn-finalizar {
    width: 100%;
    padding: 15px;
    background-color: var(--marrom);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    margin-top: 15px;
    cursor: pointer;
}

/* =====================================================
   ANIMAÇÕES
===================================================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}


/* =====================================================
   FINALIZAR RESUMO
===================================================== */
.resumo-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bloco-resumo {
    background: #C5DADB;
    border: 1px solid #eee;
    padding: 10px;
    border-radius: 8px;
    text-align: left;
}

.label-resumo {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    color: #783606;
    font-weight: bold;
    margin-bottom: 4px;
}

.conteudo-resumo {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.total-destaque {
    border-color: var(--marrom);
    background-color: #fff9f5;
}

.total-destaque #resumoTotal {
    font-size: 18px;
    color: var(--marrom);
    font-weight: bold;
}

/* =====================================================
   PAGAMENTO E QR CODE
===================================================== */
#qrCodeImg {
    width: 200px;
    height: 200px;
    border: 1px solid #eee;
    padding: 10px;
    background: #fff;
    border-radius: 12px;
    display: block;
    margin: 0 auto; /* Centralização garantida */
}

.btn-copiar {
    background-color: #28a745; /* Verde Pix */
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
}

.btn-pagamento.selected {
    background-color: #e8f5e9;
    border: 2px solid #27ae60;
}

/* =====================================================
   BOTÕES DE VALOR / PORCENTAGEM
===================================================== */
.btn-valor {
    flex: 1;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    transition: 0.3s;
}

.btn-valor.active {
    border-color: var(--marrom);
    background-color: #fdf5f0;
}

.btn-valor strong { 
    font-size: 18px; 
    color: var(--marrom); 
}

.btn-valor span { 
    font-size: 12px; 
    color: #666; 
}

/* =====================================================
   RESUMO DE PERSONALIZADOS (NO CARRINHO)
===================================================== */



.box-opcao {
    flex: 1;
    max-width: calc(50% - 5px);
    background-color: #FAD5DC;
    border-radius: 12px;
    padding: 10px;
    min-height: 95px;
    position: relative;
    display: none; /* Controlado pelo JS */
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    text-align: left;
    transition: transform 0.3s, box-shadow 0.3s;
    margin-bottom: 15px !important;
}

.box-opcao.visivel { display: flex !important; }

.box-opcao span, #titulo-topo-drawer {
    color: #783606 !important;
    font-weight: bold;
    font-size: 13px;
}

#detalhes-topo-carrinho {
    text-align: left;
    width: 100%;
    margin-top: 2px;
    line-height: 1.4;
}

.box-opcao:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    filter: brightness(0.95);
}



@keyframes fadeInSlide {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.resumo-personalizado-card {
    animation: fadeInSlide 0.4s ease forwards;
}

/* =====================================================
   RESUMO DE DOCES (NO CARRINHO)
===================================================== */

#bloco-doces-carrinho .pill {
    display: inline-block;
    margin-bottom: 15px;
}

#lista-doces-itens {
    display: flex;
    flex-direction: column;
    gap: 10px;
}



.animar-batida {
    transform: scale(1.2);
}


/* --- Card azul para os itens de doces no carrinho --- */
.doce-item-carrinho {
    background-color: #C5DADB; /* Azul */
    color: #783606;
    border-radius: 12px;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    position: relative;
    
}

.doce-info-carrinho {
    display: flex;
    flex-direction: column;
}

/* A Lixeira (Ajustada para não flutuar fora do card) */
.doce-item-carrinho .lixeira, 
.lixeira-padrao {
    position: static !important; /* Remove o 'absolute' que fazia ela fugir */
    width: 22px !important;
    height: 22px !important;
    cursor: pointer;
    display: block;
    transition: transform 0.2s ease;
    /* REMOVIDO: filter: brightness(0) invert(1) para manter o marrom original */
}

.lixeira-padrao:hover {
    transform: scale(1.3) rotate(15deg);
    
}

/* A Lixeira (Filha) */
.lixeira {
    position: absolute;
    top: 10px;    /* Ajustado de 5px para 10px para respirar melhor */
    right: 10px;
    width: 18px !important;
    height: 18px !important;
    cursor: pointer;
    z-index: 10 !important;
    display: block !important;
}

#paymentBrick_container {
    width: 100%;
    min-height: 500px; /* Mantém o espaço para não dar "pulo" na tela */
    display: block;
}


/* No seu arquivo CSS */
#pix-container {
    display: none; /* O JS vai mudar para flex */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%; /* Ocupa toda a largura disponível no drawer */
    box-sizing: border-box; /* Garante que o padding não "estoure" a largura */
    padding: 20px;
    margin: 20px 0;
    border: 2px dashed #783606;
    border-radius: 12px;
    background-color: #fdf5e6;
}

#pix-qr-img {
    width: 200px; /* Tamanho fixo ideal para leitura */
    height: 200px;
    background-color: #fff;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    margin-bottom: 15px;
    
}

#pix-copia-e-cola {
    width: 100%; /* Ocupa toda a largura do container */
    max-width: 100%; 
    height: 80px;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 10px;
    font-size: 11px;
    background-color: #fff;
    color: #333;
    resize: none;
    word-break: break-all; /* Quebra o código longo para não sair da caixa */
    margin: 10px 0;
}

@media (max-width: 768px) {
    /* 1. Lixeira e Descrição */
    

   .lixeira {
        position: absolute !important;
        right: 10px !important;
        top: 10px !important;         /* Move para o topo do card */
        transform: none !important;    /* Remove o centramento vertical antigo */
        width: 20px !important;
        height: auto !important;
        z-index: 10 !important;
    }

    .badges span {
        display: inline-flex !important;
        align-items: center !important; /* Centraliza verticalmente o ícone e o texto */
        gap: 4px !important;            /* Espaço entre ícone e número */
    }

    /* 2. Alinhamento Ícones (Peso e Coins) */
   .total-label {
        display: inline-flex !important;
        align-items: center !important;
        gap: 5px !important;
    }

    

    .badges .total-label {
        margin: 0 !important;
        vertical-align: middle !important;
    }

    /* 3. Blocos dentro da margem */
    .observacao, .customizacao-doces, .bloco-produto {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box;
        margin-top: 25px !important;
        margin-bottom: 20px !important;
        display: inline-block;
    }


    [id="etapaCarrinho"] .card-produto {
        position: relative !important;
        /* Cria um espaço de 40px na direita onde o texto não entra */
        padding-right: 40px !important; 
        display: flex !important;
        align-items: flex-start !important;
        overflow: hidden;
    }

    /* 2. Posicionamento da Lixeira no Topo */
    [id="etapaCarrinho"] .lixeira {
        position: absolute !important;
        top: 10px !important;    /* Fixa no topo */
        right: 10px !important;  /* Fixa na direita */
        margin: 0 !important;
        width: 20px !important;
        height: 20px !important;
        z-index: 5 !important;
        transform: none !important; /* Remove qualquer centralização vertical anterior */
    }
    
    /* 3. Garantia para a Descrição */
    [id="etapaCarrinho"] .descricao {
        flex: 1 !important;
        /* Garante que o texto quebre linha antes de tocar na lixeira */
        max-width: calc(100% - 10px) !important; 
    }
}


/* Removemos o :has que estava bugando e usamos uma classe simples */


/* Garante que o contador só apareça se o JS mandar, sem interferência de conflitos de CSS */
/* Localize o ID do seu contador */
#contador-fixo-doces {
    /* 1. Garante que ele flutue sobre o layout flex do body */
    position: fixed !important;
    
    /* 2. Posicionamento estratégico (geralmente embaixo) */
    bottom: 20px !important;
    right: 20px !important;
    
    /* 3. A SOLUÇÃO: Z-index agressivo para vencer o isolation:isolate */
    z-index: 5000 !important;
    
    /* 4. Garante que ele seja visível e não transparente */
    display: flex !important; 
    background-color: #e91e63!important; /* Ou a cor do seu design */
    
    /* 5. Evita que cliques passem por ele ou ele seja ignorado */
    pointer-events: auto !important;
    
    /* Respiro interno para o texto não encostar na borda do contador */
    padding: 10px 15px;
    border-radius: 50px;
    box-shadow: 0px 4px 15px rgba(0,0,0,0.3);
}

/* IMPORTANTE: Remova a regra que esconde o contador se ela estiver atrapalhando */
body.checkout-ativo #contador-fixo-doces {
    /* Mantenha display: none apenas se quiser esconder no checkout real */
   display: none !important; 
}

/* Estilização do Título da Etapa */
.titulo-secao {
    margin-bottom: 20px !important;
    display: block !important;
    margin-top: 10px !important;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.titulo-secao h3 {
    color: #e91e63; /* O rosa que você usa no projeto */
    font-size: 20px;
    margin: 0;
    font-weight: 700;
}

.titulo-secao p {
    color: #000;
    font-size: 14px;
    margin: 5px 0 0 0;
}

/* Ajuste de margem para os blocos flutuantes não colarem no título */
#etapaIdentificacao .form-bloco.floating:first-of-type {
    margin-top: 10px;
}

#etapaIdentificacao .pill-titulo {
    /* 1. O SEGREDO: Faz o bloco ter apenas a largura do texto interno */
    display: inline-block !important; 
    width: auto !important;
    
    /* 2. Mantém o design de 'pílula' */
    background-color: #783606 !important; /* Cor rosa padrão */
    color: #ffffff !important;
    padding: 8px 15px !important; /* Respiro interno horizontal e vertical */
    border-radius: 18px !important; /* Arredondado nas pontas */
    
    /* 3. Ajustes de fonte e alinhamento */
    font-size: 18px !important;
    
    text-align: center !important;
    
    /* 4. Margens para não grudar no que vem depois */
    margin-bottom: 18px !important;
    margin-top: 10px !important;
}

/* Garante que o container acima dele não o force a esticar */
#etapaIdentificacao div:has(> .pill-titulo) {
    text-align: left !important; /* Mantém ele alinhado à esquerda */
    width: 100%;
}

/* Ajuste para mobile no título */
@media (max-width: 768px) {
    .pill-titulo {
        font-size: 12px;
        padding: 5px 15px;
    }
}

#container-preferencia-peso .radio{
    display: flex !important;
    align-items: center !important; /* Alinha bolinha e texto perfeitamente */
    justify-content: flex-start !important;
    
    /* Redução do Bloco */
    padding: 8px 12px !important; /* Padding menor para o bloco ficar mais fino */
    margin-bottom: 5px !important;
    
    border: 1px dashed #783606 !important;
    border-radius: 6px !important;
    width: 100% !important;
    font-size: 14px !important; /* Texto levemente menor para combinar */
    line-height: 1 !important;   /* Garante que não haja folga em cima/baixo */
    color: #783606;
}



#container-preferencia-peso input[type="radio"] {
   -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;

    /* Define o novo tamanho reduzido */
    width: 12px !important; 
    height: 12px !important;
    
    /* Cria a borda da bolinha */
    border: 1.5px solid #783606 !important;
    border-radius: 50% !important;
    
    /* Garante que ela não estique e fique centralizada */
    display: inline-block !important;
    margin: 0 8px 0 0 !important; /* Espaço entre bolinha e texto */
    cursor: pointer;
    vertical-align: middle;
    background-color: #fff;
    position: relative;
}

#container-preferencia-peso .radio span, 
#container-preferencia-peso .radio {
    text-decoration: none !important;
    border: none !important; 
    text-align: left !important;
}

/* Estilo de quando a bolinha está marcada */
#container-preferencia-peso input[type="radio"]:checked {
    background-color: #e91e63 !important;
    border-color: #e91e63 !important;
    
    /* Opcional: Criar um pontinho branco interno se achar que ficou muito pequena */
    box-shadow: inset 0 0 0 2px #fff !important; 
}

/* 1. Título alinhado à esquerda */
#container-preferencia-peso .titulo {
    display: block !important;
    text-align: left !important; /* Move o título para a esquerda */
    font-size: 17px !important;
    font-weight: bold;
    color: #783606;
    margin-bottom: 10px !important;
}

/* Container principal da seção */
.secao-documento {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

/* Alinha CPF e CNPJ lado a lado com espaço */
.opcoes-doc-container {
    display: flex;
    flex-direction: row; /* Garante que fiquem na mesma linha */
    gap: 30px;           /* Espaço entre os blocos */
    align-items: center;
    padding: 5px 0;
}

/* Estilo do bloco Radio + Texto */
.radio-bloco {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    padding: 10px 0;
   
}

.radio-bloco input[type="radio"] {
    width: 15px;
    height: 15px;
    margin: 0;
    
    accent-color: #e91e63; /* Rosa do seu tema */
}


/* Ajuste para o erro não quebrar o layout */
.mensagem-erro {
    color: #e91e63;
    font-size: 12px;
    font-weight: bold;
    display: none;
    margin-top: 5px;
    padding-left: 5px;
}

/* Container do input */
.form-bloco.floating {
    position: relative;
    margin-top: 20px; /* Abre espaço para o label fixo no topo */
}

/* O Label fixo no topo */
.form-bloco.floating label {
    position: absolute;
    left: 12px;
    top: -10px;        /* Move para cima da borda */
    background: white; /* Cor do fundo para cobrir a linha da borda */
    padding: 0 5px;    /* Espaço para o texto não encostar na borda cortada */
    font-size: 12px;
    font-weight: bold;
    color: #8b4513;    /* Marrom do seu tema */
    z-index: 1;
    pointer-events: none;
}

/* Ajuste do Input para não encostar no label */
.form-bloco.floating input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
}

/* AJUSTE MOBILE (Onde estava bugando) */
@media (max-width: 768px) {
    .opcoes-doc-container {
        gap: 40px; /* Aumenta o espaço para o dedo tocar sem errar no mobile */
        justify-content: flex-start;
    }
    
    /* Garante que o input de texto apareça com largura total */
    .form-bloco.floating {
        width: 100% !important;
        display: block !important;
    }
}

/* ... código existente */
@media (max-width: 768px) {

    /* Força o ícone da data a aparecer no mobile */
    input[type="date"] {
        min-height: 45px; /* Altura confortável para o dedo */
        display: flex;
        align-items: center;
    }
}

/* ... código existente */
@media (max-width: 768px) {
    input[type="date"] {
        appearance: none; /* Remove estilos nativos que bugam */
        -webkit-appearance: none;
        min-height: 45px;
        width: 100% !important;
        background-color: #fff;
        position: relative;
    }
    
    /* Força o texto a aparecer preto e legível */
    input[type="date"]::before {
        content: attr(placeholder);
        width: 100%;
    }
}