/* ============================================
   Goodds Checkout - Estilo Yampi (full checkout)
   ============================================ */

/* Esconder header/footer em página só checkout (temas comuns) */
body.goodds-checkout-page #masthead,
body.goodds-checkout-page .site-header,
body.goodds-checkout-page header.site-header,
body.goodds-checkout-page #colophon,
body.goodds-checkout-page .site-footer,
body.goodds-checkout-page footer.site-footer {
  display: none !important;
}

body.goodds-checkout-page {
  background: #f5f5f5;
  min-height: 100vh;
  overflow-x: hidden;
}

.goodds-checkout-wrap.goodds-checkout-yampi {
  overflow-x: hidden;
}

/* Wrapper principal */
.goodds-checkout-wrap.goodds-checkout-yampi {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px 48px;
  min-height: 100vh;
  box-sizing: border-box;
}

/* Header (logo + seguro) */
.goodds-checkout-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  padding: 0 4px;
}

.goodds-checkout-logo {
  font-size: 0;
}

.goodds-checkout-logo a,
.goodds-logo-text {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: #1a1a1a;
  font-weight: 700;
  font-size: 20px;
}

.goodds-checkout-logo img {
  max-height: 42px;
  width: auto;
}

.goodds-checkout-seguro {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #374151;
  font-size: 13px;
  font-weight: 500;
}

.goodds-seguro-icon {
  font-size: 16px;
}

/* Layout 3 colunas: etapas | formulário | resumo */
.goodds-checkout-body {
  display: grid;
  grid-template-columns: 200px 1fr 340px;
  gap: 28px;
  align-items: start;
}

@media (max-width: 1024px) {
  .goodds-checkout-body {
    grid-template-columns: 1fr 340px;
  }
  .goodds-checkout-steps-nav {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: row;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0,0,0,.08);
  }
  .goodds-step-item {
    flex: 1;
  }
  .goodds-step-desc {
    display: none;
  }
}

@media (max-width: 768px) {
  .goodds-checkout-body {
    grid-template-columns: 1fr;
  }
  .goodds-checkout-summary {
    order: -1;
  }
}

/* ========== MOBILE: checkout bem feito no celular ========== */
@media (max-width: 768px) {
  .goodds-checkout-wrap.goodds-checkout-yampi {
    padding: 16px 16px 32px;
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
    padding-bottom: max(32px, env(safe-area-inset-bottom));
  }

  .goodds-checkout-header {
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
  }

  .goodds-checkout-logo img {
    max-height: 36px;
  }

  .goodds-checkout-logo a,
  .goodds-logo-text {
    font-size: 18px;
  }

  .goodds-checkout-seguro {
    font-size: 12px;
    width: 100%;
    justify-content: center;
  }

  .goodds-checkout-steps-nav {
    padding: 10px 0 14px;
    gap: 8px;
    margin-bottom: 4px;
  }

  .goodds-step-item {
    padding: 8px 0;
    min-width: 0;
  }

  .goodds-step-num {
    width: 28px;
    height: 28px;
    font-size: 13px;
  }

  .goodds-step-title {
    font-size: 13px;
  }

  .goodds-form-card {
    padding: 20px 18px 24px;
  }

  .goodds-step-heading {
    font-size: 18px;
    margin-bottom: 6px;
  }

  .goodds-step-heading-num {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }

  .goodds-step-desc-inline {
    font-size: 13px;
    margin-bottom: 18px;
  }

  .goodds-form-card .form-row {
    margin-bottom: 16px;
  }

  /* Inputs: 16px evita zoom no iOS; min-height 48px = área de toque confortável */
  .goodds-form-card input[type="text"],
  .goodds-form-card input[type="email"],
  .goodds-form-card input[type="tel"],
  .goodds-form-card select {
    padding: 14px 16px;
    font-size: 16px;
    min-height: 48px;
    -webkit-appearance: none;
    appearance: none;
  }

  .goodds-form-card label {
    font-size: 14px;
  }

  .goodds-btn {
    width: 100%;
    min-height: 52px;
    padding: 16px 24px;
    font-size: 16px;
    margin-top: 12px;
  }

  .goodds-step-actions {
    flex-direction: column;
    margin-top: 20px;
    padding-top: 18px;
    gap: 10px;
  }

  .goodds-step-actions .goodds-btn {
    width: 100%;
    margin-top: 0;
  }

  .goodds-summary-card {
    position: relative;
    top: 0;
    padding: 20px 18px;
  }

  .goodds-summary-title {
    font-size: 14px;
    margin-bottom: 16px;
    padding-bottom: 12px;
  }

  .goodds-summary-card .woocommerce-checkout-review-order-table {
    font-size: 13px;
  }

  .goodds-summary-card .woocommerce-checkout-review-order-table th,
  .goodds-summary-card .woocommerce-checkout-review-order-table td {
    padding: 10px 0;
  }

  .goodds-summary-card .woocommerce-checkout-review-order-table .order-total th,
  .goodds-summary-card .woocommerce-checkout-review-order-table .order-total td,
  .goodds-summary-card .woocommerce-checkout-review-order-table tfoot .order-total th,
  .goodds-summary-card .woocommerce-checkout-review-order-table tfoot .order-total td {
    padding: 14px 12px;
    font-size: 14px;
  }

  .goodds-summary-card .woocommerce-checkout-review-order-table .order-total .amount,
  .goodds-summary-card .woocommerce-checkout-review-order-table tfoot .order-total .amount {
    font-size: 18px;
  }

  .goodds-summary-card .woocommerce-checkout-review-order-table td:first-child {
    word-break: break-word;
    padding-right: 12px;
  }
}

