/* ============================================================
   nav.css
   Desktop top navigation bar + mobile bottom tab bar
   ============================================================ */

/* ── Desktop Nav ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 300;
  background: rgba(10,10,15,.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 2rem;
  height: var(--nav-height);
  gap: 1rem;
  padding-top: var(--safe-top);
}

.nav-logo {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}
.nav-logo img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(201,168,76,.4);
}

.nav-tabs {
  display: flex;
  gap: 3px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 40px;
  padding: 3px;
  justify-self: center;
}

.nav-tab {
  padding: 6px 16px;
  border-radius: 36px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: 'Cinzel', serif;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .06em;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}
.nav-tab:hover  { color: var(--text); }
.nav-tab.active { background: var(--gold); color: #000; }

.nav-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 1;
}

.nav-cart-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 16px;
  background: var(--bg-surface2);
  border: 1px solid var(--border);
  border-radius: 36px;
  color: var(--text);
  font-family: 'Cinzel', serif;
  font-size: .72rem;
  cursor: pointer;
  transition: all .2s;
}
.nav-cart-btn:hover { border-color: var(--gold); color: var(--gold); }

.nav-badge {
  background: var(--gold);
  color: #000;
  font-size: .62rem;
  font-weight: 700;
  min-width: 17px;
  height: 17px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  transition: transform .15s;
}
.nav-badge.bump { transform: scale(1.5); }

.nav-signin-btn {
  padding: 7px 16px;
  border-radius: 36px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-family: 'Cinzel', serif;
  font-size: .72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}
.nav-signin-btn:hover { border-color: var(--gold); color: var(--gold); }

.nav-user-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  background: var(--bg-surface2);
  border: 1px solid var(--border);
  border-radius: 36px;
  color: var(--text);
  font-family: 'Cinzel', serif;
  font-size: .68rem;
  cursor: pointer;
  transition: all .2s;
}
.nav-user-btn:hover { border-color: var(--gold); color: var(--gold); }

.nav-admin-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  background: transparent;
  border: 1px solid rgba(239,68,68,.3);
  border-radius: 36px;
  color: rgba(239,68,68,.8);
  font-family: 'Cinzel', serif;
  font-size: .66rem;
  cursor: pointer;
  transition: all .2s;
}
.nav-admin-btn:hover { border-color: var(--error); color: var(--error); }

/* ── Mobile Header (top bar on small screens) ── */
.mob-header {
  display: none;
  position: sticky;
  top: 0;
  z-index: 300;
  background: rgba(10,10,15,.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: 54px;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  padding-top: var(--safe-top);
}

/* ── Mobile Bottom Tab Bar ── */
.mob-tabs {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--mob-tab-h) + var(--safe-bottom));
  background: rgba(10,10,15,.97);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  z-index: 300;
  padding-bottom: var(--safe-bottom);
}

.mob-tabs-inner {
  display: flex;
  height: var(--mob-tab-h);
}

.mob-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: 'Cinzel', serif;
  font-size: .56rem;
  letter-spacing: .04em;
  cursor: pointer;
  transition: color .2s;
  padding: 0;
  position: relative;
}
.mob-tab:hover { color: var(--text); }
.mob-tab.active { color: var(--gold); }
.mob-tab-icon { font-size: 1.3rem; line-height: 1; }

.mob-tab-badge {
  position: absolute;
  top: 6px;
  right: calc(50% - 18px);
  background: var(--gold);
  color: #000;
  font-size: .55rem;
  font-weight: 700;
  min-width: 15px;
  height: 15px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}

/* ── Responsive: hide desktop nav, show mobile on small screens ── */
@media (max-width: 599px) {
  .nav        { display: none; }
  .mob-header { display: flex; }
  .mob-tabs   { display: flex; }
  .page-content { padding-bottom: calc(var(--mob-tab-h) + var(--safe-bottom)); }
}
