/* Desktop main nav – futuristic glass bar */
.main-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  background: radial-gradient(circle at top left, rgba(0, 255, 136, 0.08), rgba(10, 10, 10, 0.98));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(22px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.8);
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
}

.nav-brand {
  order: 1;
  flex-shrink: 0;
  margin-left: 0;
}

/* Search: after logo, input + button, expands to fill space */
.nav-search {
  order: 2;
  flex: 1 1 280px;
  min-width: 0;
  max-width: 420px;
}

.nav-search-form {
  width: 100%;
}

.nav-search-inner {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.nav-search-input {
  flex: 1;
  min-width: 0;
  height: 38px;
  padding: 0 2.75rem 0 0.9rem;
  font-size: 0.875rem;
  color: var(--color-text-primary);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}

.nav-search-input::placeholder {
  color: var(--color-text-tertiary);
}

.nav-search-input:focus {
  border-color: rgba(0, 255, 136, 0.5);
  background: rgba(255, 255, 255, 0.08);
}

.nav-search-btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  background: transparent;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.2s;
}

.nav-search-btn:hover {
  color: var(--color-accent-primary);
}

.nav-search-btn svg {
  display: block;
}

.nav-menu {
  order: 3;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  order: 4;
}

/* Cart badge (desktop + mobile header) */
.nav-icon,
.home-cart-btn {
  position: relative;
}

.cart-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  background: var(--color-accent-primary);
  color: var(--color-black);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
}

.nav-brand .brand-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-left: auto;
}

.nav-link {
  position: relative;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  text-decoration: none;
  padding: 0.35rem 0;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.25rem;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-accent-primary), var(--color-accent-tertiary));
  transition: width var(--transition-fast);
}

.nav-link:hover {
  color: #ffffff;
}

.nav-link:hover::after {
  width: 100%;
}

.nav-icon {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: radial-gradient(circle at 30% 0%, rgba(255, 255, 255, 0.16), rgba(26, 26, 26, 0.95));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7);
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    border-color var(--transition-fast),
    background var(--transition-fast);
}

.nav-icon:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.9);
  border-color: rgba(0, 255, 136, 0.6);
  background: radial-gradient(circle at 30% 0%, rgba(0, 255, 136, 0.22), rgba(26, 26, 26, 0.98));
}

.nav-profile-avatar,
.home-profile-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.7);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.header-profile-initial {
  font-size: 0.85rem;
  font-weight: 600;
  color: #ffffff;
}

/* Mobile top bar */
.home-top-bar {
  display: none;
}

.home-top-bar {
  position: sticky;
  top: 0;
  z-index: 45;
  width: 100%;
  padding: 0.55rem 0.9rem;
  background: linear-gradient(120deg, rgba(0, 0, 0, 0.98), rgba(0, 255, 136, 0.1));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.home-burger-btn,
.home-back-btn,
.home-cart-btn,
.home-profile-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: transparent;
  color: #ffffff;
  cursor: pointer;
}

/* Hide only back button in mobile top bar */
.home-back-btn {
  display: none;
}

/* Hide profile button in mobile top bar */
.home-profile-btn {
  display: none;
}

.home-search-wrap {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
}

.home-search-form {
  width: 100%;
}

.home-search-inner {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0.2rem 0.4rem;
  border-radius: 999px;
  background: rgba(15, 15, 15, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.home-search-input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: #ffffff;
  font-size: 0.8rem;
  padding: 0.35rem 2.25rem 0.35rem 0.5rem;
}

.home-search-input::placeholder {
  color: var(--color-text-secondary);
}

.home-search-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-tertiary);
  background: transparent;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.2s;
}

.home-search-btn:hover {
  color: var(--color-accent-primary);
}

.home-search-btn svg {
  display: block;
}

.home-search-btn svg {
  display: block;
}

/* Mobile sidebar */
.home-sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
  z-index: 60;
}

.home-sidebar-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.home-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 288px;
  background: #111111;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  transform: translateX(-100%);
  transition: transform var(--transition-base);
  z-index: 61;
  display: flex;
  flex-direction: column;
}

.home-sidebar.is-open {
  transform: translateX(0);
}

.home-sidebar-header {
  padding: 0.9rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.home-sidebar-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
}

.home-sidebar-brand-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #ffffff;
}

.home-sidebar-close {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: transparent;
  color: #ffffff;
  cursor: pointer;
}

.home-sidebar-nav {
  padding: 0.75rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.home-sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
}

.home-sidebar-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

/* Mobile drawer active tab only (desktop nav unchanged) */
@media (max-width: 768px) {
  .home-sidebar-link.is-active {
    background: linear-gradient(135deg, rgba(201, 169, 98, 0.22), rgba(201, 169, 98, 0.08));
    color: #ffffff;
    border: 1px solid rgba(201, 169, 98, 0.35);
    box-shadow: 0 0 0 1px rgba(201, 169, 98, 0.12);
    border-radius: 8px;
    padding-top: 0.38rem;
    padding-bottom: 0.38rem;
  }

  .home-sidebar-link.is-active .home-sidebar-link-icon {
    color: var(--color-accent-primary, #c9a962);
  }
}

/* Breakpoints */
@media (max-width: 768px) {
  .main-nav {
    display: none;
  }

  .home-top-bar {
    display: flex;
  }
}

@media (min-width: 769px) {
  .home-top-bar,
  .home-sidebar,
  .home-sidebar-backdrop {
    display: none;
  }
}
