/**
 * Checkout — tema claro, layout moderno
 */
body.premium-theme.page-checkout {
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%) !important;
  color: #0f172a;
}

body.premium-theme.page-checkout .fds-main {
  background: transparent !important;
}

body.premium-theme.page-checkout .checkout-section {
  --checkout-radius: 16px;
  --checkout-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 20px 40px -12px rgba(15, 23, 42, 0.08);
  --checkout-border: #e2e8f0;
  --checkout-muted: #64748b;
  --checkout-surface: #ffffff;
  max-width: 1120px;
  padding-top: 2rem !important;
  padding-bottom: 3rem !important;
}

/* Header */
.checkout-hero {
  margin-bottom: 2rem;
}

.checkout-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  color: var(--checkout-muted);
  margin-bottom: 0.75rem;
}

.checkout-breadcrumb a {
  color: var(--checkout-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.checkout-breadcrumb a:hover {
  color: var(--ds-primary, var(--accent, #4F46E5));
}

.checkout-breadcrumb-sep {
  opacity: 0.45;
}

.checkout-page-title {
  font-size: clamp(1.75rem, 4vw, 2.125rem) !important;
  font-weight: 800 !important;
  letter-spacing: -0.03em;
  color: #0f172a !important;
  margin: 0 !important;
  line-height: 1.15;
}

/* Blocks */
.checkout-block {
  background: var(--checkout-surface);
  border: 1px solid var(--checkout-border);
  border-radius: var(--checkout-radius);
  box-shadow: var(--checkout-shadow);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.checkout-block-title {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a !important;
  margin: 0 0 1rem;
  letter-spacing: -0.01em;
}

/* Payment method cards */
.checkout-pay-methods {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.checkout-pay-option {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.125rem;
  border: 2px solid var(--checkout-border);
  border-radius: 12px;
  background: #fafbfc;
  cursor: default;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.checkout-pay-option.is-active {
  border-color: var(--ds-primary, var(--accent, #4F46E5));
  background: color-mix(in srgb, var(--ds-primary, #4F46E5) 4%, white);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ds-primary, #4F46E5) 12%, transparent);
}

.checkout-pay-option input[type="radio"] {
  width: 1.125rem;
  height: 1.125rem;
  accent-color: var(--ds-primary, var(--accent, #4F46E5));
  flex-shrink: 0;
  margin: 0;
}

.checkout-pay-option-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.checkout-pay-option-icon.pix {
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  color: #059669;
}

.checkout-pay-option-icon.boleto {
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
  color: #ea580c;
}

.checkout-pay-option-icon.card {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  color: #2563eb;
}

.checkout-pay-option-body {
  flex: 1;
  min-width: 0;
}

.checkout-pay-option-name {
  font-weight: 700;
  color: #0f172a;
  font-size: 0.9375rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.checkout-pay-badge {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: #059669;
  color: #fff;
}

.checkout-pay-option-desc {
  font-size: 0.8125rem;
  color: var(--checkout-muted);
  margin: 0.15rem 0 0;
}

/* Form */
.checkout-form-grid {
  display: grid;
  gap: 1rem;
}

.checkout-form-grid.cols-2 {
  grid-template-columns: 1fr;
}

@media (min-width: 576px) {
  .checkout-form-grid.cols-2 {
    grid-template-columns: 1fr 1fr;
  }
  .checkout-form-grid .span-2 {
    grid-column: span 2;
  }
}

body.premium-theme.page-checkout .checkout-section .form-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #334155 !important;
  margin-bottom: 0.35rem;
}

body.premium-theme.page-checkout .checkout-section .form-control,
body.premium-theme.page-checkout .checkout-section .form-select,
body.premium-theme.page-checkout .checkout-section .checkout-input {
  background: #f8fafc !important;
  border: 1.5px solid #e2e8f0 !important;
  border-radius: 10px !important;
  color: #0f172a !important;
  min-height: 48px;
  padding: 0.625rem 0.875rem;
  font-size: 0.9375rem;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

body.premium-theme.page-checkout .checkout-section .form-control::placeholder {
  color: #94a3b8 !important;
}

body.premium-theme.page-checkout .checkout-section .form-control:focus,
body.premium-theme.page-checkout .checkout-section .form-select:focus,
body.premium-theme.page-checkout .checkout-section .checkout-input:focus {
  background: #fff !important;
  border-color: var(--ds-primary, var(--accent, #4F46E5)) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ds-primary, #4F46E5) 14%, transparent) !important;
}

.checkout-terms {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  margin: 1.25rem 0;
  font-size: 0.8125rem;
  color: var(--checkout-muted);
  line-height: 1.45;
}

.checkout-terms input {
  width: 1.125rem;
  height: 1.125rem;
  margin-top: 0.15rem;
  accent-color: var(--ds-primary, var(--accent, #4F46E5));
  flex-shrink: 0;
}

.checkout-terms a {
  color: var(--ds-primary, var(--accent, #4F46E5));
  text-decoration: none;
  font-weight: 600;
}

.checkout-terms a:hover {
  text-decoration: underline;
}

body.premium-theme.page-checkout .checkout-section .checkout-submit-btn {
  background: linear-gradient(135deg, var(--ds-primary, var(--accent, #4F46E5)), color-mix(in srgb, var(--ds-primary, #4F46E5) 85%, #000)) !important;
  border: none !important;
  color: #fff !important;
  font-weight: 700;
  font-size: 1rem;
  border-radius: 12px !important;
  padding: 1rem 1.25rem !important;
  min-height: 54px;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--ds-primary, #4F46E5) 35%, transparent);
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
}

body.premium-theme.page-checkout .checkout-section .checkout-submit-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px color-mix(in srgb, var(--ds-primary, #4F46E5) 40%, transparent);
}

body.premium-theme.page-checkout .checkout-section .checkout-submit-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.checkout-submit-hint {
  text-align: center;
  font-size: 0.75rem;
  color: var(--checkout-muted);
  margin-top: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.checkout-submit-hint i {
  color: #059669;
}

/* Summary sidebar */
.checkout-summary {
  background: var(--checkout-surface);
  border: 1px solid var(--checkout-border);
  border-radius: var(--checkout-radius);
  box-shadow: var(--checkout-shadow);
  overflow: hidden;
}

@media (min-width: 992px) {
  .checkout-summary-sticky {
    position: sticky;
    top: 1.5rem;
  }
}

.checkout-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #f1f5f9;
}

.checkout-summary-head h2 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  color: #0f172a !important;
}

.checkout-secure-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #059669;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 999px;
  padding: 0.25rem 0.55rem;
  white-space: nowrap;
}

.checkout-summary-body {
  padding: 1.25rem 1.5rem;
}

.checkout-item {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f1f5f9;
}

.checkout-item:last-of-type {
  border-bottom: none;
}

.checkout-item-thumb {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.checkout-item-thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 1.25rem;
}

.checkout-item-info {
  flex: 1;
  min-width: 0;
}

.checkout-item-name {
  font-weight: 600;
  font-size: 0.875rem;
  color: #0f172a !important;
  margin: 0;
  line-height: 1.35;
}

.checkout-item-meta {
  font-size: 0.75rem;
  color: var(--checkout-muted);
  margin: 0.15rem 0 0;
}

.checkout-item-price {
  font-weight: 700;
  font-size: 0.9375rem;
  color: #0f172a !important;
  white-space: nowrap;
}

.checkout-totals {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed #e2e8f0;
}

.checkout-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  color: var(--checkout-muted);
  margin-bottom: 0.5rem;
}

.checkout-total-row.grand {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e2e8f0;
  margin-bottom: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a !important;
}

.checkout-total-row.grand span:last-child {
  font-size: 1.25rem;
  color: var(--ds-primary, var(--accent, #4F46E5)) !important;
}

.checkout-summary-foot {
  padding: 1rem 1.5rem;
  background: #f8fafc;
  border-top: 1px solid #f1f5f9;
  font-size: 0.75rem;
  color: var(--checkout-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.checkout-summary-foot i {
  color: var(--ds-primary, var(--accent, #4F46E5));
  font-size: 1rem;
}

/* Feedback & PIX */
.checkout-feedback {
  border-radius: 10px;
  padding: 0.75rem 1rem;
}

.checkout-feedback.text-success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857 !important;
}

.checkout-feedback.text-danger {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c !important;
}

.checkout-pix-panel {
  background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 100%);
  border: 1px solid #bbf7d0;
  border-radius: var(--checkout-radius);
  padding: 1.5rem;
  margin-top: 1.25rem;
}

.checkout-pix-steps {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.checkout-pix-step {
  flex: 1;
  min-width: 100px;
  text-align: center;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--checkout-muted);
  padding: 0.5rem;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.checkout-pix-step.is-active {
  color: #059669;
  border-color: #86efac;
  background: #ecfdf5;
}

.checkout-pix-qr-wrap {
  text-align: center;
  margin-bottom: 1rem;
}

.checkout-pix-qr-wrap img {
  max-width: 220px;
  border-radius: 12px;
  border: 4px solid #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1);
}

.checkout-pix-copy-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.5rem;
}

.checkout-pix-copy-row {
  display: flex;
  gap: 0.5rem;
}

.checkout-pix-copy-row textarea {
  flex: 1;
  font-size: 0.75rem !important;
  min-height: 72px !important;
  resize: none;
  background: #fff !important;
}

.checkout-pix-copy-btn {
  align-self: stretch;
  min-width: 48px;
  border: none;
  border-radius: 10px;
  background: var(--ds-primary, var(--accent, #4F46E5));
  color: #fff;
  font-size: 1.125rem;
  cursor: pointer;
  transition: opacity 0.15s;
}

.checkout-pix-copy-btn:hover {
  opacity: 0.9;
}

.checkout-pix-waiting {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
  font-size: 0.8125rem;
  color: #059669;
  font-weight: 600;
}

.checkout-pix-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid #bbf7d0;
  border-top-color: #059669;
  border-radius: 50%;
  animation: checkout-spin 0.7s linear infinite;
}

@keyframes checkout-spin {
  to { transform: rotate(360deg); }
}

body.premium-theme.page-checkout .checkout-section .alert-warning {
  background: #fffbeb !important;
  border-color: #fde68a !important;
  color: #92400e !important;
  border-radius: 12px;
}

@media (max-width: 991.98px) {
  body.premium-theme.page-checkout .checkout-section {
    padding-top: 1.25rem !important;
  }

  .checkout-block {
    padding: 1.25rem;
  }

  .checkout-summary {
    margin-bottom: 0.5rem;
  }
}
