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

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

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

.modal-carrinho-content {
  background: #fff;
  color: #222;
  padding: 35px;
  border-radius: 12px;
  max-width: 650px;
  width: 92%;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  animation: fadeIn 0.3s ease;
  font-family: "Poppins", sans-serif;
}

/* ================================
   ⚙️ AJUSTE DE QUANTIDADE (NÃO DEFORMAR)
================================ */
/* ================================
   🧮 TABELA DO CARRINHO (AJUSTADA)
================================ */
.modal-carrinho table {
  width: 100%;
  border-collapse: collapse;
  margin: 15px 0;
  font-size: 0.95rem;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
}

/* Cabeçalho */
.modal-carrinho th {
  background: #b71c1c;
  color: #fff;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 10px;
  text-align: center;
  white-space: nowrap;
}

/* Células */
.modal-carrinho td {
  border-bottom: 1px solid #ddd;
  padding: 10px;
  color: #333;
  text-align: center;
  vertical-align: middle;
}

/* Alinhamento das colunas numéricas */
.modal-carrinho td:nth-child(3),
.modal-carrinho td:nth-child(4),
.modal-carrinho th:nth-child(3),
.modal-carrinho th:nth-child(4) {
  text-align: right;
}

/* Item (primeira coluna) fica à esquerda */
.modal-carrinho td:first-child {
  text-align: left;
  max-width: 220px;
  word-wrap: break-word;
}

/* === Coluna de Quantidade === */
.col-qtd {
  text-align: center;
  white-space: nowrap;
}

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

.qtd-box .btnQtd {
  background: #b71c1c;
  color: #fff;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: bold;
  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: 28px;
  text-align: center;
  font-weight: 600;
}

/* === Ícone de remover === */
.btn-remover {
  background: #b71c1c;
  color: #fff;
  border: none;
  border-radius: 8px;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: 0.3s;
}

.btn-remover:hover {
  background: #d50000;
  transform: scale(1.1);
}

/* === Rolagem lateral para tabelas grandes === */
.modal-carrinho table {
  display: block;
  overflow-x: auto;
  white-space: nowrap;
}

/* Scrollbar estilizada */
.modal-carrinho table::-webkit-scrollbar {
  height: 8px;
}

.modal-carrinho table::-webkit-scrollbar-thumb {
  background: #b71c1c;
  border-radius: 6px;
}



/* ================================
   🧾 ROLAGEM QUANDO TEM MUITOS ITENS
================================ */
.modal-carrinho-content {
  max-height: 90vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #b71c1c #eee;
}

.modal-carrinho-content::-webkit-scrollbar {
  width: 8px;
}

.modal-carrinho-content::-webkit-scrollbar-thumb {
  background: #b71c1c;
  border-radius: 6px;
}



@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ================================
   🧮 TABELA DO CARRINHO
================================ */
.modal-carrinho table {
  width: 100%;
  border-collapse: collapse;
  margin: 15px 0;
  font-size: 0.95rem;
}

.modal-carrinho th,
.modal-carrinho td {
  border-bottom: 1px solid #ddd;
  padding: 8px;
  text-align: center;
}

.modal-carrinho th {
  background: #b71c1c;
  color: #fff;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.modal-carrinho td {
  color: #333;
}

/* ================================
   ⚙️ BOTÕES DE QUANTIDADE
================================ */
.btnQtd {
  background: #b71c1c;
  color: #fff;
  border: none;
  padding: 6px 10px;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  margin: 0 4px;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.btnQtd:hover {
  background: #d50000;
}

.qtd {
  font-weight: 600;
  font-size: 1rem;
  margin: 0 6px;
}

/* ================================
   🗑️ BOTÃO REMOVER ITEM
================================ */
.btn-remover {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  color: #b71c1c;
  transition: 0.3s;
}

.btn-remover:hover {
  color: #d50000;
  transform: scale(1.2);
}

/* ================================
   💰 TOTAL E AÇÕES
================================ */
#totalCarrinho {
  font-size: 1.2rem;
  font-weight: 600;
  text-align: right;
  margin-top: 15px;
  color: #b71c1c;
}

