/*
 * Stack Gamer - evidence final pass 02
 * Scope: visual-only overrides for the public 2026 theme.
 * No checkout, payment, freight, session or database behavior is changed here.
 */

body.theme-stackgamer-definitive-preview:not(.admin-mode) {
  --sg2-bg: #f4f7fb;
  --sg2-card: #ffffff;
  --sg2-card-soft: #f8fbff;
  --sg2-text: #0f172a;
  --sg2-muted: #475569;
  --sg2-soft: #64748b;
  --sg2-blue: #2563ff;
  --sg2-cyan: #0ea5ff;
  --sg2-line: rgba(37, 99, 255, .18);
  --sg2-line-strong: rgba(37, 99, 255, .34);
  --sg2-shadow: 0 18px 42px rgba(15, 23, 42, .10);
  --sg2-shadow-soft: 0 10px 26px rgba(15, 23, 42, .07);
  background: var(--sg2-bg) !important;
  color: var(--sg2-text) !important;
}

body.theme-stackgamer-definitive-preview:not(.admin-mode) * {
  text-shadow: none !important;
}

/* 1. Cookie consent: small top-left popup, never fullscreen. */
body.theme-stackgamer-definitive-preview:not(.admin-mode) :where(#cookie-consent-prompt-overlay, .preferences-modal-overlay) {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

body.theme-stackgamer-definitive-preview:not(.admin-mode) #cookie-consent-prompt.preferences-modal:not([hidden]) {
  position: fixed !important;
  inset: 16px auto auto 16px !important;
  width: min(420px, calc(100vw - 32px)) !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: calc(100vh - 32px) !important;
  display: block !important;
  padding: 0 !important;
  background: transparent !important;
  pointer-events: none !important;
  z-index: 10050 !important;
}

body.theme-stackgamer-definitive-preview:not(.admin-mode) #cookie-consent-prompt[hidden] {
  display: none !important;
}

body.theme-stackgamer-definitive-preview:not(.admin-mode) #cookie-consent-prompt :where(.preferences-prompt-shell, .preferences-modal-card, .cookie-card) {
  width: 100% !important;
  max-height: inherit !important;
  overflow: auto !important;
  border: 1px solid var(--sg2-line-strong) !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: var(--sg2-text) !important;
  box-shadow: var(--sg2-shadow) !important;
  pointer-events: auto !important;
}

body.theme-stackgamer-definitive-preview:not(.admin-mode) #cookie-consent-prompt :where(h1, h2, h3, p, span, small, button) {
  color: var(--sg2-text) !important;
  opacity: 1 !important;
}

/* 2. Header identity and Pedidos block. */
body.theme-stackgamer-definitive-preview:not(.admin-mode) .sg-header-t3 {
  background: rgba(255, 255, 255, .98) !important;
}

body.theme-stackgamer-definitive-preview:not(.admin-mode) .brand-logo-container {
  width: 198px !important;
  min-width: 198px !important;
  height: 78px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.theme-stackgamer-definitive-preview:not(.admin-mode) .brand-logo-img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  padding: 0 !important;
  filter: drop-shadow(0 8px 18px rgba(37, 99, 255, .16)) !important;
}

body.theme-stackgamer-definitive-preview:not(.admin-mode) .nav-logo-text {
  display: none !important;
}

body.theme-stackgamer-definitive-preview:not(.admin-mode) .sg-orders-link {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-height: 58px !important;
  padding: 9px 14px !important;
}

body.theme-stackgamer-definitive-preview:not(.admin-mode) .sg-orders-link > span:first-child {
  order: 0 !important;
  display: inline-grid !important;
  place-items: center !important;
  width: 34px !important;
  height: 34px !important;
  border: 1px solid rgba(37, 99, 255, .28) !important;
  border-radius: 8px !important;
  background: #eef5ff !important;
  color: var(--sg2-blue) !important;
}

body.theme-stackgamer-definitive-preview:not(.admin-mode) .sg-orders-link > span:nth-child(2) {
  display: block !important;
  color: var(--sg2-text) !important;
  font-weight: 800 !important;
  line-height: 1.05 !important;
}

body.theme-stackgamer-definitive-preview:not(.admin-mode) .sg-orders-link strong {
  display: none !important;
}

