/* Tools Header */

/* Main header row: logo + search + icons */
.tools-header-main .molla-header-inner {
  padding: 16px 0;
  gap: 20px;
}

/* Search bar */
.tools-header-search {
  flex: 1;
  display: flex;
  max-width: 600px;
}
.tools-search-input {
  flex: 1;
  border: 1px solid #e0e0e0;
  border-right: none;
  padding: 0 16px;
  height: 44px;
  font-size: 13px;
  outline: none;
  border-radius: 0;
  background: #fff;
  color: #222;
}
.tools-search-btn {
  width: 52px;
  height: 44px;
  background: var(--molla-accent, #c96);
  border: none;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: opacity .2s;
}
.tools-search-btn:hover { opacity: .85; }

/* Nav bar (second row) */
.tools-navbar {
  background: var(--molla-dark, #222);
  border-top: 1px solid rgba(255,255,255,.06);
}
.tools-navbar-inner {
  display: flex;
  align-items: stretch;
  gap: 0;
  min-height: 48px;
}
.tools-navbar .molla-nav {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
}
.tools-navbar .molla-nav > li { position: relative; }
.tools-navbar .molla-nav > li > a {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 14px;
  height: 48px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: rgba(255,255,255,.85);
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s;
}
.tools-navbar .molla-nav > li > a:hover,
.tools-navbar .molla-nav > li > a.active { color: var(--molla-accent, #c96); }

/* Level 2 dropdown — chỉ apply cho dropdown trực tiếp của nav item */
.tools-navbar .molla-nav > li > .molla-nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid #eee;
  border-top: 2px solid var(--molla-accent, #c96);
  min-width: 180px;
  z-index: 999;
  display: none;
  list-style: none;
  padding: 8px 0;
  margin: 0;
  box-shadow: 0 4px 16px rgba(0,0,0,.1);
}
/* Chỉ show level 2 khi hover nav item — dùng > để không show level 3 cùng lúc */
.tools-navbar .molla-nav > li:hover > .molla-nav-dropdown { display: block; }

/* Level 3 dropdown — nằm bên phải li.has-sub */
.tools-navbar .molla-nav-dropdown li.has-sub { position: relative; }
.tools-navbar .molla-nav-dropdown--sub {
  display: none;
  position: absolute;
  top: 0;
  left: 100%;
  min-width: 180px;
  background: #fff;
  border: 1px solid #eee;
  border-top: 2px solid var(--molla-accent, #c96);
  box-shadow: 4px 4px 16px rgba(0,0,0,.08);
  list-style: none;
  padding: 8px 0;
  margin: 0;
  z-index: 1000;
}
.tools-navbar .molla-nav-dropdown li.has-sub:hover > .molla-nav-dropdown--sub { display: block; }

/* Link style cho cả level 2 và level 3 */
.tools-navbar .molla-nav-dropdown li > a {
  display: flex;
  align-items: center;
  padding: 8px 18px;
  font-size: 13px;
  color: #333;
  text-decoration: none;
}
.tools-navbar .molla-nav-dropdown li > a:hover { color: var(--molla-accent, #c96); }
/* Icon chevron-right canh phải */
.tools-navbar .molla-nav-dropdown li.has-sub > a .bi-chevron-right {
  margin-left: auto;
  font-size: 10px;
  color: #aaa;
  flex-shrink: 0;
}

/* Login link */
.tools-navbar-login {
  display: flex;
  align-items: center;
  padding: 0 16px;
  border-left: 1px solid rgba(255,255,255,.08);
  white-space: nowrap;
}
.tools-navbar-login a {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: rgba(255,255,255,.75);
  text-decoration: none;
  transition: color .2s;
}
.tools-navbar-login a:hover { color: var(--molla-accent, #c96); }

/* Browse Categories */
.tools-browse-wrap {
  position: relative;
  flex-shrink: 0;
}
.tools-browse-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px;
  height: 48px;
  background: var(--molla-accent, #c96);
  border: none;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  width: 240px;
}
.tools-browse-btn:hover { opacity: .9; }

.tools-browse-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 240px;
  background: #fff;
  border: 1px solid #eee;
  box-shadow: 0 6px 20px rgba(0,0,0,.12);
  z-index: 1000;
}
.tools-browse-menu.open { display: block; }

.tools-browse-item { position: relative; }
.tools-browse-item > a {
  display: flex;
  align-items: center;
  padding: 9px 16px;
  font-size: 13px;
  color: #333;
  text-decoration: none;
  transition: background .15s, color .15s;
  border-bottom: 1px solid #f5f5f5;
}
.tools-browse-item > a:hover { background: #f9f9f9; color: var(--molla-accent, #c96); }
.tools-browse-item > a .bi-chevron-right { margin-left: auto; font-size: 11px; color: #aaa; }

/* Sub menu */
.tools-browse-sub {
  display: none;
  position: absolute;
  top: 0;
  left: 100%;
  width: 200px;
  background: #fff;
  border: 1px solid #eee;
  box-shadow: 4px 4px 16px rgba(0,0,0,.08);
  z-index: 1001;
}
.tools-browse-item.has-sub:hover .tools-browse-sub { display: block; }
.tools-browse-sub a {
  display: block;
  padding: 8px 16px;
  font-size: 13px;
  color: #333;
  text-decoration: none;
  border-bottom: 1px solid #f5f5f5;
}
.tools-browse-sub a:hover { color: var(--molla-accent, #c96); background: #f9f9f9; }

/* Mobile */
@media (max-width: 991px) {
  .tools-navbar { display: none; }
  .tools-header-search { max-width: none; }
}
@media (max-width: 767px) {
  .tools-header-topbar { display: none; }
}
@media (max-width: 480px) {
  .tools-header-search { display: none; }
}
