/* ============================================================
   ORTA — веб-магазин: стили области B1 — витрина: главная, каталог,
   лента, карточка товара, производители, избранное, город.

   Подключается шаблонами области (templates/shop/catalog/_layout.html).
   Токены и общие компоненты (.btn, .field, .card, .pill, .stepper,
   .empty, .chip, .grid-products, .tag) — в base.css; здесь только своё.
   Цвет — только var(--…), без литералов: обе темы берутся из токенов.
   Даже маска растворения фото — var(--ink): маске важна только
   непрозрачность, а цвета-литерала здесь быть не должно.

   Размеры — в rem там, где растёт текст (крупный шрифт браузера), и
   min-height вместо height: при шрифте 200 % карточки растут, а не
   режут подписи. Ряды, которые на телефоне листаются вбок, с 1024
   становятся сеткой без прокрутки.
   ============================================================ */

/* ---------- Общее: колонка страницы, заголовки секций ---------- */

/* Колонка страниц области — minmax(0, 1fr), а не auto: в ней живут
   ряды, которые листаются вбок (полосы, круги категорий, чипы), и
   колонка с минимумом «по содержимому» растягивалась бы на всю их
   ширину — страница уезжала бы вправо на телефоне. */
.home,
.catalog-page,
.feed-page,
.product-page,
.producers-page,
.store-page,
.favorites-page,
.city-page {
  grid-template-columns: minmax(0, 1fr);
  /* Длинное слово при шрифте 200 % («поддерживать», «сотрудника»)
     шире узкой плитки: переносим его, а не выталкиваем страницу
     вбок. `anywhere`, а не `break-word`: только он уменьшает
     минимальную ширину ячейки сетки. Сначала — переносы по слогам. */
  overflow-wrap: anywhere;
  hyphens: auto;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 4px 16px;
  margin-bottom: 12px;
}
.section-head__text { min-width: 0; }
.section-head__sub { margin-top: 2px; color: var(--ink-3); font-size: .875rem; }
.section-head__more { flex: none; }
.section-head__more .icon,
.btn-link .icon { width: 18px; height: 18px; }

/* Шапка вкладки (BrandTabHeader): крупный заголовок и орнамент,
   уходящий за правый край. */
.tab-head {
  position: relative;
  overflow: hidden;
  padding: 8px 0 4px;
}
.tab-head__ornament {
  position: absolute;
  top: -40px;
  right: -60px;
  width: 220px;
  height: 220px;
  color: var(--ornament-page);
  pointer-events: none;
}
.tab-head > :not(.tab-head__ornament) { position: relative; }

/* Круг на белом в обеих темах — логотип магазина (StoreLogo); без
   логотипа — инициалы хвоей. Белый — токен «текст на хвое»: он белый
   и днём, и ночью, ровно как подложка логотипа в приложении. */
.logo-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 56px;
  height: 56px;
  overflow: hidden;
  border: 3px solid var(--surface);
  border-radius: 50%;
  background: var(--on-pine);
  box-shadow: var(--card-shadow);
}
.logo-circle img { width: 100%; height: 100%; object-fit: cover; }
.logo-circle__initials {
  color: var(--pine);
  font-family: var(--font-head);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1;
}

/* ---------- Главная ---------- */

.home { display: grid; gap: 28px; }

.home-hero { display: grid; gap: 6px; padding-top: 8px; text-align: center; }
.home-hero__slogan {
  color: var(--slogan);
  font-size: 1.875rem;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.15;
}
.home-hero__lead { color: var(--ink-2); }

/* Цифры площадки — три бежевые плашки, только живые числа. */
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  max-width: 640px;
  margin: 12px auto 0;
}
.stats__tile {
  display: grid;
  align-content: center;
  gap: 2px;
  min-height: 64px;
  padding: 10px 6px;
  border-radius: var(--r-chip);
  background: var(--stat-tile);
}
.stats__value {
  color: var(--ink);
  font-family: var(--font-head);
  font-size: 1.125rem;
  font-weight: 700;
}
.stats__label { color: var(--ink-3); font-size: .78125rem; line-height: 1.35; }

