/*
 * Da Chapada — dc-checkout.css
 * Escopo: SOMENTE página de checkout. Prefix: .dc-co-*
 * Não toca em tokens globais nem em dc-woo.css.
 */

/* ══════════════════════════════════════════════════════════
   Body do checkout — fundo cream
   ══════════════════════════════════════════════════════════ */
.woocommerce-checkout body,
body.woocommerce-checkout {
  background: var(--dc-cream-soft);
  color: var(--dc-ink);
  font-family: var(--dc-font-body);
}

/* ══════════════════════════════════════════════════════════
   Header slim
   ══════════════════════════════════════════════════════════ */
.dc-co-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--dc-cream-soft);
  border-bottom: 1px solid var(--dc-border);
  height: 64px;
}

.dc-co-header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.dc-co-header-logo img {
  height: 22px;
  width: auto;
  display: block;
}

.dc-co-header-ssl {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--dc-sage-deep);
  letter-spacing: .02em;
}

.dc-co-lock {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════
   Wrapper da página (controla largura máxima)
   ══════════════════════════════════════════════════════════ */
.woocommerce-checkout .woocommerce {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

@media (max-width: 640px) {
  .woocommerce-checkout .woocommerce { padding: 0 16px 60px; }
}

/* ══════════════════════════════════════════════════════════
   Intro
   ══════════════════════════════════════════════════════════ */
.dc-co-intro {
  padding: 40px 0 32px;
}

@media (max-width: 640px) {
  .dc-co-intro { padding: 28px 0 24px; }
}

/* Breadcrumb */
.dc-co-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--dc-fg3);
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.dc-co-breadcrumb a {
  color: var(--dc-fg3);
  text-decoration: none;
}
.dc-co-breadcrumb a:hover { color: var(--dc-ink); text-decoration: underline; }
.dc-co-breadcrumb span[aria-current] { color: var(--dc-ink); font-weight: 500; }

/* Título */
.dc-co-title {
  font-family: var(--dc-font-display);
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1;
  color: var(--dc-cacau-deep);
  margin: 0 0 10px;
  font-weight: normal;
}
.dc-co-title em {
  font-style: italic;
  color: var(--dc-tropical);
}

/* Subtítulo */
.dc-co-subtitle {
  font-size: 16px;
  color: var(--dc-fg2);
  margin: 0 0 28px;
  line-height: 1.5;
}

/* Steps */
.dc-co-steps {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.dc-co-step {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: var(--dc-r-pill);
  border: 1.5px solid var(--dc-border);
  background: var(--dc-cream);
  font-size: 13px;
  font-weight: 600;
  color: var(--dc-fg3);
  transition: border-color var(--dc-fast) var(--dc-ease);
}

.dc-co-step--active {
  border-color: var(--dc-tropical);
  background: var(--dc-cream-soft);
  color: var(--dc-ink);
}

.dc-co-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--dc-cream-deep);
  font-size: 11px;
  font-weight: 700;
  color: var(--dc-cacau);
}

.dc-co-step--active .dc-co-step-num {
  background: var(--dc-tropical);
  color: #fff;
}

.dc-co-step-sep {
  width: 20px;
  height: 1px;
  background: var(--dc-border);
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════
   Grid principal
   ══════════════════════════════════════════════════════════ */
.dc-co-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px 48px;
  align-items: start;
}

@media (max-width: 1024px) {
  .dc-co-grid { gap: 24px 32px; }
}

