/**
 * assets/css/hub-chrome.css - Componentes de navegação do GlobalFire Hub
 * Tokens, ações do header (Menu, carrinho, conta), Menu Vitrine e gaveta mobile.
 * Carregado no Hub e no admin (que usa o mesmo header); nunca no IGNIS.
 * Estilos de página inteira da casca pública ficam em hub-theme.css.
 */

:root {
  --hub-black: #000000;
  --hub-bg-elevated: #080808;
  --hub-bg-surface: #101010;
  --hub-bg-card: #151515;
  --hub-bg-card-hover: #1c1c1c;
  --hub-border-subtle: rgba(255, 255, 255, 0.12);
  --hub-border-medium: rgba(255, 255, 255, 0.22);
  --hub-border-focus: #F36A27;

  --hub-orange: #F36A27;
  --hub-orange-hover: #ff7c3b;
  --hub-orange-muted: rgba(243, 106, 39, 0.18);
  --hub-orange-glow: rgba(243, 106, 39, 0.35);

  --hub-white: #FFFFFF;
  --hub-gray-light: #EEEEEE;
  --hub-gray-muted: #AAAAAA;
  --hub-gray-dark: #666666;
  --hub-gray-border: #333333;

  --hub-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --hub-font-display: "Arial Black", "Montserrat", -apple-system, sans-serif;

  --hub-radius-sm: 6px;
  --hub-radius-md: 10px;
  --hub-radius-lg: 16px;
  --hub-radius-xl: 22px;
  --hub-radius-full: 9999px;

  /* Tokens semânticos de tema (KAN-202). Valores abaixo = Premium Dark. */
  --hub-bg: #000000;
  --hub-surface-0: #0c0c0e;
  --hub-surface-1: #121214;
  --hub-surface-2: #16161a;
  --hub-surface-3: #1c1c20;
  --hub-text: #ffffff;
  --hub-text-soft: #e4e4e7;
  --hub-text-muted: #9999a0;
  --hub-text-dim: #77777f;
  --hub-on-accent: #ffffff;
  --hub-fg-rgb: 255, 255, 255;
  --hub-field-bg: #141417;
  --hub-field-text: #ffffff;
  --hub-bg-rgb: 0, 0, 0;
  --hub-header-bg: rgba(0, 0, 0, 0.92);

  --hub-transition: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --hub-shadow-card: 0 10px 30px rgba(0, 0, 0, 0.65);
  --hub-shadow-glow: 0 0 25px rgba(243, 106, 39, 0.35);
}

/* ==========================================================================
   AÇÕES DO CABEÇALHO (MENU, CARRINHO, CONTA)
   ========================================================================== */
/* Ações do cabeçalho */
.hub-header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Botão principal de Menu */
.hub-menu-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background-color: var(--hub-black);
  color: var(--hub-text);
  border: 1.5px solid var(--hub-orange);
  border-radius: var(--hub-radius-full);
  padding: 9px 20px;
  font-family: var(--hub-font-sans);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--hub-transition);
  box-shadow: 0 0 14px rgba(243, 106, 39, 0.15);
}

.hub-menu-trigger-btn:hover {
  background-color: var(--hub-orange);
  color: var(--hub-white);
  box-shadow: var(--hub-shadow-glow);
  transform: translateY(-1px);
}

.hub-menu-trigger-btn:active {
  transform: translateY(1px);
}

.hub-menu-trigger-btn .menu-icon-bars {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 18px;
}

.hub-menu-trigger-btn .menu-icon-bars span {
  display: block;
  height: 2px;
  width: 100%;
  background-color: currentColor;
  border-radius: 2px;
  transition: var(--hub-transition);
}

/* Link de Login / Perfil no Cabeçalho */
.hub-header-link {
  color: var(--hub-gray-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--hub-radius-sm);
  transition: var(--hub-transition);
}

.hub-header-link:hover {
  color: var(--hub-text);
}

/* Botão do Carrinho no Cabeçalho (Hub & Showcase) */
.hub-cart-btn {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 42px !important;
  height: 42px !important;
  padding: 0 !important;
  border-radius: var(--hub-radius-full) !important;
  background-color: var(--hub-surface-1) !important;
  border: 1px solid rgba(var(--hub-fg-rgb), 0.16) !important;
  color: var(--hub-text) !important;
  cursor: pointer !important;
  transition: var(--hub-transition) !important;
}

.hub-cart-btn:hover {
  background-color: var(--hub-surface-3) !important;
  border-color: var(--hub-orange) !important;
  color: var(--hub-orange) !important;
  transform: translateY(-1px) !important;
}