@media (min-width: 1024px) {
  .home-hero__slogan { font-size: 2.5rem; }
  .home-hero__lead { font-size: 1.125rem; }
}

/* Промо-карточки (PromoBanner): хвоя, золотая пилюля, орнамент. На
   телефоне — лентой вбок, как карусель приложения (три баннера друг
   под другом занимали бы весь первый экран), с 768 — в ряд. Раскрытый
   «Как это работает» растит только свою карточку (align-items: start). */
.promos {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 86%;
  align-items: start;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
  scroll-snap-type: x mandatory;
}
.promos > .promo { scroll-snap-align: start; }
@media (min-width: 768px) {
  .promos {
    grid-auto-flow: row;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    overflow: visible;
  }
}
.promo {
  position: relative;
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 180px;
  overflow: hidden;
  padding: 20px;
  border-radius: var(--r-banner);
  background: linear-gradient(135deg, var(--banner-from), var(--banner-to));
  color: var(--on-pine-muted);
}
.promo > * { position: relative; }
.promo__ornament {
  position: absolute;
  top: -40px;
  right: -50px;
  width: 210px;
  height: 210px;
  color: var(--gold);
  opacity: var(--banner-ornament);
  pointer-events: none;
}
.promo__mark {
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 64px;
  height: 64px;
  color: var(--gold);
  pointer-events: none;
}
.promo__mark--glyph { opacity: .9; }
.promo__overline {
  color: var(--slogan-on-pine);
  font-size: .71875rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.promo__title {
  max-width: 15em;
  padding-right: 64px;
  color: var(--on-pine);
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.2;
}
.promo__cta { justify-self: start; min-height: var(--tap); padding: 0 18px; }
.promo__cta .icon { width: 18px; height: 18px; }
.promo a:focus-visible,
.promo summary:focus-visible { outline-color: var(--gold); }

/* «Как это работает» — раскрывающийся блок вместо шторки. */
.promo__how > summary { list-style: none; cursor: pointer; }
.promo__how > summary::-webkit-details-marker { display: none; }
.promo__chevron { transition: transform .2s ease; }
.promo__how[open] .promo__chevron { transform: rotate(180deg); }
.how { display: grid; gap: 12px; margin-top: 14px; padding-right: 0; }
.how__step { display: flex; align-items: flex-start; gap: 12px; }
.how__spot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--banner-plate);
  color: var(--gold);
}
.how__spot .icon { width: 20px; height: 20px; }
.how__text { display: grid; gap: 2px; font-size: .875rem; line-height: 1.45; }
.how__title { color: var(--on-pine); font-family: var(--font-head); font-size: .9375rem; font-weight: 600; }

/* Круги корневых категорий (CategoryCircle): тон по кругу, значок в
   акценте, подпись до двух строк. Телефон — ряд вбок, дальше — сетка. */