@media (max-width: 860px) {
  .dc-co-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

/* Coluna esquerda */
.dc-co-left {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

/* Coluna direita — sticky */
.dc-co-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 80px;
  min-width: 0;
}

@media (max-width: 860px) {
  .dc-co-right {
    position: static;
    order: -1;
    margin-bottom: 24px;
  }
}

/* ══════════════════════════════════════════════════════════
   Cards base
   ══════════════════════════════════════════════════════════ */
.dc-co-card {
  background: var(--dc-cream);
  border: 1px solid var(--dc-border);
  border-radius: var(--dc-r-xl);
  padding: 28px;
  box-shadow: var(--dc-shadow-1);
}

@media (max-width: 640px) {
  .dc-co-card { padding: 20px 18px; border-radius: var(--dc-r-lg); }
}

.dc-co-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--dc-font-body);
  font-size: 17px;
  font-weight: 700;
  color: var(--dc-cacau-deep);
  margin: 0 0 20px;
}

.dc-co-card-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--dc-cacau-deep);
  color: var(--dc-cream-soft);
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.dc-co-card-body { display: flex; flex-direction: column; gap: 0; }

/* ══════════════════════════════════════════════════════════
   Campos WooCommerce dentro dos cards
   ══════════════════════════════════════════════════════════ */
.dc-co-card .woocommerce-billing-fields,
.dc-co-card .woocommerce-shipping-fields,
.dc-co-card .woocommerce-additional-fields {
  display: contents;
}

.dc-co-card .woocommerce-billing-fields__field-wrapper,
.dc-co-card .woocommerce-shipping-fields__field-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
}

@media (max-width: 560px) {
  .dc-co-card .woocommerce-billing-fields__field-wrapper,
  .dc-co-card .woocommerce-shipping-fields__field-wrapper {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

/* Campos que ocupam largura total */
.dc-co-card .form-row-wide,
.dc-co-card #billing_email_field,
.dc-co-card #billing_cpf_field,
.dc-co-card #billing_address_1_field,
.dc-co-card #billing_company_field,
.dc-co-card #shipping_address_1_field,
.dc-co-card #order_comments_field {
  grid-column: 1 / -1;
}

/* p.form-row (cada campo) */
.dc-co-card .form-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
}

.dc-co-card .form-row label {
  font-size: 12px;
  font-weight: 600;
  color: var(--dc-fg2);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.dc-co-card .form-row label .required { color: var(--dc-tropical); margin-left: 2px; }

.dc-co-card .form-row input[type="text"],
.dc-co-card .form-row input[type="email"],
.dc-co-card .form-row input[type="tel"],
.dc-co-card .form-row input[type="number"],
.dc-co-card .form-row input[type="password"],
.dc-co-card .form-row select,
.dc-co-card .form-row textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--dc-cream-soft);
  border: 1.5px solid var(--dc-border);
  border-radius: var(--dc-r-md);
  font-family: var(--dc-font-body);
  font-size: 16px;
  color: var(--dc-ink);
  outline: none;
  transition: border-color var(--dc-fast) var(--dc-ease), box-shadow var(--dc-fast) var(--dc-ease);
  box-sizing: border-box;
  appearance: none;
}

.dc-co-card .form-row input:focus,
.dc-co-card .form-row select:focus,
.dc-co-card .form-row textarea:focus {
  border-color: var(--dc-cacau);
  box-shadow: 0 0 0 3px rgba(90,58,38,.10);
}

.dc-co-card .form-row .woocommerce-input-wrapper { width: 100%; }

/* Erros inline */
.dc-co-card .woocommerce-error,
.dc-co-card span.required-field-message {
  font-size: 12px;
  color: var(--dc-cranberry);
}

/* ══════════════════════════════════════════════════════════
   Newsletter opt-in
   ══════════════════════════════════════════════════════════ */
.dc-co-newsletter {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--dc-border);
}

.dc-co-check-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.dc-co-check-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.dc-co-check-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  min-width: 20px;
  border-radius: 5px;
  border: 1.5px solid var(--dc-border);
  background: var(--dc-cream-soft);
  transition: background var(--dc-fast), border-color var(--dc-fast);
  margin-top: 1px;
}

.dc-co-check-box svg {
  width: 10px;
  height: 10px;
  stroke: #fff;
  opacity: 0;
  transition: opacity var(--dc-fast);
}

