/* =============== CARRINHO LAYOUT =============== */
.carrinho {
  max-width: 900px;
  margin: 60px auto;
  padding: 30px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

.carrinho h2 {
  text-align: center;
  color: var(--rosa);
  margin-bottom: 30px;
}

/* =============== ITEM =============== */
.carrinho-item {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid #eee;
  animation: fadeIn 0.4s ease;
}

.carrinho-item.removendo {
  opacity: 0;
  transform: translateX(20px);
  transition: 0.4s;
}

.carrinho-item img {
  width: 80px;
  border-radius: 10px;
  object-fit: contain;
}

.carrinho-item button {
  background: none;
  border: none;
  color: red;
  font-size: 18px;
  cursor: pointer;
  transition: transform 0.2s;
}

.carrinho-item button:hover {
  transform: scale(1.2);
}

/* =============== TOTAIS =============== */
.carrinho-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 18px;
  margin: 20px 0;
  padding: 12px 0;
  border-top: 1px solid #f0f0f0;
}

.total-final {
  font-size: 22px;
  font-weight: bold;
  color: var(--rosa);
  border-top: 2px solid var(--rosa);
  margin-top: 10px;
  padding-top: 16px;
}

/* =============== FRETE =============== */
.frete-box {
  margin: 25px 0;
  padding: 20px;
  background: #fafafa;
  border-radius: 15px;
}

.frete-box h3 {
  margin-bottom: 12px;
  color: #555;
}

.frete-box input {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #ddd;
  margin-bottom: 10px;
  font-size: 15px;
  transition: border 0.2s;
}

.frete-box input:focus {
  outline: none;
  border-color: var(--rosa);
}

.frete-box button {
  width: 100%;
  padding: 12px;
  border-radius: 20px;
  border: none;
  background: var(--rosa);
  color: #fff;
  cursor: pointer;
  font-size: 15px;
  transition: opacity 0.2s;
}

.frete-box button:hover {
  opacity: 0.85;
}

#frete-resultado {
  margin-top: 12px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.7;
  color: #555;
}

/* =============== PAGAMENTO =============== */
.pagamento-box {
  margin: 25px 0;
  padding: 24px;
  background: linear-gradient(135deg, rgba(168,216,255,0.15), rgba(255,241,168,0.15));
  border-radius: 18px;
  border: 1px solid rgba(217,108,138,0.15);
}

.pagamento-box h3 {
  color: var(--rosa);
  margin-bottom: 18px;
  font-size: 18px;
}

/* OPÇÕES DE PAGAMENTO */
.pagamento-opcoes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 20px;
}

.opcao-pagamento {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px 14px;
  border-radius: 16px;
  border: 2px solid #e0e0e0;
  background: #fff;
  cursor: pointer;
  transition: all 0.25s ease;
}

.opcao-pagamento:hover {
  border-color: var(--rosa);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(217,108,138,0.15);
}

.opcao-pagamento.ativo {
  border-color: var(--rosa);
  background: linear-gradient(135deg, rgba(217,108,138,0.08), rgba(168,216,255,0.12));
  box-shadow: 0 6px 18px rgba(217,108,138,0.2);
}

.opcao-icon {
  font-size: 28px;
}

.opcao-label {
  font-size: 15px;
  font-weight: 600;
  color: #333;
}

.opcao-desc {
  font-size: 12px;
  color: #888;
}

.opcao-pagamento.ativo .opcao-desc {
  color: var(--rosa);
  font-weight: 500;
}

/* =============== PIX =============== */
.pix-detalhes {
  animation: fadeIn 0.4s ease;
  padding: 20px;
  background: #fff;
  border-radius: 16px;
  border: 2px dashed rgba(217,108,138,0.3);
}