.cat-circles {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 5.25rem;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scroll-snap-type: x proximity;
}
@media (min-width: 768px) {
  .cat-circles {
    grid-auto-flow: row;
    grid-template-columns: repeat(auto-fill, minmax(6rem, 1fr));
    overflow: visible;
  }
}
.cat-circle {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 4px 2px;
  border-radius: var(--r-chip);
  color: var(--ink);
  text-align: center;
  text-decoration: none;
  scroll-snap-align: start;
}
@media (hover: hover) {
  .cat-circle:hover .cat-circle__label { color: var(--accent); }
}
.cat-circle__spot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--tint-1);
  color: var(--accent);
}
.cat-circle__spot .icon { width: 28px; height: 28px; }
.cat-circles > li:nth-child(5n + 2) .cat-circle__spot { background: var(--tint-2); }
.cat-circles > li:nth-child(5n + 3) .cat-circle__spot { background: var(--tint-3); }
.cat-circles > li:nth-child(5n + 4) .cat-circle__spot { background: var(--tint-4); }
.cat-circles > li:nth-child(5n + 5) .cat-circle__spot { background: var(--tint-5); }
.cat-circle__label {
  display: -webkit-box;
  overflow: hidden;
  font-size: .75rem;
  font-weight: 500;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.home__all { display: flex; justify-content: center; }
.home__all .icon { width: 20px; height: 20px; }

/* ---------- Полосы: лента вбок → сетка без прокрутки ---------- */

.rail__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(min(9.75rem, 100%), 46%);
  gap: 10px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  margin: -2px -2px 0;
  scroll-snap-type: x proximity;
}
.rail__item { display: flex; min-width: 0; scroll-snap-align: start; }
.rail__item > * { flex: 1; }
@media (min-width: 768px) {
  .rail__track { grid-auto-columns: minmax(min(11.25rem, 100%), 30%); gap: 12px; }
}
@media (min-width: 1024px) {
  .rail__track {
    grid-auto-flow: row;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    overflow: visible;
  }
  .rail__track > .rail__item:nth-child(n + 9) { display: none; }
}
@media (min-width: 1200px) {
  .rail__track { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .rail__track > .rail__item:nth-child(n + 9) { display: flex; }
  .rail__track > .rail__item:nth-child(n + 11) { display: none; }
}
.rail--stores .rail__track { grid-auto-columns: minmax(min(10.5rem, 100%), 52%); }
@media (min-width: 768px) {
  .rail--stores .rail__track { grid-auto-columns: minmax(min(12.5rem, 100%), 32%); }
}
/* Производители на компьютере — один ряд: два ряда крупных плиток
   отодвигали категории и товары на второй экран. Остальные — по
   «Смотреть все». */
@media (min-width: 1024px) {
  .rail--stores .rail__track { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .rail--stores .rail__track > .rail__item:nth-child(n + 5) { display: none; }
}
@media (min-width: 1200px) {
  .rail--stores .rail__track { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .rail--stores .rail__track > .rail__item:nth-child(n + 5) { display: flex; }
  .rail--stores .rail__track > .rail__item:nth-child(n + 6) { display: none; }
}

/* ---------- Карточка товара (ProductCard) ---------- */

.pcard {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--card-bg);
  box-shadow: var(--card-shadow);
}
.pcard__media {
  position: relative;
  aspect-ratio: 1;
  background: var(--surface-high);
}
.pcard__img { width: 100%; height: 100%; object-fit: cover; }
.pcard__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
.pcard__ornament { width: 44%; height: 44%; color: var(--line); }
.pcard__discount { position: absolute; top: 8px; left: 8px; }
/* «Нет в наличии» — пелена цвета карточки и плашка со словом. */
.pcard__veil {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  background: color-mix(in srgb, var(--surface) 74%, transparent);
}
.pcard__body {
  display: grid;
  align-content: start;
  gap: 4px;
  flex: 1;
  padding: 12px 10px 12px 12px;
}
.pcard__name {
  display: -webkit-box;
  overflow: hidden;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
/* Вся карточка — ссылка названия, растянутая на карточку: один фокус
   и одно название для диктора. Сердечко — выше неё. */
.pcard__link { color: inherit; text-decoration: none; }
.pcard__link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: var(--r-card);
}
.pcard__link:focus-visible { outline: none; }
.pcard__link:focus-visible::after { outline: 2px solid var(--accent); outline-offset: -2px; }
@media (hover: hover) {
  .pcard:hover .pcard__name { color: var(--accent); }
}
.pcard__store {
  overflow: hidden;
  color: var(--ink-3);
  font-size: .78125rem;
  line-height: 1.35;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.pcard__prices {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
  margin-top: 2px;
}
.pcard__price { font-size: 1rem; }
.pcard__old { font-size: .8125rem; }
.pcard__rating {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--ink);
  font-size: .8125rem;
  font-weight: 600;
}
.pcard__star { width: 14px; height: 14px; color: var(--star); }
.pcard__notes { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.pcard__heart { position: absolute; top: 4px; right: 4px; z-index: 2; }

/* ---------- Сердечко ---------- */

.heart { margin: 0; }
.heart__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--tap);
  height: var(--tap);
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  color: var(--ink);
  box-shadow: var(--card-shadow);
}
.heart__btn .icon { width: 22px; height: 22px; }
@media (hover: hover) {
  .heart__btn:hover { color: var(--danger); }
}
.heart__on { color: var(--danger); }
.heart__btn[aria-pressed="true"] .heart__off,
.heart__btn[aria-pressed="false"] .heart__on { display: none; }
.heart.is-busy .heart__btn { opacity: .6; cursor: progress; }

/* ---------- Плитка производителя (ProducerTile) ---------- */

.scard {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--card-bg);
  box-shadow: var(--card-shadow);
}
.scard__media {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: calc(var(--r-card) - 1px) calc(var(--r-card) - 1px) 0 0;
  background: linear-gradient(135deg, var(--banner-from), var(--banner-to));
}
.scard__cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
.scard__ornament {
  position: absolute;
  top: 12%;
  right: 8%;
  width: 52%;
  height: 76%;
  color: var(--gold);
  opacity: var(--banner-ornament);
}
.scard__logo { position: absolute; left: 12px; bottom: -28px; }
.scard__body { display: grid; align-content: start; gap: 4px; flex: 1; padding: 36px 12px 12px; }
.scard__name { font-size: .9375rem; font-weight: 600; line-height: 1.3; }
.scard__link { color: var(--ink); text-decoration: none; }
.scard__link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: var(--r-card); }
.scard__link:focus-visible { outline: none; }
.scard__link:focus-visible::after { outline: 2px solid var(--accent); outline-offset: -2px; }
@media (hover: hover) {
  .scard:hover .scard__link { color: var(--accent); }
}
.scard__tagline {
  display: -webkit-box;
  overflow: hidden;
  color: var(--ink-2);
  font-size: .8125rem;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.scard__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 10px;
  color: var(--ink-3);
  font-size: .78125rem;
}
.scard__city,
.scard__rating { display: inline-flex; align-items: center; gap: 3px; }
.scard__city .icon { width: 14px; height: 14px; }
.scard__rating { color: var(--ink); font-weight: 600; }
.scard__star { width: 14px; height: 14px; color: var(--star); }

