/* BCX Theme — cart.css, v1.2.0
   Carrinho página dedicada com sticky CTA, vehicle context, Pix verde
   Mockup: bcx-ui-padrao/mockups/carrinho-mobile.html
*/

/* ─── Header/Footer minimalista (modo checkout, distração zero) ─── */
.bcx-checkout-mode .site-header,
.bcx-checkout-mode .bcx-header,
.bcx-checkout-mode .bcx-topbar,
.bcx-checkout-mode .site-footer,
.bcx-checkout-mode .bcx-footer,
.bcx-checkout-mode .bcx-promo-strip,
.bcx-checkout-mode .bcx-vehicle-selector-section,
.bcx-checkout-mode .bcx-section-newsletter,
.bcx-checkout-mode .bcx-section-since1984,
.bcx-checkout-mode .secondary-navigation,
.bcx-checkout-mode .storefront-handheld-footer-bar {
  display: none !important;
}
.bcx-checkout-mode { background: #F8FAFC; }

/* Header checkout v2: azul Guedes #5BB0E5, logo preto, selo segurança branco */
.bcx-checkout-header {
  background: #5BB0E5;
  border-bottom: 0;
  padding: 12px 16px;
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.bcx-checkout-header-inner {
  max-width: 1280px; margin: 0 auto;
  display: flex; align-items: center; gap: 16px;
  flex-wrap: wrap;
  justify-content: space-between;
}
.bcx-checkout-logo {
  text-decoration: none;
  display: flex; align-items: center;
}
/* Logo do header de cart/checkout, mesmo tamanho do topbar da home (calderon 17/05/2026) */
.bcx-checkout-logo img { display: block; max-height: 48px; width: auto; }
.bcx-checkout-logo-text { display: none; } /* logo é só imagem, sem texto duplicado */
.bcx-checkout-logo-text {
  font-weight: 900; font-size: 16px;
  color: #000;
  letter-spacing: -0.5px;
  display: flex; flex-direction: column; line-height: 1;
}
.bcx-checkout-logo-text small {
  font-size: 8px; font-weight: 700;
  color: #000;
  letter-spacing: 0.8px; margin-top: 2px;
  opacity: 0.7;
}

.bcx-checkout-header-secure {
  display: flex; align-items: center; gap: 6px;
  color: #000;
}
.bcx-checkout-header-secure svg { color: #000; }
.bcx-checkout-header-secure span {
  font-size: 12px; font-weight: 700;
}
.bcx-checkout-header-secure small {
  font-size: 10px; color: rgba(0,0,0,0.6);
  font-weight: 500;
}
@media (max-width: 600px) {
  .bcx-checkout-header-secure small { display: none; }
}

.bcx-checkout-back {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 600;
  color: var(--bcx-text-mid, #475569);
  text-decoration: none;
}
.bcx-checkout-back:hover { color: var(--bcx-primary-deep, #0F5E94); }
@media (max-width: 600px) {
  .bcx-checkout-back span { display: none; }
}

/* Trust bar NEUTRA (fundo branco, fonte cinza) — não compete com Pix verde nem CTA azul
   calderon 16/05/2026: foco no botão azul de finalizar, trust bar discreta */
.bcx-checkout-trust {
  background: #fff;
  border-top: 1px solid #E2E8F0;
  border-bottom: 1px solid #E2E8F0;
  padding: 12px 16px;
  margin-top: 32px;
}
.bcx-checkout-trust-inner {
  max-width: 1280px; margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 8px 12px;
  font-size: 12px;
  color: #94A3B8;
  font-weight: 500;
}
.bcx-checkout-trust-inner strong { color: #475569; font-weight: 600; }
.bcx-trust-item { display: inline-flex; align-items: center; gap: 5px; }
.bcx-trust-item svg { flex-shrink: 0; color: #94A3B8; }
.bcx-trust-sep { opacity: 0.4; color: #94A3B8; }
@media (max-width: 600px) {
  .bcx-checkout-trust-inner { font-size: 11px; gap: 6px 10px; }
  .bcx-trust-sep { display: none; }
}

/* Footer checkout v3: minimal só razão social */
.bcx-checkout-footer {
  background: #fff;
  padding: 14px 16px;
}
.bcx-checkout-footer-inner {
  max-width: 1280px; margin: 0 auto;
  text-align: center;
  font-size: 11px;
  color: var(--bcx-text-soft, #94A3B8);
  line-height: 1.5;
}
.bcx-checkout-footer-inner strong { color: var(--bcx-text-mid, #475569); font-weight: 700; font-size: 12px; }
.bcx-checkout-footer-pay {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; flex-wrap: wrap;
}
.bcx-checkout-footer-pix, .bcx-checkout-footer-boleto {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--bcx-bg-soft, #F1F5F9);
  border: 1px solid var(--bcx-border, #E2E8F0);
  padding: 4px 10px; border-radius: 6px;
  font-size: 11px; font-weight: 700;
  color: var(--bcx-text, #0F172A);
}
.bcx-checkout-footer-pix svg, .bcx-checkout-footer-boleto svg {
  flex-shrink: 0;
}

.bcx-checkout-footer-cnpj {
  font-size: 11px;
  color: var(--bcx-text-soft, #94A3B8);
  line-height: 1.5;
}
.bcx-checkout-footer-cnpj strong {
  color: var(--bcx-text-mid, #475569);
  font-weight: 700;
}
.bcx-checkout-footer-links {
  display: flex; gap: 6px; flex-wrap: wrap;
  align-items: center; justify-content: center;
  font-size: 11px;
}
.bcx-checkout-footer-links a {
  color: var(--bcx-text-mid, #475569);
  text-decoration: none;
}
.bcx-checkout-footer-links a:hover {
  color: var(--bcx-primary, #37B7FF);
  text-decoration: underline;
}
.bcx-checkout-footer-links .sep {
  color: var(--bcx-text-soft, #94A3B8);
}


.bcx-cart-page {
  max-width: 880px;
  margin: 0 auto;
  padding: 16px;
  font-family: 'Inter', sans-serif;
}
@media (min-width: 1024px) {
  .bcx-cart-page { padding: 24px; }
}

/* ─── Stepper ───────────────────────────────────────────────────── */
.bcx-stepper { margin-bottom: 20px; }
.bcx-stepper ol { display: flex; list-style: none; gap: 8px; padding: 0; margin: 0; }
.bcx-step { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; position: relative; font-size: 12px; color: var(--bcx-text-soft, #94A3B8); }
.bcx-step-num { width: 28px; height: 28px; border-radius: 50%; background: var(--bcx-border, #E2E8F0); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.bcx-step.is-current { color: var(--bcx-primary, #37B7FF); font-weight: 600; }
.bcx-step.is-current .bcx-step-num { background: var(--bcx-primary, #37B7FF); color: #fff; }
.bcx-step.is-done .bcx-step-num { background: var(--bcx-accent, #10B981); color: #fff; }
.bcx-step + .bcx-step::before { content: ''; position: absolute; top: 14px; left: -50%; width: 100%; height: 2px; background: var(--bcx-border); z-index: -1; }

/* ─── Vehicle context ───────────────────────────────────────────── */
.bcx-cart-vehicle {
  display: flex; align-items: center; gap: 12px;
  background: var(--bcx-primary-light, #DEF1FE);
  border-left: 4px solid var(--bcx-primary, #37B7FF);
  padding: 12px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
}
.bcx-cart-vehicle svg { color: var(--bcx-primary-deep, #0F5E94); flex-shrink: 0; }
.bcx-cart-vehicle-text { flex: 1; }
.bcx-cart-vehicle-text small { font-size: 10px; font-weight: 700; color: var(--bcx-primary-deep); text-transform: uppercase; letter-spacing: 0.5px; display: block; }
.bcx-cart-vehicle-text strong { font-size: 14px; font-weight: 800; color: var(--bcx-primary-deep); }
.bcx-cart-vehicle-change {
  background: #fff; color: var(--bcx-primary-deep);
  border: 1px solid var(--bcx-primary);
  padding: 5px 12px; border-radius: 100px;
  font-size: 11px; font-weight: 700; text-decoration: none;
}

/* ─── Header centralizado ───────────────────────────────────────── */
.bcx-cart-page-header { margin-bottom: 20px; text-align: center; }
.bcx-cart-page-header h1 { font-size: 24px; font-weight: 800; margin: 0 0 4px; color: var(--bcx-text); }
.bcx-cart-subtitle { font-size: 13px; color: var(--bcx-text-mid); margin: 0; }

/* ─── Continuar comprando link (embaixo do cart) ────────────────── */
.bcx-cart-continue {
  text-align: center;
  margin: 24px 0 0;
  padding: 16px 0;
  border-top: 1px dashed var(--bcx-border, #E2E8F0);
}
.bcx-cart-continue-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600;
  color: var(--bcx-primary-deep, #0F5E94);
  text-decoration: none;
  padding: 10px 18px;
  border: 1px solid var(--bcx-border, #E2E8F0);
  border-radius: 100px;
  background: #fff;
  transition: all 0.15s;
}
.bcx-cart-continue-link:hover {
  border-color: var(--bcx-primary, #37B7FF);
  background: var(--bcx-primary-light, #DEF1FE);
  transform: translateX(-2px);
}

/* ─── Lista de itens ────────────────────────────────────────────── */
.bcx-cart-items { list-style: none; padding: 0; margin: 0 0 20px; display: flex; flex-direction: column; gap: 10px; }
.bcx-cart-item {
  display: flex; gap: 12px;
  background: #fff; padding: 14px;
  border: 1px solid var(--bcx-border, #E2E8F0);
  border-radius: 12px;
}
.bcx-cart-item-thumb {
  width: 80px; height: 80px;
  background: var(--bcx-bg-soft, #F1F5F9);
  border-radius: 8px;
  overflow: hidden; flex-shrink: 0;
}
.bcx-cart-item-thumb img, .bcx-cart-item-thumb a { display: block; width: 100%; height: 100%; object-fit: cover; }
.bcx-cart-item-info { flex: 1; min-width: 0; }
.bcx-cart-item-name { font-size: 13px; font-weight: 700; line-height: 1.3; margin-bottom: 2px; }
.bcx-cart-item-name a { color: var(--bcx-text); text-decoration: none; }
.bcx-cart-item-sku { font-size: 10px; color: var(--bcx-text-soft); margin-bottom: 6px; }

.bcx-cart-item-fitment {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600;
  padding: 3px 8px;
  border-radius: 100px;
  margin-bottom: 8px;
}
.bcx-cart-item-fitment.compat { background: var(--bcx-pix-light, #D1FAE5); color: var(--bcx-pix-dark, #047857); }
.bcx-cart-item-fitment.warn { background: #FEF3C7; color: #92400E; }

.bcx-cart-item-price { margin-bottom: 8px; }
.bcx-cart-item-price strong { font-size: 16px; font-weight: 900; color: var(--bcx-text); }
.bcx-cart-item-pix {
  display: block; font-size: 11px; font-weight: 700;
  color: var(--bcx-pix-dark, #047857);
}

/* Card compacto v3 (calderon 17/05/2026): fitment + qty stepper na MESMA LINHA.
   Economiza ~36px de altura por card = +1 produto visível no viewport mobile. */
.bcx-cart-item-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.bcx-cart-item-info .bcx-cart-item-name { margin-bottom: 0; }
.bcx-cart-item-info .bcx-cart-item-sku { margin-bottom: 4px; }
.bcx-cart-item-info .bcx-cart-item-price { margin-bottom: 0; margin-top: 4px; }

/* Row: fitment esq + qty stepper dir */
.bcx-cart-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 2px 0 4px;
}
.bcx-cart-item-row .bcx-cart-item-fitment {
  margin-bottom: 0;
  flex: 0 1 auto;
  min-width: 0;
}
.bcx-cart-item-row-spacer { flex: 1; }
.bcx-cart-item-row .bcx-cart-item-actions {
  margin-top: 0;
  flex-shrink: 0;
}

.bcx-cart-item-actions {
  display: flex; align-items: center; justify-content: flex-start;
}
.bcx-cart-item-remove { display: none !important; }
.bcx-cart-qty { display: inline-flex; align-items: center; background: var(--bcx-bg-soft, #F1F5F9); border: 1px solid var(--bcx-border); border-radius: 100px; overflow: hidden; }
.bcx-cart-qty .qty {
  width: 36px; height: 32px; padding: 0; text-align: center;
  background: transparent; border: none; border-left: 1px solid var(--bcx-border); border-right: 1px solid var(--bcx-border);
  font-weight: 700; font-size: 12px;
  -moz-appearance: textfield;
}
.bcx-cart-qty .qty::-webkit-outer-spin-button,
.bcx-cart-qty .qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.bcx-cart-qty button.plus, .bcx-cart-qty button.minus {
  width: 28px; height: 32px; background: transparent; border: none;
  color: var(--bcx-text-mid); font-weight: 700; font-size: 14px;
  cursor: pointer;
}
.bcx-cart-item-remove {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; color: var(--bcx-promo, #EF4444);
  text-decoration: none;
}
.bcx-cart-item-remove:hover { text-decoration: underline; }

/* ─── Blocos (CEP em cima, Cupom embaixo) ──────────────────────── */
.bcx-cart-blocks { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }

.bcx-cart-shipping, .bcx-cart-coupon {
  background: #fff;
  border: 1px solid var(--bcx-border);
  border-radius: 12px;
  padding: 14px;
}
.bcx-cart-shipping h3, .bcx-cart-coupon summary {
  font-size: 13px; font-weight: 700;
  display: flex; align-items: center; gap: 6px;
  margin: 0 0 10px; cursor: pointer;
  list-style: none;
}
.bcx-cart-coupon summary::-webkit-details-marker { display: none; }
.bcx-cart-coupon[open] summary { margin-bottom: 10px; }
.bcx-cart-coupon-form { display: flex; gap: 6px; }
.bcx-cart-coupon-form input { flex: 1; height: 38px; padding: 0 10px; border: 1px solid var(--bcx-border); border-radius: 6px; font-size: 13px; }

/* shipping calc do WC override */
.shipping-calculator-form { display: flex; flex-direction: column; gap: 8px; }
.shipping-calculator-form input, .shipping-calculator-form select { height: 36px; padding: 0 10px; border: 1px solid var(--bcx-border); border-radius: 6px; font-size: 13px; width: 100%; }
.shipping-calculator-form button { background: var(--bcx-primary); color: #fff; border: none; padding: 8px 14px; border-radius: 6px; font-weight: 700; font-size: 12px; cursor: pointer; }

/* ─── Resumo ──────────────────────────────────────────────────── */
.bcx-cart-summary {
  background: #fff;
  border: 1px solid var(--bcx-border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}
.bcx-cart-summary h3 {
  font-size: 14px; font-weight: 800;
  margin: 0 0 12px;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--bcx-text);
}
.bcx-cart-totals { display: flex; flex-direction: column; gap: 6px; }
.bcx-cart-total-row {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 13px;
  color: var(--bcx-text-mid);
}
.bcx-cart-total-row strong { font-weight: 700; color: var(--bcx-text); }
.bcx-cart-total-pix-economy { color: var(--bcx-pix-dark, #047857); font-weight: 700; }
.bcx-cart-total-pix-economy strong { color: var(--bcx-pix-dark); }
.bcx-cart-total-final {
  padding-top: 10px; margin-top: 4px;
  border-top: 1px solid var(--bcx-border);
  font-size: 15px;
}
.bcx-cart-total-final span { font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; }
.bcx-cart-total-amount { font-size: 18px; font-weight: 900; }

.bcx-cart-total-pix {
  margin-top: 8px;
  padding: 10px 12px;
  background: var(--bcx-pix-light, #D1FAE5);
  border-radius: 8px;
  display: flex; justify-content: space-between; align-items: baseline;
}
.bcx-cart-total-pix strong {
  font-size: 18px; font-weight: 900;
  color: var(--bcx-pix-dark, #047857);
}
.bcx-cart-total-pix small {
  font-size: 12px; color: var(--bcx-pix-dark);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* Trust */
.bcx-cart-trust {
  margin-top: 12px; padding-top: 12px;
  border-top: 1px dashed var(--bcx-border);
}
.bcx-cart-trust p {
  font-size: 11px; color: var(--bcx-text-soft);
  margin: 4px 0;
  display: flex; align-items: center; gap: 4px;
}

/* ─── CTA full-width (mesmo padrão Identificação/Pagamento) ─── */
.bcx-cart-cta-inline {
  margin: 16px 0 0;
  max-width: 480px;
  margin-left: auto; margin-right: auto;
}
.bcx-cart-cta-inline .bcx-button {
  width: 100%;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px;
  font-size: 15px;
}
.bcx-cart-total-shipping .bcx-free { color: var(--bcx-cor-pix, #10B981); font-weight: 800; }
.bcx-cart-total-shipping .bcx-pending { color: var(--bcx-text-soft, #94A3B8); font-weight: 500; font-size: 12px; font-style: italic; }
/* Regra antiga removida (calderon 16/05/2026):
   .bcx-cart-cta-inline agora aparece em TODOS os tamanhos.
   Sticky CTA do mobile foi tirado, então este botão inline assume a função. */

/* Sticky CTA do carrinho REMOVIDO em mobile também (calderon 16/05/2026).
   Mobile agora usa o mesmo CTA inline azul do desktop (.bcx-cart-cta-inline).
   Padrão consistente desktop+mobile, sem barra fixa cobrindo footer. */
.bcx-cart-sticky-cta { display: none !important; }
/* Sticky removido, footer não precisa mais de margem extra */
body.bcx-checkout-mode .bcx-cart-page { padding-bottom: 16px; }
.bcx-cart-sticky-inner {
  max-width: 880px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.bcx-cart-sticky-total {
  display: flex; flex-direction: column; gap: 1px; flex: 1;
  min-width: 0;
}
.bcx-cart-sticky-vista, .bcx-cart-sticky-pix {
  display: flex; align-items: baseline; gap: 6px;
  white-space: nowrap;
}
.bcx-cart-sticky-vista .lbl {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--bcx-text-soft, #94A3B8);
}
.bcx-cart-sticky-vista .val {
  font-size: 13px; font-weight: 700;
  color: var(--bcx-text-mid, #475569);
  text-decoration: line-through;
}
.bcx-cart-sticky-parcela {
  font-size: 11px; color: var(--bcx-text-mid, #475569);
  font-weight: 600;
  margin: 1px 0;
}
.bcx-cart-sticky-pix .lbl {
  font-size: 10px; font-weight: 700;
  color: var(--bcx-pix-dark, #047857);
  text-transform: uppercase; letter-spacing: 0.5px;
}
.bcx-cart-sticky-pix .val {
  font-size: 18px; font-weight: 900;
  color: var(--bcx-pix-dark, #047857);
}
.bcx-cart-sticky-pix .badge {
  background: var(--bcx-pix, #10B981);
  color: #fff;
  font-size: 9px; font-weight: 800;
  padding: 1px 5px; border-radius: 100px;
  letter-spacing: 0.5px;
}
.bcx-button-lg {
  background: var(--bcx-pix, #10B981);
  color: #fff !important;
  border: none;
  padding: 14px 22px;
  border-radius: 10px;
  font-weight: 800; font-size: 14px;
  display: inline-flex; align-items: center; gap: 6px;
  text-decoration: none;
  cursor: pointer;
  flex-shrink: 0;
}
.bcx-button-lg:hover { background: var(--bcx-pix-dark, #047857); transform: translateY(-1px); }
.bcx-button-lg svg { color: #fff; }

/* ─── Shipping inline simplificado ──────────────────────────────── */
.bcx-cart-shipping-inline {
  background: #fff;
  border: 1px solid var(--bcx-border, #E2E8F0);
  border-radius: 12px;
  padding: 14px;
}
.bcx-cart-cep-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700;
  color: var(--bcx-text, #0F172A);
  margin-bottom: 8px;
}
.bcx-cart-cep-label svg { color: var(--bcx-primary, #37B7FF); }
.bcx-cart-cep-form {
  display: flex; gap: 6px;
}
.bcx-cart-cep-input {
  flex: 1; height: 40px;
  padding: 0 12px;
  background: var(--bcx-bg-soft, #F1F5F9);
  border: 1px solid var(--bcx-border, #E2E8F0);
  border-radius: 8px;
  font-size: 14px; font-family: inherit;
  letter-spacing: 0.5px;
}
.bcx-cart-cep-input:focus {
  outline: none;
  border-color: var(--bcx-primary, #37B7FF);
  box-shadow: 0 0 0 3px rgba(55,183,255,0.18);
}
/* Botão OK removido — calderon 16/05/2026, calculo dinâmico ao completar CEP */
.bcx-cart-cep-btn { display: none; }
.bcx-cart-cep-form .bcx-cart-cep-input { width: 100%; }
/* Indicador visual de loading quando o CEP completa e o fetch dispara */
.bcx-cart-cep-input.is-calculating {
  background: #F1F5F9 url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'><circle cx='12' cy='12' r='10' stroke='%235BB0E5' stroke-width='3' fill='none' stroke-dasharray='40 20'><animateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='0.8s' repeatCount='indefinite'/></circle></svg>") no-repeat right 10px center;
  padding-right: 36px;
}
.bcx-cart-cep-help {
  display: inline-block; margin-top: 6px;
  font-size: 11px; color: var(--bcx-primary, #37B7FF);
  text-decoration: none;
}
.bcx-cart-cep-help:hover { text-decoration: underline; }

/* Banner verde de sucesso após calcular frete (calderon 17/05/2026, feedback elegante) */
.bcx-shipping-success {
  display: flex; align-items: center; gap: 6px;
  margin: 12px 0 8px;
  padding: 8px 12px;
  background: var(--bcx-pix-light, #D1FAE5);
  color: var(--bcx-pix-dark, #047857);
  border-radius: 8px;
  font-size: 12.5px; font-weight: 600;
  border-left: 3px solid var(--bcx-pix-dark, #047857);
  animation: bcx-shipping-success-in 0.4s ease-out;
}
.bcx-shipping-success strong { font-weight: 800; }
@keyframes bcx-shipping-success-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Selo "Mais barato" no rate de menor preço (incentivo de escolha) */
.bcx-shipping-rate-badge {
  display: inline-block;
  background: var(--bcx-pix-dark, #047857);
  color: #fff;
  font-size: 10px; font-weight: 800;
  padding: 3px 8px;
  border-radius: 100px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  flex-shrink: 0;
  margin-left: 8px;
}

/* Skeleton loader nas rates durante refresh AJAX */
.bcx-cart-page.is-refreshing .bcx-cart-shipping-rates {
  opacity: 0.4;
  pointer-events: none;
  filter: blur(0.4px);
  position: relative;
}
.bcx-cart-page.is-refreshing .bcx-cart-shipping-rates::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.6) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: bcx-skeleton-shimmer 1.2s infinite;
}
@keyframes bcx-skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Lista de fretes disponíveis (sem bullets, cards estilizados) */
.bcx-cart-shipping-rates {
  list-style: none; padding: 0; margin: 12px 0 0;
  display: flex; flex-direction: column; gap: 6px;
}
.bcx-cart-shipping-rates .bcx-shipping-rate {
  animation: bcx-rate-in 0.32s ease-out both;
  animation-delay: var(--bcx-rate-delay, 0ms);
}
@keyframes bcx-rate-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.bcx-cart-shipping-rates li::marker { content: ''; }
.bcx-shipping-rate { list-style: none; }
.bcx-shipping-rate label {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: #fff;
  border: 1.5px solid var(--bcx-border, #E2E8F0);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 13px;
  line-height: 1.35;
}
.bcx-shipping-rate label:hover {
  border-color: var(--bcx-primary, #37B7FF);
  background: var(--bcx-primary-light, #DEF1FE);
}
.bcx-shipping-rate.is-chosen label {
  border-color: var(--bcx-primary, #37B7FF);
  background: var(--bcx-primary-light, #DEF1FE);
  box-shadow: 0 0 0 3px rgba(55,183,255,0.12);
}
/* Rate "Mais barato" recebe borda verde sutil (não compete com is-chosen azul) */
.bcx-shipping-rate.is-cheapest:not(.is-chosen) label {
  border-color: rgba(4,120,87,0.35);
}
.bcx-shipping-rate.is-cheapest.is-chosen label {
  border-color: var(--bcx-pix-dark, #047857);
  background: var(--bcx-pix-light, #D1FAE5);
  box-shadow: 0 0 0 3px rgba(4,120,87,0.15);
}
.bcx-shipping-rate.is-cheapest.is-chosen input[type="radio"] { accent-color: var(--bcx-pix-dark, #047857); }

/* Pulse no total quando recalcula via AJAX (sinaliza atualização) */
.bcx-just-updated {
  animation: bcx-total-pulse 0.85s ease-out;
}
@keyframes bcx-total-pulse {
  0%   { transform: scale(1);    color: inherit; }
  20%  { transform: scale(1.08); color: var(--bcx-pix-dark, #047857); }
  60%  { transform: scale(1);    color: var(--bcx-pix-dark, #047857); }
  100% { transform: scale(1);    color: inherit; }
}

/* Mobile fitment+qty: fitment encolhe se preciso, qty stepper fica fixo direita */
@media (max-width: 480px) {
  .bcx-cart-item-row { gap: 6px; }
  .bcx-cart-item-fitment {
    font-size: 10.5px;
    padding: 2px 7px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60%;
  }
  .bcx-cart-item-row .bcx-cart-item-actions .bcx-cart-qty-stepper {
    transform: scale(0.92);
    transform-origin: right center;
  }
}
.bcx-shipping-rate input[type="radio"] {
  width: 18px; height: 18px;
  accent-color: var(--bcx-primary, #37B7FF);
  flex-shrink: 0;
}
.bcx-shipping-rate-label {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 2px;
}
.bcx-shipping-rate-label strong {
  font-weight: 400; color: var(--bcx-text); font-size: 13px;
  line-height: 1.4;
}
.bcx-shipping-rate-label .amount,
.bcx-shipping-rate-label .amount bdi,
.bcx-shipping-rate-label .woocommerce-Price-amount {
  color: #0F172A !important;
  font-weight: 800 !important;
  font-size: 13px;
}
.bcx-shipping-no-rates {
  list-style: none;
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--bcx-promo, #EF4444);
  padding: 8px 0;
}

/* Cupom accordion bem discreto (escondido por default, alinhado à esquerda) */
.bcx-cart-coupon {
  background: transparent;
  border: none;
  padding: 4px 4px 0;
  text-align: left;
}
.bcx-cart-coupon summary {
  cursor: pointer;
  list-style: none;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
  padding: 6px 12px;
  color: var(--bcx-text-soft, #94A3B8);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
}
.bcx-cart-coupon summary:hover { color: var(--bcx-primary, #37B7FF); }
.bcx-cart-coupon summary::-webkit-details-marker { display: none; }
.bcx-cart-coupon summary::marker { content: ''; }
.bcx-summary-text {
  display: inline-flex; align-items: center; gap: 4px;
}
.bcx-summary-text svg { width: 10px; height: 10px; }
.bcx-cart-coupon[open] summary { color: var(--bcx-primary-deep, #0F5E94); }
.bcx-cart-coupon[open] .bcx-cart-coupon-form { margin: 10px 0 0; max-width: 360px; }
.bcx-cart-coupon-form { display: flex; gap: 6px; }
.bcx-cart-coupon-form input {
  flex: 1; height: 38px; padding: 0 10px;
  border: 1px solid var(--bcx-border, #E2E8F0);
  border-radius: 6px; font-size: 13px;
  background: #fff;
}

/* Carrinho vazio (WC native) */
.cart-empty.woocommerce-info, .return-to-shop {
  text-align: center;
  padding: 32px 16px;
}
.cart-empty { font-size: 16px; color: var(--bcx-text-mid); margin-bottom: 16px; }
.return-to-shop .button {
  display: inline-block;
  background: var(--bcx-primary, #37B7FF);
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
}

/* Esconde notices WC "custo de entrega atualizado" no cart/checkout (calderon 16/05/2026) */
.woocommerce-cart .woocommerce-info,
.woocommerce-cart .woocommerce-message,
.woocommerce-checkout .woocommerce-info,
.bcx-cart .woocommerce-info,
.bcx-cart .woocommerce-message,
.bcx-checkout .woocommerce-info {
  display: none !important;
}

/* ═══════════════════════════════════════════════════════════════════
   Qty stepper +/− por item (calderon 16/05/2026)
   ═══════════════════════════════════════════════════════════════════ */
.bcx-cart-qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid #CBD5E1;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  user-select: none;
}
.bcx-qty-btn {
  width: 32px;
  height: 32px;
  background: #F1F5F9;
  border: 0;
  color: #0F172A;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s;
  touch-action: manipulation;
}
.bcx-qty-btn:hover { background: #E2E8F0; }
.bcx-qty-btn:active { background: #CBD5E1; transform: scale(0.95); }
.bcx-qty-input {
  width: 40px;
  height: 32px;
  border: 0;
  border-left: 1px solid #E2E8F0;
  border-right: 1px solid #E2E8F0;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: #0F172A;
  background: #fff;
  -moz-appearance: textfield;
}
.bcx-qty-input::-webkit-outer-spin-button,
.bcx-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.bcx-qty-input:focus { outline: 2px solid #5BB0E5; outline-offset: -2px; }

/* ═══════════════════════════════════════════════════════════════════
   CART CARD v4 (calderon 17/05/2026): fitment vai pro canto superior
   direito do card. Preço SOBE pra ficar alinhado com qty stepper na
   mesma linha (footer do card). Mais ar entre nome e ações.
   ═══════════════════════════════════════════════════════════════════ */
.bcx-cart-item-info { position: relative; }

/* Fitment como tag flutuante top-right do info */
.bcx-cart-item-fitment.bcx-fitment-corner {
  position: absolute;
  top: 0; right: 0;
  margin: 0 !important;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.2px;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
  display: inline-flex; align-items: center; gap: 4px;
  z-index: 2;
  line-height: 1.3;
}
.bcx-fitment-corner svg { width: 12px; height: 12px; flex-shrink: 0; }
.bcx-fitment-corner .bcx-fitment-label { line-height: 1; }

/* Nome e SKU precisam de padding-right pra não bater na tag fitment */
.bcx-cart-item-info .bcx-cart-item-name { padding-right: 100px; }
.bcx-cart-item-info .bcx-cart-item-sku  { padding-right: 100px; margin-bottom: 10px; }

/* Linha BOTTOM: preço esq + stepper+remove dir, baseline alinhado */
.bcx-cart-item-row {
  align-items: flex-end !important;
  margin-top: 6px;
}
.bcx-cart-item-row .bcx-cart-item-price {
  margin: 0;
  display: flex; flex-direction: column;
  gap: 1px;
}
.bcx-cart-item-row .bcx-cart-item-price strong {
  font-size: 17px;
  line-height: 1.1;
  display: block;
  font-weight: 900;
  letter-spacing: -0.2px;
}
.bcx-cart-item-row .bcx-cart-item-pix {
  font-size: 11.5px;
  font-weight: 600;
  margin-top: 1px;
}

/* Mobile: tag e padding ajustados */
@media (max-width: 540px) {
  .bcx-cart-item-info .bcx-cart-item-name,
  .bcx-cart-item-info .bcx-cart-item-sku { padding-right: 96px; }
  .bcx-cart-item-fitment.bcx-fitment-corner {
    font-size: 10px;
    padding: 3px 7px;
  }
  .bcx-cart-item-row .bcx-cart-item-price strong { font-size: 16px; }
}

@media (max-width: 380px) {
  .bcx-cart-item-info .bcx-cart-item-name,
  .bcx-cart-item-info .bcx-cart-item-sku { padding-right: 90px; }
  .bcx-cart-item-fitment.bcx-fitment-corner .bcx-fitment-label { display: none; }
  .bcx-cart-item-fitment.bcx-fitment-corner { padding: 5px; border-radius: 50%; }
  .bcx-cart-item-fitment.bcx-fitment-corner svg { width: 14px; height: 14px; }
}

/* ─── Botão "Limpar carrinho" (calderon 17/05/2026 v2: pequeno, sempre direita,
       separado do CEP pra não confundir) ─────────────── */
.bcx-cart-clear-wrap {
  display: flex;
  justify-content: flex-end;
  margin: 2px 0 22px;
}
.bcx-cart-clear-all {
  display: inline-flex; align-items: center; gap: 4px;
  background: transparent;
  border: 0;
  padding: 3px 6px;
  color: #94A3B8;
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 4px;
  font-family: inherit;
  transition: color .15s ease, background .15s ease;
  line-height: 1.3;
}
.bcx-cart-clear-all svg { color: currentColor; width: 11px; height: 11px; }
.bcx-cart-clear-all:hover { color: #DC2626; background: #FEF2F2; }
.bcx-cart-clear-all:disabled { cursor: progress; opacity: 0.6; }
@media (max-width: 540px) {
  /* Mobile: continua à direita (calderon) com fonte ainda menor */
  .bcx-cart-clear-wrap { justify-content: flex-end; margin: 2px 0 20px; }
  .bcx-cart-clear-all { font-size: 10px; padding: 4px 6px; }
  .bcx-cart-clear-all svg { width: 10px; height: 10px; }
}
