/* [TEMP] GIFT 메뉴 임시 숨김 — 되살리려면 이 블록만 지우면 됨 (데스크톱 nav + 모바일 메뉴 둘 다) */
.gnb-nav a[href$="/gift.php"],
.gnb-mobile-menu a[href$="/gift.php"] {
  display: none !important;
}

.gnb {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--gnb-height);
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border-light);
  z-index: 1000;
  transition: background 0.3s ease, border-color 0.3s ease;
}

/* Transparent GNB on home hero */
.gnb.gnb-transparent {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom-color: transparent;
}

.gnb.gnb-transparent .gnb-logo,
.gnb.gnb-transparent .gnb-link {
  color: rgba(255,255,255,0.95);
}

.gnb.gnb-transparent .gnb-link:hover {
  color: #fff;
}

.gnb.gnb-transparent .gnb-link::after {
  background: #fff;
}

/* 투명 헤더(홈 히어로)에서도 흰 알약 그대로.
   어두운 히어로 위에서는 글로우가 더 잘 보이므로 번짐만 조금 키운다. */
.gnb.gnb-transparent .gnb-cta {
  color: #1A1A1A;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.22),
    0 12px 34px rgba(var(--cta-glow), 0.38);
}
.gnb.gnb-transparent .gnb-cta:hover {
  box-shadow:
    0 3px 10px rgba(0, 0, 0, 0.26),
    0 16px 46px rgba(var(--cta-glow), 0.58);
}

.gnb.gnb-transparent .gnb-hamburger span {
  background: #fff;
}

.gnb-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 40px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.gnb-logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: 0.2em;
  color: var(--color-text);
  font-weight: 500;
  text-transform: uppercase;
}

/* Nav links */
.gnb-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.gnb-link {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  transition: var(--transition);
  position: relative;
  font-weight: 500;
  padding: 4px 0;
}

.gnb-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-text);
  transition: var(--transition);
}

.gnb-link:hover,
.gnb-link.active {
  color: var(--color-text);
}

.gnb-link:hover::after,
.gnb-link.active::after {
  width: 100%;
}

/* ============================================================
   CTA in nav — 뒤에서 따뜻한 빛이 새어나오는 흰 알약(pill)
   ------------------------------------------------------------
   레이어 순서가 핵심이다. 한 스택 컨텍스트 안에서 음수 z-index 자식은
   부모의 '배경'보다 위에 그려지므로, 버튼 배경을 그대로 두면 글로우가
   버튼 '안'에 갇힌다. 그래서 면을 ::before 로 분리한다.

     .gnb-cta-fx (캔버스)  z-index:-2   ← 밖으로 번지는 백라이트 (blur)
     .gnb-cta::before      z-index:-1   ← 흰 알약 표면 (글로우를 가림)
     텍스트                 (인라인)     ← 항상 최상단

   isolation:isolate 로 음수 z-index 가 헤더 배경 뒤로 빠지지 않게 가둔다.
   ★ 색·번짐 조절 지점은 아래 3곳: --cta-glow / .gnb-cta-fx 의 blur·inset / box-shadow
   ============================================================ */
.gnb-cta {
  --cta-glow: 214, 150, 30;          /* 앰버 골드 — 번짐 색 (레퍼런스 톤) */
  position: relative;
  isolation: isolate;
  overflow: visible;                 /* 글로우가 버튼 밖으로 번져야 함 */
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 11px 26px;
  color: #1A1A1A;                    /* 흰 면 위 검정 글자 */
  font-weight: 600;
  border: none;
  background: transparent;           /* 실제 면은 ::before 가 그린다 */
  text-shadow: none;
  /* 캔버스가 없을 때(모션 최소화·JS 미실행)도 남는 정적 글로우 */
  box-shadow:
    0 2px 6px rgba(120, 80, 10, 0.10),
    0 10px 26px rgba(var(--cta-glow), 0.22);
  transition: box-shadow 0.5s ease, transform 0.5s ease;
}

