/* ==========================================================================
 * AnonShield — carrinho: badge do topo + GAVETA LATERAL (side cart) portada
 * do demo aprovado (public/carrinho-demo.html) + estilos da pagina /carrinho/.
 * A gaveta e' autossuficiente (classes proprias .as-side-cart / .as-cart-*),
 * nao depende do CartFlows. Botoes com !important para o estilo de botao do
 * tema (azul) nao vazar para dentro dela.
 * ======================================================================== */

/* ---- badge do contador no link "Carrinho" do topo ---------------------- */
.b1-actions a.b1-lnk { position: relative; }
[data-as-cart-count] {
  position: absolute; top: -6px; right: -10px;
  min-width: 17px; height: 17px; padding: 0 4px; box-sizing: border-box;
  border-radius: 999px; background: #10b981; color: #fff;
  font: 700 11px/17px Inter, -apple-system, "Segoe UI", Roboto, sans-serif;
  text-align: center; white-space: nowrap;
  box-shadow: 0 0 0 2px rgba(255,255,255,.25); pointer-events: none;
}
[data-as-cart-count][hidden] { display: none; }

/* ==========================================================================
 * GAVETA LATERAL (.as-side-cart) — Versão 2.0 Redesign Mobile + Desktop
 * ======================================================================== */
.as-side-cart, .as-side-cart * {
  box-sizing: border-box;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Variáveis de Tema: Modo Claro (Padrão) */
.as-side-cart {
  --as-cart-bg: #ffffff;
  --as-cart-header-bg: #ffffff;
  --as-cart-border: #e2e8f0;
  --as-cart-border-subtle: #f1f5f9;
  --as-cart-title: #0f172a;
  --as-cart-text: #334155;
  --as-cart-muted: #64748b;
  --as-cart-card-bg: #ffffff;
  --as-cart-card-border: #e2e8f0;
  --as-cart-card-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  --as-cart-thumb-bg: #f8fafc;
  --as-cart-thumb-border: #e2e8f0;
  --as-cart-stepper-bg: #ffffff;
  --as-cart-stepper-border: #cbd5e1;
  --as-cart-stepper-text: #0f172a;
  --as-cart-stepper-hover: #f1f5f9;
  --as-cart-ver-bg: #f8fafc;
  --as-cart-ver-border: #cbd5e1;
  --as-cart-ver-text: #1e293b;
  --as-cart-pix-bg: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  --as-cart-pix-border: #86efac;
  --as-cart-pix-title: #15803d;
  --as-cart-pix-val: #15803d;
  --as-cart-pix-eco: #16a34a;
  --as-cart-pix-pill-bg: #22c55e;
  --as-cart-pix-pill-txt: #ffffff;
  --as-cart-garantia-bg: #f0fdf4;
  --as-cart-garantia-border: #bbf7d0;
  --as-cart-garantia-title: #166534;
  --as-cart-garantia-txt: #15803d;
  --as-cart-cross-bg: #f8fafc;
  --as-cart-cross-border: #e2e8f0;
  --as-cart-cross-title: #0f172a;
  --as-cart-cross-btn-bg: #014C6D;
  --as-cart-cross-btn-hover: #01374f;
  --as-cart-cross-btn-txt: #ffffff;
  --as-cart-footer-bg: #ffffff;
  --as-cart-footer-border: #e2e8f0;
  --as-cart-footer-shadow: 0 -8px 24px rgba(0, 0, 0, 0.06);
  --as-cart-badge-bg: #014C6D;
  --as-cart-badge-txt: #ffffff;
}

/* Variáveis de Tema: Modo Escuro */
html[data-tema="escuro"] .as-side-cart {
  --as-cart-bg: #101a20;
  --as-cart-header-bg: #132028;
  --as-cart-border: #26363f;
  --as-cart-border-subtle: #1c2b33;
  --as-cart-title: #e8eef2;
  --as-cart-text: #cbd5e1;
  --as-cart-muted: #9fb0bc;
  --as-cart-card-bg: #17242c;
  --as-cart-card-border: #26363f;
  --as-cart-card-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
  --as-cart-thumb-bg: #101a20;
  --as-cart-thumb-border: #26363f;
  --as-cart-stepper-bg: #101a20;
  --as-cart-stepper-border: #2e414c;
  --as-cart-stepper-text: #f1f5f9;
  --as-cart-stepper-hover: #1e2f38;
  --as-cart-ver-bg: #101a20;
  --as-cart-ver-border: #2e414c;
  --as-cart-ver-text: #e2e8f0;
  --as-cart-pix-bg: linear-gradient(135deg, rgba(22, 101, 52, 0.24) 0%, rgba(18, 140, 126, 0.2) 100%);
  --as-cart-pix-border: rgba(34, 197, 94, 0.4);
  --as-cart-pix-title: #4ade80;
  --as-cart-pix-val: #4ade80;
  --as-cart-pix-eco: #86efac;
  --as-cart-pix-pill-bg: #16a34a;
  --as-cart-pix-pill-txt: #ffffff;
  --as-cart-garantia-bg: rgba(22, 101, 52, 0.18);
  --as-cart-garantia-border: rgba(34, 197, 94, 0.3);
  --as-cart-garantia-title: #4ade80;
  --as-cart-garantia-txt: #bbf7d0;
  --as-cart-cross-bg: #17242c;
  --as-cart-cross-border: #26363f;
  --as-cart-cross-title: #e8eef2;
  --as-cart-cross-btn-bg: #0d5f83;
  --as-cart-cross-btn-hover: #10729d;
  --as-cart-cross-btn-txt: #ffffff;
  --as-cart-footer-bg: #101a20;
  --as-cart-footer-border: #26363f;
  --as-cart-footer-shadow: 0 -8px 25px rgba(0, 0, 0, 0.45);
  --as-cart-badge-bg: #0d5f83;
  --as-cart-badge-txt: #ffffff;
}

/* overlay escuro */
.as-cart-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.68);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  z-index: 99998; opacity: 1; transition: opacity .3s ease;
}
.as-cart-overlay.hidden { opacity: 0; pointer-events: none; }

