/* ==========================================================================
   TOKENS DE DESIGN COMPARTILHADOS — LOJA SJ 3D
   Usado na loja (/), painel do cliente (/conta), admin (/admin) e calculadora
   ========================================================================== */

:root {
  --sj-brand-orange: #f04e23;
  --sj-brand-orange-hover: #d8431b;
  --sj-brand-orange-vivid: #ff5500;
  --sj-brand-orange-soft: rgba(240, 78, 35, 0.08);
  --sj-brand-orange-border: rgba(240, 78, 35, 0.28);

  --sj-bg-page: #ffffff;
  --sj-bg-subtle: #f8fafc;
  --sj-bg-surface: #ffffff;
  --sj-bg-muted: #f1f5f9;
  --sj-border-subtle: #e2e8f0;
  --sj-border-strong: #cbd5e1;

  --sj-text-primary: #0f172a;
  --sj-text-secondary: #334155;
  --sj-text-muted: #64748b;

  /* Cores de apoio e status de estoque */
  --sj-accent-ink: #1e293b;
  --sj-status-ok: #15803d;
  --sj-status-ok-bg: #f0fdf4;
  --sj-status-warn: #b45309;
  --sj-status-warn-bg: #fffbeb;
  --sj-status-danger: #b91c1c;
  --sj-status-danger-bg: #fef2f2;

  --sj-font-sans: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --sj-font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --sj-space-xs: 6px;
  --sj-space-sm: 12px;
  --sj-space-md: 20px;
  --sj-space-lg: 32px;
  --sj-space-xl: 48px;
  --sj-space-section: 56px;

  --sj-radius-sm: 8px;
  --sj-radius-md: 12px;
  --sj-radius-lg: 16px;
  --sj-radius-xl: 20px;
  --sj-radius-pill: 9999px;

  --sj-shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05);
  --sj-shadow-md: 0 10px 28px rgba(15, 23, 42, 0.08);
  --sj-shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.14);
  --sj-shadow-orange: 0 6px 18px rgba(240, 78, 35, 0.22);

  --sj-focus-outline: 2.5px solid var(--sj-brand-orange);
  --sj-transition: 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Foco visível consistente em botões, links e controles */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: var(--sj-focus-outline);
  outline-offset: 2px;
}

/* Menu compacto unificado da conta no cabeçalho */
.sj-acct-anchor {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.sj-acct-chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 5px 11px 5px 7px;
  border-radius: var(--sj-radius-pill);
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #0f172a;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.16s ease, background-color 0.16s ease, transform 0.14s ease;
  white-space: nowrap;
}

.sj-acct-chip-btn:hover {
  border-color: var(--sj-brand-orange);
  background: #fff8f5;
}

.sj-acct-chip-btn[aria-expanded="true"] {
  border-color: var(--sj-brand-orange);
  box-shadow: 0 0 0 3px rgba(240, 78, 35, 0.14);
}

.sj-acct-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sj-brand-orange), var(--sj-brand-orange-hover));
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.sj-acct-name {
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sj-acct-role-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: var(--sj-radius-pill);
  background: var(--sj-brand-orange-soft);
  color: var(--sj-brand-orange-hover);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.sj-acct-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 232px;
  max-width: min(290px, calc(100vw - 24px));
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--sj-radius-lg);
  box-shadow: var(--sj-shadow-lg);
  padding: 6px;
  z-index: 1200;
  display: none;
}

.sj-acct-popover.is-open {
  display: block;
}

.sj-acct-popover-head {
  padding: 8px 10px 10px;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 4px;
}

.sj-acct-popover-title {
  font-size: 0.84rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.25;
  word-break: break-word;
}

.sj-acct-popover-email {
  font-size: 0.74rem;
  color: #64748b;
  margin-top: 2px;
  word-break: break-all;
}

.sj-acct-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border: none;
  border-radius: var(--sj-radius-sm);
  background: transparent;
  color: #1e293b;
  font-family: inherit;
  font-size: 0.83rem;
  font-weight: 600;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.14s ease, color 0.14s ease;
}

.sj-acct-menu-item:hover,
.sj-acct-menu-item:focus-visible {
  background: #f8fafc;
  color: var(--sj-brand-orange);
}

.sj-acct-menu-item[aria-current="page"] {
  background: var(--sj-brand-orange-soft);
  color: var(--sj-brand-orange-hover);
  font-weight: 800;
}

.sj-acct-menu-item.is-danger {
  color: #b91c1c;
}

.sj-acct-menu-item.is-danger:hover,
.sj-acct-menu-item.is-danger:focus-visible {
  background: #fef2f2;
  color: #991b1b;
}

.sj-acct-sep {
  border: none;
  border-top: 1px solid #f1f5f9;
  margin: 4px 0;
}

/* Variante escura para o cabeçalho da Calculadora 3D */
.sj-acct-anchor.is-dark .sj-acct-chip-btn {
  background: #14141a;
  border-color: rgba(255, 255, 255, 0.14);
  color: #f8fafc;
}

.sj-acct-anchor.is-dark .sj-acct-chip-btn:hover {
  background: #1c1c24;
  border-color: rgba(255, 85, 0, 0.55);
}

.sj-acct-anchor.is-dark .sj-acct-role-tag {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
}

.sj-acct-anchor.is-dark .sj-acct-popover {
  background: #14141c;
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65);
}

.sj-acct-anchor.is-dark .sj-acct-popover-head {
  border-bottom-color: rgba(255, 255, 255, 0.09);
}

.sj-acct-anchor.is-dark .sj-acct-popover-title {
  color: #f8fafc;
}

.sj-acct-anchor.is-dark .sj-acct-popover-email {
  color: #94a3b8;
}