.grid-stores {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 13.75rem), 1fr));
  gap: 16px;
}
@media (max-width: 767px) {
  .grid-stores { grid-template-columns: repeat(auto-fill, minmax(min(100%, 9.5rem), 1fr)); gap: 10px; }
  /* Сетка товаров на страницах витрины: колонка — в rem, а не в px
     (base.css), чтобы при шрифте 200 % на телефоне осталась одна
     широкая карточка, а не две с названием из двух слов и многоточия. */
  .feed-page .grid-products,
  .store-page .grid-products,
  .favorites-page .grid-products {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 9.5rem), 1fr));
  }
}

/* ---------- Каталог: карточки корневых категорий ---------- */

.cat-cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}
@media (min-width: 560px) {
  .cat-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .cat-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
}
.cat-cards__item { display: flex; }
.cat-cards__item--wide { grid-column: 1 / -1; }
.cat-card {
  position: relative;
  display: flex;
  flex: 1;
  min-height: 150px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--card-bg);
  box-shadow: var(--card-shadow);
  color: var(--ink);
  text-decoration: none;
}
.cat-card__text {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: start;
  gap: 6px;
  flex: 1 1 52%;
  min-width: 0;
  padding: 16px 12px 56px 16px;
}
.cat-card__name { font-family: var(--font-head); font-size: 1.0625rem; font-weight: 600; line-height: 1.25; }
.cat-card__caption {
  display: -webkit-box;
  overflow: hidden;
  color: var(--ink-3);
  font-size: .8125rem;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.cat-card__media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 48%;
}
/* Фото растворяется в карточку слева — маска по непрозрачности. */
.cat-card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-mask-image: linear-gradient(to right, transparent, var(--ink) 45%);
  mask-image: linear-gradient(to right, transparent, var(--ink) 45%);
}
.cat-card__spot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--sand);
  color: var(--accent);
}
.cat-card__spot .icon { width: 32px; height: 32px; }
.cat-card__arrow {
  position: absolute;
  left: 16px;
  bottom: 14px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--sand);
  color: var(--ink);
}
.cat-card__arrow .icon { width: 18px; height: 18px; }
@media (hover: hover) {
  .cat-card:hover .cat-card__name { color: var(--accent); }
}

