/* ============================================================
   Pixelmay Header — custom pm-* classes, zero conflict
   ============================================================ */

/* ── Base header ── */
#pm-head {
  position: sticky;
  top: 0;
  z-index: 10000;
  height: 64px;
  background: #fff;
  border-bottom: 1px solid #e8e8e8;
  transition: top 0.3s ease;
}

#pm-head.is-hidden {
  top: -70px;
}

/* ── Inner: logo | searchbar | right-group ── */
.pm-head-inner {
  display: grid;
  grid-template-columns: auto 1fr auto; /* logo | search fills gap | nav+actions */
  align-items: center;
  height: 100%;
  padding: 0 32px;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
}

/* ── Logo ── */
.pm-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.pm-logo-img {
  max-height: 36px;
  width: auto;
  display: block;
}

.pm-logo-text {
  font-size: 1.8rem;
  font-weight: 700;
  color: #111;
  white-space: nowrap;
}

/* ── Search bar ── */
.pm-search-bar {
  width: 100%;       /* fill the 1fr grid column entirely */
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  background: #f2f2f2;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  color: #666;
  font-size: 1.5rem;
  font-weight: 400;
  text-align: left;
  transition: background 0.15s;
  overflow: hidden;
}

.pm-search-bar:hover {
  background: #e8e8e8;
}

.pm-search-bar span {
  overflow: hidden;
  text-overflow: ellipsis;
  color: #666;
  flex: 1;
  min-width: 0;
}

/* ── Right group ── */
.pm-right {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ── Nav ── */
.pm-nav {
  display: flex;
  align-items: center;
  height: 64px;
}

/* Ghost {{navigation}} outputs <ul class="nav"> */
.pm-nav ul.nav {
  display: flex !important;
  align-items: center !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 64px !important;
  background: none !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  gap: 0 !important;
}

.pm-nav ul.nav li {
  display: flex !important;
  align-items: center !important;
  height: 64px !important;
  opacity: 1 !important;
  transform: none !important;
  margin: 0 !important;
  padding: 0 !important;
  position: static !important;
}

.pm-nav ul.nav li a,
.pm-nav ul.nav li span {
  display: flex !important;
  align-items: center !important;
  height: 64px !important;
  padding: 0 12px !important;
  font-size: 1.45rem !important;
  font-weight: 500 !important;
  color: #222 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  opacity: 1 !important;
  transform: none !important;
  position: static !important;
  visibility: visible !important;
  transition: color 0.2s !important;
}

.pm-nav ul.nav li a:hover {
  color: #777 !important;
}

/* ── Submenu dropdown ── */
.pm-nav .subnav {
  position: relative;   /* dropdown will be absolute to THIS element */
  height: 64px;
  display: flex;
  align-items: center;
  isolation: isolate;
}

/* The ul.nav itself must NOT be a positioning context */
.pm-nav ul.nav {
  position: static !important;
}

.pm-nav .subnav > a::after,
.pm-nav .subnav > span::after {
  content: "";
  display: inline-block;
  margin-left: 4px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid #555;
  transition: transform 0.2s;
  flex-shrink: 0;
}

.pm-nav .subnav:hover > a,
.pm-nav .subnav:hover > span {
  color: #777 !important;
}

.pm-nav .subnav:hover > a::after,
.pm-nav .subnav:hover > span::after {
  transform: rotate(180deg);
}

.pm-nav .submenu-wrapper {
  display: none;
  flex-direction: column;
  position: fixed;   /* fixed — keluar dari semua overflow context */
  min-width: 180px;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.10);
  z-index: 20000;
  overflow: hidden;
  animation: pmFadeDown 0.15s ease;
}

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

.pm-nav .subnav:hover .submenu-wrapper {
  display: flex;
}

.pm-nav .submenu {
  list-style: none;
  margin: 0;
  padding: 6px 0;
}

.pm-nav .submenu li {
  height: auto !important;
}

.pm-nav .submenu li a {
  height: auto !important;
  padding: 10px 18px !important;
  font-size: 1.4rem !important;
  display: block !important;
}

.pm-nav .submenu li a:hover {
  background: #f5f5f5;
}

/* ── Pricing button ── */
.pm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 1.4rem;
  font-weight: 600;
  text-decoration: none;
  background: var(--ghost-accent-color, #e91e8c);
  color: #fff !important;
  white-space: nowrap;
  flex-shrink: 0;
  transition: opacity 0.2s;
}

.pm-btn:hover {
  opacity: 0.85;
}

/* ── Sign in ── */
.pm-signin {
  font-size: 1.4rem;
  font-weight: 500;
  color: #222;
  text-decoration: none;
  padding: 6px 10px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.2s;
}

