/* ============================================================
   Carrinho – White + Green/Yellow Brazilian Theme
   Matches carrinho.html structure exactly
   ============================================================ */

/* ---- Steps Bar ---- */
.steps-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  max-width: 700px;
  margin: 24px auto 28px;
  padding: 14px 20px;
  background: #fff;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.07);
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  font-size: 0.75rem;
  font-weight: 700;
  color: #bfc3d6;
  position: relative;
}

.step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 800;
  border: 2px solid #dfe2ec;
  background: #f5f6fa;
  color: #bfc3d6;
  transition: all .3s;
}

.step.done .step-circle {
  background: #1B9C3F;
  border-color: #1B9C3F;
  color: #fff;
}

.step.active .step-circle {
  background: linear-gradient(135deg, #1B9C3F, #22b84a);
  border-color: #1B9C3F;
  color: #fff;
  box-shadow: 0 3px 12px rgba(27,156,63,0.3);
}

.step.done span,
.step.active span { color: #1A1A2E; }

/* connector lines */
.step + .step::before {
  content: '';
  position: absolute;
  top: 16px;
  right: calc(50% + 20px);
  width: calc(100% - 40px);
  height: 2px;
  background: #dfe2ec;
}
.step.done + .step::before,
.step.done + .step.done::before,
.step.done + .step.active::before { background: #1B9C3F; }

/* ---- Cart Layout (two columns) ---- */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px 60px;
  align-items: start;
}

.cart-items-col { display: flex; flex-direction: column; gap: 14px; }
.cart-summary-col { position: sticky; top: 20px; }

/* ---- Main Cart Item ---- */
.cart-item {
  background: #fff;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.07);
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  overflow: hidden;
}

.cart-item-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
}

.cart-item-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(27,156,63,0.12), rgba(255,193,7,0.12));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.cart-item-title {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cart-item-title strong {
  font-size: 1rem;
  color: #1A1A2E;
}

.cart-item-meta {
  display: flex;
  gap: 12px;
  font-size: 0.8rem;
  color: #5A5E78;
}

.btn-details {
  background: none;
  border: 1px solid rgba(27,156,63,0.25);
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #1B9C3F;
  cursor: pointer;
  white-space: nowrap;
  transition: all .2s;
}
.btn-details:hover {
  background: rgba(27,156,63,0.06);
}

.cart-item-details {
  padding: 0 20px 16px;
  font-size: 0.88rem;
  color: #5A5E78;
  line-height: 1.6;
  border-top: 1px solid rgba(0,0,0,0.05);
}
.cart-item-details p { margin: 12px 0 0; }

.cart-item-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  background: #f9fafb;
  border-top: 1px solid rgba(0,0,0,0.05);
}

.cart-footer-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.cart-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #9A9DB5;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cart-value {
  font-size: 1.15rem;
  font-weight: 800;
  color: #1B9C3F;
}

.cart-footer-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-qty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #1B9C3F, #22b84a);
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
}

.btn-remove-item {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(230,57,70,0.2);
  background: rgba(230,57,70,0.06);
  color: #E63946;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
}
.btn-remove-item:hover { background: rgba(230,57,70,0.12); }
.btn-remove-item.disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ---- Upsell Notification ---- */
.upsell-notification {
  background: #fff;
  border-radius: 14px;
  border: 2px solid rgba(27,156,63,0.2);
  overflow: hidden;
  transition: border-color .3s;
}
.upsell-notification.upsell-added {
  border-color: #1B9C3F;
  background: linear-gradient(135deg,rgba(27,156,63,0.03),rgba(255,193,7,0.03));
}

.upsell-badge {
  padding: 6px 16px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #FFC107, #ffb300);
  color: #1A1A2E;
}
.upsell-added .upsell-badge {
  background: #1B9C3F;
  color: #fff;
}

.upsell-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px 10px;
}