/* 3. Hero, decision cards and support badge must be readable and framed. */
body.theme-stackgamer-definitive-preview:not(.admin-mode) .conversion-hero {
  overflow: visible !important;
  border: 1px solid var(--sg2-line) !important;
  border-radius: 8px !important;
  background: linear-gradient(120deg, rgba(255,255,255,.96), rgba(235,245,255,.94) 48%, rgba(221,241,255,.86)) !important;
  box-shadow: var(--sg2-shadow-soft) !important;
}

body.theme-stackgamer-definitive-preview:not(.admin-mode) .conversion-hero :where(h1, h2, h3, p, span, li, strong) {
  color: var(--sg2-text) !important;
  opacity: 1 !important;
}

body.theme-stackgamer-definitive-preview:not(.admin-mode) :where(.conversion-hero-secondary, .conversion-decision-card, .conversion-hero-card, .conversion-hero-copy-card) {
  border: 1px solid var(--sg2-line-strong) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, .96) !important;
  color: var(--sg2-text) !important;
  box-shadow: var(--sg2-shadow-soft) !important;
}

body.theme-stackgamer-definitive-preview:not(.admin-mode) :where(.conversion-hero-badge, .conversion-hero-support-card, .conversion-support-card) {
  max-width: min(430px, calc(100vw - 48px)) !important;
  right: clamp(20px, 5vw, 72px) !important;
  left: auto !important;
  transform: none !important;
  border: 1px solid rgba(37, 99, 255, .26) !important;
  border-radius: 8px !important;
  background: #0f172a !important;
  color: #fff !important;
  box-shadow: 0 18px 38px rgba(15, 23, 42, .18) !important;
}

body.theme-stackgamer-definitive-preview:not(.admin-mode) :where(.conversion-hero-badge *, .conversion-hero-support-card *, .conversion-support-card *) {
  color: #fff !important;
}