.hub-cart-btn .hub-cart-badge,
.hub-cart-btn .badge,
#showcaseFabBadge,
#fabBadge.hub-cart-badge {
  position: absolute !important;
  top: -4px !important;
  right: -4px !important;
  min-width: 18px !important;
  height: 18px !important;
  padding: 0 4px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: var(--hub-orange, #F36A27) !important;
  color: #ffffff !important;
  border: 2px solid var(--hub-bg) !important;
  border-radius: 999px !important;
  font-family: var(--hub-font-sans, sans-serif) !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4) !important;
  pointer-events: none;
}

/* Esconde badge quando vazio (data-count="0") */
.hub-cart-btn .hub-cart-badge[data-count="0"],
.hub-cart-btn .badge[data-count="0"],
#showcaseFabBadge[data-count="0"],
#fabBadge.hub-cart-badge[data-count="0"] {
  display: none !important;
}

/* ==========================================================================
   COMPONENTE DO MENU VITRINE HORIZONTAL & GRADE (SHOWCASE OVERLAY)
   ========================================================================== */
.hub-showcase-overlay {
  position: fixed;
  /* Abre abaixo do .site-header real (altura sincronizada via JS em --gf-header-h) */
  inset: var(--gf-header-h, 72px) 0 0 0;
  z-index: 990;
  background: radial-gradient(circle at 50% 40%, rgba(22, 22, 28, 0.96) 0%, rgba(4, 4, 6, 0.98) 100%);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.hub-showcase-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

/* Título da vitrine (o header com logo/ações é o próprio .site-header da Home) */
.hub-showcase-intro {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 20px 4px;
  box-sizing: border-box;
  flex-shrink: 0;
}

.hub-showcase-title {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hub-text);
  margin: 0;
}

.hub-showcase-subtitle {
  font-size: 0.85rem;
  color: var(--hub-gray-muted);
  margin: 0;
}

/* Botão Menu do header em estado aberto: vira "fechar" (mesmo padrão do hambúrguer mobile) */
.hub-menu-trigger-btn.is-active {
  background-color: var(--hub-orange);
  border-color: var(--hub-orange);
  color: var(--hub-white);
  box-shadow: var(--hub-shadow-glow);
}

.hub-menu-trigger-btn.is-active .menu-icon-bars span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.hub-menu-trigger-btn.is-active .menu-icon-bars span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hub-menu-trigger-btn.is-active .menu-icon-bars span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Corpo Central do Showcase (Preenchimento Vertical Harmonioso) */
.hub-showcase-body {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 6px 0;
}

/* Setas Flutuantes Grandes nas Laterais */
.hub-showcase-float-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 30;
  background: rgba(14, 14, 18, 0.88);
  border: 1px solid rgba(var(--hub-fg-rgb), 0.18);
  border-radius: var(--hub-radius-full);
  color: var(--hub-text);
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--hub-transition);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.75);
}

.hub-showcase-float-nav:hover {
  background: var(--hub-orange);
  border-color: var(--hub-orange);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 0 30px rgba(243, 106, 39, 0.6);
}

.hub-showcase-float-nav.prev {
  left: 28px;
}

.hub-showcase-float-nav.next {
  right: 28px;
}

/* Trilho Horizontal (Modo Carrossel) — SCROLLBAR 100% INVISÍVEL */
.hub-showcase-rail {
  display: flex;
  gap: 24px;
  padding: 20px 90px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  width: 100%;
  cursor: grab;
  user-select: none;
  scrollbar-width: none !important; /* Firefox */
  -ms-overflow-style: none !important; /* IE e Edge */
}

/* Oculta completamente a barra laranja no Chrome, Safari e novos navegadores */
.hub-showcase-rail::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.hub-showcase-rail.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto !important;
  scroll-snap-type: none !important;
}

/* Carrossel infinito: durante o salto invisível entre cópias, sem animação nem snap */
.hub-showcase-rail.is-looping {
  scroll-behavior: auto !important;
  scroll-snap-type: none !important;
}

/* ==========================================================================
   CARD PÔSTER P&B EDITORIAL (FIEL À PÁGINA 03 DO BRIEFING)
   Fotografia P&B de alto contraste + Vinheta escura + Tipografia na base
   ========================================================================== */
.hub-card {
  flex: 0 0 330px;
  width: 330px;
  height: min(520px, 64vh);
  min-height: 450px;
  scroll-snap-align: center;
  background-color: #0b0b0e;
  border: 1px solid rgba(var(--hub-fg-rgb), 0.12);
  border-radius: 22px;
  padding: 24px 26px 26px;
  box-sizing: border-box;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.35s ease, box-shadow 0.38s ease;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.85);
}