.dc-co-check-input:checked + .dc-co-check-box {
  background: var(--dc-tropical);
  border-color: var(--dc-tropical);
}

.dc-co-check-input:checked + .dc-co-check-box svg { opacity: 1; }

.dc-co-check-text {
  font-size: 14px;
  color: var(--dc-fg2);
  line-height: 1.4;
}

/* ══════════════════════════════════════════════════════════
   Card de Pagamento — tabs
   ══════════════════════════════════════════════════════════ */
.dc-co-pay-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

@media (max-width: 480px) {
  .dc-co-pay-tabs { gap: 6px; }
}

.dc-co-pay-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px 10px;
  background: var(--dc-cream-soft);
  border: 1.5px solid var(--dc-border);
  border-radius: var(--dc-r-lg);
  cursor: pointer;
  transition: border-color var(--dc-fast) var(--dc-ease), background var(--dc-fast) var(--dc-ease), box-shadow var(--dc-fast);
  text-align: center;
  font-family: var(--dc-font-body);
  color: var(--dc-fg2);
}

.dc-co-pay-tab:hover {
  border-color: var(--dc-cacau);
  background: var(--dc-cream);
}

.dc-co-pay-tab.is-active {
  border-color: var(--dc-tropical);
  background: var(--dc-cream);
  box-shadow: 0 0 0 3px rgba(232,138,45,.12);
  color: var(--dc-ink);
}

.dc-co-tab-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.dc-co-tab-label {
  font-size: 14px;
  font-weight: 700;
}

.dc-co-tab-sub {
  font-size: 11px;
  font-weight: 500;
  color: var(--dc-fg3);
  white-space: nowrap;
}

.dc-co-pay-tab.is-active .dc-co-tab-sub { color: var(--dc-tropical); }

/* ── Corpo do gateway Woo ──────────────────────────────── */
.dc-co-pay-body { min-height: 0; }

/* Oculta a lista de gateways padrão (tabs substituem) */
.dc-co-pay-body #payment .wc_payment_methods {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Oculta cada radio label de gateway (tab visual já sinaliza) */
.dc-co-pay-body #payment .wc_payment_method > label {
  display: none !important;
}

/* Radio nativo oculto */
.dc-co-pay-body #payment .wc_payment_method input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* Caixa de conteúdo de cada gateway */
.dc-co-pay-body #payment .wc_payment_method .payment_box {
  display: none;
  padding: 16px;
  background: var(--dc-cream-soft);
  border: 1px solid var(--dc-border);
  border-radius: var(--dc-r-md);
  font-size: 14px;
  color: var(--dc-fg2);
  line-height: 1.5;
  margin-top: 0;
}

.dc-co-pay-body #payment .wc_payment_method.is-active .payment_box { display: block; }

/* Esconde o #place_order nativo — usamos nosso CTA */
.dc-co-pay-body #payment #place_order { display: none !important; }

/* Esconde aviso de privacidade padrão do Woo dentro do #payment */
.dc-co-pay-body #payment .woocommerce-privacy-policy-text { display: none; }

/* Botões de enviar que possam aparecer nos gateways */
.dc-co-pay-body #payment .woocommerce-terms-and-conditions-wrapper { display: none; }

/* ══════════════════════════════════════════════════════════
   Mini-lista de itens
   ══════════════════════════════════════════════════════════ */
.dc-co-items-card {
  background: var(--dc-cream-soft);
  border: 1px solid var(--dc-border);
  border-radius: var(--dc-r-xl);
  padding: 20px 20px 16px;
  box-shadow: var(--dc-shadow-1);
}

.dc-co-items-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.dc-co-items-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--dc-cacau-deep);
}

.dc-co-items-edit {
  font-size: 13px;
  color: var(--dc-tropical);
  text-decoration: none;
  font-weight: 500;
}
.dc-co-items-edit:hover { text-decoration: underline; }