@media (max-width: 480px) {
  .goodds-checkout-wrap.goodds-checkout-yampi {
    padding: 12px 14px 28px;
  }

  .goodds-checkout-steps-nav {
    flex-wrap: wrap;
    gap: 6px;
  }

  .goodds-step-item {
    flex: 1 1 calc(50% - 6px);
    min-width: 0;
  }

  .goodds-step-item:nth-child(3) {
    flex: 1 1 100%;
  }

  .goodds-form-card {
    padding: 18px 14px 22px;
  }

  .goodds-step-heading {
    font-size: 17px;
  }

  .goodds-btn {
    min-height: 50px;
    padding: 14px 20px;
  }
}

/* Coluna esquerda: navegação das etapas */
.goodds-checkout-steps-nav {
  position: sticky;
  top: 24px;
}

.goodds-step-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(0,0,0,.06);
  opacity: 0.5;
  transition: opacity .2s;
}

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

.goodds-step-item.is-active {
  opacity: 1;
}

.goodds-step-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e5e7eb;
  color: #6b7280;
  border-radius: 50%;
  font-weight: 700;
  font-size: 14px;
}

.goodds-step-item.is-active .goodds-step-num {
  background: #FFC106;
  color: #000;
}

.goodds-step-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.goodds-step-title {
  font-weight: 600;
  font-size: 15px;
  color: #1a1a1a;
}

.goodds-step-item:not(.is-active) .goodds-step-title {
  color: #6b7280;
}

.goodds-step-desc {
  font-size: 12px;
  color: #9ca3af;
}

/* Card do formulário (centro) */
.goodds-form-card {
  padding: 28px 32px;
}

.goodds-step-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px 0;
  font-size: 20px;
  font-weight: 700;
  color: #1a1a1a;
}

.goodds-step-heading-num {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #FFC106;
  color: #000;
  border-radius: 50%;
  font-size: 16px;
}

.goodds-step-desc-inline {
  margin: 0 0 20px 0;
  font-size: 14px;
  color: #6b7280;
  line-height: 1.5;
}

/* Campos do WooCommerce dentro do nosso layout */
.goodds-form-card .form-row {
  margin-bottom: 18px;
}

.goodds-form-card label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  font-size: 14px;
  color: #374151;
}

.goodds-form-card input[type="text"],
.goodds-form-card input[type="email"],
.goodds-form-card input[type="tel"],
.goodds-form-card select {
  width: 100%;
  max-width: 100%;
  padding: 12px 14px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font-size: 15px;
  background: #fff;
  box-sizing: border-box;
  transition: border-color .2s;
}

.goodds-form-card input:focus,
.goodds-form-card select:focus {
  outline: none;
  border-color: #FFC106;
  box-shadow: 0 0 0 3px rgba(255, 193, 6, .25);
}

.goodds-form-card input,
.goodds-form-card select,
.goodds-btn {
  -webkit-tap-highlight-color: rgba(255, 193, 6, .2);
  touch-action: manipulation;
}

/* Botões */
.goodds-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, transform .05s;
}

.goodds-btn:active {
  transform: scale(0.98);
}

.goodds-btn-primary {
  background: #000;
  color: #fff;
  margin-top: 8px;
}

.goodds-btn-primary:hover {
  background: #222;
}

.goodds-btn-secondary {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #e5e7eb;
}

.goodds-btn-secondary:hover {
  background: #e5e7eb;
}

.goodds-step-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(0,0,0,.06);
}

.goodds-step-actions .goodds-prev-step {
  order: 1;
}

.goodds-step-actions .goodds-next-step {
  order: 2;
}

/* Card resumo (direita) */
.goodds-summary-card {
  position: sticky;
  top: 24px;
  padding: 28px;
}