.pm-signin:hover {
  color: #777;
}

/* ── Burger (mobile only) ── */
.pm-burger {
  display: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
}

/* ── Overlay ── */
.pm-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 15000;
}

.pm-overlay.show {
  display: block;
}

html.lock-scroll {
  overflow: hidden;
}

/* ── Mobile menu (unchanged, uses gh- classes) ── */
.gh-mobile-menu {
  position: fixed;
  top: 0;
  left: -110%;
  width: 320px;
  max-width: 88vw;
  height: 100vh;
  background: #fff;
  display: flex;
  flex-direction: column;
  z-index: 20000;
  overflow-y: auto;
  box-shadow: 4px 0 24px rgba(0,0,0,0.1);
}

.gh-mobile-menu.show { left: 0; }

@keyframes pmSlideIn  { from { left: -110%; } to { left: 0; } }
@keyframes pmSlideOut { from { left: 0; } to { left: -110%; } }

.gh-mobile-menu.animateRight { animation: pmSlideIn  0.3s ease forwards; }
.gh-mobile-menu.animateLeft  { animation: pmSlideOut 0.25s ease forwards; }

.gh-mobile-menu__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid #e8e8e8;
  flex-shrink: 0;
}

.gh-mobile-menu__close-btn {
  display: flex;
  align-items: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.gh-mobile-menu__close-btn svg path { stroke: #222; }
.gh-mobile-menu-main { flex: 1; overflow-y: auto; }

.gh-mobile-menu__nav {
  padding: 12px 22px 24px;
}

.gh-mobile-menu__nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.gh-mobile-menu__nav-item {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid #f0f0f0;
}

.gh-mobile-menu__nav-item .nav-item__link {
  font-size: 1.7rem;
  font-weight: 500;
  color: #111;
  padding: 13px 0;
  display: block;
  text-decoration: none;
  height: auto;
}

.gh-mobile-menu__btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: none;
  border: none;
  cursor: pointer;
  width: 100%;
  padding: 0;
}

.gh-mobile-menu__btn svg path { fill: #222; }
.gh-mobile-menu__btn svg { rotate: 0deg; transition: rotate 0.25s ease; }
.gh-mobile-menu__nav-item.active .gh-mobile-menu__btn svg { rotate: 90deg; }

.mobile-submenu {
  height: 0;
  overflow: hidden;
  transition: height 0.28s ease;
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-submenu .submenu__item-link {
  display: block;
  font-size: 1.5rem;
  color: #555;
  padding: 9px 0 9px 14px;
  text-decoration: none;
}

.gh-mobile-menu__nav .pm-btn {
  display: block;
  text-align: center;
  margin-top: 20px;
}


/* nav-item__link class dari navigation.hbs Spotlight */
.pm-nav .nav-item__link {
  display: flex !important;
  align-items: center !important;
  height: 64px !important;
  padding: 0 12px !important;
  font-size: 1.45rem !important;
  font-weight: 500 !important;
  color: #222 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  opacity: 1 !important;
  transform: none !important;
  visibility: visible !important;
  transition: color 0.2s !important;
  cursor: pointer;
  background: none;
  border: none;
}

.pm-nav .nav-item__link:hover {
  color: #777 !important;
}

/* subnav arrow juga untuk nav-item__link */
.pm-nav .subnav > .nav-item__link::after {
  content: "";
  display: inline-block;
  margin-left: 4px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid #555;
  transition: transform 0.2s;
  flex-shrink: 0;
}

.pm-nav .subnav:hover > .nav-item__link {
  color: #777 !important;
}

.pm-nav .subnav:hover > .nav-item__link::after {
  transform: rotate(180deg);
}

/* submenu item links */
.pm-nav .submenu__item-link {
  display: block !important;
  height: auto !important;
  padding: 10px 18px !important;
  font-size: 1.4rem !important;
  font-weight: 500 !important;
  color: #222 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  transition: background 0.15s !important;
}

.pm-nav .submenu__item-link:hover {
  background: #f5f5f5 !important;
  color: #111 !important;
}

/* ── Responsive ── */
@media (max-width: 960px) {
  .pm-head-inner {
    grid-template-columns: auto 1fr auto; /* same grid, nav hidden via pm-nav */
  }
  .pm-nav     { display: none; }
  .pm-signin  { display: none; }
  .pm-burger  { display: flex; }
}

@media (max-width: 480px) {
  .pm-head-inner { padding: 0 16px; }
  .pm-search-bar span { display: none; }
  .pm-search-bar {
    max-width: 38px;
    justify-content: center;
    background: none;
    padding: 0;
  }
}