.cat-card--pine {
  min-height: 168px;
  border: 0;
  border-radius: var(--r-banner);
  background: linear-gradient(135deg, var(--banner-from), var(--banner-to));
  color: var(--on-pine);
}
.cat-card--pine .cat-card__media { flex-basis: 56%; }
.cat-card--pine .cat-card__name { font-size: 1.375rem; }
.cat-card--pine .cat-card__caption { color: var(--on-pine-muted); }
.cat-card--pine .cat-card__spot { background: var(--banner-plate); color: var(--gold); }
.cat-card--pine .cat-card__arrow { background: var(--gold); color: var(--on-gold); }
@media (hover: hover) {
  .cat-card--pine:hover .cat-card__name { color: var(--on-pine); text-decoration: underline; text-underline-offset: 4px; }
}
.cat-card--pine:focus-visible { outline-color: var(--gold); }

/* ---------- Лента ---------- */

.feed-page { gap: 16px; }
.feed-head { display: grid; gap: 6px; }
.feed-head__lead { max-width: 60em; }
.feed-city {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  color: var(--ink-2);
  font-size: .875rem;
}
.feed-city .icon { width: 18px; height: 18px; color: var(--accent); }

.feed-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 50px;
  padding: 3px 3px 3px 12px;
  border: 1px solid var(--outline);
  border-radius: var(--r-chip);
  background: var(--surface-alt);
}
.feed-search:focus-within { border-color: var(--accent); }
/* Фокус в самом поле — кольцо 2 px вокруг плашки, как у поиска шапки
   (.searchbar, base.css): outline поля выключен ниже, а полпикселя тени
   на телефоне не видно. У кнопки «Найти» кольцо своё. */
.feed-search:has(.feed-search__input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.feed-search__icon { width: 20px; height: 20px; color: var(--ink-3); }
.feed-search__input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: var(--tap);
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 1rem;
}
.feed-search__input::placeholder { color: var(--ink-3); opacity: 1; }
.feed-search__input:focus { outline: none; }
.feed-search__submit { flex: none; }

/* Ряды чипов на телефоне листаются вбок, а не растут в высоту. */
.feed-chips,
.sortbar {
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 2px;
  margin: -2px;
  scrollbar-width: thin;
}
.feed-chips .chip,
.sortbar .chip { flex: none; }
@media (min-width: 1024px) {
  .feed-chips { flex-wrap: wrap; overflow: visible; }
}

.feed-layout { display: grid; gap: 16px; align-items: start; }
.feed-layout__main { display: grid; gap: 16px; min-width: 0; }
@media (min-width: 1024px) {
  .feed-layout { grid-template-columns: 240px minmax(0, 1fr); gap: 24px; }
  .feed-layout__side { position: sticky; top: calc(var(--header-h) + 64px); }
}
@media (min-width: 1280px) {
  .feed-layout { grid-template-columns: 264px minmax(0, 1fr); }
}

/* Фильтры: ниже 1024 — раскрывающийся блок под кнопкой «Фильтры · N»,
   с 1024 — боковая панель (catalog.js раскрывает блок; без скрипта
   панель открывается той же кнопкой, а раскрытая кнопку прячет). */