.goodds-summary-title {
  margin: 0 0 24px 0;
  padding-bottom: 14px;
  font-size: 15px;
  font-weight: 700;
  color: #000;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 3px solid #FFC106;
}

/* Resumo WooCommerce – tabela moderna */
.goodds-summary-card .woocommerce-checkout-review-order-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
  border-radius: 12px;
  overflow: hidden;
}

.goodds-summary-card .woocommerce-checkout-review-order-table thead th {
  padding: 12px 0 10px 0;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: bottom;
}

.goodds-summary-card .woocommerce-checkout-review-order-table thead th:last-child {
  text-align: right;
}

.goodds-summary-card .woocommerce-checkout-review-order-table tbody td {
  padding: 14px 0;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
  color: #334155;
}

.goodds-summary-card .woocommerce-checkout-review-order-table tbody td:last-child {
  text-align: right;
  font-weight: 500;
  color: #000;
}

.goodds-summary-card .woocommerce-checkout-review-order-table tbody tr:last-child td {
  border-bottom: none;
}

/* Linha de subtotal */
.goodds-summary-card .woocommerce-checkout-review-order-table .cart-subtotal td {
  padding-top: 16px;
  font-size: 13px;
  color: #64748b;
}

.goodds-summary-card .woocommerce-checkout-review-order-table .cart-subtotal td:last-child {
  color: #334155;
  font-weight: 600;
}

/* Linha TOTAL – destaque */
.goodds-summary-card .woocommerce-checkout-review-order-table .order-total {
  background: #000;
  color: #fff;
}

.goodds-summary-card .woocommerce-checkout-review-order-table .order-total th,
.goodds-summary-card .woocommerce-checkout-review-order-table .order-total td {
  padding: 16px 16px;
  border: none;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  border-radius: 0 0 12px 12px;
}

.goodds-summary-card .woocommerce-checkout-review-order-table .order-total th {
  padding-left: 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 13px;
  opacity: 0.9;
}

.goodds-summary-card .woocommerce-checkout-review-order-table .order-total td {
  text-align: right;
  font-size: 20px;
  padding-right: 0;
}

.goodds-summary-card .woocommerce-checkout-review-order-table .order-total .amount {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}

.goodds-summary-card .woocommerce-checkout-review-order-table tfoot .order-total th,
.goodds-summary-card .woocommerce-checkout-review-order-table tfoot .order-total td {
  padding: 16px 16px;
  border: none;
  background: #000;
  color: #fff;
  font-weight: 700;
}

.goodds-summary-card .woocommerce-checkout-review-order-table tfoot .order-total .amount {
  font-size: 20px;
  color: #fff;
}

/* Bloco cupom e outros no resumo */
.goodds-summary-card #payment,
.goodds-summary-card .woocommerce-checkout-payment {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #f1f5f9;
}

.goodds-summary-card .coupon .form-row {
  margin-bottom: 12px;
}

.goodds-summary-card a:not(.goodds-btn) {
  color: #FFC106;
  text-decoration: none;
  font-weight: 500;
}

.goodds-summary-card a:not(.goodds-btn):hover {
  color: #e6ad05;
  text-decoration: underline;
}

/* Card base (reutilizado) */
.goodds-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  border: 1px solid rgba(0,0,0,.04);
}

/* Trust bar / chips (se existir) */
.goodds-trustbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 14px;
}

.goodds-trustchip {
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(0,0,0,.02);
}

/* Order bump (se existir) */
.goodds-bump {
  border: 1px dashed rgba(0,0,0,.15);
  border-radius: 14px;
  padding: 14px;
  margin: 16px 0;
  background: #fafafa;
}

.goodds-bump label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
}

.goodds-bump input[type="checkbox"] {
  margin-top: 4px;
}

.goodds-bump strong {
  display: block;
  font-size: 14px;
}

.goodds-bump .desc {
  font-size: 12px;
  color: #6b7280;
}

/* Botão "Finalizar pedido" / Place order: sempre visível e estilizado */
.goodds-checkout-wrap #place_order,
.goodds-checkout-wrap #payment #place_order,
.goodds-checkout-wrap .woocommerce-checkout-payment #place_order,
.goodds-checkout-wrap .woocommerce-checkout-payment .button.alt,
.goodds-checkout-wrap input[type="submit"][name="woocommerce_checkout_place_order"] {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  padding: 14px 24px;
  background: #000 !important;
  color: #fff !important;
  border: none !important;
  border-radius: 10px;
  font-size: 16px !important;
  font-weight: 600 !important;
  cursor: pointer;
  margin-top: 16px;
}

.goodds-checkout-wrap #place_order:hover,
.goodds-checkout-wrap .woocommerce-checkout-payment .button.alt:hover {
  background: #222 !important;
  color: #fff !important;
}
