.header {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header__top {
  border-bottom: 1px solid var(--color-gray-200);
}

.header__top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
}

.header__top-left {
  display: flex;
  align-items: center;
  gap: 24px;
}

.header__city {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  font-style: normal;
  line-height: 100%;
  letter-spacing: 0;
  color: #33261c;
  cursor: pointer;
}

.header__city svg {
  width: 12px;
  height: 12px;
  color: #33261c;
}

.header__top-info {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 400;
  font-style: normal;
  line-height: 100%;
  letter-spacing: 0;
  color: #8a7d70;
  white-space: nowrap;
}

.header__top-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.header__top-link {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 400;
  font-style: normal;
  line-height: 100%;
  letter-spacing: 0;
  color: #8a7d70;
  white-space: nowrap;
  transition: color var(--transition);
}

.header__top-link:hover {
  color: #33261c;
}

.header__main {
  padding: 16px 0;
}

.header__main-inner {
  display: flex;
  align-items: center;
  gap: 32px;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.header__logo-img {
  width: 222.95px;
  height: 63.31px;
  object-fit: contain;
  flex-shrink: 0;
}

.header__toggle {
  display: flex;
  background: var(--color-beige);
  border-radius: var(--radius-pill);
  padding: 4px;
  flex-shrink: 0;
}

.header__toggle-btn {
  padding: 8px 20px;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: background var(--transition), color var(--transition);
}

.header__toggle-btn--active {
  background: var(--color-brown);
  color: var(--color-white);
}

.header__spacer {
  flex: 1;
}

.header__phone {
  text-align: right;
  flex-shrink: 0;
}

.header__phone-number {
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 700;
  font-style: normal;
  line-height: 100%;
  letter-spacing: 0.34px;
  text-align: right;
  color: #33261c;
  white-space: nowrap;
}

.header__phone-note {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 400;
  font-style: normal;
  line-height: 100%;
  letter-spacing: 0;
  text-align: right;
  color: #33261c;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.header__cart {
  position: relative;
  padding-right: 36px;
}

.header__cart-count {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: var(--radius-pill);
  background: var(--color-brown);
  color: var(--color-white);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header__nav {
  padding: 0 0 16px;
}

.header__nav-list {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header__nav-link {
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text);
  white-space: nowrap;
  transition: background var(--transition), color var(--transition);
}

.header__nav-link:hover {
  background: var(--color-beige);
}

.header__nav-link--active {
  background: var(--color-brown);
  color: var(--color-white);
}

.header__nav-link--active:hover {
  background: var(--color-brown-light);
}

/* ── Desktop large (1280+) — default ── */

/* ── Laptop (1024–1279) ── */
@media (max-width: 1279px) {
  .header__main-inner {
    gap: 20px;
  }

  .header__toggle-btn {
    padding: 8px 16px;
  }
}

/* ── Tablet (768–1023) ── */
@media (max-width: 1023px) {
  .header__top-right {
    display: none;
  }

  .header__top-left {
    gap: 16px;
  }

  .header__top-info:last-of-type {
    display: none;
  }

  .header__toggle {
    display: none;
  }

  .header__main-inner {
    gap: 16px;
  }
}

/* ── Mobile (576–767) ── */
@media (max-width: 767px) {
  .header__top-inner {
    min-height: 36px;
  }

  .header__top-left {
    gap: 12px;
  }

  .header__top-info {
    display: none;
  }

  .header__main {
    padding: 12px 0;
  }

  .header__main-inner {
    flex-wrap: wrap;
    gap: 12px;
  }

  .header__logo-img {
    width: 169px;
    height: 48px;
  }

  .header__spacer {
    display: none;
  }

  .header__phone {
    order: 3;
    flex: 1;
    text-align: left;
  }

  .header__phone-number,
  .header__phone-note {
    text-align: left;
  }

  .header__actions {
    margin-left: auto;
  }

  .header__nav {
    padding-bottom: 12px;
  }

  .header__nav-list {
    gap: 4px;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }

  .header__nav-list::-webkit-scrollbar {
    display: none;
  }

  .header__nav-link {
    padding: 6px 12px;
    font-size: 0.8125rem;
  }
}

/* ── Small mobile (<576) ── */
@media (max-width: 575px) {
  .header__main-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    align-items: center;
  }

  .header__logo-img {
    width: 141px;
    height: 40px;
  }

  .header__logo {
    grid-column: 1;
    grid-row: 1;
  }

  .header__actions {
    grid-column: 2;
    grid-row: 1;
    gap: 8px;
  }

  .header__phone {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-top: 4px;
  }

  .header__cart {
    padding-right: 32px;
  }

  .header__cart-count {
    min-width: 20px;
    height: 20px;
    font-size: 0.6875rem;
  }
}

/* ── Extra small (<400) ── */
@media (max-width: 399px) {
  .header__logo-img {
    width: 113px;
    height: 32px;
  }

  .header__actions .btn--ghost {
    display: none;
  }
}