.filters > summary { list-style: none; cursor: pointer; }
.filters > summary::-webkit-details-marker { display: none; }
.filters__summary .icon { width: 18px; height: 18px; }
.filters[open] > .filters__summary {
  border-color: var(--accent-fill);
  background: var(--accent-fill);
  color: var(--on-accent);
}
.filters__form {
  gap: 14px;
  margin-top: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--card-bg);
  box-shadow: var(--card-shadow);
}
.filters__title { display: none; font-size: 1.0625rem; font-weight: 600; }
.filters__price,
.filters__group { display: grid; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.filters__range { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.filters__actions { display: grid; gap: 8px; }
@media (min-width: 1024px) {
  .filters[open] > .filters__summary { display: none; }
  .filters__form { margin-top: 0; }
  .filters__title { display: block; }
}

.feed-more {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 8px;
}
.feed-more__link { min-width: 220px; }
.feed-more.is-loading .feed-more__link { opacity: .6; pointer-events: none; }
/* Подпись под кнопкой, когда не догрузилось (catalog.js): пустая — без
   места, ссылка над ней остаётся повтором. */
.feed-more__error { margin-top: 8px; color: var(--danger); font-size: .875rem; font-weight: 500; text-align: center; }
.feed-more__error:empty { margin-top: 0; }

/* ---------- Карточка товара ---------- */

.product-page { gap: 24px; }
.pd { display: grid; gap: 20px; align-items: start; }
@media (min-width: 1024px) {
  .pd { grid-template-columns: minmax(0, 55fr) minmax(0, 45fr); gap: 32px; }
  .pd__gallery { position: sticky; top: calc(var(--header-h) + 64px); }
}

.gallery { display: grid; gap: 10px; min-width: 0; }
.gallery__stage {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--r-banner);
  background: var(--surface-high);
}
.gallery__main { width: 100%; height: 100%; object-fit: cover; }
.gallery__placeholder { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.gallery__ornament { width: 40%; height: 40%; color: var(--line); }
.gallery__discount { position: absolute; top: 12px; left: 12px; font-size: .8125rem; }
.gallery__logo { position: absolute; left: 12px; bottom: 12px; }
.gallery__heart { position: absolute; top: 8px; right: 8px; }
.gallery__thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px;
}
.gallery__thumb {
  display: block;
  flex: none;
  width: 72px;
  height: 72px;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 12px;
  background: var(--surface-high);
}
.gallery__thumb[aria-current="true"] { border-color: var(--accent); }
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 1024px) {
  .gallery__thumb { width: 96px; height: 96px; }
}

.pd__info { display: grid; gap: 12px; min-width: 0; }
.pd__title { font-size: 1.5rem; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; }
.pd__store { color: var(--ink-3); font-size: .9375rem; }
.pd__rating { display: inline-flex; align-items: center; gap: 4px; color: var(--ink); font-weight: 600; }
.pd__star { width: 18px; height: 18px; color: var(--star); }
.pd__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.pd__price-now { font-size: 1.875rem; letter-spacing: -.01em; }
.pd__stock { gap: 6px 12px; }
.pd__in-cart { color: var(--ink-2); font-size: .8125rem; font-weight: 600; }
.pd__tags { display: flex; flex-wrap: wrap; gap: 8px; }
@media (min-width: 1024px) {
  .pd__title { font-size: 1.75rem; }
}

/* «Поддержать производителя»: степпер и кнопка в строку, не прилипая к
   низу. На телефоне тоже: липкая форма внутри колонки описания
   поднималась к её верху и закрывала название и цену, а прибитая к низу
   спорила бы с таббаром, который растёт вместе с крупным шрифтом. Форма
   и так стоит сразу под ценой. */
.pd__buy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.pd__cta { flex: 1 1 14rem; }

/* Факты доверия (FeatureTile) — только правда для любого товара. */
.trust {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.5rem), 1fr));
  gap: 8px;
}
.trust__item {
  display: grid;
  justify-items: start;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-chip);
  background: var(--card-bg);
  color: var(--ink);
  font-size: .8125rem;
  font-weight: 500;
  line-height: 1.35;
}
.trust__item .icon { color: var(--accent); }

.support {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: var(--r-card);
  background: var(--stat-tile);
}
.support__icon { width: 30px; height: 30px; color: var(--accent); }