.dc-co-items-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: 280px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.dc-co-items-list::-webkit-scrollbar { width: 4px; }
.dc-co-items-list::-webkit-scrollbar-thumb { background: var(--dc-cream-deep); border-radius: 2px; }

.dc-co-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--dc-border);
}

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

.dc-co-item-thumb {
  position: relative;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
}

.dc-co-item-thumb img {
  width: 56px;
  height: 56px;
  border-radius: var(--dc-r-sm);
  object-fit: cover;
  display: block;
}

.dc-co-item-qty {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--dc-cacau-deep);
  color: var(--dc-cream-soft);
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.dc-co-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.dc-co-item-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--dc-ink);
  line-height: 1.3;
  /* permite quebra — não truncar nome */
  word-break: break-word;
}

.dc-co-item-price {
  font-size: 13px;
  color: var(--dc-fg2);
  font-weight: 500;
}

/* ══════════════════════════════════════════════════════════
   Cupom
   ══════════════════════════════════════════════════════════ */
.dc-co-coupon-wrap {
  background: var(--dc-cream);
  border: 1px solid var(--dc-border);
  border-radius: var(--dc-r-xl);
  padding: 18px 20px;
  box-shadow: var(--dc-shadow-1);
}

.dc-co-coupon-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--dc-fg2);
  margin-bottom: 10px;
}

.dc-co-coupon-label svg { width: 15px; height: 15px; flex-shrink: 0; }

.dc-co-coupon-row {
  display: flex;
  gap: 8px;
}