/* Camada de Fotografia em Preto & Branco de Alto Contraste */
.hub-card-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center 25%;
  background-repeat: no-repeat;
  filter: grayscale(100%) contrast(1.22) brightness(0.72);
  transform: scale(1.01);
  transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1), filter 0.5s ease;
  pointer-events: none;
}

.hub-card:hover .hub-card-photo,
.hub-card.is-highlighted .hub-card-photo {
  transform: scale(1.08);
  filter: grayscale(100%) contrast(1.28) brightness(0.88);
}

/* Efeito Linha Laranja Institucional no Topo */
.hub-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--hub-orange) 0%, #ff9254 100%);
  opacity: 0;
  transition: opacity var(--hub-transition);
  z-index: 4;
}

/* Vinheta Cinematográfica: Revela a foto P&B na metade superior e escurece a base para leitura perfeita */
.hub-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(5, 5, 8, 0.45) 0%,
      rgba(5, 5, 8, 0.10) 28%,
      rgba(6, 6, 9, 0.78) 54%,
      rgba(5, 5, 7, 0.96) 76%,
      #040406 100%
    );
  pointer-events: none;
  z-index: 1;
  transition: background var(--hub-transition);
}

.hub-card:hover::after,
.hub-card.is-highlighted::after {
  background:
    radial-gradient(circle at 50% 100%, rgba(243, 106, 39, 0.22) 0%, transparent 62%),
    linear-gradient(
      180deg,
      rgba(5, 5, 8, 0.30) 0%,
      rgba(5, 5, 8, 0.05) 28%,
      rgba(6, 6, 9, 0.74) 54%,
      rgba(6, 5, 5, 0.95) 76%,
      #050404 100%
    );
}

/* Camadas de Conteúdo do Card (Ficam acima da foto e da vinheta) */
.hub-card-header,
.hub-card-content {
  position: relative;
  z-index: 2;
}

.hub-card:hover,
.hub-card.is-highlighted {
  transform: translateY(-8px);
  border-color: rgba(243, 106, 39, 0.75);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.92), 0 0 36px rgba(243, 106, 39, 0.25);
}

.hub-card:hover::before,
.hub-card.is-highlighted::before {
  opacity: 1;
}

.hub-card:focus-visible {
  outline: 3px solid var(--hub-orange);
  outline-offset: 4px;
}

/* Topo do Card: Tag de Categoria + Número Editorial (01..07) */
.hub-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.hub-card-badge {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--hub-text);
  background: rgba(10, 10, 14, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(243, 106, 39, 0.5);
  padding: 5px 12px;
  border-radius: var(--hub-radius-full);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
  transition: background var(--hub-transition), border-color var(--hub-transition);
}

.hub-card:hover .hub-card-badge {
  background: var(--hub-orange);
  border-color: var(--hub-orange);
}

.hub-card-index {
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: rgba(var(--hub-fg-rgb), 0.65);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
  transition: color var(--hub-transition), transform var(--hub-transition);
}

.hub-card:hover .hub-card-index {
  color: var(--hub-orange);
  transform: scale(1.08);
}

/* Base do Card: Ícone + Título + Descrição + Botão agrupados (Sem espaço morto no centro) */
.hub-card-content {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 24px;
}

.hub-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(243, 106, 39, 0.14);
  border: 1px solid rgba(243, 106, 39, 0.38);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--hub-orange);
  margin-bottom: 2px;
  transition: background var(--hub-transition), color var(--hub-transition), transform var(--hub-transition), box-shadow var(--hub-transition);
}

.hub-card:hover .hub-card-icon {
  background: var(--hub-orange);
  color: var(--hub-white);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 20px rgba(243, 106, 39, 0.45);
}

.hub-card-icon svg {
  width: 21px;
  height: 21px;
}

.hub-card-title {
  color: var(--hub-text);
  font-size: 1.48rem;
  font-weight: 800;
  line-height: 1.22;
  margin: 0;
  letter-spacing: -0.015em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
}

.hub-card-desc {
  color: rgba(var(--hub-fg-rgb), 0.72);
  font-size: 0.89rem;
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hub-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid rgba(var(--hub-fg-rgb), 0.12);
  color: var(--hub-text);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  transition: border-color var(--hub-transition), color var(--hub-transition);
}

.hub-card:hover .hub-card-bottom {
  border-top-color: rgba(243, 106, 39, 0.45);
  color: var(--hub-orange);
}

.hub-card-bottom svg {
  width: 19px;
  height: 19px;
  color: var(--hub-orange);
  transition: transform var(--hub-transition);
}

.hub-card:hover .hub-card-bottom svg {
  transform: translateX(6px);
}

/* Modo Grade (Grid) — Mantido para alternância opcional */
.hub-showcase-overlay.view-grid .hub-showcase-body {
  align-items: flex-start;
  overflow-y: auto;
  padding: 24px 20px;
}

