/* ============================================================
   navbar.css — Barra de navegación unificada · Nexus Codes
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ── Sticky shell ─────────────────────────────────────────── */
.shell-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0 32px;
  background: rgba(7, 10, 14, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* ── Topbar ───────────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 54px;
  font-family: 'Inter', system-ui, sans-serif;
}

/* ── Logo ─────────────────────────────────────────────────── */
.brand-mark {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}
.brand-mark img {
  display: block;
  height: 28px;
  width: auto;
  object-fit: contain;
}

/* ── Nav links ────────────────────────────────────────────── */
.topnav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  justify-content: center;
}
.topnav a {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.88rem; /* Aumentado */
  font-weight: 500;
  color: rgba(200, 216, 243, 0.72);
  padding: 6px 14px;
  border-radius: 8px;
  letter-spacing: 0.02em;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
  text-decoration: none;
}
.topnav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
}
.topnav a.active,
.topnav a[aria-current="page"] {
  color: #fff;
  background: rgba(29, 155, 240, 0.18);
  font-weight: 600;
}

/* ── Top Actions ──────────────────────────────────────────── */
.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* ── Carrito ──────────────────────────────────────────────── */
.cart-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(200, 216, 243, 0.8);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.86rem; /* Aumentado */
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.cart-link:hover { background: rgba(255,255,255,0.09); color: #fff; }
.cart-link .js-cart-count,
.cart-link .cart-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 99px; background: #1d9bf0;
  color: #fff; font-size: 0.7rem; font-weight: 700;
}

/* ── Botón Discord ────────────────────────────────────────── */
.button-discord {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(88, 101, 242, 0.14);
  color: #c8d8f3;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.86rem; /* Aumentado */
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, transform 0.15s;
  cursor: pointer;
}
.button-discord img { width: 16px; height: 16px; object-fit: contain; }
.button-discord:hover {
  background: rgba(88, 101, 242, 0.28);
  color: #fff;
  transform: translateY(-1px);
}

/* ── Selector de idioma ───────────────────────────────────── */
.language-picker { position: relative; }
.button-lang {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(200, 216, 243, 0.7);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.74rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}
.button-lang:hover { background: rgba(255,255,255,0.09); color: #fff; }

.language-menu {
  position: absolute; top: calc(100% + 6px); right: 0;
  min-width: 164px; padding: 6px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(12, 16, 22, 0.97);
  backdrop-filter: blur(16px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.4);
  z-index: 200;
}
.language-menu button {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 8px 12px; border-radius: 7px;
  border: none; background: transparent;
  color: rgba(200, 216, 243, 0.8);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.8rem; font-weight: 500;
  cursor: pointer; transition: background 0.12s, color 0.12s; text-align: left;
}
.language-menu button:hover { background: rgba(255,255,255,0.07); color: #fff; }

/* ── Ajustes (usuario logueado) ───────────────────────────── */
.settings-wrap { position: relative; }

.settings-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px 4px 4px;
  border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #c8d8f3;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.settings-btn:hover { background: rgba(255,255,255,0.09); }

.settings-avatar {
  width: 28px; height: 28px;
  border-radius: 50%; object-fit: cover;
  border: 1px solid rgba(255,255,255,0.15);
}
.settings-username { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.settings-rank {
  font-size: 0.62rem; font-weight: 700;
  padding: 2px 7px; border-radius: 99px;
  background: rgba(29,155,240,0.2); color: #7bc4ff;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.settings-rank.admin { background: rgba(255,170,50,0.18); color: #ffd080; }

.settings-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  min-width: 194px; padding: 6px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(12, 16, 22, 0.97);
  backdrop-filter: blur(16px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.45);
  z-index: 200;
}
.settings-menu a,
.settings-menu button {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 9px 13px; border-radius: 8px;
  border: none; background: transparent;
  color: rgba(200, 216, 243, 0.85);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.8rem; font-weight: 500;
  cursor: pointer; text-decoration: none; text-align: left;
  transition: background 0.12s, color 0.12s;
}
.settings-menu a:hover,
.settings-menu button:hover { background: rgba(255,255,255,0.07); color: #fff; }
.settings-menu .menu-danger { color: rgba(255,110,110,0.85); }
.settings-menu .menu-danger:hover { background: rgba(255,80,80,0.08); color: #ff7070; }
.settings-menu hr { border: none; border-top: 1px solid rgba(255,255,255,0.07); margin: 4px 0; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .shell-nav { padding: 0 18px; }
  .topnav a { padding: 6px 10px; font-size: 0.72rem; }
}
@media (max-width: 680px) {
  .topbar { height: auto; flex-wrap: wrap; padding: 10px 0; gap: 8px; }
  .topnav { order: 3; width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .brand-mark img { height: 24px; }
}

/* ── Cart Icon Bag ── */
.bag {
  width: 18px;
  height: 18px;
  border: 1.5px solid rgba(244, 241, 234, 0.9);
  border-radius: 4px;
  position: relative;
  display: inline-block;
}

.bag::before {
  content: "";
  position: absolute;
  left: 3.5px;
  top: -5px;
  width: 8px;
  height: 6px;
  border: 1.5px solid rgba(244, 241, 234, 0.9);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
}