.sj-acct-anchor.is-dark .sj-acct-menu-item {
  color: #e2e8f0;
}

.sj-acct-anchor.is-dark .sj-acct-menu-item:hover,
.sj-acct-anchor.is-dark .sj-acct-menu-item:focus-visible {
  background: rgba(255, 255, 255, 0.07);
  color: #ff7a3d;
}

.sj-acct-anchor.is-dark .sj-acct-menu-item[aria-current="page"] {
  background: rgba(255, 85, 0, 0.16);
  color: #ff7a3d;
}

.sj-acct-anchor.is-dark .sj-acct-menu-item.is-danger {
  color: #fca5a5;
}

.sj-acct-anchor.is-dark .sj-acct-menu-item.is-danger:hover,
.sj-acct-anchor.is-dark .sj-acct-menu-item.is-danger:focus-visible {
  background: rgba(239, 68, 68, 0.16);
  color: #fecaca;
}

.sj-acct-anchor.is-dark .sj-acct-sep {
  border-top-color: rgba(255, 255, 255, 0.09);
}

@media (max-width: 640px) {
  .sj-acct-name {
    max-width: 84px;
  }
  .sj-acct-role-tag {
    display: none;
  }
}

/* ==========================================================================
   RODAPÉ UNIFICADO (LOJA, PRIVACIDADE, CONTA) — 4 COLUNAS + ACORDEÃO MOBILE
   ========================================================================== */
.sj-unified-footer {
  background: #0f172a;
  border-top: 1px solid #1e293b;
  color: #cbd5e1;
  padding: 44px 0 32px;
  font-family: var(--sj-font-sans);
  position: relative;
  z-index: 10;
}

.sj-unified-footer .footer-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.sj-footer-cols-4 {
  display: grid;
  grid-template-columns: 1.25fr 0.9fr 1.2fr 0.85fr;
  align-items: start;
  gap: 36px;
  padding-bottom: 32px;
  border-bottom: 1px solid #1e293b;
}

.sj-footer-brand-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.sj-unified-footer .footer-logo-row {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
}

.sj-unified-footer .footer-logo-img {
  height: 30px;
  width: auto;
  display: block;
  filter: brightness(0) invert(1);
}

.sj-footer-brand-col .footer-desc-text {
  margin: 0;
  font-size: 0.88rem;
  color: #e2e8f0;
  line-height: 1.5;
  max-width: 290px;
}

/* Linha de ícones circulares (42px x 42px) de redes sociais */
.sj-footer-social-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.sj-social-circle-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.sj-social-circle-btn:hover {
  transform: translateY(-2px);
  color: #ffffff;
}

.sj-social-circle-btn.is-instagram:hover {
  background: #f04e23;
  border-color: #f04e23;
}

.sj-social-circle-btn.is-whatsapp:hover {
  background: #25d366;
  border-color: #25d366;
  color: #052e16;
}

.sj-social-circle-btn.is-maps:hover {
  background: #f04e23;
  border-color: #f04e23;
}

.sj-footer-accordion {
  min-width: 0;
}

.sj-footer-col-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.84rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #ffffff;
  min-height: 30px;
  margin-bottom: 14px;
  cursor: default;
}

.sj-footer-col-summary::-webkit-details-marker {
  display: none;
}

.sj-footer-col-summary::after {
  display: none;
}

.sj-unified-footer .footer-nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sj-unified-footer .footer-nav-links a {
  color: #e2e8f0;
  font-size: 0.87rem;
  text-decoration: none;
  transition: color 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
}

.sj-unified-footer .footer-nav-links a:hover {
  color: #ff7a4d;
  padding-left: 0;
}

.sj-footer-note-text {
  color: #cbd5e1;
  font-size: 0.85rem;
  line-height: 1.45;
  display: inline-block;
}

.sj-unified-footer .footer-mini-tag {
  background: var(--sj-brand-orange);
  color: #ffffff;
  font-size: 0.64rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
}

.sj-footer-bottom-aa.footer-bottom-bar {
  padding-top: 20px;
  padding-right: 76px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.82rem;
  color: #f1f5f9;
}

.sj-footer-bottom-aa .footer-copy-text {
  color: #f1f5f9;
  line-height: 1.5;
}

@media (max-width: 980px) {
  .sj-footer-cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
  }
}

@media (max-width: 768px) {
  .sj-unified-footer {
    padding: 36px 0 calc(92px + env(safe-area-inset-bottom, 0px));
  }
  .sj-footer-bottom-aa.footer-bottom-bar {
    padding-right: 68px;
  }
}

@media (max-width: 640px) {
  .sj-footer-cols-4 {
    grid-template-columns: 1fr;
    gap: 0;
    padding-bottom: 18px;
  }
  .sj-footer-brand-col {
    padding-bottom: 20px;
    border-bottom: 1px solid #1e293b;
  }
  .sj-footer-accordion {
    border-bottom: 1px solid #1e293b;
  }
  .sj-footer-col-summary {
    cursor: pointer;
    margin-bottom: 0;
    padding: 14px 0;
    min-height: 44px;
  }
  .sj-footer-col-summary::after {
    content: "";
    display: inline-block;
    width: 9px;
    height: 9px;
    border-right: 2px solid #e2e8f0;
    border-bottom: 2px solid #e2e8f0;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
    margin-right: 4px;
  }
  .sj-footer-accordion[open] > .sj-footer-col-summary::after {
    transform: rotate(-135deg);
  }
  .sj-footer-accordion-body {
    padding-bottom: 16px;
  }
  .sj-footer-bottom-aa.footer-bottom-bar {
    padding-right: 62px;
    font-size: 0.78rem;
  }
}