.pd-section { display: grid; gap: 10px; }
.pd-section__text { max-width: 70ch; color: var(--ink-2); }
.pd-section__text p + p { margin-top: .75em; }

.specs { display: grid; margin: 0; }
.specs__row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.specs dt { color: var(--ink-3); }
.specs dd { margin: 0; color: var(--ink); font-weight: 500; }

/* «О производителе» — хвойная карточка (ProducerCard). */
.producer-card {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  overflow: hidden;
  padding: 20px;
  border-radius: var(--r-banner);
  background: linear-gradient(135deg, var(--banner-from), var(--banner-to));
  color: var(--on-pine-muted);
  text-decoration: none;
}
.producer-card > * { position: relative; }
.producer-card__ornament {
  position: absolute;
  top: -30px;
  right: -40px;
  width: 180px;
  height: 180px;
  color: var(--gold);
  opacity: var(--banner-ornament);
}
.producer-card__logo { width: 72px; height: 72px; border-color: var(--pine-soft); }
/* Текст уходит под логотип, когда ему рядом меньше 12rem (крупный
   шрифт на телефоне), а не сжимается до слова в строку. */
.producer-card__text { display: grid; gap: 4px; flex: 1 1 12rem; min-width: 0; }
.producer-card__overline {
  color: var(--slogan-on-pine);
  font-size: .71875rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.producer-card__name { color: var(--on-pine); font-family: var(--font-head); font-size: 1.125rem; font-weight: 600; }
.producer-card__tagline { color: var(--on-pine); font-size: .875rem; }
.producer-card__story { font-size: .875rem; line-height: 1.45; }
.producer-card__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--on-gold);
}
.producer-card__arrow .icon { width: 20px; height: 20px; }
.producer-card:focus-visible { outline-color: var(--gold); }
@media (hover: hover) {
  .producer-card:hover .producer-card__name { text-decoration: underline; text-underline-offset: 4px; }
}

/* ---------- Страница производителя ---------- */

.store-page { gap: 20px; }
.brand-hero { display: grid; gap: 6px; }
.brand-hero__cover {
  position: relative;
  height: 220px;
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--banner-from), var(--banner-to));
}
.brand-hero__img { width: 100%; height: 100%; object-fit: cover; }
.brand-hero__ornament {
  position: absolute;
  top: -30px;
  right: -40px;
  width: 280px;
  height: 280px;
  color: var(--gold);
  opacity: var(--banner-ornament);
}
.brand-hero__badges {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px 12px;
  margin: -44px 0 6px 16px;
  position: relative;
}
.brand-hero__logo { width: 88px; height: 88px; border-width: 4px; }
.brand-hero__logo .logo-circle__initials { font-size: 1.5rem; }
.brand-hero__verified { margin-bottom: 6px; }
.brand-hero__name { font-size: 1.625rem; font-weight: 700; line-height: 1.2; }
.brand-hero__tagline { color: var(--ink); font-size: 1rem; }
.brand-hero__city { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-3); font-size: .8125rem; }
.brand-hero__city .icon { width: 16px; height: 16px; }
.brand-hero__facts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  margin-top: 6px;
  color: var(--ink);
  font-size: .875rem;
}
.brand-hero__rating { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.brand-hero__star { width: 18px; height: 18px; color: var(--star); }
.brand-hero__cta { margin-top: 10px; min-height: 48px; }
.brand-hero__cta .icon { width: 18px; height: 18px; }
@media (min-width: 1024px) {
  .brand-hero__cover { height: 300px; }
  .brand-hero__name { font-size: 2rem; }
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
  gap: 8px;
}
.facts__tile {
  display: grid;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-chip);
  background: var(--card-bg);
}
.facts__title { color: var(--ink-3); font-size: .78125rem; }
.facts__value { color: var(--ink); font-family: var(--font-head); font-size: .9375rem; font-weight: 600; }

.about-brand { display: grid; gap: 8px; border-radius: var(--r-banner); }
.about-brand__title { font-size: 1.5rem; font-weight: 600; line-height: 1.15; }
.about-brand__text { max-width: 70ch; color: var(--ink-2); line-height: 1.5; }
.about-brand__text p + p { margin-top: .75em; }

