/* Stack Gamer 2026 - Capitulo 06: Carrinho */
body.theme-stackgamer-2026-preview.sg-cap06-cart-ready {
  --sg-cart-navy: #0f172a;
  --sg-cart-blue: #2563ff;
  --sg-cart-energy: #0ea5ff;
  --sg-cart-cyan: #38ddf8;
  --sg-cart-muted: #64748b;
  --sg-cart-border: rgba(15, 23, 42, 0.12);
  --sg-cart-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
}

body.theme-stackgamer-2026-preview .cart-overlay {
  position: fixed;
  inset: 0;
  z-index: 9997;
  background: rgba(15, 23, 42, 0.58);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

body.theme-stackgamer-2026-preview .cart-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

body.theme-stackgamer-2026-preview #cartSidebar.cyber-cart-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 9998;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(100vw, 452px);
  max-width: 100vw;
  height: 100dvh;
  overflow: hidden;
  color: var(--sg-cart-navy);
  background: #ffffff;
  border-left: 1px solid var(--sg-cart-border);
  box-shadow: var(--sg-cart-shadow);
  transform: translateX(104%);
  transition: transform 220ms ease;
}

body.theme-stackgamer-2026-preview #cartSidebar.cyber-cart-sidebar.active {
  transform: translateX(0);
}

body.theme-stackgamer-2026-preview #cartSidebar .cart-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 22px 18px;
  color: var(--sg-cart-navy);
  background: linear-gradient(135deg, #f8fbff 0%, #eff6ff 100%);
  border-bottom: 1px solid var(--sg-cart-border);
}

body.theme-stackgamer-2026-preview #cartSidebar .cart-header small {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  color: var(--sg-cart-blue);
  font: 800 0.72rem/1 Inter, system-ui, sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

body.theme-stackgamer-2026-preview #cartSidebar .cart-header small::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--sg-cart-cyan);
  box-shadow: 0 0 0 4px rgba(56, 221, 248, 0.14);
}

body.theme-stackgamer-2026-preview #cartSidebar .cart-header h3 {
  margin: 0;
  color: var(--sg-cart-navy);
  font: 900 clamp(1.35rem, 4vw, 1.8rem)/1.05 Inter, system-ui, sans-serif;
  letter-spacing: 0;
}

body.theme-stackgamer-2026-preview #cartSidebar .cart-close {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  color: var(--sg-cart-navy);
  background: #ffffff;
  border: 1px solid rgba(37, 99, 255, 0.22);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(37, 99, 255, 0.12);
  font: 900 1.35rem/1 Inter, system-ui, sans-serif;
  cursor: pointer;
}

body.theme-stackgamer-2026-preview #cartSidebar .cart-close:hover,
body.theme-stackgamer-2026-preview #cartSidebar .cart-close:focus-visible {
  color: #ffffff;
  background: var(--sg-cart-blue);
  outline: 2px solid rgba(56, 221, 248, 0.42);
  outline-offset: 2px;
}

body.theme-stackgamer-2026-preview #cartItemsContainer.cart-items {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  padding: 18px 18px 24px;
  overflow-y: auto;
  background: #f3f4f6;
}

body.theme-stackgamer-2026-preview #cartItemsContainer.cart-items.cart-items-empty {
  justify-content: center;
  padding: 32px 24px;
  text-align: center;
}

body.theme-stackgamer-2026-preview #cartItemsContainer.cart-items.cart-items-empty p,
body.theme-stackgamer-2026-preview #cartItemsContainer.cart-items > p:only-child {
  display: grid;
  place-items: center;
  min-height: 210px;
  margin: 0;
  padding: 28px;
  color: var(--sg-cart-muted);
  background: #ffffff;
  border: 1px dashed rgba(37, 99, 255, 0.28);
  border-radius: 8px;
  font: 700 1rem/1.45 Inter, system-ui, sans-serif;
}

body.theme-stackgamer-2026-preview #cartSidebar .cart-item {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