.dc-co-coupon-input {
  flex: 1;
  padding: 9px 12px;
  background: var(--dc-cream-soft);
  border: 1.5px solid var(--dc-border);
  border-radius: var(--dc-r-md);
  font-family: var(--dc-font-body);
  font-size: 16px;
  color: var(--dc-ink);
  outline: none;
  transition: border-color var(--dc-fast);
  min-width: 0;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.dc-co-coupon-input::placeholder { text-transform: none; letter-spacing: 0; color: var(--dc-fg3); }

.dc-co-coupon-input:focus { border-color: var(--dc-cacau); }

.dc-co-coupon-btn {
  padding: 9px 16px;
  background: var(--dc-cacau-deep);
  color: var(--dc-cream-soft);
  border: none;
  border-radius: var(--dc-r-md);
  font-family: var(--dc-font-body);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity var(--dc-fast);
}

.dc-co-coupon-btn:hover { opacity: .85; }
.dc-co-coupon-btn:disabled { opacity: .5; cursor: not-allowed; }

.dc-co-coupon-msg {
  margin-top: 8px;
  font-size: 13px;
  min-height: 18px;
  line-height: 1.4;
}

.dc-co-coupon-msg--ok  { color: var(--dc-sage-deep); }
.dc-co-coupon-msg--err { color: var(--dc-cranberry); }

/* ══════════════════════════════════════════════════════════
   Card de totais — fundo escuro
   ══════════════════════════════════════════════════════════ */
.dc-co-totals-card {
  background: var(--dc-cacau-deep);
  color: var(--dc-cream-soft);
  border-radius: var(--dc-r-xl);
  overflow: hidden;
  box-shadow: var(--dc-shadow-3);
}

/* ── Totals live (fragmento AJAX) ─────────────── */
.dc-co-totals-live {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.dc-co-totals-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dc-co-total-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  font-size: 14px;
  gap: 8px;
}

.dc-co-total-row > span:first-child { color: rgba(250,244,230,.7); }
.dc-co-total-row > span:last-child  { font-weight: 600; color: var(--dc-cream-soft); text-align: right; }

.dc-co-total-row--coupon > span:last-child { color: #a8d5a0; }

.dc-co-coupon-tag {
  display: inline-block;
  padding: 1px 6px;
  background: rgba(250,244,230,.12);
  border-radius: var(--dc-r-pill);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  margin-left: 5px;
  vertical-align: middle;
}

.dc-co-ship-label {
  display: block;
  font-size: 11px;
  font-weight: 400;
  margin-top: 2px;
  opacity: .65;
}

.dc-co-ship-free { color: #a8d5a0; font-weight: 600; }
.dc-co-ship-tbd  { color: rgba(250,244,230,.5); font-style: italic; }

/* Total grande */
.dc-co-total-grand {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid rgba(250,244,230,.14);
}

.dc-co-total-grand > span:first-child {
  font-size: 14px;
  color: rgba(250,244,230,.7);
  font-weight: 500;
}

.dc-co-total-amount {
  font-family: var(--dc-font-display);
  font-size: 36px;
  font-weight: normal;
  color: var(--dc-cream-soft);
  line-height: 1;
}

/* Botão CTA */
.dc-co-pay-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px 20px;
  background: var(--dc-tropical);
  color: #fff;
  border: none;
  border-radius: var(--dc-r-pill);
  font-family: var(--dc-font-body);
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: filter var(--dc-fast) var(--dc-ease), transform var(--dc-fast);
  letter-spacing: .01em;
  text-align: center;
}

.dc-co-pay-cta:hover  { filter: brightness(1.08); }
.dc-co-pay-cta:active { transform: scale(.98); }
.dc-co-pay-cta:disabled { opacity: .55; cursor: not-allowed; }

.dc-co-cta-lock  { width: 16px; height: 16px; flex-shrink: 0; }
.dc-co-cta-arrow { width: 18px; height: 18px; flex-shrink: 0; }

/* Trust list */
.dc-co-trust-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dc-co-trust-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(250,244,230,.65);
}

.dc-co-trust-list svg { width: 14px; height: 14px; flex-shrink: 0; opacity: .75; }

/* Disclaimer */
.dc-co-disclaimer {
  font-size: 11px;
  color: rgba(250,244,230,.4);
  line-height: 1.5;
  text-align: center;
  margin: 0;
}

.dc-co-disclaimer a { color: rgba(250,244,230,.6); text-underline-offset: 2px; }
.dc-co-disclaimer a:hover { color: var(--dc-cream-soft); }

/* ══════════════════════════════════════════════════════════
   #order_review — oculto visualmente, acessível ao Woo AJAX
   ══════════════════════════════════════════════════════════ */
.dc-co-review-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ══════════════════════════════════════════════════════════
   Estado vazio
   ══════════════════════════════════════════════════════════ */
.dc-co-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
  padding: 40px 24px;
}

.dc-co-empty-card {
  max-width: 480px;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.dc-co-empty-icon {
  width: 64px;
  height: 64px;
  color: var(--dc-cream-deep);
}

.dc-co-empty-title {
  font-family: var(--dc-font-display);
  font-size: clamp(28px, 4vw, 44px);
  color: var(--dc-cacau-deep);
  font-weight: normal;
  margin: 0;
  line-height: 1.1;
}

.dc-co-empty-title em {
  font-style: italic;
  color: var(--dc-tropical);
}

.dc-co-empty-sub {
  font-size: 16px;
  color: var(--dc-fg2);
  line-height: 1.5;
  margin: 0;
}

.dc-co-empty-btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 4px;
}

.dc-co-btn-primary {
  padding: 12px 24px;
  background: var(--dc-cacau-deep);
  color: var(--dc-cream-soft);
  border-radius: var(--dc-r-pill);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: opacity var(--dc-fast);
}
.dc-co-btn-primary:hover { opacity: .85; }

.dc-co-btn-ghost {
  padding: 12px 24px;
  background: transparent;
  color: var(--dc-cacau-deep);
  border: 1.5px solid var(--dc-border);
  border-radius: var(--dc-r-pill);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: border-color var(--dc-fast), background var(--dc-fast);
}
.dc-co-btn-ghost:hover { border-color: var(--dc-cacau); background: var(--dc-cream); }

