/* checkout.css - Checkout Fluido em 3 Etapas + Sub-etapas OX (VIPS Calçados) */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Outfit:wght@600;700;800&display=swap');

:root {
  --primary: #111827;
  --primary-accent: #000000;
  --success: #10b981;
  --success-dark: #059669;
  --bg-page: #f8fafc;
  --card-bg: #ffffff;
  --border: #e2e8f0;
  --border-focus: #0f172a;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --radius: 10px;
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* HEADER DO CHECKOUT */
.checkout-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
}

.checkout-header-container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.checkout-logo {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 800;
  text-decoration: none;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  line-height: 1;
}

.checkout-logo .vips-brand-svg {
  display: block;
  height: 28px;
  width: auto;
  max-width: 165px;
}

.security-badge-header {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--success-dark);
  font-weight: 700;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  padding: 6px 14px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* GRID PRINCIPAL (2 COLUNAS NO DESKTOP, RESUMO NO TOPO E SELOS EMBAIXO NO MOBILE) */
.checkout-layout {
  max-width: 1100px;
  margin: 26px auto 44px;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  grid-template-rows: auto 1fr;
  column-gap: 32px;
  row-gap: 16px;
  align-items: start;
}

.checkout-form-column {
  grid-column: 1;
  grid-row: 1 / span 2;
  min-width: 0;
  width: 100%;
}

.checkout-summary-column {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  width: 100%;
}

.checkout-trust-column {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  width: 100%;
}

@media (max-width: 900px) {
  .checkout-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    margin: 12px auto 32px;
    padding: 0 14px;
    gap: 12px;
  }
  .checkout-summary-column {
    grid-column: 1;
    grid-row: 1;
  }
  .checkout-form-column {
    grid-column: 1;
    grid-row: 2;
  }
  .checkout-trust-column {
    grid-column: 1;
    grid-row: 3;
  }
}

/* RESUMO DO PEDIDO (MINIMIZADO POR PADRÃO EM DESKTOP E MOBILE) */
.order-summary-accordion {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

.order-summary-accordion__toggle {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 18px;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  background: #ffffff;
  user-select: none;
}

.order-summary-accordion__toggle::-webkit-details-marker {
  display: none;
}

.order-summary-accordion__toggle:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: -3px;
}

.order-summary-accordion__right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 800;
  color: #0a0a0a;
}

.order-summary-accordion__chevron {
  transition: transform 0.2s ease;
  color: #475569;
}

.order-summary-accordion[open] .order-summary-accordion__chevron {
  transform: rotate(180deg);
}

.order-summary-accordion__body {
  border-top: 1px solid var(--border);
  padding: 16px 18px 18px;
  background: #ffffff;
}

/* STEPPER DE 3 ETAPAS */
.c-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-bottom: 16px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  gap: 8px;
}

.c-stepper__btn {
  appearance: none;
  background: transparent;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  cursor: pointer;
  color: #64748b;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  transition: color 0.15s ease, background-color 0.15s ease;
  white-space: nowrap;
}

.c-stepper__btn:hover {
  background: #f8fafc;
  color: #0f172a;
}

.c-stepper__num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.c-stepper__btn.is-active {
  color: #0f172a;
}

.c-stepper__btn.is-active .c-stepper__num {
  background: #0a0a0a;
  color: #ffffff;
}

.c-stepper__btn.is-done {
  color: #0f172a;
}

.c-stepper__btn.is-done .c-stepper__num {
  background: #10b981;
  color: #ffffff;
}

.c-stepper__sep {
  flex: 1;
  height: 1px;
  background: #e2e8f0;
  min-width: 10px;
}

/* CARDS */
.c-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.c-card-header {
  margin-bottom: 18px;
}

.c-card-header--inline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.c-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.c-step-heading {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
  margin: 0;
  outline: none;
}

.c-step-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-left: 36px;
}

.c-step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* RESUMO COMPACTO DAS ETAPAS ANTERIORES */
.c-summary-chips-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
  min-width: 0;
  max-width: 100%;
}

.c-summary-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 9px 12px;
  margin-bottom: 16px;
  font-size: 12.5px;
  color: #334155;
  min-width: 0;
  max-width: 100%;
}

.c-summary-chips-stack .c-summary-chip {
  margin-bottom: 0;
}