.hub-showcase-overlay.view-grid .hub-showcase-rail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 22px;
  max-width: 1320px;
  margin: 0 auto;
  padding: 10px 10px 40px;
  overflow-x: visible;
  overflow-y: visible;
  cursor: default;
  scroll-snap-type: none !important;
}

.hub-showcase-overlay.view-grid .hub-card {
  width: 100%;
  flex: none;
  height: 360px;
  min-height: 340px;
  scroll-snap-align: none;
}

.hub-showcase-overlay.view-grid .hub-showcase-float-nav,
.hub-showcase-overlay.view-grid .hub-showcase-dots,
.hub-showcase-overlay.view-grid .hub-showcase-counter,
.hub-showcase-overlay.view-grid .hub-showcase-nav-btns {
  display: none !important;
}

/* Rodapé Equilibrado em 3 Colunas (Dots Centralizados no Meio da Tela) */
.hub-showcase-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 16px 40px;
  border-top: 1px solid rgba(var(--hub-fg-rgb), 0.08);
  flex-shrink: 0;
  background: rgba(6, 6, 8, 0.9);
}

.hub-showcase-hint {
  color: var(--hub-gray-muted);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-self: start;
}

.hub-showcase-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  justify-self: center;
}

.hub-showcase-counter {
  justify-self: end;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--hub-gray-dark);
  font-variant-numeric: tabular-nums;
}

.hub-showcase-counter strong {
  color: var(--hub-orange);
  font-weight: 900;
  font-size: 0.88rem;
}

.hub-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--hub-radius-full);
  background: rgba(var(--hub-fg-rgb), 0.2);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all var(--hub-transition);
}

.hub-dot:hover {
  background: rgba(var(--hub-fg-rgb), 0.5);
}

.hub-dot.is-active {
  width: 28px;
  background: var(--hub-orange);
  box-shadow: 0 0 12px rgba(243, 106, 39, 0.6);
}

/* ==========================================================================
   RESPONSIVIDADE (MOBILE FIRST & ACABAMENTO PREMIUM)
   ========================================================================== */
@media (max-width: 960px) {
  .hub-showcase-float-nav {
    display: none !important;
  }
}

@media (max-width: 768px) {
  body.gf-public-shell .site-header .container {
    padding: 12px 16px;
  }

  /* No mobile o título fica só para leitores de tela: o header da Home já identifica a área */
  .hub-showcase-intro {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  /* Corpo Central no Mobile */
  .hub-showcase-body {
    padding: 4px 0;
    align-items: center;
    justify-content: center;
  }

  .hub-showcase-rail {
    padding: 10px 20px 16px;
    gap: 16px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  /* Card Mobile: Proporção de App nativo com peek do próximo card */
  .hub-card {
    flex: 0 0 82vw;
    width: 82vw;
    max-width: 320px;
    height: 56vh;
    min-height: 390px;
    max-height: 490px;
    padding: 22px 20px;
    border-radius: 20px;
    scroll-snap-align: center;
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.85);
  }

  .hub-card-title {
    font-size: 1.32rem;
  }

  .hub-card-desc {
    font-size: 0.85rem;
    line-height: 1.45;
  }

  .hub-card-bottom {
    padding-top: 14px;
    font-size: 0.84rem;
  }

  .hub-btn-central-menu {
    padding: 16px 36px;
    font-size: 1.05rem;
  }

  /* Rodapé Mobile: Apenas os dots centralizados, sem poluição */
  .hub-showcase-footer {
    display: flex;
    padding: 12px 20px 18px;
    justify-content: center;
    background: transparent;
    border-top: none;
  }

  .hub-showcase-dots {
    width: 100%;
    justify-content: center;
    gap: 8px;
  }

  .hub-showcase-hint,
  .hub-showcase-counter {
    display: none !important;
  }
}


/* ==========================================================================
   MOBILE HEADER & MENU SANFONADO (ACCORDION DRAWER)
   ========================================================================== */

/* Botão Hambúrguer Mobile */
.hub-mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--hub-surface-1);
  border: 1px solid rgba(var(--hub-fg-rgb), 0.15);
  color: var(--hub-text);
  cursor: pointer;
  padding: 0;
  transition: all 0.2s ease;
  position: relative;
  z-index: 1002;
  box-sizing: border-box;
}

.hub-mobile-menu-btn:hover {
  border-color: #F36A27;
  background: var(--hub-surface-3);
}

.hub-mobile-menu-btn.is-active {
  background: #F36A27;
  border-color: #F36A27;
  color: #ffffff;
  box-shadow: 0 0 14px rgba(243, 106, 39, 0.4);
}