/* gaveta */
.as-side-cart {
  position: fixed; top: 0; right: 0;
  width: 100%; max-width: 460px; height: 100vh;
  background: var(--as-cart-bg); color: var(--as-cart-text); z-index: 99999;
  display: flex; flex-direction: column;
  box-shadow: -10px 0 35px rgba(0,0,0,.3);
  transform: translateX(0);
  transition: transform .3s cubic-bezier(.16,1,.3,1);
  overflow: hidden;
}
.as-side-cart.closed { transform: translateX(100%); }

/* 1. TOPO */
.as-cart-header {
  padding: 16px 20px;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--as-cart-header-bg);
  border-bottom: 1px solid var(--as-cart-border);
  position: relative; z-index: 2;
  flex-shrink: 0;
}
.as-cart-title {
  display: flex; align-items: center; gap: 9px;
  font-size: 16px; font-weight: 700; color: var(--as-cart-title);
  letter-spacing: -0.2px;
}
.as-cart-title-icon {
  display: flex; align-items: center; justify-content: center;
  color: var(--as-cart-title);
}
.as-cart-count-badge {
  background: var(--as-cart-badge-bg);
  color: var(--as-cart-badge-txt);
  font-size: 11px; font-weight: 700;
  padding: 2px 7px; border-radius: 999px;
  line-height: 1.2;
}
.as-cart-close {
  background: var(--as-cart-surface, #f1f5f9) !important;
  border: 1px solid var(--as-cart-border) !important;
  color: var(--as-cart-muted) !important;
  cursor: pointer; width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50% !important;
  transition: all .15s ease;
  -webkit-appearance: none; appearance: none;
}
.as-cart-close:hover {
  background: var(--as-cart-border) !important;
  color: var(--as-cart-title) !important;
  transform: scale(1.05);
}

/* Micro-barra de garantia/suporte */
.as-cart-trust-bar {
  background: rgba(34, 197, 94, 0.08);
  border-bottom: 1px solid var(--as-cart-border-subtle);
  padding: 6px 18px;
  font-size: 11.5px; font-weight: 600; color: #16a34a;
  text-align: center; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
html[data-tema="escuro"] .as-cart-trust-bar {
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
}

/* 2. LISTA DE ITENS */
.as-cart-items {
  flex: 1; overflow-y: auto; overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 16px 18px;
  display: flex; flex-direction: column; gap: 12px;
}
.as-side-cart .as-cart-item {
  position: relative;
  transition: all .25s ease;
}
.as-side-cart .as-cart-item.removing {
  opacity: 0; transform: translateX(30px); height: 0; padding: 0; margin: 0; overflow: hidden;
}

/* Card Individual de Produto */
.as-item-card {
  background: var(--as-cart-card-bg);
  border: 1px solid var(--as-cart-card-border);
  border-radius: 14px;
  padding: 14px;
  box-shadow: var(--as-cart-card-shadow);
  display: flex; flex-direction: column; gap: 12px;
  transition: border-color .15s ease;
}
.as-item-card-top {
  display: flex; align-items: flex-start; gap: 12px;
}
.as-item-thumb {
  width: 68px; height: 68px; border-radius: 10px;
  border: 1px solid var(--as-cart-thumb-border);
  background: var(--as-cart-thumb-bg);
  object-fit: contain; flex-shrink: 0; padding: 3px;
}
.as-item-info {
  flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px;
}
.as-item-header-row {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 8px;
}
.as-item-title {
  font-size: 14.5px; font-weight: 700; line-height: 1.3;
  color: var(--as-cart-title);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  flex: 1;
}
.as-item-remove-btn {
  background: none !important; border: none !important;
  color: var(--as-cart-muted) !important;
  cursor: pointer; padding: 3px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s ease; flex-shrink: 0; -webkit-appearance: none; appearance: none;
}
.as-item-remove-btn:hover {
  color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.1) !important;
}

.as-item-pricing {
  font-size: 12.5px; line-height: 1.35;
  display: flex; align-items: center; flex-wrap: wrap; gap: 5px;
}
.as-item-old-price {
  text-decoration: line-through; color: var(--as-cart-muted); font-size: 11.5px;
}
.as-item-unit-price {
  color: var(--as-cart-title); font-weight: 700;
}
.as-item-pix-price {
  color: #16a34a; font-weight: 600; font-size: 11.5px;
}
html[data-tema="escuro"] .as-item-pix-price {
  color: #4ade80;
}

/* Linha Inferior do Card (Controles + Total) */
.as-item-card-bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding-top: 10px; border-top: 1px dashed var(--as-cart-border-subtle);
}
.as-item-controls {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.as-item-total {
  font-size: 15px; font-weight: 800; color: var(--as-cart-title);
  text-align: right; white-space: nowrap; margin-left: auto;
}

/* Pilula de Quantidade (- 1 +) */
.as-item-qty-pill {
  display: inline-flex; align-items: center;
  border: 1px solid var(--as-cart-stepper-border);
  border-radius: 20px; overflow: hidden;
  background: var(--as-cart-stepper-bg); height: 32px;
  flex-shrink: 0 !important;
}
.as-qty-btn {
  background: none !important; border: none !important;
  width: 30px; height: 100%;
  font-size: 16px; font-weight: 700; color: var(--as-cart-muted) !important;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all .1s ease; -webkit-appearance: none; appearance: none;
  border-radius: 0 !important; flex-shrink: 0 !important;
}
.as-qty-btn:hover {
  background: var(--as-cart-stepper-hover) !important;
  color: var(--as-cart-title) !important;
}
.as-qty-val {
  font-size: 13px; font-weight: 700; padding: 0 4px;
  color: var(--as-cart-stepper-text); min-width: 22px; text-align: center;
  flex-shrink: 0 !important;
}

/* Botao de Troca de Versao */
.as-ver-picker { position: relative; flex-shrink: 0; }
.as-ver-btn {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--as-cart-ver-bg) !important;
  border: 1px solid var(--as-cart-ver-border) !important;
  border-radius: 20px !important;
  padding: 0 11px; height: 32px; font-size: 12px; font-weight: 600;
  color: var(--as-cart-ver-text) !important;
  cursor: pointer; transition: all .15s ease;
  -webkit-appearance: none; appearance: none;
  white-space: nowrap !important;
}
.as-ver-btn span {
  white-space: nowrap !important; line-height: 1 !important; display: inline-block;
}
.as-ver-btn strong { font-weight: 700; }
.as-ver-btn:hover {
  border-color: #22c55e !important;
}
.as-ver-btn svg {
  transition: transform .2s ease; flex-shrink: 0;
}
.as-ver-btn.open svg { transform: rotate(180deg); }
.as-ver-btn--single { cursor: default !important; }

