/* ══ Malggu 공통 헤더 (portal-theme.css · 2026-06-10) ══ */

.page-portal.page-store .malggu-nav,
.page-portal .malggu-nav.portal-layer {
  z-index: 100;
}

.malggu-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: none;
  box-shadow: none;
  overflow: visible;
}

.malggu-nav-inner {
  display: flex;
  align-items: center;
  height: 60px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
  gap: 16px;
}

.malggu-logo {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.malggu-logo-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #7c5cbf 0%, #c9a84c 100%);
  flex-shrink: 0;
}

.malggu-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.malggu-logo-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}

.malggu-logo-sub {
  font-size: 10px;
  font-weight: 500;
  color: #c9a84c;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  opacity: 0.8;
}

.malggu-menu {
  display: none;
  align-items: center;
  flex: 1;
  justify-content: center;
}

.malggu-menu-pill {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.malggu-actions {
  display: none;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.malggu-mobile-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: color 0.2s;
  margin-left: auto;
}

.malggu-mobile-btn:hover {
  color: #fff;
}

.malggu-mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(5, 5, 9, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  z-index: 101;
}

.malggu-mobile-menu.open {
  display: block;
}

.malggu-mobile-menu-inner {
  padding: 20px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.malggu-mobile-menu-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  margin-top: 4px;
  margin-bottom: 2px;
}

.malggu-mobile-market-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-left: 8px;
}

@media (min-width: 768px) {
  .malggu-menu { display: flex; }
  .malggu-actions { display: flex; }
  .malggu-mobile-btn { display: none; }
  .malggu-mobile-menu { display: none !important; }
}

@media (max-width: 767px) {
  .malggu-nav-inner { padding: 0 16px; }
}

/* ── nav links ── */
.nav-link {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.44);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 100px;
  transition: color 0.18s, background 0.18s;
  white-space: nowrap;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
}

.nav-link:hover {
  color: #f2f2f8;
  background: rgba(255, 255, 255, 0.06);
}

.nav-link-active {
  color: #f2f2f8 !important;
  background: rgba(255, 255, 255, 0.1) !important;
}

/* ── Sign in / profile ── */
.nav-cta {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  padding: 9px 22px;
  border-radius: 100px;
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.04);
  color: #f2f2f8;
  text-decoration: none;
  transition: all 0.22s cubic-bezier(0.23, 1, 0.32, 1);
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-cta:hover {
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.1);
}

.nav-cta.profile-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
}

#mobileMenu .nav-cta.profile-btn {
  width: 44px;
  height: 44px;
}

.nav-ghost-btn {
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 100px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  font-family: inherit;
  transition: color 0.18s, background 0.18s;
}

.nav-ghost-btn:hover {
  color: #f2f2f8;
  background: rgba(255, 255, 255, 0.06);
}

.nav-ghost-btn[hidden] {
  display: none !important;
}

/* ── Market dropdown ── */
.malggu-nav-dropdown {
  position: relative;
}

.malggu-nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  position: relative;
}

.malggu-nav-dropdown-caret {
  font-size: 10px;
  opacity: 0.7;
}

/* hover bridge — 끊김 방지 */
.malggu-nav-dropdown-trigger::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 12px;
}

.malggu-nav-dropdown-flyout {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s, transform 0.18s, visibility 0.18s;
  z-index: 110;
}

.malggu-nav-dropdown.open .malggu-nav-dropdown-flyout,
.malggu-nav-dropdown:hover .malggu-nav-dropdown-flyout {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.malggu-nav-dropdown-menu {
  min-width: 168px;
  padding: 6px;
  border-radius: 14px;
  background: rgba(14, 14, 22, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(16px);
}

.malggu-nav-dropdown-item {
  display: block;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.malggu-nav-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