.hub-mobile-menu-btn .hub-hamb-icon {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 18px;
  height: 14px;
  position: relative;
  pointer-events: none;
}

.hub-mobile-menu-btn .hub-hamb-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}

.hub-mobile-menu-btn.is-active .hub-hamb-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.hub-mobile-menu-btn.is-active .hub-hamb-bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hub-mobile-menu-btn.is-active .hub-hamb-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Menu Sanfonado Mobile (Drawer / Dropdown) */
.hub-mobile-drawer {
  display: none;
  /* Ancorada ao .site-header (sticky = posicionado): abre logo abaixo dele com
     altura explícita. Não usa fixed porque o backdrop-filter do header do Hub
     vira bloco de contenção do fixed, e o header do admin não tem esse filtro. */
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: calc(100vh - var(--gf-header-h, 64px));
  height: calc(100dvh - var(--gf-header-h, 64px));
  background: rgba(8, 8, 10, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 999;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 18px 18px 48px;
  box-sizing: border-box;
  border-top: 1px solid rgba(var(--hub-fg-rgb), 0.08);
}

.hub-mobile-drawer.is-open {
  display: block;
  animation: hubSlideDown 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes hubSlideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Card de Perfil do Usuário no Topo do Menu Sanfonado */
.hub-mobile-user-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--hub-surface-2);
  border: 1px solid rgba(var(--hub-fg-rgb), 0.1);
  border-radius: 14px;
  margin-bottom: 18px;
}

.hub-mobile-user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #F36A27, #d9581c);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.15rem;
  box-shadow: 0 4px 12px rgba(243, 106, 39, 0.35);
  flex-shrink: 0;
}

.hub-mobile-user-info {
  flex: 1;
  min-width: 0;
}

.hub-mobile-user-name {
  font-weight: 800;
  font-size: 1rem;
  color: var(--hub-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hub-mobile-user-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #F36A27;
  letter-spacing: 0.04em;
  margin-top: 2px;
}

/* Accordion (Sanfona) */
.hub-accordion-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.hub-accordion-item {
  border: 1px solid rgba(var(--hub-fg-rgb), 0.08);
  border-radius: 14px;
  background: var(--hub-surface-1);
  overflow: hidden;
  transition: all 0.2s ease;
}

.hub-accordion-item.is-open {
  border-color: rgba(243, 106, 39, 0.35);
  background: var(--hub-surface-2);
}

.hub-accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 18px;
  background: none;
  border: none;
  color: var(--hub-text);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
  user-select: none;
  box-sizing: border-box;
}

.hub-accordion-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hub-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--hub-text-muted);
}

.hub-accordion-icon {
  color: var(--hub-orange);
}

.hub-accordion-link.is-highlight .hub-ico,
.hub-accordion-link:hover .hub-ico {
  color: var(--hub-orange);
}

.hub-mobile-auth-btn .hub-ico {
  color: inherit;
}

.hub-accordion-chevron {
  width: 18px;
  height: 18px;
  color: var(--hub-text-muted);
  transition: transform 0.25s ease, color 0.2s ease;
  flex-shrink: 0;
}

.hub-accordion-item.is-open .hub-accordion-chevron {
  transform: rotate(180deg);
  color: #F36A27;
}

.hub-accordion-panel {
  display: none;
  padding: 6px 12px 14px;
  border-top: 1px solid rgba(var(--hub-fg-rgb), 0.06);
}

.hub-accordion-item.is-open .hub-accordion-panel {
  display: block;
}

/* Título de grupo dentro de uma sanfona (ex.: seções do Painel Administrativo) */
.hub-accordion-subtitle {
  display: block;
  margin: 14px 12px 2px;
  color: var(--hub-text-dim);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hub-accordion-subtitle:first-child {
  margin-top: 8px;
}

/* Links dentro do Accordion */
.hub-accordion-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 12px;
  border-radius: 10px;
  color: var(--hub-text-soft);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  transition: all 0.15s ease;
  margin-top: 4px;
}

.hub-accordion-link:hover,
.hub-accordion-link:active {
  background: rgba(var(--hub-fg-rgb), 0.06);
  color: var(--hub-text);
}

.hub-accordion-link.is-highlight {
  color: #F36A27;
  font-weight: 700;
}

.hub-accordion-link-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hub-accordion-badge {
  background: rgba(243, 106, 39, 0.15);
  color: #F36A27;
  border: 1px solid rgba(243, 106, 39, 0.3);
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
}

/* Botões de Ação Rápida (Auth) para Deslogados */
.hub-mobile-auth-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}

.hub-mobile-auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  text-align: center;
}

.hub-mobile-auth-btn.primary {
  background: #F36A27;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(243, 106, 39, 0.35);
}