/* 4, 5, 15. Category and product cards: stronger identity, no overlap, 5 columns on wide screens. */
body.theme-stackgamer-definitive-preview:not(.admin-mode) :where(.conversion-category-grid a, .category-card, .product-card, .sg-product-card) {
  position: relative !important;
  border: 1px solid var(--sg2-line) !important;
  border-radius: 8px !important;
  background: linear-gradient(135deg, #fff, #f8fbff) !important;
  color: var(--sg2-text) !important;
  box-shadow: var(--sg2-shadow-soft) !important;
  overflow: hidden !important;
}

body.theme-stackgamer-definitive-preview:not(.admin-mode) :where(.conversion-category-grid a, .category-card, .product-card, .sg-product-card)::after {
  content: "" !important;
  position: absolute !important;
  right: 14px !important;
  bottom: 10px !important;
  width: 34px !important;
  height: 2px !important;
  background: linear-gradient(90deg, var(--sg2-blue), var(--sg2-cyan)) !important;
  border-radius: 999px !important;
}

body.theme-stackgamer-definitive-preview:not(.admin-mode) :where(.conversion-category-grid a:hover, .category-card:hover, .product-card:hover, .sg-product-card:hover) {
  border-color: var(--sg2-line-strong) !important;
  box-shadow: var(--sg2-shadow) !important;
}

body.theme-stackgamer-definitive-preview:not(.admin-mode) .product-card-body {
  display: flex !important;
  flex: 1 1 auto !important;
  flex-direction: column !important;
  min-height: 0 !important;
  gap: 8px !important;
}

body.theme-stackgamer-definitive-preview:not(.admin-mode) :where(.product-card-meta, .product-rating, .product-rating-empty, .product-price-label, .product-payment-line, .product-installments) {
  min-height: 18px !important;
  color: var(--sg2-muted) !important;
  opacity: 1 !important;
}

body.theme-stackgamer-definitive-preview:not(.admin-mode) .product-title {
  display: -webkit-box !important;
  min-height: 56px !important;
  max-height: 56px !important;
  overflow: hidden !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 3 !important;
  line-height: 1.16 !important;
  word-break: normal !important;
}

body.theme-stackgamer-definitive-preview:not(.admin-mode) .product-spec-summary {
  display: -webkit-box !important;
  min-height: 19px !important;
  max-height: 19px !important;
  overflow: hidden !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 1 !important;
}

body.theme-stackgamer-definitive-preview:not(.admin-mode) .product-footer {
  margin-top: auto !important;
  display: grid !important;
  gap: 10px !important;
  padding-top: 12px !important;
}

@media (min-width: 1500px) {
  body.theme-stackgamer-definitive-preview:not(.admin-mode) :where(.conversion-product-grid, .catalog-products-grid, .products-grid, .product-grid) {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }

  body.theme-stackgamer-definitive-preview:not(.admin-mode) :where(.product-card, .sg-product-card) {
    min-height: 515px !important;
  }

  body.theme-stackgamer-definitive-preview:not(.admin-mode) .product-title {
    font-size: .88rem !important;
  }
}

/* 6, 7, 16. Product, profile and generic content pages: light, readable identity. */
body.theme-stackgamer-definitive-preview:not(.admin-mode) :where(
  .sg-product-page,
  .sg-product-page-main,
  .sg-product-page-content,
  .sg-product-page-heading,
  .sg-product-page-hero,
  .sg-product-hero,
  .sg-product-page-titlebar,
  .sg-product-page-section,
  .sg-product-page-buybox,
  .sg-product-price-box,
  .sg-product-payment-box,
  .sg-product-freight-box,
  .sg-product-page-gallery,
  .sg-product-specs,
  .sg-product-decision-guide,
  .sg-product-quick-faq,
  .admin-container.profile-grid,
  .profile-sidebar,
  .order-card,
  .panel
) {
  background: #ffffff !important;
  color: var(--sg2-text) !important;
  border-color: var(--sg2-line) !important;
  box-shadow: var(--sg2-shadow-soft) !important;
}

body.theme-stackgamer-definitive-preview:not(.admin-mode) :where(
  .sg-product-page h1, .sg-product-page h2, .sg-product-page h3,
  .sg-product-page summary, .sg-product-page strong, .sg-product-page dt, .sg-product-page th,
  .profile-sidebar h1, .profile-sidebar h2, .profile-sidebar h3,
  .order-card h1, .order-card h2, .order-card h3, .order-card strong
) {
  color: var(--sg2-text) !important;
  opacity: 1 !important;
}

body.theme-stackgamer-definitive-preview:not(.admin-mode) :where(
  .sg-product-page p, .sg-product-page li, .sg-product-page dd, .sg-product-page td, .sg-product-page span, .sg-product-page small,
  .profile-sidebar p, .profile-sidebar label, .profile-sidebar span,
  .order-card p, .order-card span, .timeline-date
) {
  color: var(--sg2-muted) !important;
  opacity: 1 !important;
}

body.theme-stackgamer-definitive-preview:not(.admin-mode) :where(.sg-product-page table, .sg-product-page tr, .sg-product-page td, .sg-product-page th, .sg-product-specs table, .sg-product-specs td, .sg-product-specs th) {
  background: #f8fbff !important;
  color: var(--sg2-text) !important;
  border-color: rgba(15, 23, 42, .09) !important;
}

/* 9. Cart sidebar: readable background and visible quantity buttons. */
body.theme-stackgamer-definitive-preview:not(.admin-mode) :where(.cart-sidebar, .cyber-cart-sidebar) {
  width: min(470px, 100vw) !important;
  background: #ffffff !important;
  color: var(--sg2-text) !important;
  border-left: 1px solid var(--sg2-line-strong) !important;
  box-shadow: -24px 0 58px rgba(15, 23, 42, .22) !important;
}

body.theme-stackgamer-definitive-preview:not(.admin-mode) :where(.cart-header, .cart-footer) {
  background: #ffffff !important;
  color: var(--sg2-text) !important;
  border-color: var(--sg2-line) !important;
}

body.theme-stackgamer-definitive-preview:not(.admin-mode) .cart-item {
  display: grid !important;
  grid-template-columns: 72px minmax(0, 1fr) auto !important;
  gap: 10px !important;
  align-items: center !important;
  background: #fff !important;
  color: var(--sg2-text) !important;
  border: 1px solid var(--sg2-line) !important;
  border-radius: 8px !important;
}

body.theme-stackgamer-definitive-preview:not(.admin-mode) :where(.cart-item *, .cart-total-row, .cart-summary-row, .cart-footer *) {
  color: var(--sg2-text) !important;
  opacity: 1 !important;
  min-width: 0 !important;
}

body.theme-stackgamer-definitive-preview:not(.admin-mode) :where(.qty-btn, .quantity-btn, .cart-qty-button, .sg-modal-qty-button, .btn-qty, button[data-action="decrease"], button[data-action="increase"]) {
  display: inline-grid !important;
  place-items: center !important;
  min-width: 38px !important;
  height: 38px !important;
  border: 1px solid rgba(37, 99, 255, .28) !important;
  border-radius: 8px !important;
  background: #0f172a !important;
  color: #ffffff !important;
  font-weight: 900 !important;
  opacity: 1 !important;
}

/* 10, 11. Login/register: visible inactive tab, senha wording already in PHP, side visual panels. */
body.theme-stackgamer-definitive-preview.sg-page-login {
  background:
    radial-gradient(circle at 12% 18%, rgba(37, 99, 255, .13), transparent 34%),
    radial-gradient(circle at 86% 20%, rgba(14, 165, 255, .13), transparent 32%),
    var(--sg2-bg) !important;
}

body.theme-stackgamer-definitive-preview.sg-page-login .center-wrapper::before,
body.theme-stackgamer-definitive-preview.sg-page-login .center-wrapper::after {
  background-image:
    linear-gradient(135deg, rgba(255,255,255,.90), rgba(239,247,255,.76)),
    url('../img/logo.png') !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: auto, min(72%, 330px) auto !important;
}

body.theme-stackgamer-definitive-preview.sg-page-login .tab-btn:not(.active) {
  opacity: 1 !important;
  background: #f8fafc !important;
  color: #334155 !important;
  border: 1px solid var(--sg2-line-strong) !important;
}

body.theme-stackgamer-definitive-preview.sg-page-login :where(label, .form-label, input, select, textarea, .form-control) {
  color: var(--sg2-text) !important;
  opacity: 1 !important;
}

/* 12, 14. Monte seu PC: premium builder, selectable-looking component cards. */
body.theme-stackgamer-definitive-preview.sg-page-setup .grid-layout {
  width: min(100% - 32px, 1420px) !important;
  grid-template-columns: minmax(0, 1fr) 330px !important;
  gap: 20px !important;
}

body.theme-stackgamer-definitive-preview.sg-page-setup :where(.wizard-container, .summary-sidebar, .setup-status-strip, .setup-filter-container, .setup-step-guidance) {
  background: #ffffff !important;
  color: var(--sg2-text) !important;
  border: 1px solid var(--sg2-line) !important;
  border-radius: 8px !important;
  box-shadow: var(--sg2-shadow-soft) !important;
}

body.theme-stackgamer-definitive-preview.sg-page-setup :where(.current-step-title, .setup-step-guidance h2, .summary-sidebar h2, .option-title, .component-title, .product-option h3) {
  color: var(--sg2-text) !important;
  opacity: 1 !important;
}

body.theme-stackgamer-definitive-preview.sg-page-setup :where(.setup-step-guidance p, .summary-sidebar small, .option-meta, .component-meta, .product-option p) {
  color: var(--sg2-muted) !important;
  opacity: 1 !important;
}

body.theme-stackgamer-definitive-preview.sg-page-setup :where(.options-list, .products-grid, .component-grid, .setup-options-grid) {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 14px !important;
}

body.theme-stackgamer-definitive-preview.sg-page-setup :where(.option-card, .product-option, .component-card) {
  min-height: 300px !important;
  background: linear-gradient(135deg, #ffffff, #f8fbff) !important;
  color: var(--sg2-text) !important;
  border: 1px solid var(--sg2-line) !important;
  border-radius: 8px !important;
  box-shadow: var(--sg2-shadow-soft) !important;
  opacity: 1 !important;
}

body.theme-stackgamer-definitive-preview.sg-page-setup :where(.option-card button, .product-option button, .component-card button, .btn-wiz, .btn-add, .option-add-button) {
  pointer-events: auto !important;
  opacity: 1 !important;
  border-radius: 8px !important;
}

body.theme-stackgamer-definitive-preview.sg-page-setup :where(.btn-wiz, .btn-add, .option-add-button) {
  background: linear-gradient(135deg, var(--sg2-blue), var(--sg2-cyan)) !important;
  color: #fff !important;
  border: 0 !important;
}

@media (min-width: 1280px) {
  body.theme-stackgamer-definitive-preview.sg-page-setup :where(.options-list, .products-grid, .component-grid, .setup-options-grid) {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }
}

/* 12. Coupons and floating buttons. */
body.theme-stackgamer-definitive-preview :where(.conversion-coupon-grid, .stack-coupons-wrapper) {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 14px !important;
  overflow: visible !important;
}

body.theme-stackgamer-definitive-preview :where(.coupon-card, .stack-coupon-card, .coupon-box) {
  min-height: 154px !important;
  border: 1px solid var(--sg2-line) !important;
  border-radius: 8px !important;
  background: linear-gradient(135deg, #ffffff, #f8fbff) !important;
  color: var(--sg2-text) !important;
  box-shadow: var(--sg2-shadow-soft) !important;
}

body.theme-stackgamer-definitive-preview :where(.coupon-card *, .stack-coupon-card *, .coupon-box *) {
  color: var(--sg2-text) !important;
  opacity: 1 !important;
}

body.theme-stackgamer-definitive-preview :where(.whatsapp-float, .whatsapp-floating, .floating-whatsapp, .setup-whatsapp-help) {
  position: fixed !important;
  right: 18px !important;
  bottom: 18px !important;
  left: auto !important;
  top: auto !important;
  transform: none !important;
  z-index: 9997 !important;
}

body.theme-stackgamer-definitive-preview :where(.whatsapp-float, .whatsapp-floating, .floating-whatsapp, .setup-whatsapp-help)::after {
  content: "" !important;
  position: absolute !important;
  inset: 11px !important;
  background: url('../img/logo.png') center / contain no-repeat !important;
  pointer-events: none !important;
}

body.theme-stackgamer-definitive-preview :where(.stack-coupons-floating, .floating-coupons, .coupon-floating) {
  position: fixed !important;
  right: 18px !important;
  bottom: 92px !important;
  left: auto !important;
  top: auto !important;
  transform: none !important;
  z-index: 9996 !important;
}

/* 8. Footer logo consistency. */
body.theme-stackgamer-definitive-preview:not(.admin-mode) .footer-brand-orbit {
  width: 190px !important;
  min-width: 190px !important;
  height: 78px !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.theme-stackgamer-definitive-preview:not(.admin-mode) .footer-brand-orbit img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
}

@media (max-width: 980px) {
  body.theme-stackgamer-definitive-preview:not(.admin-mode) .brand-logo-container,
  body.theme-stackgamer-definitive-preview:not(.admin-mode) .footer-brand-orbit {
    width: 154px !important;
    min-width: 154px !important;
    height: 62px !important;
  }

  body.theme-stackgamer-definitive-preview.sg-page-login .center-wrapper,
  body.theme-stackgamer-definitive-preview.sg-page-setup .grid-layout {
    grid-template-columns: 1fr !important;
  }

  body.theme-stackgamer-definitive-preview.sg-page-login .center-wrapper::before,
  body.theme-stackgamer-definitive-preview.sg-page-login .center-wrapper::after {
    display: none !important;
  }

  body.theme-stackgamer-definitive-preview.sg-page-setup :where(.options-list, .products-grid, .component-grid, .setup-options-grid) {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.theme-stackgamer-definitive-preview :where(.conversion-coupon-grid, .stack-coupons-wrapper) {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 620px) {
  body.theme-stackgamer-definitive-preview:not(.admin-mode) #cookie-consent-prompt.preferences-modal:not([hidden]) {
    inset: 10px auto auto 10px !important;
    width: calc(100vw - 20px) !important;
  }

  body.theme-stackgamer-definitive-preview.sg-page-setup :where(.options-list, .products-grid, .component-grid, .setup-options-grid) {
    grid-template-columns: 1fr !important;
  }

  body.theme-stackgamer-definitive-preview :where(.whatsapp-float, .whatsapp-floating, .floating-whatsapp, .setup-whatsapp-help) {
    right: 12px !important;
    bottom: 12px !important;
  }

  body.theme-stackgamer-definitive-preview :where(.stack-coupons-floating, .floating-coupons, .coupon-floating) {
    right: 12px !important;
    bottom: 84px !important;
  }
}