.desconto-badge {
  display: inline-block;
  background: linear-gradient(135deg, #ff6b9d, #ff9a3c);
  color: #fff;
  padding: 8px 18px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 14px;
  animation: pulse 1.5s ease infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

.total-com-desconto {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 17px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f0f0f0;
}

.total-com-desconto strong {
  color: var(--rosa);
  font-size: 22px;
}

/* Instruções PIX */
.pix-instrucoes {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pix-instrucoes p {
  font-size: 14px;
  color: #666;
  text-align: center;
}

/* QR Code */
.qr-wrapper {
  display: flex;
  justify-content: center;
}

.qr-code {
  width: 180px;
  height: 180px;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(217,108,138,0.2);
  border: 4px solid #fff;
  outline: 2px solid rgba(217,108,138,0.2);
}

/* Chave PIX */
.pix-chave-box {
  background: #f8f8f8;
  border-radius: 12px;
  padding: 14px 16px;
}

.pix-chave-label {
  font-size: 12px;
  color: #999;
  display: block;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pix-chave-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.pix-chave-row code {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  color: #333;
  background: none;
  letter-spacing: 0.5px;
}

.btn-copiar {
  background: var(--rosa);
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.btn-copiar:hover {
  opacity: 0.85;
  transform: scale(1.05);
}

.pix-aviso {
  background: rgba(255, 200, 100, 0.2);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  color: #a07820 !important;
  text-align: left !important;
}

/* =============== CARTÃO =============== */
.cartao-detalhes {
  animation: fadeIn 0.4s ease;
  padding: 20px;
  background: #fff;
  border-radius: 16px;
  text-align: center;
}

.cartao-info {
  font-size: 14px;
  color: #666;
  margin-bottom: 16px;
  line-height: 1.6;
}

.total-cartao {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 17px;
  background: #f8f8f8;
  padding: 14px 18px;
  border-radius: 12px;
}

.total-cartao strong {
  color: var(--rosa);
  font-size: 20px;
}

/* =============== BOTÕES FINAIS =============== */
.carrinho-botoes {
  display: flex;
  gap: 15px;
  margin-top: 10px;
}

.btn-voltar,
.btn-finalizar {
  flex: 1;
  padding: 14px;
  border-radius: 30px;
  text-align: center;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.25s;
}

.btn-voltar {
  background: #eee;
  color: #333;
}

.btn-voltar:hover {
  background: #e0e0e0;
}

.btn-finalizar {
  background: var(--rosa);
  color: #fff;
  border: none;
}

.btn-finalizar:hover {
  opacity: 0.88;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(217,108,138,0.35);
}

.btn-limpar {
  width: 100%;
  margin-top: 14px;
  padding: 12px;
  border-radius: 30px;
  border: 1px solid #ddd;
  background: #fafafa;
  color: #888;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.btn-limpar:hover {
  background: #fff0f3;
  border-color: var(--rosa);
  color: var(--rosa);
}

/* =============== TOAST =============== */
#toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--rosa);
  color: #fff;
  padding: 12px 22px;
  border-radius: 30px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: 0.4s;
  z-index: 9999;
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

#toast.show {
  opacity: 1;
}

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

/* =============== CONTADOR DE VISITAS =============== */
#visit-counter {
  margin-top: 12px;
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.3px;
}

/* =============== RESPONSIVO =============== */
@media (max-width: 600px) {
  .carrinho {
    margin: 16px;
    padding: 20px;
  }

  .pagamento-opcoes {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .opcao-pagamento {
    padding: 14px 10px;
  }

  .opcao-label {
    font-size: 13px;
    text-align: center;
  }

  .carrinho-botoes {
    flex-direction: column;
  }

  .qr-code {
    width: 150px;
    height: 150px;
  }
}

@media (max-width: 480px) {
  .carrinho {
    margin: 10px;
    padding: 16px;
    border-radius: 16px;
  }

  .carrinho h2 { font-size: 20px; }

  .carrinho-item {
    grid-template-columns: 64px 1fr auto;
    gap: 12px;
  }

  .carrinho-item img { width: 64px; }
  .carrinho-item h4 { font-size: 13px; }

  .pagamento-opcoes { grid-template-columns: 1fr 1fr; gap: 8px; }
  .opcao-pagamento { padding: 12px 8px; }
  .opcao-icon { font-size: 22px; }
  .opcao-label { font-size: 12px; }
  .opcao-desc { font-size: 11px; }

  .btn-voltar, .btn-finalizar { font-size: 14px; padding: 12px; }
  .btn-limpar { font-size: 13px; }

  .frete-box h3 { font-size: 16px; }
  .pagamento-box h3 { font-size: 16px; }

  .total-com-desconto { font-size: 15px; }
  .total-com-desconto strong { font-size: 19px; }

  .carrinho-total { font-size: 15px; }
  .total-final strong, .total-final span { font-size: 15px; }
}


/* ================================================
   CONFIRMAÇÃO + FORMULÁRIO DE AVALIAÇÃO
================================================ */
.confirmacao-section {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: linear-gradient(160deg, #fff9fc 0%, #f0f7ff 100%);
}

.confirmacao-box {
  background: white;
  border-radius: 24px;
  padding: 40px 36px;
  max-width: 520px;
  width: 100%;
  text-align: center;
  box-shadow: 0 12px 48px rgba(217,108,138,0.12);
  border: 1px solid #f8e0ea;
}

.confirmacao-check {
  width: 72px; height: 72px;
  background: linear-gradient(135deg, #D96C8A, #ff9ac1);
  color: white;
  font-size: 36px;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  animation: popIn .5s cubic-bezier(.22,1,.36,1);
}
@keyframes popIn {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.confirmacao-box h2 { font-size: 22px; color: #333; margin-bottom: 10px; }
.confirmacao-box > p { color: #777; font-size: 15px; margin-bottom: 28px; }

/* Bloco de avaliação */
.avaliacao-box {
  background: #fff9fc;
  border: 1.5px solid #f8d8e8;
  border-radius: 18px;
  padding: 24px 22px;
  margin-bottom: 24px;
  text-align: left;
}
.avaliacao-box h3 { text-align: center; font-size: 17px; color: #D96C8A; margin: 0 0 6px; }
.avaliacao-sub    { text-align: center; font-size: 13px; color: #aaa; margin-bottom: 16px; }

/* Estrelas */
.estrelas-input {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
}
.estrela-btn {
  font-size: 32px;
  color: #e0d0d8;
  cursor: pointer;
  transition: color .15s, transform .15s;
  line-height: 1;
  user-select: none;
}
.estrela-btn.ativa  { color: #f5c842; }
.estrela-btn:hover  { transform: scale(1.2); }

/* Inputs */
.avaliacao-box input,
.avaliacao-box textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 14px;
  border: 1.5px solid #e8d0da;
  border-radius: 12px;
  font-size: 14px;
  color: #444;
  background: white;
  margin-bottom: 10px;
  font-family: inherit;
  outline: none;
  resize: vertical;
  transition: border-color .2s;
}
.avaliacao-box input:focus,
.avaliacao-box textarea:focus { border-color: #D96C8A; }

.av-contador {
  display: block;
  text-align: right;
  font-size: 12px;
  color: #bbb;
  margin-top: -6px;
  margin-bottom: 14px;
}

.btn-enviar-av {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #D96C8A, #e8a0b8);
  color: white;
  border: none;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .2s;
}
.btn-enviar-av:hover    { opacity: .88; }
.btn-enviar-av:disabled { opacity: .55; cursor: default; }

.av-obrigado {
  text-align: center;
  color: #388e3c;
  font-weight: 600;
  font-size: 15px;
  margin-top: 10px;
}

.btn-voltar-home {
  display: inline-block;
  margin-top: 8px;
  color: #D96C8A;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}
.btn-voltar-home:hover { text-decoration: underline; }

/* Mobile */
@media (max-width: 480px) {
  .confirmacao-box { padding: 28px 18px; border-radius: 18px; }
  .confirmacao-check { width: 58px; height: 58px; font-size: 28px; }
  .confirmacao-box h2 { font-size: 18px; }
  .estrela-btn { font-size: 26px; }
}
