/* =======================
   Carrinho - BioTech CSS
   ======================= */

/* Container do carrinho */
.carrinho-container {
  max-width: 1200px;
  margin: 30px auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* Header do carrinho */
.carrinho-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.carrinho-title {
  font-size: 2rem;
  color: #1a4f2b;
}

/* Conteúdo principal do carrinho */
.carrinho-content {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
}

/* Itens do carrinho */
.carrinho-items {
  flex: 2;
  min-width: 300px;
}

.carrinho-item {
  display: flex;
  gap: 20px;
  padding: 20px;
  background-color: white;
  border-radius: 15px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
  align-items: center;
}

.carrinho-item-img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  border-radius: 10px;
}

.carrinho-item-details {
  flex: 1;
}

.carrinho-item-title {
  font-size: 1.2rem;
  font-weight: bold;
  color: #1a4f2b;
  margin-bottom: 5px;
}

.carrinho-item-price {
  font-size: 1.1rem;
  color: #28a745;
  font-weight: bold;
  margin-bottom: 10px;
}

.carrinho-item-actions {
  display: flex;
  gap: 15px;
  align-items: center;
}

.quantity-selector {
  display: flex;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 5px;
  overflow: hidden;
}

.quantity-btn {
  background-color: #f5f5f5;
  border: none;
  padding: 5px 10px;
  cursor: pointer;
  font-size: 16px;
}

.quantity-input {
  width: 40px;
  text-align: center;
  border: none;
  border-left: 1px solid #ddd;
  border-right: 1px solid #ddd;
  padding: 5px;
}

.remove-item {
  color: #dc3545;
  text-decoration: none;
  font-size: 14px;
  cursor: pointer;
}

/* Resumo do Pedido */
.carrinho-summary {
  flex: 1;
  background-color: white;
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  height: fit-content;
}

.summary-title {
  font-size: 1.3rem;
  font-weight: bold;
  color: #1a4f2b;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.summary-label {
  color: #666;
}

.summary-value {
  font-weight: 600;
}

.total-row {
  margin-top: 20px;
  padding-top: 10px;
  border-top: 1px solid #eee;
  font-size: 1.2rem;
  font-weight: bold;
}

.checkout-btn {
  background-color: #28a745;
  color: white;
  border: none;
  padding: 12px;
  width: 100%;
  border-radius: 5px;
  font-size: 1rem;
  font-weight: 600;
  margin-top: 20px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.checkout-btn:hover {
  background-color: #218838;
}

.continue-shopping {
  display: block;
  text-align: center;
  margin-top: 15px;
  color: #28a745;
  text-decoration: none;
  font-weight: 600;
}

/* Campo de CEP e Cupom */
.campo-cupom,
#campo-cep {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.campo-cupom input,
#campo-cep {
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 7px 12px;
  font-size: 1rem;
  outline: none;
  background: #fafafa;
  width: 120px;
  transition: border 0.2s, background 0.2s;
}

.campo-cupom input:focus,
#campo-cep:focus {
  border: 1.5px solid #28a745;
  background: #fff;
}

.campo-cupom button,
#calcular-frete,
#limpar-frete {
  background: #28a745;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 7px 14px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

#limpar-frete {
  background-color: #dc3545;
}

.campo-cupom button#remover-cupom {
  background: #e53935;
}

.campo-cupom button:hover,
#calcular-frete:hover {
  background-color: #218838;
}

#limpar-frete:hover {
  background-color: #b52a37;
}

#cep-msg,
#cupom-msg {
  font-size: 0.97rem;
  margin-top: 4px;
  min-height: 18px;
  display: block;
  color: #009688;
}

/* Responsividade */
@media (max-width: 768px) {
  .carrinho-content {
    flex-direction: column;
  }
  .carrinho-items,
  .carrinho-summary {
    width: 100%;
  }
  .campo-cupom input,
  #campo-cep {
    width: 100%;
  }
}

/* Etapas do checkout */
.etapas-checkout {
  display: flex;
  justify-content: space-between;
  max-width: 1000px;
  margin: 20px auto;
  padding: 0 10px;
}

.etapas-checkout .etapa {
  flex: 1;
  text-align: center;
  color: #ccc;
  font-weight: 600;
  position: relative;
}

.etapas-checkout .etapa i {
  display: block;
  font-size: 24px;
  margin-bottom: 5px;
}

.etapas-checkout .etapa.ativa {
  color: #28a745;
}

.etapas-checkout .etapa::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 100%;
  height: 4px;
  background-color: #ccc;
  z-index: -1;
  transform: translateY(-50%);
}

.etapas-checkout .etapa:last-child::after {
  display: none;
}

.etapas-checkout .etapa.ativa::after {
  background-color: #28a745;
}

/* Dark Mode */
body.dark-mode {
  background-color: #121212;
  color: #e0e0e0;
}

body.dark-mode .carrinho-summary,
body.dark-mode .carrinho-item,
body.dark-mode .campo-cupom {
  background-color: #1e1e1e;
  border: 1px solid #444;
  color: #e0e0e0;
}

body.dark-mode .carrinho-item-title,
body.dark-mode .summary-title,
body.dark-mode .carrinho-title {
  color: #4ac567;
}

body.dark-mode .carrinho-item-price,
body.dark-mode .checkout-btn,
body.dark-mode .continue-shopping {
  background-color: #4ac567;
  color: white;
  border: none;
}

body.dark-mode input[type="text"] {
  background-color: #222;
  color: #f0f0f0;
  border: 1px solid #555;
}

body.dark-mode #cep-msg,
body.dark-mode #cupom-msg {
  color: #80cbc4;
}
