/* NOBBYO — Nav cluster (location, notifications, cart, profile, lang)
   Loaded after vibrant.css. */

.nav-cluster {
  display: flex; align-items: center; gap: 6px;
  position: relative;
}

/* Generic icon button (square, ghost) */
.nav-icon-btn {
  position: relative;
  display: inline-flex; align-items: center; gap: 6px;
  height: 38px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 10px;
  background: #fff; color: var(--ink);
  font-size: 13px; font-weight: 600; font-family: inherit;
  cursor: pointer;
  transition: all .2s var(--ease-spring);
}
.nav-icon-btn:hover { border-color: var(--indigo); color: var(--indigo); transform: translateY(-1px); box-shadow: 0 6px 16px -8px rgba(30,42,120,.25); }
.nav-icon-btn.active { border-color: var(--indigo); color: var(--indigo); background: rgba(79,70,229,.06); }

/* Location button */
.loc-btn .loc-label {
  font-weight: 700;
  letter-spacing: -.005em;
  max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Square buttons (cart, bell) — no label */
.notif-btn, .cart-btn { width: 38px; padding: 0; justify-content: center; }
.cart-btn:hover { color: #FF4D8D; border-color: #FF4D8D; }
.notif-btn:hover { color: #F59E0B; border-color: #F59E0B; }

/* Badges on icon buttons */
.nav-icon-btn .badge {
  position: absolute; top: -5px; right: -5px;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px;
  font-size: 10px; font-weight: 800; line-height: 18px;
  text-align: center; color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
  animation: bounceIn .35s var(--ease-spring);
}
.cart-badge { background: linear-gradient(135deg, #FF4D8D, #FF5A3C); }
.bell-badge { background: linear-gradient(135deg, #F59E0B, #FF5A3C); }
.bell-badge::after {
  content: ""; position: absolute; inset: -2px;
  border-radius: 999px; border: 2px solid rgba(245,158,11,.4);
  animation: livePulse 2s ease-in-out infinite;
}

/* Lang toggle compact variant */
.lang-toggle.compact {
  display: inline-flex; height: 38px; border: 1px solid var(--line);
  border-radius: 10px; overflow: hidden; padding: 0;
}
.lang-toggle.compact button {
  padding: 0 10px; border: 0; background: #fff; color: var(--ink-2);
  font-size: 12px; font-weight: 700; cursor: pointer;
  transition: all .15s;
}
.lang-toggle.compact button.active { background: linear-gradient(135deg, #4F46E5, #8B5CF6); color: #fff; }
.lang-toggle.compact button:not(.active):hover { background: var(--bg-soft); color: var(--ink); }

.nav-divider {
  width: 1px; height: 24px; background: var(--line); margin: 0 4px;
}

/* Profile button */
.profile-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 38px; padding: 3px 8px 3px 4px;
  border: 1px solid var(--line); border-radius: 999px;
  background: #fff; color: var(--ink); cursor: pointer;
  transition: all .2s var(--ease-spring);
  font-family: inherit;
}
.profile-btn:hover { border-color: var(--indigo); transform: translateY(-1px); box-shadow: 0 6px 16px -8px rgba(30,42,120,.25); }
.profile-btn.active { border-color: var(--indigo); background: rgba(79,70,229,.06); }

.profile-btn .avatar {
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #FF4D8D, #8B5CF6);
  color: #fff; font-weight: 800; font-size: 13px;
  letter-spacing: -.02em;
  box-shadow: 0 0 0 2px #fff inset, 0 4px 10px -4px rgba(255,77,141,.4);
}
.profile-btn .avatar.guest {
  background: var(--bg-soft); color: var(--ink-2);
  box-shadow: none;
}

/* ── Popovers ────────────────────────────────────────── */
.nav-pop {
  position: absolute; top: calc(100% + 12px); right: 0;
  min-width: 280px;
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 24px 60px -16px rgba(15,23,42,.25);
  z-index: 100; overflow: hidden;
  animation: popIn .25s var(--ease-spring);
}
@keyframes popIn { from { opacity: 0; transform: translateY(-8px) scale(.96); } to { opacity: 1; transform: none; } }

.nav-pop-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px; border-bottom: 1px solid var(--line);
  font-size: 13px; font-weight: 700; color: var(--ink);
}
.nav-pop-foot {
  padding: 12px 16px; border-top: 1px solid var(--line);
  text-align: center; font-size: 13px; font-weight: 600; color: var(--indigo);
  background: var(--bg-soft); cursor: pointer;
}
.nav-pop-foot a { color: var(--indigo); }
.nav-pop-foot:hover { background: rgba(79,70,229,.08); }

.link-btn {
  background: transparent; border: 0; color: var(--indigo);
  font-size: 12px; font-weight: 600; cursor: pointer; font-family: inherit;
}
.link-btn:hover { text-decoration: underline; }

/* Location popover */
.loc-pop { min-width: 240px; left: 0; right: auto; }
.loc-list {
  max-height: 320px; overflow: auto; padding: 6px;
}
.loc-list button {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border: 0; background: transparent; border-radius: 8px;
  font-size: 14px; font-weight: 500; color: var(--ink); cursor: pointer;
  text-align: left; font-family: inherit;
  transition: background .15s, color .15s;
}
.loc-list button svg { color: var(--ink-2); flex-shrink: 0; }
.loc-list button:hover { background: var(--bg-soft); color: var(--indigo); }
.loc-list button:hover svg { color: var(--indigo); }
.loc-list button.sel { background: rgba(79,70,229,.08); color: var(--indigo); font-weight: 600; }
.loc-list button.sel svg { color: var(--indigo); }
.dot-mint {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--mint); margin-left: auto;
  box-shadow: 0 0 0 3px rgba(16,185,129,.25);
}

/* Notifications popover */
.notif-pop { width: 360px; }
.notif-list { max-height: 380px; overflow: auto; }
.notif-item {
  display: grid; grid-template-columns: 36px 1fr auto;
  gap: 12px; padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  position: relative; cursor: pointer;
  transition: background .15s;
}
.notif-item:hover { background: var(--bg-soft); }
.notif-item:last-child { border-bottom: 0; }
.notif-item.unread::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, #FF4D8D, #8B5CF6);
}
.notif-item .ic {
  width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center; flex-shrink: 0;
}
.notif-item .body .t { font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 2px; }
.notif-item .body .d { font-size: 12px; color: var(--ink-2); line-height: 1.4; }
.notif-item .meta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.notif-item .meta .time { font-size: 11px; color: var(--ink-2); font-weight: 600; }
.notif-item .meta .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 2px rgba(255,90,60,.25); }

/* Profile popover */
.profile-pop { min-width: 280px; }
.profile-head {
  display: flex; gap: 12px; align-items: center;
  padding: 16px; border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(255,77,141,.06), rgba(139,92,246,.06));
}
.profile-head .avatar.lg {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #FF4D8D, #8B5CF6);
  color: #fff; font-weight: 800; font-size: 18px;
  box-shadow: 0 4px 12px -4px rgba(255,77,141,.5);
}
.profile-head .t { font-size: 14px; font-weight: 700; color: var(--ink); }
.profile-head .d { font-size: 12px; color: var(--ink-2); }

.profile-cta { padding: 18px 16px; }
.profile-cta h4 { font-size: 16px; font-weight: 700; margin: 0 0 4px; }
.profile-cta p { font-size: 13px; color: var(--ink-2); margin: 0 0 14px; line-height: 1.45; }

.profile-row {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 16px; font-size: 14px; font-weight: 500;
  color: var(--ink); cursor: pointer;
  transition: background .15s, color .15s;
}
.profile-row:hover { background: var(--bg-soft); color: var(--indigo); }
.profile-row .num {
  margin-left: auto; min-width: 22px;
  background: var(--bg-soft); color: var(--ink-2);
  border-radius: 999px; padding: 2px 8px;
  font-size: 11px; font-weight: 700;
}
.profile-row.danger { color: #DC2626; }
.profile-row.danger:hover { background: #FEF2F2; }
.profile-sep { height: 1px; background: var(--line); margin: 6px 0; }

/* Hide profile button label on tablets */
@media (max-width: 1280px) {
  .nav-cluster .loc-btn .loc-label,
  .nav-cluster .loc-btn .icon-chev,
  .nav-cluster .nav-divider,
  .nav-cluster .lang-toggle.compact { display: none; }
  .nav-cluster .loc-btn { width: 38px; padding: 0; justify-content: center; }
  .nav-cluster { gap: 4px; }
  .nav-cluster .profile-btn svg.chev { display: none; }
}
@media (max-width: 1100px) {
  .nav-cluster .notif-btn { display: none; }
}
@media (max-width: 900px) {
  .nav-cluster .loc-btn { display: none; }
}

/* nav full-bleed override (landing page only — has-nav-cart class) */
.has-nav-cart .nav > .container { max-width: none !important; padding: 0 28px; }
@media (max-width: 768px) { .has-nav-cart .nav > .container { padding: 0 20px; } }

/* Hide the old fixed cart-fab on landing page only — nav-cluster has cart now. */
body.has-nav-cart .cart-fab { display: none !important; }


/* ── NOBBYO SOFT nav link ────────────────────────────── */
.nav-link-soft {
  position: relative;
  background: linear-gradient(135deg, rgba(139,92,246,.12), rgba(255,77,141,.12)) !important;
  color: #6D28D9 !important;
  font-weight: 700 !important;
  letter-spacing: .02em;
  display: inline-flex !important; align-items: center; gap: 5px;
  border: 1px solid rgba(139,92,246,.2);
  transition: all .25s var(--ease-spring, cubic-bezier(.34,1.56,.64,1));
}
.nav-link-soft .soft-bolt {
  font-size: 12px;
  background: linear-gradient(135deg, #8B5CF6, #FF4D8D);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-weight: 800;
  animation: softBoltSpin 3s ease-in-out infinite;
}
@keyframes softBoltSpin {
  0%,100% { transform: rotate(0) scale(1); }
  50% { transform: rotate(180deg) scale(1.15); }
}
.nav-link-soft:hover {
  background: linear-gradient(135deg, rgba(139,92,246,.2), rgba(255,77,141,.2)) !important;
  color: #5B21B6 !important;
  border-color: rgba(139,92,246,.4);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px -6px rgba(139,92,246,.4);
}
/* On dark soft-page nav */
body.soft-page .nav-link-soft {
  background: linear-gradient(135deg, rgba(139,92,246,.25), rgba(255,77,141,.25)) !important;
  color: #fff !important;
  border-color: rgba(255,255,255,.18);
}
body.soft-page .nav-link-soft:hover {
  background: linear-gradient(135deg, rgba(139,92,246,.4), rgba(255,77,141,.4)) !important;
}