.c-summary-chip__text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.c-summary-chip__edit {
  appearance: none;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  flex-shrink: 0;
  padding: 2px 4px;
}

/* FORM ELEMENTS */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.c-num-bairro-row {
  grid-template-columns: 0.72fr 1.28fr;
}

.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 5px;
}

.input-hint-top {
  display: block;
  font-size: 11.5px;
  color: #64748b;
  margin-bottom: 6px;
}

[hidden] {
  display: none !important;
}

.form-input,
.form-select {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid #94a3b8;
  border-radius: 8px;
  font-size: max(1rem, 1em);
  background: #ffffff;
  color: var(--text-main);
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.25s;
  font-family: inherit;
}

.form-input:focus-visible,
.form-select:focus-visible,
.payment-tab-btn:focus-visible,
.coupon-btn:focus-visible,
.btn-finish-order:focus-visible,
.btn-step-next:focus-visible,
.btn-step-back:focus-visible,
.c-stepper__btn:focus-visible,
.c-summary-chip__edit:focus-visible,
.c-link-muted:focus-visible,
.c-saved-address-edit:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

.form-input:focus,
.form-select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.1);
}

.form-input.is-just-focused {
  border-color: var(--success-dark);
}

.form-input[aria-invalid="true"],
.form-input:user-invalid {
  border-color: #dc2626;
}

.field-error-text {
  font-size: 12px;
  color: #dc2626;
  font-weight: 600;
  margin-top: 5px;
}

.input-feedback {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 5px;
}

/* ETAPA 2A CEP + ENDEREÇO */
.c-cep-hero {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.c-cep-top-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}

.c-cep-field-col {
  flex: 0 1 200px;
  min-width: 145px;
}

.c-cep-city-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  padding-bottom: 6px;
}

.c-city-uf-preview {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.c-link-muted {
  appearance: none;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: #475569;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  white-space: nowrap;
  padding: 2px 0;
}

.c-link-muted:hover {
  color: #0f172a;
}

.c-address-details {
  animation: cFadeSlide 0.2s ease-out;
}

@keyframes cFadeSlide {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.c-city-uf-grid {
  display: grid;
  grid-template-columns: 2.2fr 1fr;
  gap: 10px;
}

/* ETAPA 2B CARD DE ENDEREÇO SALVO + 2 OPÇÕES DE FRETE ESTILO OX */
.c-saved-address-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1.5px solid #0a0a0a;
  border-radius: 8px;
  padding: 14px 16px;
  background: #ffffff;
  margin-bottom: 18px;
}

.c-saved-address-card__left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.c-radio-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  position: relative;
  flex-shrink: 0;
}

.c-radio-dot.is-checked {
  border-color: #0a0a0a;
}

.c-radio-dot.is-checked::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: #0a0a0a;
}

.c-saved-address-card__text {
  min-width: 0;
}

.c-saved-address-card__text strong {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: #0a0a0a;
  line-height: 1.35;
}

.c-saved-address-card__text span {
  display: block;
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}

.c-saved-address-edit {
  appearance: none;
  background: transparent;
  border: none;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: #475569;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 6px;
  flex-shrink: 0;
}

.c-saved-address-edit:hover {
  color: #0a0a0a;
}

.c-shipping-section__label {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 10px;
}

.c-shipping-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.c-shipping-option {
  position: relative;
  display: grid;
  grid-template-columns: 20px 1fr auto;
  align-items: center;
  gap: 12px;
  border: 1px solid #d4d4d8;
  border-radius: 8px;
  padding: 14px 16px;
  background: #ffffff;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.c-shipping-option:hover {
  border-color: #71717a;
}

.c-shipping-option.is-selected {
  border: 1.5px solid #0a0a0a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.c-shipping-radio-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.c-shipping-option__control {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #a1a1aa;
  position: relative;
  transition: border-color 0.15s ease;
}

.c-shipping-option.is-selected .c-shipping-option__control {
  border-color: #0a0a0a;
}

.c-shipping-option.is-selected .c-shipping-option__control::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: #0a0a0a;
}

.c-shipping-option__body {
  min-width: 0;
}

.c-shipping-option__title {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: #0a0a0a;
  line-height: 1.4;
}

.c-days-logo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  vertical-align: baseline;
}

