:root {
  /* Безопасные отступы устройства (челка, домашний индикатор).
     Внутри Telegram их ведёт SDK: он выставляет --tg-safe-area-inset-* на
     <html> и обновляет по событию safe_area_changed, в том числе при входе
     во fullscreen и повороте. Вне Telegram эти переменные не определены
     вообще — SDK трогает их только из обработчика события, — поэтому
     срабатывает запасной env() самого браузера. */
  --safe-top: var(--tg-safe-area-inset-top, env(safe-area-inset-top, 0px));
  --safe-bottom: var(--tg-safe-area-inset-bottom, env(safe-area-inset-bottom, 0px));
  --safe-left: var(--tg-safe-area-inset-left, env(safe-area-inset-left, 0px));
  --safe-right: var(--tg-safe-area-inset-right, env(safe-area-inset-right, 0px));

  /* Отступы под собственный интерфейс Telegram — крестик и меню «⋮».
     Telegram отсчитывает их ОТ safe-area, а не от края экрана, поэтому
     складываются с --safe-*. Вне Telegram равны нулю. */
  --tg-chrome-top: var(--tg-content-safe-area-inset-top, 0px);
  --tg-chrome-bottom: var(--tg-content-safe-area-inset-bottom, 0px);

  --font-sans: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --accent-color: #c8ff2a;
  --accent-color-hover: #bce628;
  --accent-ink: #4d6800;
  --bg-page: #f2f2f4;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-subtle: #ebedf0;
  --text-main: #0a0a0a;
  --text-muted: #666666;
  --border-subtle: rgba(0, 0, 0, 0.06);
  --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.03), 0 1px 4px rgba(0, 0, 0, 0.02);
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
  --shadow-card-hover: 0 20px 40px -10px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.02);
  --radius-card: 28px;
  --radius-sm: 14px;
  --radius-medium: 18px;
  --section-mb: 40px;
  --page-inner-padding: 32px 24px 60px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 20px;
  --space-lg: 32px;
  --glass-bg: rgba(255, 255, 255, 0.75);
  --glass-blur: 20px;
  --glass-border: rgba(255, 255, 255, 0.4);

  /* ── Фокус ──────────────────────────────────────────────────────────
     До этого по магазину жило пять разных выделений: чёрное кольцо 4px,
     полупрозрачное 3px, обводка 2px #111, салатовое на оформлении заказа и
     своё в админке. Здесь два состояния и больше никаких.

     1. Управляющие элементы — ссылки, кнопки, свои контролы. Обводка
        появляется только по :focus-visible, то есть при ходьбе с
        клавиатуры, и рисуется через outline: его не режет overflow у
        предков (из-за чего выделение и «обрезалось»), он повторяет
        border-radius сам и не смешивается с тенями карточек.

     2. Поля ввода. Текстовому полю кольцо не нужно: курсор и так виден, а
        по спецификации поле совпадает с :focus-visible даже при обычном
        тапе — поэтому жирная рамка вылезала от простого касания и читалась
        как поломка. Полю положено потемнение рамки и мягкий ореол. */
  --focus-ring-color: #0a0a0a;
  --focus-ring-width: 2px;
  --focus-ring-offset: 2px;
  --focus-field-border: rgba(10, 10, 10, 0.38);
  --focus-field-shadow: 0 0 0 3px rgba(10, 10, 10, 0.08);
}

/* Правило живёт здесь, а не в modern-updates.css, потому что base.css грузят
   все три макета — витрина, кабинет продавца и админка. Раньше оно было
   только у витрины, и в кабинете с админкой фокус рисовал браузер как умел. */
:where(a, button, input, textarea, select, [tabindex]):focus {
  outline: none;
}

/* Обводка достаётся управляющим элементам. Текстовые поля сюда намеренно не
   входят — их состояние описывает потемневшая рамка с мягким ореолом. */
:where(a, button, select, [tabindex]):focus-visible,
:where(input):is([type="checkbox"], [type="radio"], [type="range"], [type="file"], [type="submit"], [type="button"], [type="reset"]):focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring-color);
  outline-offset: var(--focus-ring-offset);
  box-shadow: none;
}

.page-hero {
  margin-bottom: var(--space-lg);
}

.page-hero .pill {
  margin-bottom: var(--space-sm);
}

.page-hero h1 {
  font-size: 1.625rem;
  line-height: 1.2;
  margin-bottom: var(--space-xs);
}

.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.section-intro {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}




body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  letter-spacing: -0.015em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  z-index: 0;
}

.web-only-notice-banner {
  position: relative;
  z-index: 20;
  background: #0b0e14;
  color: #fff;
}