.hub-mobile-auth-btn.secondary {
  background: var(--hub-surface-3);
  color: var(--hub-text);
  border: 1px solid rgba(var(--hub-fg-rgb), 0.14);
}

/* Botão de Logout */
.hub-mobile-logout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 18px;
  border-radius: 12px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #fca5a5;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.15s ease;
  margin-top: 10px;
  box-sizing: border-box;
}

.hub-mobile-logout-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  color: var(--hub-text);
}

/* Redes e Rodapé */
.hub-mobile-drawer-footer {
  text-align: center;
  padding-top: 18px;
  border-top: 1px solid rgba(var(--hub-fg-rgb), 0.08);
  margin-top: 16px;
}

.hub-mobile-ig-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--hub-text-muted);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
}

.hub-mobile-ig-link:hover {
  color: var(--hub-text);
}

@media (max-width: 768px) {
  /* Oculta no mobile o botão longo de Menu desktop, Profile desktop e Login link desktop */
  .hub-desktop-menu-btn {
    display: none !important;
  }
  .hub-desktop-profile-menu {
    display: none !important;
  }
  .hub-desktop-login-link {
    display: none !important;
  }

  /* Exibe o botão Hambúrguer Mobile */
  .hub-mobile-menu-btn {
    display: inline-flex !important;
  }

  .hub-header-actions {
    gap: 10px !important;
  }

  /* Carrinho em formato perfeitamente circular de 42px no mobile */
  .hub-cart-btn {
    width: 42px !important;
    height: 42px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    background: var(--hub-surface-1) !important;
    border: 1px solid rgba(var(--hub-fg-rgb), 0.15) !important;
    color: var(--hub-text) !important;
    box-sizing: border-box !important;
  }
  .hub-cart-btn:hover {
    border-color: #F36A27 !important;
    background: var(--hub-surface-3) !important;
  }

  body.gf-mobile-menu-lock {
    overflow: hidden !important;
    touch-action: none !important;
  }
}

@media (min-width: 769px) {
  .hub-mobile-menu-btn {
    display: none !important;
  }
  .hub-mobile-drawer {
    display: none !important;
  }
}

/* ==========================================================================
   CABEÇALHO PERSISTENTE (KAN-183) — logomarca, navegação desktop e rótulo mobile
   ========================================================================== */
.hub-header-logo-img {
  display: block;
  height: 48px;
  width: auto;
}
/* Logo branca no escuro, logo escura no modo claro */
.hub-logo-on-light { display: none !important; }
html[data-theme="light"] :is(body.gf-public-shell, body.gf-admin-shell) .hub-logo-on-dark { display: none !important; }
html[data-theme="light"] :is(body.gf-public-shell, body.gf-admin-shell) .hub-logo-on-light { display: block !important; }

.site-header .logo { flex: none; }

.hub-desktop-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  gap: 2px;
  margin: 0 12px;
  min-width: 0;
}

.hub-desktop-nav-link {
  position: relative;
  color: var(--hub-text-muted, var(--hub-gray-muted));
  text-decoration: none;
  font-family: var(--hub-font-sans);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  padding: 9px 11px;
  border-radius: var(--hub-radius-full);
  transition: color 0.2s ease, background-color 0.2s ease;
}

.hub-desktop-nav-link:hover,
.hub-desktop-nav-link:focus-visible {
  color: var(--hub-text);
  background: rgba(var(--hub-fg-rgb), 0.06);
}

.hub-desktop-nav-link.is-current {
  color: var(--hub-text);
}

.hub-desktop-nav-link.is-current::after {
  content: "";
  position: absolute;
  left: 11px;
  right: 11px;
  bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: var(--hub-orange);
}

/* Rótulo curto em telas menores (o completo continua para leitores de tela via aria) */
.hub-nav-lbl-short { display: none; }

.hub-header-actions { flex: none; }

/* Desktop: as opções ficam visíveis ao lado da logo; o botão "Menu" não é necessário */
@media (min-width: 769px) {
  .hub-desktop-menu-btn {
    display: none !important;
  }
}

/* Desktop estreito / notebook: rótulos curtos para caber sem sobrepor as ações */
@media (min-width: 769px) and (max-width: 1399px) {
  .hub-nav-lbl-full { display: none; }
  .hub-nav-lbl-short { display: inline; }
}
@media (min-width: 769px) and (max-width: 1100px) {
  .hub-desktop-nav { margin: 0 6px; gap: 0; }
  .hub-desktop-nav-link { font-size: 0.8rem; padding: 8px 7px; }
  .hub-desktop-nav-link.is-current::after { left: 7px; right: 7px; }
  .hub-header-logo-img { height: 38px; }
  .hub-account-name { display: none; }
  .hub-account-trigger { padding: 0 8px 0 4px; }
}
@media (min-width: 769px) and (max-width: 900px) {
  .hub-desktop-nav-link { font-size: 0.74rem; padding: 8px 5px; }
  .hub-header-actions { gap: 8px !important; }
}

