/* ===== Namespace: bcat-* ===== */
:root {
  --bcat-radius: 12px;
}
[hidden] {
  display: none !important;
}

.mainnav {
  position: relative;
}
.bcat-trigger {
  position: relative;
  display: inline-block;
}

/* dropdown: desce do botão */
#bcat-dropdown {
  display: none;
}
html.bcat-open #bcat-dropdown {
  display: block !important;
  position: absolute !important;
  top: calc(100% + 8px) !important;
  left: 0 !important;
  z-index: 10050 !important;
}

/* caixa */
#bcat-dropdown .bcat-panel {
  width: 280px;
  max-width: 280px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: var(--bcat-radius);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.14);
  padding: 6px;
  box-sizing: border-box;
}

/* root ul */
#bcat-dropdown .bcat-root {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 62vh;
  overflow: auto;
}

/* itens */
#bcat-dropdown .bcat-item {
  position: relative;
}
#bcat-dropdown .bcat-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  text-decoration: none;
  color: #1f2937;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#bcat-dropdown .bcat-link:hover {
  background: #ecf3ff;
  border-color: #dbe7ff;
  color: #0b1b4a;
}
#bcat-dropdown .bcat-chev {
  font-style: normal;
  font-size: 18px;
  line-height: 1;
}

/* submenu (flyout) */
#bcat-dropdown .bcat-submenu {
  display: none;
  position: absolute;
  top: 0;
  left: calc(100% + 8px);
  min-width: 240px;
  max-width: 340px;
  list-style: none;
  margin: 0;
  padding: 8px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: var(--bcat-radius);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
  z-index: 1;
}
#bcat-dropdown .bcat-item.has-sub:hover > .bcat-submenu {
  display: block;
}

#bcat-dropdown .bcat-sublink {
  display: block;
  padding: 10px 12px;
  text-decoration: none;
  color: #1f2937;
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#bcat-dropdown .bcat-sublink:hover {
  background: #f5f7fb;
  color: #0b1b4a;
}

/* vazio */
#bcat-dropdown .bcat-empty {
  padding: 12px;
  text-align: center;
  font-size: 14px;
  color: #6b7280;
}

/* mobile */
@media (max-width: 720px) {
  #bcat-dropdown .bcat-panel {
    width: min(96vw, 560px);
    max-width: none;
  }
  #bcat-dropdown .bcat-submenu {
    position: static;
    display: none;
    margin-top: 6px;
  }
  #bcat-dropdown .bcat-item.has-sub:hover > .bcat-submenu {
    display: block;
  }
}