/* ══════════════════════════════════════════════════════════
   WooCommerce — mensagens de erro / aviso
   ══════════════════════════════════════════════════════════ */
.woocommerce-checkout .woocommerce-error,
.woocommerce-checkout .woocommerce-message,
.woocommerce-checkout .woocommerce-info {
  border-radius: var(--dc-r-md);
  margin-bottom: 20px;
}

/* ══════════════════════════════════════════════════════════
   Métodos de envio (Frenet) dentro do card 2
   ══════════════════════════════════════════════════════════ */
.dc-co-card .woocommerce-shipping-methods {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dc-co-card .woocommerce-shipping-methods li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--dc-cream-soft);
  border: 1.5px solid var(--dc-border);
  border-radius: var(--dc-r-md);
  cursor: pointer;
  transition: border-color var(--dc-fast);
}

.dc-co-card .woocommerce-shipping-methods li:has(input:checked) {
  border-color: var(--dc-tropical);
  background: var(--dc-cream);
}

.dc-co-card .woocommerce-shipping-methods li input[type="radio"] { accent-color: var(--dc-tropical); }

.dc-co-card .woocommerce-shipping-methods li label {
  font-size: 14px;
  font-weight: 500;
  color: var(--dc-ink);
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
}

/* Badge frete grátis */
.dc-co-card .woocommerce-shipping-methods li label .dc-free-badge::before {
  content: "✓ ";
}

/* ══════════════════════════════════════════════════════════
   Responsive tweaks
   ══════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .dc-co-pay-tabs {
    grid-template-columns: repeat(3, 1fr);
  }

  .dc-co-tab-sub { display: none; }

  .dc-co-total-amount { font-size: 28px; }

  .dc-co-pay-cta { font-size: 15px; padding: 14px 16px; }
}

@media (max-width: 380px) {
  .dc-co-pay-tabs { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════════════
   Checkout Accordion & Progressive Disclosure Styles
   ══════════════════════════════════════════════════════════ */

/* Transições e estados de recolhimento dos cards */
.dc-co-card {
  transition: background-color var(--dc-fast) var(--dc-ease), border-color var(--dc-fast) var(--dc-ease), box-shadow var(--dc-fast) var(--dc-ease);
}

