/* ============================================================
   PlugNest v7 — Floating Pill Navbar (Framer-inspired)
   ============================================================ */

/* ── CSS property for animated border ────────────────────── */
@property --angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

/* ── Announcement ribbon ─────────────────────────────────── */
.pn-ribbon {
  background: linear-gradient(90deg, #7c3aed 0%, #a855f7 40%, #ec4899 70%, #7c3aed 100%);
  background-size: 200% 100%;
  animation: ribbon-slide 6s linear infinite;
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 0;
  text-align: center;
  position: relative;
  z-index: 200;
  letter-spacing: 0.2px;
}
.pn-ribbon a { color: rgba(255,255,255,0.9); text-decoration: underline; }
.pn-ribbon a:hover { color: #fff; }
@keyframes ribbon-slide {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* ── Nav outer wrapper ───────────────────────────────────── */
.pn-nav-outer {
  position: sticky;
  top: 0;
  z-index: 150;
  display: flex;
  justify-content: center;
  padding: 14px 20px;
  pointer-events: none;
}

/* ── Spinning border container ───────────────────────────── */
.pn-nav-border {
  position: relative;
  border-radius: 22px;
  max-width: 1100px;
  width: 100%;
  pointer-events: all;
}

/* Animated conic-gradient border */
.pn-nav-border::before {
  content: '';
  position: absolute;
  inset: -1.5px;
  border-radius: inherit;
  background: conic-gradient(
    from var(--angle),
    transparent 0%,
    transparent 75%,
    rgba(124,58,237,0.8) 85%,
    rgba(236,72,153,0.6) 92%,
    transparent 100%
  );
  animation: border-spin 5s linear infinite;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
}
.pn-nav-border:hover::before,
.pn-nav-border.glow::before {
  opacity: 1;
}
@keyframes border-spin {
  to { --angle: 360deg; }
}

/* ── Pill itself ─────────────────────────────────────────── */
.pn-pill {
  background: rgba(8, 8, 20, 0.82);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 22px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  animation: pill-drop 0.65s cubic-bezier(0.34,1.56,0.64,1) 0.2s both;
}
.pn-nav-border:hover .pn-pill {
  border-color: rgba(124,58,237,0.2);
  box-shadow: 0 8px 48px rgba(0,0,0,0.5), 0 0 0 1px rgba(124,58,237,0.1) inset;
}
@keyframes pill-drop {
  from { opacity: 0; transform: translateY(-18px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Logo ────────────────────────────────────────────────── */
.pn-pill-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
  text-decoration: none;
  margin-right: 4px;
}
.pn-pill-logo-mark {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, #7c3aed, #ec4899);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  box-shadow: 0 0 16px rgba(124,58,237,0.45);
  transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
  flex-shrink: 0;
}
.pn-pill-logo:hover .pn-pill-logo-mark {
  transform: rotate(-10deg) scale(1.12);
  box-shadow: 0 0 28px rgba(124,58,237,0.7);
}
.pn-pill-logo-text {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
}
.pn-pill-logo-text em { color: #a78bfa; font-style: normal; }

/* ── Divider ─────────────────────────────────────────────── */
.pn-nav-divider {
  width: 1px;
  height: 20px;
  background: rgba(255,255,255,0.08);
  flex-shrink: 0;
  margin: 0 6px;
}

/* ── Center nav links ────────────────────────────────────── */
.pn-pill-links {
  display: flex;
  align-items: center;
  gap: 1px;
  flex: 1;
}
.pn-pill-link {
  position: relative;
  padding: 6px 13px;
  font-size: 13.5px;
  font-weight: 500;
  color: rgba(255,255,255,0.62);
  border-radius: 11px;
  text-decoration: none;
  transition: color 0.2s;
  white-space: nowrap;
}
.pn-pill-link::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(255,255,255,0.07);
  opacity: 0;
  transform: scale(0.85);
  transition: all 0.22s cubic-bezier(0.34,1.56,0.64,1);
}
.pn-pill-link:hover { color: #fff; }
.pn-pill-link:hover::before { opacity: 1; transform: scale(1); }
.pn-pill-link.active { color: #a78bfa; }
.pn-pill-link.active::before { opacity: 1; transform: scale(1); background: rgba(124,58,237,0.12); }

/* Hot badge on a nav link */
.pn-nav-hot {
  display: inline-block;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: #000;
  font-size: 9px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
  margin-left: 4px;
  vertical-align: middle;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* ── Right actions ───────────────────────────────────────── */
.pn-pill-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* Search icon button */
.pn-search-btn {
  width: 34px; height: 34px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.55);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.34,1.56,0.64,1);
  text-decoration: none;
}
.pn-search-btn:hover {
  background: rgba(124,58,237,0.15);
  border-color: rgba(124,58,237,0.3);
  color: #fff;
  transform: scale(1.08);
}

/* Cart button */
.pn-pill-cart {
  position: relative;
  width: 34px; height: 34px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.65);
  font-size: 15px;
  text-decoration: none;
  transition: all 0.22s cubic-bezier(0.34,1.56,0.64,1);
}
.pn-pill-cart:hover {
  background: rgba(124,58,237,0.15);
  border-color: rgba(124,58,237,0.35);
  color: #fff;
  transform: scale(1.08);
}
.pn-pill-cart-count {
  position: absolute;
  top: -5px; right: -5px;
  background: #ef4444;
  color: #fff;
  font-size: 9px; font-weight: 800;
  min-width: 16px; height: 16px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--bg, #06060f);
  animation: badge-pop 0.3s cubic-bezier(0.34,1.56,0.64,1);
}

/* CTA button */
.pn-pill-cta {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: #fff;
  font-size: 13px; font-weight: 700;
  padding: 8px 18px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all 0.22s ease;
  position: relative; overflow: hidden;
  box-shadow: 0 3px 16px rgba(124,58,237,0.4);
  white-space: nowrap;
}
.pn-pill-cta::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
  transform: translateX(-100%);
  transition: transform 0.45s;
}
.pn-pill-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(124,58,237,0.6);
  color: #fff;
}
.pn-pill-cta:hover::after { transform: translateX(100%); }

/* ── Mobile hamburger ────────────────────────────────────── */
.pn-pill-ham {
  display: none;
  width: 34px; height: 34px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  flex-direction: column;
  align-items: center; justify-content: center;
  gap: 4.5px; cursor: pointer; flex-shrink: 0;
}
.pn-pill-ham span {
  display: block; width: 18px; height: 1.5px;
  background: rgba(255,255,255,0.75); border-radius: 2px;
  transition: all 0.25s ease;
}
.pn-pill-ham.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.pn-pill-ham.open span:nth-child(2) { opacity: 0; }
.pn-pill-ham.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Mobile drawer */
.pn-pill-drawer {
  display: none;
  position: fixed;
  inset: 0;
  top: 0;
  background: rgba(6,6,15,0.97);
  backdrop-filter: blur(24px);
  z-index: 149;
  flex-direction: column;
  padding: 80px 24px 32px;
}
.pn-pill-drawer.open {
  display: flex;
  animation: fade-up 0.25s ease;
}
.pn-pill-drawer a {
  display: block;
  font-size: 22px; font-weight: 700; color: rgba(255,255,255,0.85);
  padding: 16px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  text-decoration: none;
  transition: color 0.2s, padding-left 0.2s;
}
.pn-pill-drawer a:hover { color: #fff; padding-left: 8px; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .pn-pill-links { display: none; }
  .pn-nav-divider:first-of-type { display: none; }
}
@media (max-width: 640px) {
  .pn-pill-cta { display: none; }
  .pn-pill-ham { display: flex; }
  .pn-nav-outer { padding: 10px 14px; }
}
