/* Overlay geral do carrinho */
.cart-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
}

.cart-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
}

.cart-drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: 400px;
  max-width: 100%;
  height: 100%;
  background: #fff;
  box-shadow: -4px 0 20px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
}

.cart-header {
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-header-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.cart-header-subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  color: #6c757d;
}

.cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.5rem;
}

.cart-footer {
  padding: 1rem 1.5rem 1.5rem;
  border-top: 1px solid #e9ecef;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f1f3f5;
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item-thumb {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  background: #f1f3f5;
}

.cart-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-info {
  flex: 1;
}

.cart-item-title {
  font-size: 0.95rem;
  font-weight: 500;
  margin: 0;
}

.cart-item-meta {
  font-size: 0.8rem;
  color: #6c757d;
}

.cart-item-price {
  font-size: 0.95rem;
  font-weight: 600;
}

.cart-item-remove {
  border: none;
  background: none;
  color: #6c757d;
  cursor: pointer;
}

.cart-item-remove:hover {
  color: #dc3545;
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.cart-summary-label {
  font-size: 0.9rem;
  color: #6c757d;
}

.cart-summary-value {
  font-size: 1rem;
  font-weight: 600;
}

.cart-footer-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.cart-empty {
  text-align: center;
  color: #6c757d;
  padding: 2rem 1rem;
}

.cart-empty i {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  color: #dee2e6;
}

@media (max-width: 576px) {
  .cart-drawer {
    width: 100%;
  }
}

/* ===========================
   Página de Checkout
   =========================== */

.checkout-page {
  background: #f5f7fb;
  min-height: 100vh;
  /* Mesma compensação de topo das outras internas (navbar fixa) */
  padding-top: 120px;
}

.checkout-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  padding: 1.75rem 1.75rem 1.5rem;
}

.checkout-card-header {
  border-bottom: 1px solid #edf2f7;
  padding-bottom: 0.75rem;
  margin-bottom: 1.5rem;
}

.checkout-title {
  font-size: 1.4rem;
  font-weight: 600;
}

.checkout-subtitle {
  font-size: 0.9rem;
  color: #6b7280;
}

.checkout-seller-block {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  margin-bottom: 1rem;
}

.checkout-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f3f4f6;
}

.checkout-item-thumb {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  overflow: hidden;
  background: #f3f4f6;
}

.checkout-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.checkout-item-info {
  flex: 1;
}

.checkout-item-title {
  font-size: 0.95rem;
  font-weight: 500;
  margin: 0;
}

.checkout-item-meta {
  font-size: 0.8rem;
  color: #6b7280;
  margin: 0.1rem 0 0;
}

.checkout-item-price {
  font-size: 0.95rem;
  font-weight: 600;
}

.checkout-item-remove {
  border: none;
  background: none;
  color: #9ca3af;
  cursor: pointer;
}

.checkout-item-remove:hover {
  color: #ef4444;
}

.checkout-tabs .nav-link {
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 0.75rem 1rem 0.6rem;
  color: #6b7280 !important; /* sobrescreve .nav-link global (branco) */
  font-weight: 500;
  font-size: 0.95rem;
}

.checkout-tabs .nav-link.active {
  color: #2563eb !important;
  border-color: #2563eb;
  background-color: transparent;
}

.checkout-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1rem;
  font-weight: 600;
}

.checkout-total-label {
  color: #4b5563;
}

.checkout-total-value {
  font-size: 1.1rem;
}

@media (max-width: 991.98px) {
  .checkout-page {
    padding-top: 5rem;
  }

  .checkout-card {
    padding: 1.25rem 1.25rem 1.25rem;
  }
}