.web-only-notice-banner__inner {
  width: min(100% - 32px, 1180px);
  min-height: 44px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 13px;
  line-height: 1.35;
  text-align: center;
}

.web-only-notice-banner__inner i {
  color: #c8ff2a;
  font-size: 16px;
}

.web-only-notice-banner__inner a {
  padding: 6px 11px;
  border: 1px solid rgba(200, 255, 42, .55);
  border-radius: 999px;
  color: #c8ff2a;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .web-only-notice-banner__inner {
    width: 100%;
    min-height: 0;
    padding: 10px 12px;
    justify-content: flex-start;
    gap: 8px;
    font-size: 11px;
    text-align: left;
  }

  .web-only-notice-banner__inner span {
    flex: 1;
  }

  .web-only-notice-banner__inner a {
    padding: 6px 9px;
    font-size: 10px;
  }
}



body::before {
  display: none;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font: inherit;
  cursor: pointer;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 0;
}

.page-header {
  border-bottom: 1px solid var(--border-subtle);
  background-color: #ffffff;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.header-inner {
  /* Шапка была зажата в 1200px по центру, и на широком экране логотип стоял
     заметно правее края страницы, а поисковой строке не хватало места. Полоса
     стала шире, а левый отступ меньше — логотип уехал влево, освободившееся
     место забрал поиск. */
  max-width: 1440px;
  margin: 0 auto;
  padding: 10px 20px 10px 12px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 18px;
  position: relative;
}


.header-catalog-btn {
  flex: 0 0 auto;
  height: 46px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 14px;
  background: var(--text-main);
  color: #f7f7f9;
  font-size: 14px;
  font-weight: 700;
  transition: transform 0.12s ease, box-shadow 0.15s ease;
}

.header-catalog-btn:hover {
  border-color: rgba(11, 14, 20, 0.24);
  box-shadow: 0 3px 10px rgba(11, 14, 20, 0.1);
}

.header-catalog-btn .bi {
  font-size: 18px;
  line-height: 1;
}


.header-search {
  /* Поиск — главный способ добраться до товара, и он обязан выглядеть главным
     элементом шапки, а не соседом каталога. База роста увеличена с 480 до 680:
     flex-basis здесь решает, сколько поиск заберёт при делении свободного места. */
  height: 50px;
  min-width: 240px;
  flex: 1 1 680px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 5px 6px 5px 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #f3f4f4;
  transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.header-search:focus-within {
  border-color: var(--focus-field-border);
  background: #fff;
  box-shadow: var(--focus-field-shadow);
}

.header-search > .bi {
  color: #12161d;
  font-size: 18px;
}


.header-search input[type="search"] {
  min-width: 0;
  flex: 1;
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text-main);
  font: 500 13px/1.2 inherit;
  font-family: inherit;
  box-shadow: none;
  
  -webkit-appearance: none;
  appearance: none;
}

.header-search input[type="search"]::-webkit-search-decoration,
.header-search input[type="search"]::-webkit-search-cancel-button,
.header-search input[type="search"]::-webkit-search-results-button,
.header-search input[type="search"]::-webkit-search-results-decoration {
  -webkit-appearance: none;
  display: none;
}

.header-search input[type="search"]::placeholder {
  color: #7c818a;
}

.header-search input[type="search"]:focus,
.header-search input[type="search"]:focus-visible {
  outline: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  border-radius: 0 !important;
}