/* 흰 알약 표면 — 캔버스 위, 글자 아래 */
.gnb-cta::before {
  content: '';
  position: absolute; inset: 0; z-index: -1;
  border-radius: inherit;
  background: linear-gradient(180deg, #FFFFFF 0%, #FCFAF6 55%, #F6F1E7 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),      /* 윗면 하이라이트 */
    inset 0 0 0 1px rgba(184, 150, 12, 0.16);     /* 아주 얇은 골드 링 */
  transition: background 0.4s ease;
}

/* 캔버스 글로우 파티클 — 알약 뒤에서 유영하며 밖으로 새어나오는 빛 (JS 주입)
   ★ <canvas> 는 대체 요소라 inset + width:auto 로는 안 늘어난다.
     (고유 크기 300×150 이 그대로 적용돼 버튼 밖으로 크게 삐져나감)
     반드시 width/height 를 명시할 것. --cta-spread 로 번짐 폭 조절. */
.gnb-cta-fx {
  --cta-spread: 13px;
  position: absolute; z-index: -2; display: block;
  top: calc(var(--cta-spread) * -1);
  left: calc(var(--cta-spread) * -1);
  width: calc(100% + var(--cta-spread) * 2);
  height: calc(100% + var(--cta-spread) * 2);
  border-radius: 999px;
  filter: blur(11px) saturate(1.1);
  opacity: 0.8;
  transition: filter 0.5s ease, opacity 0.5s ease;
}

.gnb-cta:hover {
  transform: translateY(-1px);
  box-shadow:
    0 2px 8px rgba(120, 80, 10, 0.12),
    0 14px 38px rgba(var(--cta-glow), 0.42);      /* 호버 시 빛이 더 넓게 */
}
.gnb-cta:hover::before { background: linear-gradient(180deg, #FFFFFF 0%, #FFFDF9 60%, #FCF7EC 100%); }
.gnb-cta:hover .gnb-cta-fx { filter: blur(13px) saturate(1.25) brightness(1.18); opacity: 0.95; }
.gnb-cta:active { transform: translateY(0) scale(0.985); }

@media (prefers-reduced-motion: reduce) {
  .gnb-cta-fx { display: none; }   /* 모션 최소화: 정적 글로우(box-shadow)만 남음 */
  .gnb-cta { transition: none; }
}

/* Right actions group (login/cart/cta) */
.gnb-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.gnb-greet {
  font-size: 0.72rem;
  color: var(--color-text-secondary);
  letter-spacing: 0.04em;
}

.gnb-cart {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.gnb-cart-badge {
  display: inline-block;
  min-width: 16px;
  height: 16px;
  line-height: 16px;
  padding: 0 5px;
  border-radius: 8px;
  background: var(--color-accent-gold);
  color: #fff;
  font-size: 0.62rem;
  text-align: center;
  font-weight: 600;
  letter-spacing: 0;
}

.gnb.gnb-transparent .gnb-greet {
  color: rgba(255,255,255,0.85);
}

/* Hamburger */
.gnb-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 22px;
  padding: 4px 0;
  cursor: pointer;
}

.gnb-hamburger span {
  display: block;
  width: 100%;
  height: 1px;
  background: var(--color-text);
  transition: var(--transition);
}

/* Mobile menu */
.gnb-mobile-menu {
  display: none;
  position: fixed;
  top: var(--gnb-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-white);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  z-index: 999;
  opacity: 0;
  transition: var(--transition);
}

.gnb-mobile-menu.open {
  display: flex;
  opacity: 1;
}

.gnb-mobile-menu .gnb-link {
  font-size: 0.85rem;
}

.gnb-mobile-menu .gnb-cta {
  font-size: 0.85rem;
  padding: 14px 36px;
}

/* Hamburger active state */
.gnb-hamburger.active span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.gnb-hamburger.active span:nth-child(2) {
  opacity: 0;
}

.gnb-hamburger.active span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ===== Dropdown (COLLECTION / GUIDE / MY) ===== */
.gnb-item { position: relative; display: flex; align-items: center; }
.gnb-sub {
  position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 160px; padding: 8px;
  background: var(--color-white);
  border: 1px solid var(--color-border-light);
  border-radius: 12px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.12);
  display: flex; flex-direction: column; gap: 2px;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 1001;
}
/* 호버 브릿지 — 항목과 드롭다운 사이 이동 시 안 닫힘 */
.gnb-sub::before { content: ''; position: absolute; left: 0; right: 0; top: -10px; height: 12px; }
.gnb-item:hover .gnb-sub {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translateX(-50%) translateY(5px);
}
.gnb-sub a {
  padding: 9px 14px; border-radius: 8px;
  font-size: 0.82rem; letter-spacing: 0.02em;
  color: var(--color-text); white-space: nowrap;
  transition: background 0.14s ease, color 0.14s ease;
}
.gnb-sub a:hover { background: var(--color-surface); color: var(--color-accent); }

@media (max-width: 768px) {
  .gnb-inner {
    padding: 0 20px;
  }

  .gnb-nav {
    display: none;
  }

  .gnb-actions {
    display: none;
  }

  .gnb-inner > .gnb-cta {
    display: none;
  }

  .gnb-hamburger {
    display: flex;
  }
}

/* ============================================================
   [LOGO] 헤더 로고 마크 (assets/ui/logo.png) + VESON 텍스트
   ------------------------------------------------------------
   업로드된 로고는 '은색 크롬' 원본이라 흰 헤더에서 거의 안 보인다.
   → filter 로 어둡게 눌러 대비를 만든다. 원본 파일은 그대로 두고 화면에서만 조정.
   ★ 톤이 마음에 안 들면 --logo-filter 한 줄만 바꾸면 된다.
      · 완전 검정 실루엣  : brightness(0)
      · 지금(음영 유지)   : grayscale(1) contrast(1.5) brightness(0.5)
      · 원본 그대로       : none
   ============================================================ */
.gnb-logo {
  --logo-filter: grayscale(1) contrast(1.5) brightness(0.5);
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.gnb-logo-mark {
  height: 26px; width: auto; display: block; flex: 0 0 auto;
  filter: var(--logo-filter);
  transition: filter var(--transition);
}
.gnb-logo-txt { display: inline-block; }

/* 투명 헤더(홈 히어로) — 배경이 어두우므로 로고를 흰색으로 반전 */
.gnb.gnb-transparent .gnb-logo {
  --logo-filter: brightness(0) invert(1);
}

@media (max-width: 768px) {
  .gnb-logo { gap: 7px; }
  .gnb-logo-mark { height: 22px; }
}
