/* Header actions — auth, cart, user menu */
.header-inner .nav {
  flex: 1;
  justify-content: center;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-shrink: 0;
}

.header-cart {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  color: var(--navy);
  border: 1px solid var(--border);
  background: #fff;
  transition: border-color .15s, background .15s;
}
.header-cart:hover {
  border-color: var(--navy);
  background: var(--bg-soft);
}
.header-cart .cart-badge {
  top: -4px;
  left: -4px;
}

.header-btn {
  padding: .5rem 1rem;
  font-size: .88rem;
  white-space: nowrap;
}
.header-btn--login { min-width: 72px; }

.header-user { position: relative; }
.header-user__toggle {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .35rem .65rem .35rem .45rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  font-family: inherit;
  max-width: 180px;
}
.header-user__toggle:hover { border-color: var(--navy); background: var(--bg-soft); }
.header-user__avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--yellow);
  display: grid;
  place-items: center;
  font-size: .82rem;
  font-weight: 800;
  flex-shrink: 0;
}
.header-user__name {
  font-size: .85rem;
  font-weight: 600;
  color: var(--navy);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.header-user__chevron { flex-shrink: 0; opacity: .5; }
.header-user__menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 180px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: .4rem;
  display: none;
  z-index: 60;
}
.header-user.open .header-user__menu { display: block; }
.header-user__menu a,
.header-user__menu button {
  display: block;
  width: 100%;
  text-align: right;
  padding: .6rem .75rem;
  border: none;
  background: none;
  border-radius: 8px;
  font-family: inherit;
  font-size: .88rem;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
}
.header-user__menu a:hover,
.header-user__menu button:hover { background: var(--bg-soft); }
.header-user__logout { margin: 0; padding: 0; }

/* Mobile nav auth links */
.nav-auth-mobile {
  display: none;
  padding-top: .75rem;
  margin-top: .5rem;
  border-top: 1px solid var(--border);
  gap: .5rem;
}
.nav-auth-mobile .btn { flex: 1; justify-content: center; }

@media (max-width: 768px) {
  .header-inner .nav { flex: none; }
  .header-btn--login,
  .header-btn--register { display: none; }
  .header-user__name,
  .header-user__chevron { display: none; }
  .header-user__toggle { padding: .35rem; border-radius: 10px; }
  .nav-auth-mobile { display: flex; }
  .header-actions { gap: .35rem; }
}

@media (min-width: 769px) {
  .nav-auth-mobile { display: none !important; }
}