.modal-carrinho .acoes {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

/* Botões principais */
.modal-carrinho button {
  background: linear-gradient(90deg, #b71c1c, #d50000);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: 0.3s;
  font-size: 0.95rem;
}

.modal-carrinho button:hover {
  background: linear-gradient(90deg, #d50000, #b71c1c);
  transform: scale(1.05);
}

.modal-carrinho .fechar {
  background: #444;
}

.modal-carrinho .fechar:hover {
  background: #000;
}

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

.modal-carrinho td:nth-child(3),
.modal-carrinho td:nth-child(4),
.modal-carrinho th:nth-child(3),
.modal-carrinho th:nth-child(4) {
  text-align: right;
}

/* === Abas === */
.abas-carrinho {
  display: flex;
  justify-content: center;
  margin-bottom: 15px;
  gap: 10px;
}

.aba-btn {
  background: #b71c1c;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s;
}

.aba-btn:hover {
  background: #d50000;
}

.aba-btn.ativa {
  background: #000;
}

/* === Conteúdo das abas === */
/* === Controle das telas === */
.aba-conteudo {
  display: none;
  animation: fadeSlide 0.4s ease;
}

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

/* === Transição suave === */
@keyframes fadeSlide {
  from {
    opacity: 0;
    transform: translateY(15px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}



/* === Formulário do cliente === */
#formCliente {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 15px;
}

#formCliente input,
#formCliente textarea {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  width: 100%;
  font-family: "Poppins", sans-serif;
}

#formCliente input:focus,
#formCliente textarea:focus {
  outline: 2px solid #b71c1c;
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* ================================
   📱 RESPONSIVIDADE
================================ */
@media (max-width: 980px) {

  /* === Modal === */
  .modal-carrinho-content {
    padding: 18px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 10px;
  }

  /* === Tabela rolável lateralmente === */
  .modal-carrinho table {
    display: block;
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    border-collapse: collapse;
  }

  .modal-carrinho th,
  .modal-carrinho td {
    font-size: 0.9rem;
    padding: 8px 6px;
    text-align: center;
    vertical-align: middle;
  }

  .modal-carrinho th,
  .modal-carrinho td {
    font-size: 0.9rem;
    padding: 8px 6px;
  }

  .qtd-box .btnQtd {
    width: 35px;
    height: 35px;
  }

  .qtd-box .qtd {
    min-width: 26px;
    font-size: 0.95rem;
  }

  .modal-carrinho td:first-child {
    max-width: 160px;
  }

  .modal-carrinho th:first-child,
  .modal-carrinho td:first-child {
    text-align: left;
  }

  /* === Corrige botões de quantidade === */
  .modal-carrinho td:nth-child(2) {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
  }

  .btnQtd {
    background: #b71c1c;
    color: #fff;
    border: none;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
  }

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

  .btnQtd:active {
    transform: scale(0.9);
  }

  .qtd {
    font-size: 1rem;
    font-weight: 600;
    color: #000;
    min-width: 28px;
    text-align: center;
  }

  /* === Ícone de remover centralizado === */
  .btn-remover {
    width: 40px;
    height: 40px;
    background: #b71c1c;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
    border: none;
    cursor: pointer;
  }

  .btn-remover:hover {
    background: #d50000;
  }

  /* === Total e botões principais === */
  #totalCarrinho {
    font-size: 1rem;
    text-align: center;
    margin-top: 15px;
    color: #b71c1c;
  }

  .modal-carrinho .acoes {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-top: 20px;
  }

  .modal-carrinho button {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    border-radius: 8px;
  }

  /* === Botão flutuante === */
  .btn-carrinho-flutuante {
    width: 60px;
    height: 60px;
    font-size: 26px;
    bottom: 22px;
    right: 22px;
  }

  /* === Scrollbar leve === */
  .modal-carrinho table::-webkit-scrollbar {
    height: 6px;
  }

  .modal-carrinho table::-webkit-scrollbar-thumb {
    background: #b71c1c;
    border-radius: 4px;
  }

  /* === Aviso flutuante === */
  .aviso-carrinho {
    bottom: 85px;
    right: 15px;
    font-size: 0.95rem;
    padding: 12px 18px;
    border-radius: 8px;
  }
}

.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 {
  max-width: 25px;
  margin-top: 3px;
  transform: scale(1.1);
}

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