.hub-mobile-menu-label {
  display: none;
}

/* Mobile: sem navegação inline; botão com o texto "Menu" ao lado das três barras */
@media (max-width: 768px) {
  .hub-desktop-nav {
    display: none !important;
  }
  .hub-header-logo-img {
    height: 42px;
  }
  .hub-mobile-menu-btn {
    width: auto;
    gap: 10px;
    padding: 0 16px;
    border-radius: var(--hub-radius-full);
  }
  .hub-mobile-menu-label {
    display: inline;
    font-family: var(--hub-font-sans);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    pointer-events: none;
  }
}

/* ==========================================================================
   AUTOFILL DO NAVEGADOR (KAN-185)
   O Chrome pinta campos preenchidos automaticamente com a cor do esquema do
   navegador (claro) quando o app é escuro, gerando divergência de cor.
   - color-scheme alinha controles nativos e autofill ao tema da página;
   - a regra :-webkit-autofill cobre todos os campos do Hub e do admin (cadastro,
     ficha de membro, contribuições, loja...), usando as variáveis de campo do tema.
   Variáveis: --hub-field-bg / --hub-field-text (fallback Premium Dark).
   ========================================================================== */
body.gf-public-shell,
body.gf-admin-shell {
  color-scheme: dark;
}

body.gf-public-shell input:-webkit-autofill,
body.gf-public-shell input:-webkit-autofill:hover,
body.gf-public-shell input:-webkit-autofill:focus,
body.gf-public-shell textarea:-webkit-autofill,
body.gf-public-shell textarea:-webkit-autofill:hover,
body.gf-public-shell textarea:-webkit-autofill:focus,
body.gf-public-shell select:-webkit-autofill,
body.gf-public-shell select:-webkit-autofill:hover,
body.gf-public-shell select:-webkit-autofill:focus,
body.gf-admin-shell input:-webkit-autofill,
body.gf-admin-shell input:-webkit-autofill:hover,
body.gf-admin-shell input:-webkit-autofill:focus,
body.gf-admin-shell textarea:-webkit-autofill,
body.gf-admin-shell select:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px var(--hub-field-bg, #141417) inset !important;
  box-shadow: 0 0 0 1000px var(--hub-field-bg, #141417) inset !important;
  -webkit-text-fill-color: var(--hub-field-text, #ffffff) !important;
  caret-color: var(--hub-field-text, #ffffff);
  /* adia indefinidamente a troca de fundo aplicada pelo Chrome */
  transition: background-color 9999s ease-in-out 0s;
}
/* Ícone SVG inline em textos/botões (substitui emojis — KAN-184) */
.hub-ico-inline {
  display: inline-flex;
  align-items: center;
  vertical-align: -0.2em;
  margin-right: 0.4em;
}
.hub-ico-inline svg { display: block; }

/* ==========================================================================
   AVISOS DO SISTEMA (TOAST)
   Mensagens de sessão (flash_set/flash_get) flutuam no canto superior direito,
   abaixo do header, sem empurrar a página. Somem sozinhas (assets/app.js) ou no X.
   Sobrescreve o visual legado do IGNIS (faixa verde com sombra rosa) de style.css.
   ========================================================================== */
.hub-toast-stack {
  position: fixed;
  top: calc(var(--gf-header-h, 81px) + 14px);
  right: 20px;
  z-index: 1300;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(380px, calc(100vw - 32px));
  pointer-events: none;
}
.hub-toast-stack .flash {
  pointer-events: auto;
  position: relative;
  margin: 0 !important;
  padding: 14px 14px 14px 18px !important;
  background: var(--hub-surface-2, #16161a) !important;
  color: var(--hub-text, #fff) !important;
  border: 1px solid rgba(var(--hub-fg-rgb, 255, 255, 255), 0.12) !important;
  border-radius: 14px !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45) !important;
  font-family: var(--hub-font-sans) !important;
  font-size: 0.9rem !important;
  font-weight: 500 !important;
  line-height: 1.45 !important;
  overflow: hidden;
  animation: hubToastIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
html[data-theme="light"] .hub-toast-stack .flash {
  background: #ffffff !important;
  box-shadow: 0 16px 40px rgba(17, 17, 20, 0.14) !important;
}
/* Barra de cor por tipo */
.hub-toast-stack .flash::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--hub-toast-accent, #22c55e);
}
.hub-toast-stack .flash.success { --hub-toast-accent: #22c55e; }
.hub-toast-stack .flash.danger  { --hub-toast-accent: #ef4444; }
.hub-toast-stack .flash.warning { --hub-toast-accent: #f59e0b; }
.hub-toast-stack .flash.info    { --hub-toast-accent: var(--hub-orange, #F36A27); }
.hub-toast-stack .flash .flash-inner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.hub-toast-stack .flash .flash-icon {
  width: 20px;
  height: 20px;
  margin-top: 1px;
  color: var(--hub-toast-accent, #22c55e);
}
.hub-toast-stack .flash .flash-content {
  flex: 1;
  min-width: 0;
  word-break: break-word;
}
.hub-toast-stack .flash .flash-close {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 26px;
  height: 26px;
  margin: -3px -3px 0 0;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 8px !important;
  color: var(--hub-text-muted, #9999a0) !important;
  box-shadow: none !important;
  cursor: pointer;
}
.hub-toast-stack .flash .flash-close:hover {
  background: rgba(var(--hub-fg-rgb, 255, 255, 255), 0.08) !important;
  color: var(--hub-text, #fff) !important;
}
.hub-toast-stack .flash.hide {
  opacity: 0;
  transform: translateX(16px);
}
@keyframes hubToastIn {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}
@media (max-width: 768px) {
  .hub-toast-stack {
    top: calc(var(--gf-header-h, 69px) + 10px);
    right: 12px;
    left: 12px;
    width: auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hub-toast-stack .flash { animation: none; transition: none; }
}

/* ==========================================================================
   CONTA DO USUÁRIO (dropdown do header) — site e painel admin
   ========================================================================== */
.hub-account {
  position: relative;
  flex: none;
}
.hub-account-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px 0 4px;
  border-radius: 999px;
  background: rgba(var(--hub-fg-rgb), 0.06);
  border: 1px solid rgba(var(--hub-fg-rgb), 0.12);
  color: var(--hub-text);
  font-family: var(--hub-font-sans);
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.hub-account-trigger:hover,
.hub-account.is-open .hub-account-trigger {
  border-color: var(--hub-orange);
  background: rgba(243, 106, 39, 0.08);
}
.hub-account-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--hub-orange);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
  flex: none;
}
.hub-account-avatar.is-lg {
  width: 42px;
  height: 42px;
  font-size: 1rem;
}
.hub-account-name {
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hub-account-chevron {
  color: var(--hub-text-muted);
  transition: transform 0.2s ease;
}
.hub-account.is-open .hub-account-chevron { transform: rotate(180deg); }

.hub-account-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 280px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  padding: 8px;
  background: var(--hub-surface-2);
  border: 1px solid rgba(var(--hub-fg-rgb), 0.14);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}
html[data-theme="light"] .hub-account-panel {
  background: #ffffff;
  border-color: rgba(17, 17, 20, 0.10);
  box-shadow: 0 16px 40px rgba(17, 17, 20, 0.14);
}
.hub-account.is-open .hub-account-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}
.hub-account-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px 14px;
  border-bottom: 1px solid rgba(var(--hub-fg-rgb), 0.08);
  margin-bottom: 6px;
}
.hub-account-head-name {
  color: var(--hub-text);
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1.2;
}
.hub-account-head-role {
  color: var(--hub-text-muted);
  font-size: 0.78rem;
  margin-top: 2px;
}
.hub-account-group {
  padding: 4px 0;
}
.hub-account-group + .hub-account-group {
  border-top: 1px solid rgba(var(--hub-fg-rgb), 0.08);
  margin-top: 4px;
  padding-top: 8px;
}
.hub-account-group-title {
  padding: 4px 10px 6px;
  color: var(--hub-text-dim);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.hub-account-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  color: var(--hub-text-soft);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.hub-account-link-ico {
  display: inline-flex;
  color: var(--hub-text-muted);
}
.hub-account-link:hover,
.hub-account-link:focus-visible {
  background: rgba(var(--hub-fg-rgb), 0.06);
  color: var(--hub-text);
}
.hub-account-link:hover .hub-account-link-ico { color: var(--hub-orange); }
.hub-account-link.is-accent,
.hub-account-link.is-accent .hub-account-link-ico { color: var(--hub-orange); }
.hub-account-link.is-danger { color: #e5484d; }
.hub-account-link.is-danger .hub-account-link-ico { color: #e5484d; }
.hub-account-link.is-danger:hover { background: rgba(229, 72, 77, 0.10); color: #e5484d; }

/* No admin o header é mais compacto: mesmo alinhamento dos outros botões */
body.gf-admin-shell .hub-account-trigger {
  color: var(--gf-admin-text, #f5f2ee);
}
