/* Shared chrome — loaded for all public themes (Bootstrap + shell) */

.container-tb {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 1rem;
  box-sizing: border-box;
}

.tb-header .navbar {
  --bs-navbar-padding-x: 0;
  --bs-navbar-padding-y: 0;
  padding-block: 0.75rem;
}

.tb-header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  max-width: inherit;
}

.tb-header .navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
  text-decoration: none;
}

.brand-logo {
  display: block;
  height: 42px;
  width: auto;
  max-width: min(200px, 42vw);
  object-fit: contain;
}

.tb-header .navbar-collapse {
  flex-grow: 1;
  justify-content: flex-end;
}

@media (min-width: 992px) {
  .tb-header .navbar-collapse {
    display: flex !important;
    flex-basis: auto;
    align-items: center;
    gap: 0.5rem;
  }

  .tb-header .navbar-nav {
    margin-left: auto;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
  }
}

.tb-header .nav-link {
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.45rem 0.7rem !important;
  text-decoration: none;
}

.tb-nav-dropdown .dropdown-toggle::after {
  margin-left: 0.35em;
  vertical-align: 0.15em;
}

/* Category mega dropdown — Bootstrap shell + custom body */
.tb-cat-dropdown.dropdown-menu {
  min-width: min(360px, calc(100vw - 2rem));
  max-width: 420px;
  max-height: min(70vh, 520px);
  overflow: auto;
  padding: 0.65rem 0.5rem 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 1rem 2.5rem rgba(27, 36, 48, 0.16);
}

.tb-cat-menu {
  margin: 0;
}

.tb-cat-menu-all {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  margin: 0 0.25rem 0.45rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none !important;
  color: inherit;
  background: rgba(30, 136, 201, 0.1);
}

.tb-cat-menu-all:hover {
  background: rgba(30, 136, 201, 0.18);
  text-decoration: none !important;
}

.tb-cat-empty {
  margin: 0.5rem 0.75rem;
  color: #6c757d;
  font-size: 0.9rem;
}

.tb-cat-tree,
.tb-cat-sub {
  list-style: none !important;
  margin: 0;
  padding: 0;
}

.tb-cat-tree > li,
.tb-cat-sub > li {
  list-style: none !important;
}

.tb-cat-node { position: relative; }

.tb-cat-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  text-decoration: none !important;
  color: inherit;
  font-weight: 600;
  font-size: 0.9rem;
}

.tb-cat-link:hover {
  background: rgba(0, 0, 0, 0.04);
  text-decoration: none !important;
}

.tb-cat-thumb {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: #eef1f4;
}

.tb-cat-thumb--ph {
  display: inline-grid;
  place-items: center;
  font-size: 0.7rem;
  font-weight: 800;
  color: #1e88c9;
  background: #eaf4fb;
}

.tb-cat-name { flex: 1; min-width: 0; }
.tb-cat-chevron { display: none; }

.tb-cat-sub {
  padding-left: 0.85rem;
  margin: 0.1rem 0 0.25rem 1.15rem;
  border-left: 2px solid #e8eaed;
}

.tb-cat-node.depth-1 .tb-cat-link,
.tb-cat-node.depth-2 .tb-cat-link {
  font-weight: 500;
  font-size: 0.86rem;
}

.tb-cat-node.depth-1 .tb-cat-thumb,
.tb-cat-node.depth-2 .tb-cat-thumb {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

@media (max-width: 991px) {
  .tb-cat-dropdown.dropdown-menu {
    max-width: none;
    width: 100%;
    box-shadow: none;
    border: 0;
    position: static !important;
    transform: none !important;
  }
}

.hub-cat-img {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.hub-cat-blocks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.hub-cat-block {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  padding: 1rem 1.1rem 0.85rem;
}

.hub-cat-block-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: inherit;
  margin-bottom: 0.65rem;
}

.hub-cat-block-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
}

.hub-cat-block-head p {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
  color: #6c757d;
}

.hub-cat-block-img {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}

.hub-cat-block-ph {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #eaf4fb;
  color: #1e88c9;
  font-weight: 800;
  flex-shrink: 0;
}

.hub-cat-child-list {
  list-style: none !important;
  margin: 0;
  padding: 0.35rem 0 0 0.35rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.hub-cat-child-list .hub-cat-child-list {
  margin-left: 1rem;
  border-top: 0;
  border-left: 2px solid #e8eaed;
  padding-left: 0.65rem;
}

.hub-cat-child-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0.25rem;
  text-decoration: none !important;
  color: inherit;
  border-radius: 8px;
}

.hub-cat-child-link:hover { background: rgba(0, 0, 0, 0.04); }

.hub-cat-child-link img,
.hub-cat-child-ph {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.hub-cat-child-ph {
  display: inline-grid;
  place-items: center;
  background: #eef1f4;
  color: #6c757d;
  font-size: 0.7rem;
  font-weight: 800;
}

.hub-cat-child-link strong { display: block; font-size: 0.9rem; }
.hub-cat-child-link small { color: #6c757d; font-size: 0.75rem; }