.upsell-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg,rgba(27,156,63,0.1),rgba(255,193,7,0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.upsell-info { flex: 1; }
.upsell-info strong {
  font-size: 0.95rem;
  color: #1A1A2E;
  display: block;
  margin-bottom: 4px;
}

.upsell-meta {
  display: flex;
  gap: 10px;
  font-size: 0.78rem;
  color: #5A5E78;
}

.upsell-close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(230,57,70,0.08);
  color: #E63946;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}
.upsell-close:hover { background: rgba(230,57,70,0.16); }

.upsell-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px 16px;
}

.btn-add-upsell {
  padding: 10px 22px;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  background: linear-gradient(135deg, #1B9C3F, #22b84a);
  color: #fff;
  box-shadow: 0 3px 12px rgba(27,156,63,0.2);
  transition: all .25s;
}
.btn-add-upsell:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 18px rgba(27,156,63,0.3);
}
.btn-add-upsell.btn-added {
  background: #e8f5e9;
  color: #1B9C3F;
  box-shadow: none;
  cursor: default;
}

/* ---- Summary Card ---- */
.summary-card {
  background: #fff;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.07);
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  overflow: hidden;
}

.summary-header {
  padding: 18px 22px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.summary-header strong {
  font-size: 0.9rem;
  color: #1A1A2E;
  letter-spacing: 1px;
}
.summary-header span {
  font-size: 0.82rem;
  color: #9A9DB5;
}

.summary-rows { padding: 14px 22px; }

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 0.88rem;
  color: #5A5E78;
}
.summary-row span:last-child { font-weight: 700; color: #1A1A2E; }

.summary-total {
  display: flex;
  justify-content: space-between;
  padding: 16px 22px;
  border-top: 2px solid rgba(27,156,63,0.15);
  background: linear-gradient(135deg,rgba(27,156,63,0.04),rgba(255,193,7,0.04));
}
.summary-total span:first-child {
  font-weight: 700;
  font-size: 0.95rem;
  color: #1A1A2E;
}
.summary-total span:last-child {
  font-weight: 900;
  font-size: 1.2rem;
  color: #1B9C3F;
}

/* ---- CPF Box ---- */
.cpf-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border-radius: 14px;
  padding: 16px 20px;
  margin-top: 14px;
  border: 1px solid rgba(0,0,0,0.07);
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  font-size: 0.88rem;
  color: #5A5E78;
}
.cpf-box strong { color: #1A1A2E; }

.btn-not-you {
  background: none;
  border: none;
  color: #E63946;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

/* ---- Pay Button ---- */
.btn-pay {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 18px;
  margin-top: 14px;
  border: none;
  border-radius: 14px;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(135deg, #1B9C3F, #157A30);
  color: #fff;
  box-shadow: 0 4px 20px rgba(27,156,63,0.3);
  transition: all .3s;
  letter-spacing: 0.3px;
}
.btn-pay:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(27,156,63,0.4);
}
.btn-pay:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
}

/* ---- Toast ---- */
.toast {
  position: fixed;
  bottom: -60px;
  left: 50%;
  transform: translateX(-50%);
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  background: #1B9C3F;
  box-shadow: 0 6px 24px rgba(0,0,0,0.18);
  transition: bottom .4s;
  z-index: 9999;
  white-space: nowrap;
}
.toast.show { bottom: 30px; }
.toast.error { background: #E63946; }

/* ---- Responsive ---- */
@media (max-width: 860px) {
  .cart-layout {
    grid-template-columns: 1fr;
    padding: 0 12px 40px;
  }
  .cart-summary-col { position: static; }
}

@media (max-width: 520px) {
  .steps-bar {
    gap: 2px;
    padding: 10px 8px;
    margin: 16px 8px 20px;
  }
  .step { font-size: 0.68rem; }
  .step-circle { width: 28px; height: 28px; font-size: 0.75rem; }
  .step + .step::before { display: none; }
  .cart-item-header { padding: 14px 14px; gap: 10px; }
  .cart-item-footer { padding: 12px 14px; flex-wrap: wrap; }
  .summary-rows { padding: 10px 14px; }
  .summary-total { padding: 14px; }
  .cpf-box { padding: 12px 14px; flex-direction: column; gap: 8px; text-align: center; }
}