/* Dropdown de Versoes (Desktop) */
.as-ver-dropdown {
  position: absolute; top: calc(100% + 6px); left: 0;
  background: var(--as-cart-card-bg);
  border: 1px solid var(--as-cart-border); border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0,0,0,.25);
  min-width: 260px; max-width: 320px; z-index: 1000;
  padding: 6px; display: flex; flex-direction: column; gap: 4px;
  animation: asFadeIn .15s ease;
}
.as-ver-dropdown.hidden { display: none; }
@keyframes asFadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }

.as-ver-option {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 12px; border-radius: 8px; cursor: pointer; font-size: 13px;
  transition: background .12s ease;
  color: var(--as-cart-text);
}
.as-ver-option:hover {
  background: var(--as-cart-border-subtle);
  color: var(--as-cart-title);
}
.as-ver-option.selected {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.35);
}
.as-ver-opt-title {
  font-weight: 600; color: var(--as-cart-title);
  display: flex; align-items: center; gap: 6px; white-space: nowrap; flex: 1;
}
.as-badge-rec {
  background: #10b981; color: #fff; font-size: 9.5px; padding: 2px 6px;
  border-radius: 4px; text-transform: uppercase; font-weight: 800; white-space: nowrap; flex-shrink: 0;
}
.as-badge-min {
  background: #f59e0b; color: #fff; font-size: 9.5px; padding: 2px 6px;
  border-radius: 4px; text-transform: uppercase; font-weight: 800; white-space: nowrap; flex-shrink: 0;
}
.as-ver-opt-price {
  font-weight: 700; color: var(--as-cart-title); white-space: nowrap; flex-shrink: 0; margin-left: auto;
}