body.theme-stackgamer-2026-preview #cartSidebar .cart-item-image {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  overflow: hidden;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
}

body.theme-stackgamer-2026-preview #cartSidebar .cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

body.theme-stackgamer-2026-preview #cartSidebar .cart-item-content {
  min-width: 0;
}

body.theme-stackgamer-2026-preview #cartSidebar .cart-item-title {
  display: -webkit-box;
  margin: 0 0 8px;
  overflow: hidden;
  color: var(--sg-cart-navy);
  font: 850 0.94rem/1.28 Inter, system-ui, sans-serif;
  letter-spacing: 0;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

body.theme-stackgamer-2026-preview #cartSidebar .cart-item-unit {
  margin: 0 0 12px;
  color: var(--sg-cart-muted);
  font: 650 0.78rem/1.35 Inter, system-ui, sans-serif;
}

body.theme-stackgamer-2026-preview #cartSidebar .cart-item-controls {
  display: grid;
  grid-template-columns: auto minmax(74px, max-content);
  align-items: center;
  gap: 10px;
}

body.theme-stackgamer-2026-preview #cartSidebar .cart-qty-control {
  display: inline-grid;
  grid-template-columns: 34px minmax(30px, auto) 34px;
  align-items: center;
  width: max-content;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(37, 99, 255, 0.22);
  border-radius: 8px;
}

body.theme-stackgamer-2026-preview #cartSidebar .qty-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--sg-cart-navy);
  background: #f8fbff;
  border: 0;
  font: 900 1rem/1 Inter, system-ui, sans-serif;
  cursor: pointer;
}

body.theme-stackgamer-2026-preview #cartSidebar .qty-btn:hover,
body.theme-stackgamer-2026-preview #cartSidebar .qty-btn:focus-visible {
  color: #ffffff;
  background: var(--sg-cart-blue);
  outline: none;
}

body.theme-stackgamer-2026-preview #cartSidebar .cart-qty-control span {
  min-width: 30px;
  color: var(--sg-cart-navy);
  text-align: center;
  font: 850 0.9rem/1 Inter, system-ui, sans-serif;
}

body.theme-stackgamer-2026-preview #cartSidebar .cart-item-controls strong {
  justify-self: end;
  color: var(--sg-cart-energy);
  white-space: nowrap;
  font: 900 0.95rem/1.1 Inter, system-ui, sans-serif;
}

body.theme-stackgamer-2026-preview #cartSidebar .cart-remove {
  grid-column: 1 / -1;
  justify-self: start;
  margin-top: 2px;
  padding: 0;
  color: #dc2626;
  background: transparent;
  border: 0;
  font: 800 0.78rem/1 Inter, system-ui, sans-serif;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

body.theme-stackgamer-2026-preview #cartSidebar .cart-footer {
  display: grid;
  gap: 14px;
  padding: 18px 22px 22px;
  background: #ffffff;
  border-top: 1px solid var(--sg-cart-border);
  box-shadow: 0 -18px 34px rgba(15, 23, 42, 0.08);
}

body.theme-stackgamer-2026-preview #cartSidebar .cart-footer h4 {
  margin: 0;
  color: var(--sg-cart-navy);
  font: 900 1.05rem/1.2 Inter, system-ui, sans-serif;
  letter-spacing: 0;
}

body.theme-stackgamer-2026-preview #cartSidebar #areaTotais {
  display: grid;
  gap: 8px;
  padding: 0;
}

body.theme-stackgamer-2026-preview #cartSidebar #areaTotais > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  color: var(--sg-cart-muted);
  font: 750 0.9rem/1.25 Inter, system-ui, sans-serif;
}

body.theme-stackgamer-2026-preview #cartSidebar #areaTotais > div span,
body.theme-stackgamer-2026-preview #cartSidebar #areaTotais > div strong {
  color: var(--sg-cart-navy);
  white-space: nowrap;
  font-weight: 900;
}