/* «Миссия ORTA» — хвойный баннер (PromoBanner без кнопки). */
.mission {
  position: relative;
  display: grid;
  gap: 8px;
  min-height: 150px;
  align-content: center;
  overflow: hidden;
  padding: 20px;
  border-radius: var(--r-banner);
  background: linear-gradient(135deg, var(--banner-from), var(--banner-to));
}
.mission > * { position: relative; }
.mission__ornament {
  position: absolute;
  top: -40px;
  right: -40px;
  width: 210px;
  height: 210px;
  color: var(--gold);
  opacity: var(--banner-ornament);
}
.mission__overline {
  color: var(--slogan-on-pine);
  font-size: .71875rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.mission__title {
  max-width: 16em;
  color: var(--on-pine);
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.2;
}

.values { display: grid; gap: 14px; border-radius: var(--r-banner); }
.values__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 8px;
}
@media (min-width: 640px) {
  .values__list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.values__item {
  display: grid;
  justify-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: .8125rem;
  line-height: 1.3;
  text-align: center;
}
.values__spot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--sand);
  color: var(--accent);
}

.store-products { display: grid; gap: 12px; scroll-margin-top: calc(var(--header-h) + 64px); }

/* ---------- «Для своих» ---------- */

.producers-page { gap: 18px; }
.together {
  position: relative;
  display: grid;
  gap: 6px;
  overflow: hidden;
  padding: 20px;
  border-radius: var(--r-banner);
  background: var(--stat-tile);
}
.together > * { position: relative; }
.together__ornament {
  position: absolute;
  top: -30px;
  right: -30px;
  width: 160px;
  height: 160px;
  color: var(--ornament-page);
}
.together__title { max-width: 18em; font-size: 1.25rem; font-weight: 600; }
.together__text { max-width: 36em; color: var(--ink-2); }

/* ---------- Избранное ---------- */

.favorites-page { gap: 18px; }
.guest-banner {
  position: relative;
  display: grid;
  gap: 8px;
  overflow: hidden;
  padding: 20px;
  border-radius: var(--r-banner);
  background: linear-gradient(135deg, var(--banner-from), var(--banner-to));
  color: var(--on-pine-muted);
}
.guest-banner > * { position: relative; }
.guest-banner__ornament {
  position: absolute;
  top: -40px;
  right: -40px;
  width: 200px;
  height: 200px;
  color: var(--gold);
  opacity: var(--banner-ornament);
}
.guest-banner__title { color: var(--on-pine); font-family: var(--font-head); font-size: 1.375rem; font-weight: 600; }
.guest-banner__text { max-width: 36em; }
.guest-banner__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.guest-banner .btn { min-height: var(--tap); }
.guest-banner__secondary { border-color: var(--on-pine-line); color: var(--on-pine); }
@media (hover: hover) {
  .guest-banner__secondary:hover { background: var(--banner-plate); }
}
.guest-banner a:focus-visible { outline-color: var(--gold); }

.price-drop {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px 10px 12px;
  border-radius: var(--r-card);
  background: var(--accent-soft);
  color: var(--on-accent-soft);
  font-weight: 600;
}
.price-drop__icon { width: 22px; height: 22px; }

/* ---------- Город ---------- */

.city-page { max-width: 640px; }
.city-list { overflow: hidden; padding: 0; }
.city-list__items { display: grid; }
.city-list__items > li + li { border-top: 1px solid var(--line); }
.city-list__option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 10px 16px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 1rem;
  text-align: left;
}
@media (hover: hover) {
  .city-list__option:hover { background: var(--surface-alt); }
}
.city-list__option[aria-current="true"] { color: var(--accent); font-weight: 600; }
.city-list__check { width: 22px; height: 22px; }

/* Печать карточки товара: без формы покупки и сердечек. */
@media print {
  .pd__buy, .heart, .gallery__thumbs { display: none !important; }
}
