/* ================================
   🛒 BOTÃO FLUTUANTE DO CARRINHO
================================ */
.btn-carrinho-flutuante {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background: linear-gradient(135deg, #b71c1c, #d50000);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 65px;
  height: 65px;
  font-size: 28px;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.35);
  z-index: 999;
  transition: 0.3s ease;
}

.btn-carrinho-flutuante:hover {
  background: linear-gradient(135deg, #d50000, #b71c1c);
  transform: scale(1.1);
}

/* Contador (badge) do carrinho */
.contador-carrinho {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #ff0000;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

/* ================================
   🧾 MODAL DO CARRINHO
================================ */
/* ================================
   🧾 MODAL DO CARRINHO
================================ */
.modal-carrinho {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-carrinho.show {
  display: flex;
}

.modal-carrinho-content {
  background: #ffffff;
  color: #222;
  width: 92%;
  max-width: 720px;
  max-height: 90vh;
  border-radius: 18px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  font-family: "Poppins", sans-serif;
  border-top: 5px solid #b71c1c;
}

/* ================================
   🔺 CABEÇALHO
================================ */
.topo-carrinho,
.topo-etapa {
  padding: 18px 22px 10px;
  background: linear-gradient(135deg, #b71c1c, #d50000);
  color: #fff;
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: flex-start;
}

.topo-etapa {
  border-top: 1px solid rgba(255, 255, 255, 0.25);
}

.topo-carrinho h2,
.topo-etapa h3 {
  margin: 4px 0 2px;
  font-weight: 600;
}

.subtitulo-carrinho {
  margin: 0;
  font-size: 0.85rem;
  opacity: 0.9;
}

.chip-etapa {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  font-size: 0.75rem;
}

/* Botão X */
.topo-carrinho {
  padding: 18px 22px 10px;
  background: linear-gradient(135deg, #b71c1c, #d50000);
  color: #fff;
  display: flex;
  flex-direction: column;       /* empilha os itens verticalmente */
  align-items: center;          /* centraliza horizontalmente */
  text-align: center;           /* centraliza textos dentro do div */
  gap: 8px;
  position: relative;           /* permite posicionar o botão ✕ */
 
}

/* Centraliza os textos */
.topo-carrinho h2 {
  margin: 6px 0 2px;
  font-size: 1.4rem;
}

.topo-carrinho .subtitulo-carrinho {
  font-size: 0.9rem;
  opacity: 0.9;
}

/* Posiciona o botão ✕ no canto superior direito */
.btn-fechar-x {
  position: absolute;
  top: 12px;
  right: 14px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  transition: 0.25s;
    
  /* 💎 centraliza o conteúdo dentro do botão */
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;  /* garante alinhamento perfeito */
}
.btn-fechar-x:hover {
  background: rgba(0, 0, 0, 0.25);
  transform: scale(1.1);
}


/* ================================
   📦 CORPO DO MODAL
================================ */
.aba-conteudo {
  display: none;
  padding: 16px 20px 18px;
  background: #fafafa;
  animation: fadeSlide 0.25s ease;
  flex: 1;
  overflow: hidden;
}

.aba-conteudo.ativa {
  display: block;
}

.box-tabela-carrinho {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #eee;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.03);
}

/* ================================
   🧮 TABELA DO CARRINHO
================================ */
.box-tabela-carrinho table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.box-tabela-carrinho thead {
  background: #b71c1c;
}

.box-tabela-carrinho th {
  color: #fff;
  padding: 10px 8px;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
}

.box-tabela-carrinho th:first-child,
.box-tabela-carrinho td:first-child {
  text-align: left;
  padding-left: 14px;
}

.box-tabela-carrinho td {
  border-top: 1px solid #eee;
  padding: 9px 8px;
  text-align: center;
  vertical-align: middle;
  background: #fff;
}

.box-tabela-carrinho tbody tr:nth-child(odd) td {
  background: #fcfcfc;
}

.box-tabela-carrinho tbody tr:hover td {
  background: #fff5f5;
}

/* 3ª coluna = Total (R$) à direita */
.box-tabela-carrinho td:nth-child(3),
.box-tabela-carrinho th:nth-child(3) {
  text-align: right;
}

/* ================================
   ⚙️ QUANTIDADE
================================ */
.col-qtd {
  white-space: nowrap;
}

.qtd-box {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.qtd-box .btnQtd {
  background: #b71c1c;
  color: #fff;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qtd-box .btnQtd:hover {
  background: #d50000;
  transform: scale(1.05);
}

.qtd-box .qtd {
  min-width: 24px;
  text-align: center;
  font-weight: 600;
}

/* ================================
   ❌ REMOVER ITEM
================================ */
.btn-remover {
  background: #e53935;
  color: #fff;
  border: none;
  border-radius: 6px;
  width: 38px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.9rem;
  transition: 0.2s ease;
}

.btn-remover:hover {
  background: #c62828;
  transform: scale(1.05);
}

/* ================================
   💰 TOTAL + AÇÕES (RODAPÉ)
================================ */
.rodape-carrinho {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.total-label {
  font-size: 1.1rem;
  font-weight: 600;
  color: #b71c1c;
  text-align: right;
}

.acoes {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Botões principais */
.btn-primario,
.btn-secundario,
.modal-carrinho button {
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: 0.2s ease;
}

/* 🔴 Primário vermelho */
.btn-primario {
  background: linear-gradient(135deg, #b71c1c, #d50000);
  color: #fff;
  box-shadow: 0 3px 10px rgba(183, 28, 28, 0.35);
}

.btn-primario:hover {
  background: linear-gradient(135deg, #d50000, #b71c1c);
  transform: translateY(-1px);
}

/* ⚪ Secundário contornado */
.btn-secundario {
  background: #fff;
  color: #b71c1c;
  border: 1px solid #b71c1c;
}

.btn-secundario:hover {
  background: #fff5f5;
}

/* ================================
   ✅ AVISO DE ITEM ADICIONADO
================================ */
.aviso-carrinho {
  position: fixed;
  bottom: 100px;
  right: 25px;
  background: #43a047;
  color: #fff;
  padding: 10px 22px;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
  font-weight: 500;
  animation: fadeAviso 0.4s ease;
  z-index: 9999;
}

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

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

/* ================================
   🔒 LGPD
================================ */
.lgpd-termo {
  margin-top: 15px;
  background: #f8f8f8;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  color: #333;
}

.lgpd-termo input {
  margin-top: 3px;
  transform: scale(1.1);
}

.lgpd-termo a {
  color: #b71c1c;
  text-decoration: underline;
}

/* ================================
   📱 MOBILE
================================ */
@media (max-width: 980px) {
  .modal-carrinho {
    align-items: stretch;
    justify-content: stretch;
  }

  .modal-carrinho-content {
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    border-radius: 0;
  }

  .aba-conteudo {
    padding: 12px 12px 14px;
  }

  .box-tabela-carrinho {
    max-height: 55vh;
    overflow-y: auto;
  }

  .box-tabela-carrinho table {
    font-size: 0.9rem;
  }

  .total-label {
    text-align: center;
  }

  .acoes {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-primario,
  .btn-secundario {
    width: 100%;
  }
}
