/* ============================================================
   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;
    top: 0;
    right: -100%; /* Começa escondido à direita */
    width: 50%;
    height: 100vh;
    background: #fff;
    z-index: 2001;
    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: 30px;     /* Espaçamento interno */
}

.etapa {
    
    display: flex;
    flex-direction: column;
    gap: 15px;
    /* Espaço extra no final da rolagem */
}


.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;
}

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

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



/* Garante que o container alinhe os itens lado a lado */
.confirmacoes {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

@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)
===================================================== */
#etapaCarrinho,
#etapaPagamento,
#etapaFinalizar {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 120px;
}

#etapaIdentificacao {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 24px 24px 140px;
}

/* =====================================================
   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: flex;
  flex-direction: column;
  gap: 10px;
}

.card-produto {
  position: relative;
  background: #C5DADB;
  border-radius: 18px;
  padding: 12px;
  display: flex;
  gap: 20px;
}

.img-bolo {
  width: 80px;
  height: 120px;
  border-radius: 10px;
  object-fit: cover;
}

.descricao {
  flex: 1;
  font-size: 15px;
  color: #333;
}

.badges {
  display: flex;
  gap: 16px;
  margin-top: 20px;
}

.icon {
  width: 20px;
  height: auto;
}



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

/* =====================================================
   CONFIRMAÇÕES (Lado a Lado)
===================================================== */
.confirmacoes {
  display: flex;       /* Ativa o alinhamento em linha */
  flex-direction: row; /* Garante que fiquem um ao lado do outro */
  gap: 10px;           /* Espaço entre os dois blocos */
  margin: 10px 0;      /* Distância dos blocos de cima e baixo */
  width: 100%;         /* Ocupa a largura total do carrinho */
}

.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 {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.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 */


.rodape {
  position: relative;
  background: #fff;
  padding: 50px 0 20px;
  
}

/* 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;
}


html, body {
    max-width: 100%;
    overflow-x: hidden; /* Impede rolagem lateral */
    height: auto;
    min-height: 100%;
    margin: 0;
    padding: 0;
}
/* PESO */
/* PESO - Container Principal */
.peso-box {
 /* flex-grow: 0, flex-shrink: 0, flex-basis: calc(60% - metade do gap) */
  flex: 0 0 calc(60% - 6px) !important; 
  
  border: 1.5px dashed var(--lilas);
  background: #fff;
  padding: 12px;
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  box-sizing: border-box;

}

.peso-box .titulo {
  font-size: 16px;
  font-weight: 600;
  color: var(--marrom);
  margin-bottom: 4px; /* Aproxima o título das bolinhas */
  display: block;
  width: 100%;
}



/* Ajuste das Bolinhas e Escrita */
.radio {
  display: flex;
  align-items: center; /* Centraliza a bolinha com o meio do texto */
  justify-content: flex-start; /* Garante que comece na esquerda */
  gap: 8px; /* Distância curta entre bolinha e texto */
  font-size: 15px;
  color: #000;
  cursor: pointer;
  width: auto; /* Não deixa a label ocupar a linha toda se não precisar */
}

/* Garante que o input (bolinha) não tenha margens estranhas */
.radio input[type="radio"] {
  margin: 0; 
  cursor: pointer;
  width: 15px; /* Tamanho da bolinha */
  height: 15px;
}

/* Ajuste da linha do rodapé para aproximar os blocos */
.rodape-linha {
  display: flex;
  flex-direction: row; /* Garante que fiquem lado a lado */
  align-items: stretch; /* Faz os dois blocos terem a mesma altura */
  gap: 0px; /* ZERADO: Para os blocos realmente encostarem um no outro */
  margin-top: 10px;
  width: 100%;
}

/* TOTAL */
.total-coluna {
  display: flex;
  justify-content: flex-end; /* Empurra tudo para a direita */
  width: 100%;
  margin-top: 10px;
}

/* AJUSTE SÊNIOR: UNIFICAÇÃO DO CARTÃO DE TOTAL */
.total-card {
 /* flex-grow: 0, flex-shrink: 0, flex-basis: calc(40% - metade do gap) */
  flex:   calc(40% - 15px) !important;

  background: #C5DADB;
  padding: 15px;
  display: flex;
  flex-direction: column ;
  justify-content: center ;
  align-items: center ;
  text-align: center;
  gap: 5px;
  border-radius: 18px;
  box-sizing: border-box;
 
}

/* 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;
}


/* Linha da Imagem + Texto Valor Total */
.total-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px; /* Espaço entre o ícone e o texto */
  width: 100%;
  font-size: 20px; /* Ajuste conforme necessário */
  color: #783606; /* Substitua pela sua var(--marrom) */
  margin-bottom: 5px; /* Espaço para o preço ficar embaixo */
}

/* Preço embaixo */
#valorTotalRodape {
  font-size: 25px;
  font-weight: bold;
  color: #783606;
  display: block;
}


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

.total-card strong {
  font-size: 25px;
  color: var(--marrom);
}

.total-card img,
.icon-small {
  width: 22px;
  height: auto;
}

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

/* Estilos de Base para os Campos (Evita repetição) */
.form-bloco.floating input,
.form-linha input, 
.form-linha select,
.etapa input, 
.etapa select, 
.etapa textarea {
    width: 100%;
    border-radius: 8px;
    outline: none;
    background-color: white;
}

/* 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;
}

.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;
    margin-top: 15px;
    width: 100%;
}

.form-linha .form-bloco {
    flex: 1;
    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;
}

/* 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 {
    padding: 12px;
    margin-top: 8px;
    border: 1px solid #ccc;
    font-size: 16px;
}

.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-bottom: 15px !important;
}

/* 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)
===================================================== */
.rodape {
    margin-top: -10px !important;
    padding-top: 0 !important;
}

.rodape-linha {
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch !important;
  width: 100% !important;
  /* AQUI VOCÊ CONTROLA O ESPAÇAMENTO: */
  gap: 15px !important; 
  margin-top: 15px;
  box-sizing: border-box;
}

/* =====================================================
    RESPONSIVIDADE
===================================================== */
@media (max-width: 768px) {
    .rodape-acoes {
        width: 100%;
    }
}


/* =====================================================
   ETAPA DE PAGAMENTO
===================================================== */
#etapaPagamento {
    padding-top: 20px;
    margin-top: 10px;
}

.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);
    display: inline-block;
}

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

.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)
===================================================== */

.confirmacoes-container {
    display: flex;
    flex-direction: row;
    gap: 10px;
    width: 100%;
    justify-content: space-between;
    box-sizing: border-box;
}

.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;
}

.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;
}



.total-coluna {
    margin-left: auto; /* Garante que o total fique na direita */
    min-width: 150px;

}

/* Animação do Ícone de Carrinho */
.cart-count {
    transition: transform 0.2s ease;
}

.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; /* Ela flutua livremente DENTRO do card */
    top: 5px;    /* Distância do topo do card */
    right: 5px;  /* Distância da direita do card */
    width: 18px !important;  /* Força o tamanho se houver conflito */
    height: 18px !important;
    cursor: pointer;
    z-index: 10;
    display: block !important; /* Garante que não esteja escondida */
}

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

/* Remova o .active se você estiver usando a classe .hidden para controlar as etapas */
#etapaFinalizar {
    width: 100%;
}