/* Caixa Inline de Confirmacao de Remocao */
.as-inline-confirm {
  background: rgba(239, 68, 68, 0.07);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-left: 3px solid #ef4444;
  border-radius: 10px; padding: 10px 14px; margin-top: 8px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  animation: asSlideDown .2s cubic-bezier(.16,1,.3,1);
}
.as-inline-confirm.hidden { display: none; }
@keyframes asSlideDown { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
.as-confirm-text { font-size: 12.5px; color: var(--as-cart-text); line-height: 1.3; }
.as-confirm-text strong { color: var(--as-cart-title); font-weight: 700; }
.as-confirm-btns { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.btn-keep {
  background: var(--as-cart-card-bg) !important; color: var(--as-cart-text) !important;
  border: 1px solid var(--as-cart-border) !important;
  border-radius: 6px !important; padding: 6px 10px; font-size: 11.5px; font-weight: 600; cursor: pointer;
  transition: all .1s ease; -webkit-appearance: none; appearance: none;
}
.btn-keep:hover { background: var(--as-cart-border-subtle) !important; color: var(--as-cart-title) !important; }
.btn-remove-now {
  background: #ef4444 !important; color: #fff !important; border: none !important; border-radius: 6px !important;
  padding: 6px 12px; font-size: 11.5px; font-weight: 700; cursor: pointer; transition: background .1s ease;
  box-shadow: 0 2px 5px rgba(239,68,68,.25); -webkit-appearance: none; appearance: none;
}
.btn-remove-now:hover { background: #dc2626 !important; }

/* Estado Vazio */
.as-cart-empty { padding: 60px 20px; text-align: center; color: var(--as-cart-muted); }
.as-cart-empty svg { width: 52px; height: 52px; stroke: var(--as-cart-border); fill: none; margin: 0 auto 14px; display: block; }
.as-cart-empty h3 { font-size: 17px; font-weight: 700; color: var(--as-cart-title); margin: 0 0 6px; }
.as-cart-empty p { font-size: 13.5px; margin: 0 0 20px; line-height: 1.4; color: var(--as-cart-muted); }
.as-cart-empty a {
  display: inline-block; background: #198754; color: #fff; text-decoration: none;
  padding: 11px 22px; border-radius: 10px; font-weight: 700; font-size: 14px;
  box-shadow: 0 4px 12px rgba(25, 135, 84, 0.25);
  transition: all .15s ease;
}
.as-cart-empty a:hover { background: #157347; transform: translateY(-1px); }

/* 3. RODAPE (FINANCEIRO + CTA + GARANTIA + CROSS-SELL) */
.as-cart-footer {
  padding: 16px 20px max(18px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--as-cart-footer-border);
  background: var(--as-cart-footer-bg);
  box-shadow: var(--as-cart-footer-shadow);
  flex-shrink: 0; position: relative; z-index: 5;
}
.as-cart-totais { margin-bottom: 12px; }
.as-subtotal-row {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13.5px; font-weight: 600; color: var(--as-cart-muted);
  margin-bottom: 8px;
}
.as-subtotal-val-col { text-align: right; display: flex; flex-direction: column; align-items: flex-end; }
.as-subtotal-cheio { font-size: 15px; font-weight: 700; color: var(--as-cart-title); line-height: 1.2; }
.as-subtotal-parc { font-size: 11.5px; font-weight: 500; color: var(--as-cart-muted); line-height: 1.2; margin-top: 2px; }

/* Box PIX de Alto Contraste */
.as-pix-box {
  background: var(--as-cart-pix-bg);
  border: 1.5px solid var(--as-cart-pix-border);
  border-radius: 12px; padding: 11px 14px;
}
.as-pix-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.as-pix-lbl { display: flex; align-items: center; gap: 8px; }
.as-pix-tag-ico { font-size: 16px; line-height: 1; }
.as-pix-tag-wrap { display: flex; flex-direction: column; gap: 2px; }
.as-pix-tag-txt { font-size: 13px; font-weight: 700; color: var(--as-cart-pix-title); line-height: 1.1; }
.as-pix-pill {
  background: var(--as-cart-pix-pill-bg); color: var(--as-cart-pix-pill-txt);
  font-size: 10px; font-weight: 800; padding: 1px 6px; border-radius: 4px;
  text-transform: uppercase; width: max-content; line-height: 1.2;
}
.as-pix-val-col { text-align: right; display: flex; flex-direction: column; align-items: flex-end; }
.as-pix-val { font-size: 17px; font-weight: 900; color: var(--as-cart-pix-val); line-height: 1.1; }
.as-pix-eco { font-size: 11px; font-weight: 700; color: var(--as-cart-pix-eco); margin-top: 2px; }

/* Botao de Checkout WhatsApp Premium */
.as-btn-checkout {
  width: 100%;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%) !important;
  color: #fff !important; border: none !important; border-radius: 12px !important;
  padding: 14px 18px; font-size: 15px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.35);
  transition: transform .12s ease, box-shadow .15s ease;
  margin-bottom: 12px; -webkit-appearance: none; appearance: none;
}
.as-btn-checkout:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45);
}
.as-btn-checkout:active { transform: scale(.98); }
.as-btn-checkout-ico { display: flex; align-items: center; justify-content: center; }
.as-btn-checkout-txt { flex: 1; text-align: center; }
.as-btn-checkout-arr { font-size: 17px; line-height: 1; }