.dc-co-card-body-wrapper {
  overflow: hidden;
  max-height: 2500px;
  opacity: 1;
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.dc-co-card--collapsed {
  background: var(--dc-cream-soft);
  box-shadow: none;
  border-color: rgba(90, 58, 38, 0.08);
}

.dc-co-card--collapsed .dc-co-card-body-wrapper {
  max-height: 0 !important;
  opacity: 0 !important;
  pointer-events: none;
}

/* Cabeçalho do Card interativo quando recolhido */
.dc-co-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.dc-co-card--collapsed .dc-co-card-header {
  cursor: pointer;
}

.dc-co-card-title {
  margin-bottom: 0;
}

.dc-co-card--active .dc-co-card-title {
  margin-bottom: 24px;
}

/* Botão Alterar elegante */
.dc-co-card-edit-btn {
  background: transparent;
  border: 1.5px solid var(--dc-border);
  padding: 6px 14px;
  border-radius: var(--dc-r-pill);
  font-family: var(--dc-font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--dc-cacau);
  cursor: pointer;
  transition: all var(--dc-fast) var(--dc-ease);
}

.dc-co-card-edit-btn:hover {
  background: var(--dc-cream-deep);
  border-color: var(--dc-cacau);
  color: var(--dc-cacau-deep);
}

/* Resumo do passo concluído */
.dc-co-card-summary {
  font-size: 14px;
  color: var(--dc-fg2);
  line-height: 1.5;
  margin-top: 12px;
  padding: 12px 14px;
  background: var(--dc-cream-soft);
  border: 1px solid var(--dc-border);
  border-radius: var(--dc-r-md);
  animation: dcFadeIn 0.3s ease;
}

.dc-co-summary-text strong {
  color: var(--dc-ink);
}

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

/* Botões Continuar de Passo */
.dc-co-next-btn {
  margin-top: 24px;
  width: 100%;
  padding: 14px 20px;
  border: none;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: .02em;
}

/* ══════════════════════════════════════════════════════════
   Validação de Campos & Mensagens de Erro
   ══════════════════════════════════════════════════════════ */
.dc-co-card .form-row.is-invalid input,
.dc-co-card .form-row.is-invalid select {
  border-color: var(--dc-cranberry) !important;
  background-color: rgba(217, 83, 79, 0.01) !important;
}

.dc-co-field-error {
  display: block;
  font-size: 12px;
  color: var(--dc-cranberry);
  margin-top: 4px;
  font-weight: 600;
  animation: dcSlideIn 0.2s ease;
}

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

/* ══════════════════════════════════════════════════════════
   Mobile Sticky Summary & Drawer
   ══════════════════════════════════════════════════════════ */
.dc-co-mobile-summary {
  display: none;
  position: sticky;
  top: 64px;
  z-index: 99;
  background: var(--dc-cream);
  border-bottom: 1px solid var(--dc-border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.dc-co-mobile-summary-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  max-width: 1120px;
  margin: 0 auto;
}

.dc-co-mobile-summary-toggle {
  background: none;
  border: none;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--dc-font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--dc-cacau-deep);
  cursor: pointer;
  padding: 0;
}

.dc-co-mobile-cart-icon {
  width: 18px;
  height: 18px;
  stroke: var(--dc-cacau-deep);
}

.dc-co-mobile-arrow-icon {
  width: 16px;
  height: 16px;
  stroke: var(--dc-cacau);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.dc-co-mobile-summary-toggle.is-open .dc-co-mobile-arrow-icon {
  transform: rotate(180deg);
}

.dc-co-mobile-summary-total {
  font-size: 16px;
  font-weight: 700;
  color: var(--dc-ink);
}

/* Mobile Sidebar Drawer */
@media (max-width: 860px) {
  .dc-co-mobile-summary {
    display: block;
  }

  aside.dc-co-right {
    display: none;
    position: static;
    order: -1;
    margin-bottom: 0;
    background: var(--dc-cream-soft);
    border-bottom: 1px solid var(--dc-border);
    padding: 24px 20px;
  }

  aside.dc-co-right.is-open {
    display: flex;
    animation: dcSlideDown 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  }
}

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

/* Estilo do container de campos de endereço no Card 2 */
.dc-co-billing-address-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
}

@media (max-width: 560px) {
  .dc-co-billing-address-wrapper {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

.dc-co-billing-address-wrapper #billing_postcode_field,
.dc-co-billing-address-wrapper #billing_address_1_field {
  grid-column: 1 / -1;
}

/* Estilo de loading no botão nativo WooCommerce de submissão */
.dc-co-pay-cta.is-loading {
  position: relative;
  color: transparent !important;
}

.dc-co-pay-cta.is-loading::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 50%;
  margin-top: -10px;
  margin-left: -10px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: dcSpin 0.6s linear infinite;
}

@keyframes dcSpin {
  to { transform: rotate(360deg); }
}

/* =========================================================================
   Ajustes de Sub-etapas do Passo 1 (Identificação)
   ========================================================================= */
.dc-co-substep {
  overflow: hidden;
  max-height: 1200px;
  opacity: 1;
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease, margin 0.3s ease;
}

.dc-co-substep--collapsed {
  max-height: 0 !important;
  opacity: 0 !important;
  pointer-events: none;
  margin: 0 !important;
  padding: 0 !important;
}

.dc-co-substep-title {
  font-family: var(--dc-font-body);
  font-size: 12px;
  font-weight: 700;
  color: var(--dc-cacau);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin: 0 0 16px 0;
  border-bottom: 1px dashed var(--dc-border);
  padding-bottom: 8px;
}

#dc-substep-personal {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--dc-border);
}

