.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.navbar__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas:
    "logo . actions"
    "catalog search search";
  gap: 10px 12px;
  align-items: center;
  max-width: 1440px;
  margin: 0 auto;
  padding: 12px 16px;
}

.navbar__logo {
  grid-area: logo;
  display: flex;
  align-items: center;
  font-size: 20px;
  font-weight: 800;
  color: var(--color-text);
  text-decoration: none;
}

.navbar__logo-image {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 50%;
}

.navbar__catalog {
  grid-area: catalog;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 12px;
  background: #000000;
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}

.navbar__catalog:hover {
  background: #1a1a1a;
}

.navbar__catalog.is-current {
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35);
}

.navbar__catalog-icon {
  display: block;
  flex-shrink: 0;
}

.navbar__search {
  grid-area: search;
  min-width: 0;
}

.navbar__actions {
  grid-area: actions;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.navbar__action {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 44px;
  min-height: 44px;
  padding: 4px 8px;
  text-decoration: none;
  color: var(--color-text);
}

.navbar__action:hover {
  opacity: 0.72;
}

.navbar__action-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.navbar__action-label {
  display: none;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
}

.navbar__theme-toggle {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.navbar__theme-icon--sun {
  display: none;
}

[data-theme="dark"] .navbar__theme-icon--moon {
  display: none;
}

[data-theme="dark"] .navbar__theme-icon--sun {
  display: block;
}

.navbar__badge {
  position: absolute;
  top: -7px;
  right: -10px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--color-badge);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

@media (min-width: 768px) {
  .navbar__inner {
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    grid-template-areas: "logo catalog search actions";
    gap: 16px 20px;
    padding: 14px 24px;
  }

  .navbar__logo-image {
    width: 56px;
    height: 56px;
  }

  .navbar__catalog {
    height: 48px;
    padding: 0 20px;
    font-size: 16px;
  }

  .navbar__action {
    min-width: 64px;
  }

  .navbar__action-label {
    display: block;
  }
}

@media (min-width: 1024px) {
  .navbar__inner {
    gap: 20px 24px;
    padding: 16px 32px;
  }

  .navbar__logo-image {
    width: 64px;
    height: 64px;
  }
}