.c-shipping-correios-logo {
  height: 15px;
  width: auto;
  display: inline-block;
  flex-shrink: 0;
}

.c-shipping-option__sub {
  display: block;
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}

.c-shipping-option__price {
  font-size: 13.5px;
  font-weight: 700;
  color: #0a0a0a;
  white-space: nowrap;
}

/* BOTÕES DE NAVEGAÇÃO ENTRE ETAPAS */
.c-step-actions {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.btn-step-next {
  appearance: none;
  flex: 1;
  min-height: 50px;
  padding: 14px 20px;
  background: #0a0a0a;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.btn-step-next:hover {
  background: #1e293b;
  transform: translateY(-1px);
}

.c-cpf-footer-field {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}

.c-step3-submit-row {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.btn-step-back-link {
  appearance: none;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: #64748b;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  padding: 4px 8px;
}

.btn-step-back-link:hover {
  color: #0f172a;
}

/* ABAS DE PAGAMENTO */
.payment-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.payment-tab-btn {
  background: #f8fafc;
  border: 2px solid var(--border);
  border-radius: 8px;
  min-height: 48px;
  padding: 12px 8px;
  text-align: center;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  font-family: inherit;
}

.payment-tab-btn:hover {
  border-color: #cbd5e1;
}

.payment-tab-btn.active,
.payment-tab-btn[aria-selected="true"] {
  background: #ffffff;
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* CONTAINER DO PAGOU PAYMENT ELEMENT */
.pagou-card-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
}

.pagou-brand-pill {
  background: #e0e7ff;
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
}

.pagou-card-host {
  min-height: 150px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 10px;
}

.pagou-card-loading {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.checkout-error-banner {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 600;
  margin-top: 16px;
}

.btn-finish-order:disabled {
  opacity: 0.72;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.pix-badge-off {
  position: absolute;
  top: -8px;
  right: -4px;
  background: var(--success);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 999px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.payment-content-box {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px;
}

/* GARANTIAS E SELOS CARD */
.order-summary-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.summary-items-list {
  max-height: 240px;
  overflow-y: auto;
  border-bottom: 1px solid var(--border);
  padding-bottom: 14px;
  margin-bottom: 14px;
}

.summary-item {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
  align-items: center;
}

.summary-item:last-child {
  margin-bottom: 0;
}

.summary-item-img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 6px;
  background: #f1f5f9;
  border: 1px solid var(--border);
}

.summary-item-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}

.summary-item-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.summary-item-price {
  font-size: 13.5px;
  font-weight: 800;
  margin-left: auto;
  white-space: nowrap;
}

.coupon-box {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.coupon-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

/* TOTAIS */
.total-line {
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.total-line.final {
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin-top: 12px;
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0;
}

.total-line.discount-green {
  color: var(--success);
  font-weight: 700;
}

/* BOTÃO FINALIZAR */
.btn-finish-order {
  width: 100%;
  background: var(--success);
  color: #ffffff;
  border: none;
  padding: 17px 18px;
  border-radius: 8px;
  font-size: 15.5px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-finish-order:hover {
  background: var(--success-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

/* SELOS */
.checkout-guarantees {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 12px;
  color: #475569;
}

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

@media (max-width: 560px) {
  .checkout-header {
    padding: 12px 14px;
  }
  .checkout-logo .vips-brand-svg {
    height: 22px;
    max-width: 132px;
  }
  .security-badge-header {
    font-size: 11.5px;
    padding: 5px 10px;
    gap: 5px;
  }
  .c-stepper {
    padding: 8px 10px;
    gap: 4px;
  }
  .c-stepper__btn {
    font-size: 11.5px;
    padding: 5px 4px;
    gap: 5px;
  }
  .c-stepper__num {
    width: 20px;
    height: 20px;
    font-size: 11px;
  }
  .c-card {
    padding: 18px 15px;
  }
  .c-step-sub {
    margin-left: 0;
    margin-top: 4px;
  }
  .form-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .c-num-bairro-row {
    grid-template-columns: 0.85fr 1.15fr;
  }
  .c-cep-top-row {
    align-items: center;
  }
  .c-cep-field-col {
    flex: 1 1 56%;
  }
  .c-shipping-option {
    padding: 12px;
    gap: 10px;
  }
  .c-shipping-option__title {
    font-size: 12.5px;
  }
}