/* Selo de Garantia: Instale Primeiro, Pague Depois */
.as-cart-garantia {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px; margin-bottom: 12px;
  background: var(--as-cart-garantia-bg);
  border: 1px solid var(--as-cart-garantia-border);
  border-radius: 10px; box-sizing: border-box;
}
.as-cart-garantia-ico { font-size: 16px; line-height: 1; flex: none; margin-top: 1px; }
.as-cart-garantia-content { flex: 1; font-size: 12px; line-height: 1.35; color: var(--as-cart-garantia-txt); }
.as-cart-garantia-title { font-weight: 700; color: var(--as-cart-garantia-title); }
.as-cart-garantia-txt { color: var(--as-cart-garantia-txt); }

/* Cross-Sell Refinado */
.as-cross-sell {
  background: var(--as-cart-cross-bg);
  border-radius: 10px; padding: 10px 12px;
  border: 1px solid var(--as-cart-cross-border);
}
.as-cross-sell-head { margin-bottom: 8px; }
.as-cross-sell-title { font-size: 12px; font-weight: 700; color: var(--as-cart-cross-title); }
.as-cross-sell-card { display: flex; align-items: center; gap: 10px; }
.as-cross-sell-thumb {
  width: 44px; height: 44px; border-radius: 8px;
  border: 1px solid var(--as-cart-cross-border);
  background: var(--as-cart-card-bg); object-fit: contain; flex-shrink: 0; padding: 2px;
}
.as-cross-sell-info { flex: 1; min-width: 0; }
.as-cross-sell-name {
  font-size: 12px; font-weight: 600; color: var(--as-cart-cross-title);
  line-height: 1.3; margin-bottom: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.as-cross-sell-price { font-size: 12.5px; font-weight: 700; color: var(--as-cart-cross-title); }
.as-cross-sell-pix { font-size: 11px; font-weight: 600; color: #16a34a; }
html[data-tema="escuro"] .as-cross-sell-pix { color: #4ade80; }
.as-btn-add-cross {
  background: var(--as-cart-cross-btn-bg) !important;
  color: var(--as-cart-cross-btn-txt) !important;
  border: none !important; border-radius: 8px !important;
  padding: 8px 12px; font-size: 12px; font-weight: 700;
  cursor: pointer; transition: all .15s ease;
  white-space: nowrap; flex-shrink: 0; -webkit-appearance: none; appearance: none;
}
.as-btn-add-cross:hover {
  background: var(--as-cart-cross-btn-hover) !important;
  transform: scale(1.03);
}

/* ==========================================================================
 * BOTTOM SHEET DE VERSOES (MOBILE)
 * ======================================================================== */
.as-ver-sheet-backdrop {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
  z-index: 10000; opacity: 1; transition: opacity .25s ease;
}
.as-ver-sheet-backdrop.hidden { opacity: 0; pointer-events: none; }
.as-ver-sheet {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: var(--as-cart-bg);
  border-top: 1px solid var(--as-cart-border);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -12px 35px rgba(0,0,0,0.35);
  z-index: 10001;
  padding: 12px 18px max(20px, env(safe-area-inset-bottom));
  transform: translateY(0);
  transition: transform .28s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 82vh; display: flex; flex-direction: column;
}
.as-ver-sheet.hidden { transform: translateY(105%); pointer-events: none; }
.as-ver-sheet-handle {
  width: 42px; height: 4px; border-radius: 2px;
  background: var(--as-cart-muted); opacity: 0.45;
  margin: 0 auto 12px;
}
.as-ver-sheet-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px; padding-bottom: 10px;
  border-bottom: 1px solid var(--as-cart-border-subtle);
}
.as-ver-sheet-title {
  font-size: 15.5px; font-weight: 700; color: var(--as-cart-title);
}
.as-ver-sheet-sub {
  font-size: 12px; color: var(--as-cart-muted); margin-top: 2px;
}
.as-ver-sheet-close {
  background: var(--as-cart-surface, #f1f5f9) !important;
  border: 1px solid var(--as-cart-border) !important;
  color: var(--as-cart-muted) !important; width: 30px; height: 30px; border-radius: 50% !important;
  display: flex; align-items: center; justify-content: center; font-size: 13px; cursor: pointer;
  -webkit-appearance: none; appearance: none;
}
.as-ver-sheet-body {
  overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; gap: 8px;
  padding-bottom: 8px;
}
.as-ver-sheet-opt {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-radius: 12px;
  border: 1.5px solid var(--as-cart-border);
  background: var(--as-cart-card-bg);
  cursor: pointer; transition: all .15s ease;
}
.as-ver-sheet-opt.selected {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.09);
}
.as-ver-sheet-opt-left { display: flex; align-items: center; gap: 12px; }
.as-ver-sheet-radio {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--as-cart-muted);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: all .15s ease;
}
.as-ver-sheet-radio.checked {
  border-color: #22c55e; background: #22c55e;
}
.as-ver-sheet-radio.checked::after {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: #fff;
}
.as-ver-sheet-opt-title {
  font-size: 14px; font-weight: 700; color: var(--as-cart-title);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.as-ver-sheet-opt-pix {
  font-size: 12px; font-weight: 600; color: #16a34a; margin-top: 2px;
}
html[data-tema="escuro"] .as-ver-sheet-opt-pix { color: #4ade80; }
.as-ver-sheet-opt-price {
  font-size: 14.5px; font-weight: 800; color: var(--as-cart-title);
}

/* trava o scroll do fundo quando a gaveta esta aberta */
html.as-cart-aberto, body.as-cart-aberto { overflow: hidden; }

/* ==========================================================================
 * RESPONSIVIDADE MOBILE (SMARTPHONES <= 640px)
 * Garante que a gaveta, imagens, botoes e seletor caibam 100% no mobile.
 * ======================================================================== */
@media (max-width: 640px) {
  .as-side-cart {
    width: 100% !important; max-width: 100% !important;
    left: 0 !important; right: 0 !important;
  }
  .as-cart-header { padding: 14px 16px; }
  .as-cart-items { padding: 12px 14px 10px; gap: 10px; }
  .as-item-card { padding: 12px; border-radius: 12px; gap: 10px; }
  .as-item-thumb { width: 62px; height: 62px; border-radius: 8px; }
  .as-item-title { font-size: 14px; }
  .as-item-pricing { font-size: 12px; }
  .as-item-total { font-size: 14px; }
  .as-item-qty-pill { height: 32px; }
  .as-qty-btn { width: 28px; font-size: 15px; }
  .as-qty-val { font-size: 12.5px; }
  .as-ver-btn { height: 32px; font-size: 12px; padding: 0 10px; }
  .as-cart-footer { padding: 14px 16px max(16px, env(safe-area-inset-bottom)); }
}

/* ==========================================================================
 * PAGINA /carrinho/ (fallback: acesso direto, sem-JS, "ver carrinho completo")
 * ======================================================================== */
.as-cart-wrap {
  max-width: 1100px; margin: 0 auto; padding: 30px 20px 60px;
  font-family: Inter, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--tinta, #15232b);
}
.as-cart-wrap h1 { font-family: Montserrat, sans-serif; font-size: 28px; font-weight: 700; margin: 0 0 22px; color: var(--tinta, #15232b); }
.as-cart-grid { display: grid; grid-template-columns: 1fr 320px; gap: 26px; align-items: start; }
@media (max-width: 820px) { .as-cart-grid { grid-template-columns: 1fr; } }
.as-cart-pg-item {
  display: grid; grid-template-columns: 72px 1fr auto auto auto; align-items: center; gap: 14px;
  padding: 14px 0; border-bottom: 1px solid var(--borda, #E2E7EA);
}
.as-cart-pg-item__img img, .as-cart-pg-item__semimg { display: block; width: 72px; height: 72px; object-fit: contain; border-radius: 10px; background: var(--superficie, #F4F5F7); }
.as-cart-pg-item__info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.as-cart-pg-item__nome { font-family: Montserrat, sans-serif; font-weight: 600; font-size: 15.5px; color: var(--tinta, #15232b); text-decoration: none; }
.as-cart-pg-item__ver, .as-cart-pg-item__unit { font-size: 12.5px; color: var(--apoio, #647682); }
.as-cart-pg-item__sub { font-family: Montserrat, sans-serif; font-weight: 700; font-size: 15.5px; color: var(--navy, #014C6D); white-space: nowrap; }
.as-cart-pg-item__rm { border: 0; background: transparent; color: var(--apoio, #647682); font-size: 22px; cursor: pointer; padding: 4px 6px; }
.as-cart-pg-step { width: 30px; height: 32px; border: 0; background: transparent; color: var(--tinta,#15232b); font-size: 17px; cursor: pointer; }
.as-cart-pg-qtdpill { display: inline-flex; align-items: center; border: 1px solid var(--borda,#E2E7EA); border-radius: 9px; overflow: hidden; }
.as-cart-pg-qtd { min-width: 26px; text-align: center; font-weight: 600; font-size: 14px; }
.as-cart-resumo { border: 1px solid var(--borda, #E2E7EA); border-radius: 14px; padding: 18px; background: var(--card, #fff); box-shadow: 0 8px 22px var(--sombra, rgba(6,40,58,.10)); position: sticky; top: 90px; }
.as-cart-resumo__t { font-family: Montserrat, sans-serif; font-size: 16px; font-weight: 700; margin: 0 0 12px; }
.as-cart-resumo__linha { display: flex; justify-content: space-between; align-items: baseline; font-size: 15px; margin-bottom: 14px; }
.as-cart-resumo__linha b { font-family: Montserrat, sans-serif; font-size: 20px; color: var(--navy, #014C6D); }
.as-cart-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; box-sizing: border-box; padding: 13px 16px; border: 0; border-radius: 10px; font: 600 15px/1.2 Montserrat, sans-serif; text-decoration: none; cursor: pointer; margin-bottom: 10px; }
.as-cart-btn--wa { background: #198754; color: #fff; }
.as-cart-btn--wa:hover { background: #157347; }
.as-cart-btn--ghost { background: transparent; color: var(--navy, #014C6D); border: 1px solid var(--borda, #E2E7EA); }
.as-cart-vazio { text-align: center; padding: 50px 20px; }
.as-cart-vazio__t { font-family: Montserrat, sans-serif; font-size: 22px; font-weight: 700; margin: 0 0 8px; }
.as-cart-vazio__s { color: var(--apoio, #647682); margin: 0 0 22px; }
.as-cart-vazio .as-cart-btn { display: inline-flex; width: auto; padding: 13px 26px; background: #198754; color: #fff; }