body.theme-stackgamer-2026-preview #cartSidebar #areaTotais .cart-summary-total,
body.theme-stackgamer-2026-preview #cartSidebar #areaTotais > div:last-child {
  margin-top: 8px;
  padding-top: 12px;
  color: var(--sg-cart-navy);
  border-top: 1px solid rgba(15, 23, 42, 0.12);
  font-size: 1.02rem;
}

body.theme-stackgamer-2026-preview #cartSidebar #areaTotais .cart-summary-total strong,
body.theme-stackgamer-2026-preview #cartSidebar #areaTotais > div:last-child span,
body.theme-stackgamer-2026-preview #cartSidebar #areaTotais > div:last-child strong {
  color: var(--sg-cart-energy);
  font-size: 1.22rem;
}

body.theme-stackgamer-2026-preview #cartSidebar .btn-checkout,
body.theme-stackgamer-2026-preview #cartSidebar .cart-continue {
  width: 100%;
  min-height: 48px;
  border-radius: 8px;
  font: 900 0.94rem/1 Inter, system-ui, sans-serif;
  cursor: pointer;
}

body.theme-stackgamer-2026-preview #cartSidebar .btn-checkout {
  color: #ffffff;
  background: linear-gradient(135deg, var(--sg-cart-blue), var(--sg-cart-energy));
  border: 1px solid rgba(37, 99, 255, 0.18);
  box-shadow: 0 14px 28px rgba(37, 99, 255, 0.25);
}

body.theme-stackgamer-2026-preview #cartSidebar .cart-continue {
  color: var(--sg-cart-blue);
  background: #ffffff;
  border: 1px solid rgba(37, 99, 255, 0.22);
}

body.theme-stackgamer-2026-preview #cartSidebar .btn-checkout:hover,
body.theme-stackgamer-2026-preview #cartSidebar .btn-checkout:focus-visible,
body.theme-stackgamer-2026-preview #cartSidebar .cart-continue:hover,
body.theme-stackgamer-2026-preview #cartSidebar .cart-continue:focus-visible {
  transform: translateY(-1px);
  outline: 2px solid rgba(56, 221, 248, 0.42);
  outline-offset: 2px;
}

body.theme-stackgamer-2026-preview #cartSidebar .whatsapp-cart-help,
body.theme-stackgamer-2026-preview #cartSidebar .whatsapp-safety-note {
  color: var(--sg-cart-muted);
  font: 650 0.78rem/1.4 Inter, system-ui, sans-serif;
}

body.theme-stackgamer-2026-preview #cartSidebar .whatsapp-cart-help a {
  color: var(--sg-cart-blue);
  font-weight: 900;
}

body.theme-stackgamer-2026-preview .cart-badge {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  color: #ffffff;
  background: var(--sg-cart-blue);
  border-radius: 999px;
  font: 900 0.74rem/1 Inter, system-ui, sans-serif;
}

@media (max-width: 640px) {
  body.theme-stackgamer-2026-preview #cartSidebar.cyber-cart-sidebar {
    width: 100vw;
    border-left: 0;
  }

  body.theme-stackgamer-2026-preview #cartSidebar .cart-header,
  body.theme-stackgamer-2026-preview #cartSidebar .cart-footer {
    padding-right: 16px;
    padding-left: 16px;
  }

  body.theme-stackgamer-2026-preview #cartItemsContainer.cart-items {
    padding: 14px;
  }

  body.theme-stackgamer-2026-preview #cartSidebar .cart-item {
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }

  body.theme-stackgamer-2026-preview #cartSidebar .cart-item-image {
    width: 78px;
    height: 78px;
  }

  body.theme-stackgamer-2026-preview #cartSidebar .cart-item-controls {
    grid-template-columns: 1fr;
  }

  body.theme-stackgamer-2026-preview #cartSidebar .cart-item-controls strong {
    justify-self: start;
  }
}