.header-search button {
  height: 36px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: var(--accent-color, #c8ff2a);
  color: #111;
  font-weight: 800;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: filter 0.15s ease;
}

.header-search button:hover {
  filter: brightness(0.95);
}

.logo-wrapper {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.logo-wrapper img {
  display: block;
  width: auto;
  height: 64px;
  max-width: none;
  object-fit: contain;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  margin-left: auto;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: 999px;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.nav-link .bi {
  font-size: 16px;
  line-height: 1;
}

.nav-link:hover {
  background-color: var(--text-main);
  color: #f7f7f9;
}

.nav-link.is-active {
  background-color: var(--text-main);
  color: #f7f7f9;
}

.nav-cta {
  padding: 8px 14px;
  border-radius: 999px;
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  font-weight: 600;
  font-size: 14px;
  box-shadow: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.15s ease;
}

.nav-cta:hover {
  background-color: var(--text-main);
  color: #f7f7f9;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.nav-cta.is-active {
  background-color: var(--text-main);
  color: #f7f7f9;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.14);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-toggle {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: #ffffff;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-direction: column;
  padding: 0;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-main);
  border-radius: 999px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.page-header.is-nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.page-header.is-nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

.page-header.is-nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.page-main-inner>section,
.page-main-inner>div,
.page-main-inner>.card {
  animation: fadeUp 0.4s ease both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.card,
.primary-button,
.nav-link,
.nav-cta {
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  border-color: rgba(14, 15, 17, 0.14);
  box-shadow: var(--shadow-soft);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 20px;
  overflow-y: auto;
}

.modal-overlay.is-open {
  display: flex;
}

body.modal-open .card:hover {
  transform: none;
  box-shadow: var(--shadow-soft);
}

body.modal-open .card {
  transition: none;
}

body.modal-open .page-main>*:not(.modal-overlay) {
  pointer-events: none;
}

body.modal-open .modal-overlay {
  pointer-events: auto;
}

.modal {
  width: 100%;
  max-width: 520px;
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
  padding: 18px 20px 22px;
  max-height: 85vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.modal__title {
  font-size: 18px;
  font-weight: 600;
}

.modal__close {
  border: none;
  background: transparent;
  font-size: 22px;
  line-height: 1;
}

.page-main {
  flex: 1;
}

.page-main-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 26px 20px 40px;
}

.page-footer {
  border-top: 1px solid var(--border-subtle);
  background-color: var(--bg-card);
  padding: 20px 20px;
  font-size: 13px;
  color: var(--text-muted);
}

.page-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.page-footer-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 14px;
}

.page-footer-nav a {
  color: var(--text-main);
  text-decoration: none;
  transition: color 0.15s ease;
}

.page-footer-nav a:hover {
  color: var(--accent-ink);
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 16px;
  border: none;
  background-color: var(--accent-color);
  color: var(--text-main);
  font-weight: 700;
  font-size: 15px;
  transition:
    border-color var(--motion-base, 220ms) var(--motion-ease, ease),
    box-shadow var(--motion-base, 220ms) var(--motion-ease, ease),
    background-color var(--motion-base, 220ms) var(--motion-ease, ease);
  box-shadow: 0 4px 14px rgba(200, 255, 42, 0.4), inset 0 1px 0 rgba(255,255,255,0.4);
}

.primary-button:hover {
  background-color: var(--accent-color-hover);
  box-shadow: 0 4px 14px rgba(200, 255, 42, 0.32), inset 0 0 0 1px rgba(77, 104, 0, 0.18);
}

.primary-button:active {
  box-shadow: 0 2px 8px rgba(200, 255, 42, 0.3);
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  background-color: var(--text-main);
  color: #f7f7f9;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  animation: pillPulse 2.5s infinite;
}

.pill[style*="var(--accent)"] {
  animation: pillPulseAccent 2.5s infinite;
  box-shadow: 0 4px 12px rgba(200, 255, 42, 0.4) !important;
}

@keyframes pillPulse {
  0% { box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.15); }
  70% { box-shadow: 0 0 0 8px rgba(0, 0, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 0, 0, 0); }
}

@keyframes pillPulseAccent {
  0% { box-shadow: 0 0 0 0 rgba(200, 255, 42, 0.6); }
  70% { box-shadow: 0 0 0 12px rgba(200, 255, 42, 0); }
  100% { box-shadow: 0 0 0 0 rgba(200, 255, 42, 0); }
}

.grid {
  display: grid;
  gap: 24px;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  background-color: var(--bg-card);
  border-radius: var(--radius-card);
  padding: 28px 28px 32px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
  position: relative;
  z-index: 1;
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.muted {
  color: var(--text-muted);
  font-size: 14px;
}

.product-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.product-card__image {
  background: #f1f1f4;
  border-radius: 20px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-card__image span {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.product-card__meta {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.product-card__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
}

.product-card__price {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
}


@media (hover: hover) and (pointer: fine) {
  .product-card:hover {
    border-color: rgba(14, 15, 17, 0.16);
    box-shadow: 0 3px 12px rgba(14, 15, 17, 0.06);
  }
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 768px) {
  .header-inner {
    padding: 8px 14px;
    gap: 10px;
    flex-wrap: wrap;
  }

  .logo-wrapper img {
    height: 44px;
  }

  /* На телефоне «Каталог» стоит в нижней навигации — вторая такая же кнопка в
     шапке только занимала место рядом с логотипом и корзиной. */
  .header-catalog-btn {
    display: none;
  }

  .header-search {
    order: 10;
    flex: 1 1 100%;
    height: 42px;
  }

  .header-search button {
    height: 32px;
    padding: 0 14px;
  }

  .header-actions {
    margin-left: auto;
  }

  .main-nav {
    position: absolute;
    top: calc(100% + 8px);
    left: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid var(--border-subtle);
    background: #ffffff;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
    z-index: 20;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  .page-header.is-nav-open .main-nav {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .nav-link,
  .nav-cta {
    text-align: center;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .page-main-inner {
    padding: 18px 14px 30px;
  }

  .page-footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .page-footer-nav {
    flex-wrap: wrap;
  }

  body::before {
    width: 55vw;
    max-width: 360px;
    opacity: 0.75;
  }
}

@media (max-width: 480px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }

  body::before {
    display: none;
  }

  .modal-overlay {
    align-items: center;
  }

  .modal {
    max-height: calc(100vh - 40px);
  }
}

.error-page-content {
  max-width: 420px;
  margin: 0 auto;
  text-align: center;
}

.error-page-content__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.error-page-content__mascot {
  width: 160px;
  height: auto;
  margin-bottom: 16px;
  display: block;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.12));
}

.error-page-content__code {
  font-size: 72px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 8px;
}

.error-page-content__title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-main);
}

.error-page-content__message {
  font-size: 15px;
  margin-bottom: 24px;
}

.error-page-content__link {
  margin-top: 0;
}


.product-card__price-old {
  font-weight: 500;
  font-size: 12px;
  color: var(--text-muted, #94a3b8);
  text-decoration: line-through;
  white-space: nowrap;
  margin-left: 4px;
}

.product-card__price-discount {
  display: inline-block;
  vertical-align: middle;
  padding: 1px 6px;
  border-radius: 10px;
  background: #fee2e2;
  color: #ef4444;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
  margin-left: 4px;
  white-space: nowrap;
}

/* Кнопка, которую повторяет главная кнопка Telegram, на странице не нужна.
   Класс на <html> ставит assets/js/tg-native.js и только после того, как
   Telegram действительно показал свою кнопку: если он откажет, экран останется
   с рабочей кнопкой, а не без единой. */
html.tg-has-main-button [data-tg-main-button] {
  display: none;
}

/* iOS увеличивает всю страницу, когда фокус попадает в поле со шрифтом мельче
   16px, и обратно масштаб не возвращает — экран так и остаётся уехавшим, а в
   мини-аппе это выглядит как поломка. Отменить это поведение можно только
   размером шрифта: 16px и больше зум не вызывают.

   Правило действует на устройствах с пальцем, поэтому на компьютере плотность
   вёрстки не меняется. !important здесь по делу: поля оформлены классами, у
   которых вес выше, чем у голого селектора элемента, а перечислять их поимённо
   значит завести список, который разойдётся с разметкой при первой же новой
   форме. Полей крупнее 16px в проекте нет, так что правило только поднимает
   мелкие до порога и ничего не уменьшает. */
@media (pointer: coarse) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="submit"]):not([type="button"]),
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* --------------------------------------------------- шапка между 769 и 1023
 * Мобильная шапка включается с 768 и ниже, а десктопной для полного набора —
 * логотип, кнопка каталога, поиск, четыре ссылки с подписями и корзина —
 * нужно 989 пикселей. В промежутке весь документ ехал вбок: на планшете в
 * альбомной ориентации корзина и часть меню оказывались за правым краем.
 * Подписи в этом диапазоне убираем со страницы, но не из разметки: значки
 * остаются, названия по-прежнему читает скринридер.
 */
@media (min-width: 769px) and (max-width: 1023px) {
  .header-inner {
    gap: 12px;
  }

  .main-nav {
    gap: 4px;
  }

  .main-nav .nav-link {
    padding: 8px 10px;
  }

  .main-nav .nav-link .bi {
    font-size: 18px;
  }

  .main-nav .nav-link > span {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }
}

/* ------------------------------------------------------------------ */
/* Плашка баланса NICS COIN. Живёт в шапке и потому видна с любой       */
/* страницы витрины: раньше баланс можно было увидеть только зайдя в    */
/* профиль на вкладку COIN, то есть человек не помнил, что ему есть чем */
/* платить, ровно в тот момент, когда это решало.                       */
/* Разметку собирает Views/layouts/main.php ($renderCoinChip).          */
/* ------------------------------------------------------------------ */
.coin-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: var(--accent-color, #c8ff2a);
  color: var(--accent-ink, #4d6800);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.coin-chip:hover {
  background: var(--accent-color-hover, #bce628);
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.coin-chip i {
  font-size: 18px;
  line-height: 1;
}

.coin-chip__amount {
  font-variant-numeric: tabular-nums;
}

/* Минус на счёте — штатное состояние: так гасится кэшбэк за возвращённый
   заказ. Он не ошибка, но и не повод звать тратить, поэтому цвет уходит
   с призывного салатового на спокойный серый. */
.coin-chip--debt {
  background: var(--bg-subtle, #ebedf0);
  color: var(--text-muted, #666666);
}

.coin-chip--debt:hover {
  background: #e2e5e9;
}

@media (max-width: 900px) {
  .coin-chip {
    height: 44px;
    padding: 0 12px;
    font-size: 13px;
  }

  .coin-chip i {
    font-size: 16px;
  }
}

/* ------------------------------------------------------------------ */
/* Плашка города клиента. Отвечает на вопрос «откуда мне поедет заказ»  */
/* и стоит рядом с балансом: оба ответа нужны на любой странице, а не   */
/* в оформлении, где менять решение уже поздно.                         */
/* Разметку собирает Views/layouts/main.php ($renderCityChip).          */
/* ------------------------------------------------------------------ */
.city-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: #ffffff;
  color: var(--text-main, #0a0a0a);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

a.city-chip:hover {
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.city-chip i {
  font-size: 17px;
  line-height: 1;
  color: var(--text-muted, #666666);
}

/* Пока открыт один регион, плашка не ссылка, но и не немая: это кнопка,
   которая на нажатие объясняет, почему выбора нет. Курсор обычный —
   обещать выпадающий список всё ещё нечем. Сброс шрифта нужен потому,
   что <button> не наследует его сам. */
.city-chip--fixed {
  cursor: default;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  -webkit-appearance: none;
  appearance: none;
}

@media (max-width: 900px) {
  .city-chip {
    height: 44px;
    padding: 0 12px;
    font-size: 13px;
  }

  .city-chip i {
    font-size: 15px;
  }
}

/* Регион без партнёрского склада в самодельном списке каталога: виден,
   но недоступен — ровно как disabled в системном <select>. */
.catalog-sort__option.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.catalog-sort__option.is-disabled:hover {
  background: transparent;
}

/* ================================================================== */
/* Шапка: пересборка.                                                  */
/*                                                                     */
/* В одну строку конкурировали восемь блоков: логотип, «Каталог»,       */
/* поиск, четыре ссылки навигации, город, баланс, корзина и бургер.    */
/* Свободного места на всех не хватало, и flex ужимал всё подряд —     */
/* город наезжал на баланс, корзина уползала под кнопки окна Telegram. */
/*                                                                     */
/* Порядок важности сверху вниз:                                       */
/*   1) корзина и баланс — их нельзя ужимать и нельзя терять никогда;   */
/*   2) поиск — главный способ найти товар;                            */
/*   3) логотип и «Каталог»;                                           */
/*   4) ссылки навигации — они продублированы в нижнем меню, поэтому    */
/*      сдаются первыми: сначала теряют подписи, потом исчезают;        */
/*   5) город — справочная подпись, уходит следом.                     */
/* ================================================================== */
.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 14px;
  row-gap: 10px;
}

/* Действия справа не ужимаются ни при каких обстоятельствах. */
.header-actions {
  flex: 0 0 auto;
  margin-left: auto;
  gap: 8px;
}

.header-catalog-btn,
.logo-wrapper {
  flex: 0 0 auto;
}

/* Поиск забирает всё оставшееся место в строке. */
.header-search {
  flex: 1 1 320px;
  min-width: 200px;
}

.main-nav {
  flex: 0 1 auto;
  min-width: 0;
}

/* Город — справочная подпись, а не действие: он не должен спорить за
   место с балансом. Длинные названия обрезаются, а не растягивают полосу. */
.city-chip {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 160px;
}

.city-chip__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --- 1400 и уже: ссылки навигации теряют подписи ------------------- */
@media (max-width: 1400px) {
  .main-nav .nav-link span {
    display: none;
  }

  .main-nav .nav-link {
    padding-left: 10px;
    padding-right: 10px;
  }
}

/* --- 1180 и уже: поиск уезжает на собственную строку --------------- */
@media (max-width: 1180px) {
  .header-search {
    order: 10;
    flex: 1 1 100%;
    min-width: 0;
  }

  /* Полоса теперь двухэтажная, и вертикальные отступы нужно вернуть:
     иначе вторая строка липнет к первой. */
  .header-inner {
    padding-top: 8px;
    padding-bottom: 10px;
  }
}

/* --- 900 и уже: ссылки уходят совсем ------------------------------- */
@media (max-width: 900px) {
  .main-nav {
    display: none;
  }

  .city-chip {
    max-width: 128px;
  }
}

/* --- телефон: город прячется, остаются баланс и корзина ------------ */
@media (max-width: 620px) {
  .header-inner .city-chip {
    display: none;
  }
}

/* ------------------------------------------------------------------ */