.dc-co-substep-next-btn {
  margin-top: 16px;
  width: 100%;
}

/* =========================================================================
   Estilização dos Campos Readonly (Cidade/Estado pós ViaCEP)
   ========================================================================= */
.dc-readonly-field,
.dc-co-card .form-row input.dc-readonly-field {
  background-color: var(--dc-cream-deep) !important;
  border-color: var(--dc-border) !important;
  color: var(--dc-fg2) !important;
  cursor: not-allowed;
  opacity: 0.85;
}

/* =========================================================================
   Endereço de Faturamento Alternativo
   ========================================================================= */
.dc-co-different-billing-wrap {
  margin: 20px 0 8px;
  padding: 16px;
  background: var(--dc-cream-soft);
  border: 1.5px solid var(--dc-border);
  border-radius: var(--dc-r-md);
  transition: border-color var(--dc-fast);
}

.dc-co-different-billing-wrap:has(input:checked) {
  border-color: var(--dc-tropical);
}

.dc-co-shipping-address-wrapper {
  overflow: hidden;
  max-height: 1500px;
  opacity: 1;
  margin-top: 24px;
  padding: 24px;
  background: var(--dc-cream);
  border: 1.5px solid var(--dc-border);
  border-radius: var(--dc-r-xl);
  box-shadow: var(--dc-shadow-1);
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  box-sizing: border-box;
}

.dc-co-shipping-address-wrapper--collapsed {
  max-height: 0 !important;
  opacity: 0 !important;
  margin-top: 0 !important;
  padding: 0 !important;
  border: none !important;
  pointer-events: none;
}

.dc-co-shipping-address-title {
  font-family: var(--dc-font-body);
  font-size: 14px;
  font-weight: 700;
  color: var(--dc-cacau-deep);
  margin: 0 0 18px 0;
  text-transform: uppercase;
  letter-spacing: .05em;
  border-bottom: 1px dashed var(--dc-border);
  padding-bottom: 8px;
}

.dc-co-shipping-address-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
}

@media (max-width: 560px) {
  .dc-co-shipping-address-fields {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

.dc-co-shipping-address-fields #shipping_first_name_field,
.dc-co-shipping-address-fields #shipping_last_name_field,
.dc-co-shipping-address-fields #shipping_postcode_field,
.dc-co-shipping-address-fields #shipping_address_1_field {
  grid-column: 1 / -1;
}

/* =========================================================================
   Correção do Rodapé de Checkout Isolado (Apenas Checkout)
   ========================================================================= */
.dc-footer-co {
  background: var(--dc-cream);
  border-top: 1px solid var(--dc-border);
  padding: 48px 0;
  margin-top: 80px;
  width: 100%;
}

.dc-footer-co-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.dc-footer-co-seals {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}

.dc-footer-co-seal {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--dc-sage-deep);
  letter-spacing: .02em;
}

.dc-footer-co-icon {
  width: 18px;
  height: 18px;
  stroke: var(--dc-sage-deep);
  flex-shrink: 0;
}

.dc-footer-co-divider {
  width: 100%;
  height: 1px;
  background: var(--dc-border);
  opacity: 0.5;
}

.dc-footer-co-bottom {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  color: var(--dc-fg3);
  flex-wrap: wrap;
}

.dc-footer-co-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dc-footer-co-links a {
  color: var(--dc-fg2);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--dc-fast);
}

.dc-footer-co-links a:hover {
  color: var(--dc-tropical);
}

.dc-footer-co-dot {
  color: var(--dc-border);
}

@media (max-width: 768px) {
  .dc-footer-co {
    padding: 36px 0 40px;
    margin-top: 60px;
  }
  .dc-footer-co-seals {
    gap: 16px 24px;
  }
  .dc-footer-co-bottom {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }
  .dc-footer-co-links {
    justify-content: center;
  }
}

