/* ------------------------------------------------------------------
   Антиквариат и винтаж — базовые стили витрины
   Палитра снята с журнальной темы Skin Care и сдвинута под антиквариат:
   фон бумажный, тауп работает этикеткой, действие делает графит.
   ------------------------------------------------------------------ */

:root {
  --paper: #f6f5f2;
  --card: #ffffff;
  --mat: #eae7e0;
  --ink: #1c2021;
  --body: #4e5153;
  --muted: #7b7f82;
  --taupe: #8e8270;
  --taupe-deep: #6c6252;
  --seal: #8c3a2b;
  --line: rgba(28, 32, 33, 0.13);
  --line-strong: rgba(28, 32, 33, 0.28);

  /* По макету v2 заголовки — тот же гротеск, что и текст, только крупно и плотно.
     Антиква остаётся одному знаку «Сф»: так логотип не спорит с заголовками. */
  --font-display: Inter, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-seal: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: Inter, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  /* Трекинг зависит от кегля, а не задаётся одним числом: чем крупнее, тем плотнее. */
  --ls-xl: -0.055em;
  --ls-l: -0.04em;
  --ls-m: -0.03em;
  --ls-s: -0.02em;

  --wrap: 1240px;
  --radius: 2px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--body);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--taupe);
  outline-offset: 2px;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 2rem);
}

/* ---------- служебная полоса и шапка ---------- */

.topbar {
  background: var(--paper);
  color: var(--taupe-deep);
  font-size: 12px;
  letter-spacing: 0.01em;
  border-bottom: 1px solid var(--line);
}
.topbar .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  min-height: 32px;
}
.topbar a { color: var(--taupe-deep); }
.topbar a:hover { text-decoration: underline; }
/* Телефон в топбаре появляется только там, где шапка его прячет (планшет, телефон). */
.topbar .topbar-phone { display: none; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }

/* Шапка — сетка: лого, поиск по центру во всю свободную ширину, корзина, контакты. */
.header { background: var(--paper); border-bottom: 0; }
.header .wrap {
  display: grid;
  grid-template-columns: minmax(250px, 1fr) minmax(230px, 1.4fr) auto auto;
  align-items: center;
  gap: 28px;
  min-height: 94px;
}

.logo { display: flex; align-items: center; gap: 12px; }
.logo .seal {
  display: grid; place-items: center;
  font-family: var(--font-seal);
  font-size: 29px; font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.02em;
  width: 48px; height: 40px;
  padding-right: 12px;
  border-right: 1px solid var(--line);
  line-height: 1;
  flex: none;
}
.logo .word {
  font-family: var(--font-body);
  font-size: 19px; font-weight: 600; line-height: 1.25;
  color: var(--ink); letter-spacing: -0.04em;
}
.logo .word small {
  display: block;
  font-family: var(--font-body);
  font-size: 11px; font-weight: 400;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--taupe-deep); margin-top: 4px;
}

.navbar {
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.navbar .wrap {
  display: flex;
  justify-content: space-between;
  gap: clamp(16px, 2vw, 28px);
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.navbar .wrap::-webkit-scrollbar { display: none; }
.navbar a {
  flex: none;
  display: flex; align-items: center;
  min-height: 48px;
  font-size: 13px;
  letter-spacing: -0.015em;
  color: var(--body);
  padding: 10px 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.navbar a:hover, .navbar a.is-active {
  color: var(--ink);
  border-bottom-color: var(--taupe);
}

/* Планшет: контакты уходят из шапки, телефон встаёт в топбар; меню в две строки. */
@media (max-width: 1050px) {
  .header .wrap { grid-template-columns: minmax(220px, 1fr) minmax(200px, 1.2fr) auto; min-height: 86px; }
  .header .contacts { display: none; }
  .topbar .topbar-place { display: none; }
  .topbar .topbar-phone { display: inline; }
}
@media (max-width: 1000px) {
  .navbar .wrap { justify-content: flex-start; flex-wrap: wrap; gap: 0 24px; overflow: visible; }
  .navbar a { min-height: 44px; }
}
/* Телефон: лого и корзина в первой строке, поиск во второй на всю ширину; меню прокручивается. */
@media (max-width: 700px) {
  .header .wrap { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; min-height: 0; padding-top: 10px; padding-bottom: 12px; }
  .header .logo { grid-column: 1; grid-row: 1; }
  .header .cart-link { grid-column: 2; grid-row: 1; }
  .header .search-top { grid-column: 1 / -1; grid-row: 2; }
  .logo .seal { font-size: 24px; width: 40px; height: 34px; }
  .logo .word { font-size: 17px; }
  .navbar .wrap { flex-wrap: nowrap; overflow-x: auto; gap: 22px; }
  .navbar a { min-height: 45px; }
  .topbar .wrap span:first-child { display: none; }
}

/* ---------- поиск ---------- */

.search-top {
  width: 100%;
  max-width: none;
  display: flex;
  align-items: stretch;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  background: transparent;
  border-radius: 0;
  min-height: 46px;
}
.search-top input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  padding: 0 8px 0 4px;
  height: 46px;
}
.search-top input::placeholder { color: var(--muted); }
.search-top input:focus { outline: none; }
.search-top:focus-within { border-bottom-color: var(--ink); }
.search-top button {
  border: 0;
  background: transparent;
  color: var(--taupe-deep);
  width: 44px; min-height: 44px;
  padding: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
}
@media (max-width: 700px) { .search-top input { font-size: 16px; } }
.search-top button:hover { color: var(--ink); }

.search-big {
  display: flex;
  gap: 0.6rem;
  max-width: 620px;
  margin-bottom: 2rem;
}
.search-big input {
  flex: 1;
  min-width: 0;
  font-family: inherit;
  font-size: 15px;
  padding: 11px 14px;
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--ink);
  border-radius: var(--radius);
}
.search-big input:focus { outline: none; border-color: var(--taupe); }

.search-hints { margin-top: 1rem; }
.search-hints-head {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--taupe);
  font-weight: 600;
  margin: 0 0 0.8rem;
}
.search-hints-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.search-hints-row a {
  font-size: 13px;
  padding: 7px 13px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--body);
  border-radius: var(--radius);
}
.search-hints-row a:hover { border-color: var(--line-strong); color: var(--ink); }

.found-line { font-size: 13px; color: var(--muted); margin: 0 0 1.4rem; }

.header .cart-link {
  margin: 0; min-width: 46px; min-height: 46px;
  border-left: 1px solid var(--line); border-radius: 0;
  justify-content: center;
}
.header .contacts { margin: 0; text-align: right; }
.header .contacts .phone {
  font-size: 16px; font-weight: 600; color: var(--ink); letter-spacing: 0;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.header .contacts .hint { font-size: 12px; color: var(--taupe-deep); margin-top: 3px; }

/* ---------- хлебные крошки и заголовок раздела ---------- */

.crumbs {
  font-size: 12px; color: var(--taupe-deep);
  padding: 14px 0 0;
}
.crumbs a { color: var(--taupe-deep); }
.crumbs a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.crumbs span { margin: 0 0.45rem; opacity: 0.5; }

/* Заголовок раздела по макету v2: без плашки, слева, крупно; счётчик — надстрочником. */
.page-head {
  background: transparent;
  border: 0;
  padding: 26px 0 28px;
  text-align: left;
  border-bottom: 1px solid var(--ink);
}
.page-head .kicker {
  margin: 0 0 14px;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--taupe-deep);
  font-variant-numeric: tabular-nums;
}
.page-head h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.4rem, 5.2vw, 4.5rem);
  line-height: 0.98;
  letter-spacing: var(--ls-xl);
  color: var(--ink);
  margin: 0;
  max-width: 18ch;
  text-wrap: balance;
}
.page-head p {
  margin: 18px 0 0;
  max-width: 62ch;
  color: var(--body);
  font-size: 15px;
  line-height: 1.65;
  text-wrap: pretty;
}
.page-head .kicker + h1 { margin-top: 0; }

/* ---------- сетка каталога ---------- */

.layout {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  padding: 2rem 0 3.5rem;
  align-items: start;
}
@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(216px, 1fr));
  gap: clamp(1.2rem, 2.5vw, 2rem);
}

/* ---------- карточка товара ---------- */

.card { position: relative; display: flex; flex-direction: column; min-width: 0; }

/* Фото без рамки и без паспарту, на подложке цвета бумаги. */
.card .mat { background: var(--mat); border: 0; padding: 0; position: relative; overflow: hidden; }
/* Рамка квадратная по умолчанию; главная задаёт плиткам пропорцию самого фото через --ar.
   Картинка позиционируется абсолютно — в grid-контейнере height:100% браузер
   считает от натуральных пропорций, и высокие фото вылезали за рамку и обрезались. */
.card .mat .frame {
  background: transparent;
  aspect-ratio: var(--ar, 1 / 1);
  position: relative;
  overflow: hidden;
}
.card .mat img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  transition: transform 0.35s ease, opacity 0.25s ease;
}
.card:hover .mat img { transform: scale(1.015); }

/* Второй кадр (оборот с клеймом): на десктопе — по наведению, везде — по кнопке «Другой ракурс». */
.card .frame .flip { opacity: 0; }
@media (hover: hover) { .card:not(.has-second-view):hover .frame .flip { opacity: 1; } }
.card.has-second-view .frame .flip { opacity: 1; }
.card.has-second-view .frame img:not(.flip) { opacity: 0; }

/* Пока фото не пришло, в плитке стоит бледная монограмма, а не пустой квадрат. */
.card .frame::before {
  content: "Сф"; position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--font-seal); font-size: 48px; color: var(--ink); opacity: 0.06;
}

.card .body { display: flex; flex-direction: column; flex: 1; padding: 14px 0 0; }

/* Основная ссылка растянута на всю карточку псевдоэлементом — так вся плитка
   кликабельна, а инструменты под ценой лежат поверх неё (z-index 2). */
.card .card-link {
  display: block;
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.3;
  letter-spacing: var(--ls-s);
  margin: 0;
}
.card .card-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card:hover .card-link { text-decoration: underline; text-decoration-color: var(--taupe); text-underline-offset: 3px; }
.card .card-link:focus-visible { outline: none; }
.card .card-link:focus-visible::after { outline: 2px solid var(--taupe-deep); outline-offset: 4px; }

.card .body .label-line {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  margin: 7px 0 0; font-size: 13px; line-height: 1.5;
}

/* Ряд цен — единственная горизонталь, по которой глаз сравнивает предметы: держим его у низа карточки.
   Номер лота — рядом с ценой, не плашкой на фото: по нему звонят и спрашивают. */
.card .price-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-top: auto;
  padding-top: 10px;
}
.card .price { font-size: 19px; font-weight: 600; line-height: 1.3; letter-spacing: 0; white-space: nowrap; }
.card .price .cur { font: inherit; font-weight: 400; color: inherit; }
.card .lot {
  font-size: 12px;
  letter-spacing: 0;
  color: var(--taupe-deep);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Инструменты под ценой: «Другой ракурс» и «Похожие». Вещь в единственном экземпляре —
   если не подошла, из тупика должен быть выход. */
.card .card-tools {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0 12px;
  position: relative; z-index: 2;
  margin-top: 12px; border-top: 1px solid var(--line);
}
.card .card-tools .view-toggle, .card .card-tools .card-similar {
  display: inline-flex; align-items: center;
  min-height: 38px; margin: 0; padding: 0; border: 0;
  background: none; color: var(--taupe-deep);
  font: 12px/1 var(--font-body); letter-spacing: 0; cursor: pointer;
}
.card .card-tools .card-similar { margin-left: auto; }
/* «В корзину» прямо из сетки: без перехода, ответ приходит в ту же кнопку. */
.card .card-tools .card-add-form { display: inline-flex; margin: 0; }
.card .card-tools .card-add {
  display: inline-flex; align-items: center;
  min-height: 38px; margin: 0; padding: 0; border: 0;
  background: none; color: var(--ink);
  font: 500 12px/1 var(--font-body); letter-spacing: 0; cursor: pointer;
}
.card .card-tools .card-add::before { content: "+"; font-size: 16px; line-height: 1; margin-right: 6px; }
.card .card-tools .card-add:hover { text-decoration: underline; text-underline-offset: 4px; }
.card .card-tools .card-add.is-added { color: var(--taupe-deep); }
.card .card-tools .card-add.is-added::before { content: "✓"; font-size: 13px; }
.card .card-tools .card-add[disabled] { opacity: 0.5; cursor: default; }
.card .card-tools .view-toggle::before { content: "↻"; font-size: 15px; line-height: 1; margin-right: 6px; }
.card .card-tools .card-similar::after { content: "↗"; font-size: 14px; margin-left: 6px; }
.card .card-tools .view-toggle[aria-pressed="true"] { color: var(--ink); }
.card .card-tools .view-toggle:hover, .card .card-tools .card-similar:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.card .card-tools :focus-visible { outline: 2px solid var(--taupe-deep); outline-offset: 3px; }

@media (max-width: 650px) {
  .card .card-link { font-size: 15px; }
  .card .body .label-line { font-size: 12px; }
  .card .price { font-size: 17px; }
  .card .card-tools { margin-top: 8px; }
  .card .card-tools .view-toggle, .card .card-tools .card-similar, .card .card-tools .card-add { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .card .mat img { transition: none; }
  .card:hover .mat img { transform: none; }
}

.label-line {
  font-size: 12.5px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--taupe-deep);
  margin: 0 0 0.4rem;
  line-height: 1.45;
}
.label-line i { font-style: normal; opacity: 0.45; margin: 0 0.35rem; }

.price {
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.price .cur { font-size: 17px; font-weight: 400; color: var(--ink); margin-left: 0; }
.price.is-sold { color: var(--muted); text-decoration: line-through; }

.badge {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 7px;
  border: 1px solid currentColor;
  color: var(--taupe-deep);
}
.badge.is-sold { color: var(--seal); }
.badge.is-defect { color: var(--muted); }

.sold-stamp {
  position: absolute;
  z-index: 2;
  right: 14px; top: 14px;
  transform: rotate(-8deg);
  border: 2px solid var(--seal);
  color: var(--seal);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.82);
}

/* ---------- фильтры ---------- */

.filters {
  background: transparent;
  border: 0;
  padding: 0;
  position: sticky;
  top: 1rem;
}
.filters h2 {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--taupe-deep);
  margin: 0;
  padding: 12px 0;
  border-bottom: 1px solid var(--ink);
  font-weight: 600;
}
.filters .group { border-bottom: 1px solid var(--line); padding: 14px 0 12px; }
.filters .group > h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 8px;
  letter-spacing: var(--ls-s);
}
.filters label {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 13.5px;
  color: var(--body);
  padding: 4px 0;
  cursor: pointer;
}
.filters input[type="checkbox"], .filters input[type="radio"] {
  accent-color: var(--ink);
  width: 14px; height: 14px;
  margin: 0;
  position: relative; top: 1px;
  flex: none;
}
.filters label:hover { color: var(--ink); }
.filters .count { margin-left: auto; font-size: 12px; color: var(--taupe-deep); font-variant-numeric: tabular-nums; }
.filters .reset {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 4px;
}
.filters .reset::after { content: "×"; font-size: 16px; line-height: 1; }

.toolbar {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 6px 0 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}
.toolbar .found { font-size: 14px; color: var(--ink); font-variant-numeric: tabular-nums; }
.toolbar .sort { margin-left: auto; display: flex; align-items: baseline; gap: 8px; font-size: 13px; color: var(--taupe-deep); }
.toolbar select {
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  padding: 4px 22px 4px 0;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  background: transparent url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' fill='none' stroke='%231c2021' stroke-width='1.3'/></svg>") no-repeat right 4px center;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

/* ---------- карточка предмета ---------- */

.product { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(1.5rem, 4vw, 4rem); padding: 28px 0 56px; }
@media (max-width: 860px) { .product { grid-template-columns: minmax(0, 1fr); } }

.gallery .main { background: var(--mat); border: 0; padding: 0; }
.gallery .main .frame { background: transparent; aspect-ratio: 1 / 1; position: relative; overflow: hidden; }
.gallery .main img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.gallery .thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.gallery .thumbs a {
  width: 76px; height: 76px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: var(--mat);
  position: relative;
  overflow: hidden;
  padding-bottom: 2px;
}
.gallery .thumbs a.is-active { border-bottom-color: var(--ink); }
.gallery .thumbs img { position: absolute; inset: 0 0 2px; width: 100%; height: calc(100% - 2px); object-fit: contain; }

.product h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 3.8vw, 3.25rem);
  line-height: 1.02;
  color: var(--ink);
  margin: 0 0 14px;
  letter-spacing: var(--ls-l);
  text-wrap: balance;
}
.product .label-line { font-size: 14px; margin: 0 0 22px; }

.lot-no {
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--taupe-deep);
  font-weight: 400;
  margin: 4px 0 14px;
  font-variant-numeric: tabular-nums;
}

/* Цена и действия — между двумя линиями, а не в коробке. */
.buybox {
  border: 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background: transparent;
  padding: 22px 0;
  margin: 0 0 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 18px 24px; flex-wrap: wrap;
}
.buybox .price { font-size: clamp(28px, 2.6vw, 36px); font-weight: 600; letter-spacing: 0; line-height: 1; }
.buybox .price .cur { font-size: 0.75em; font-weight: 400; margin-left: 4px; }
.buybox .actions { display: flex; gap: 10px; margin: 0; flex-wrap: wrap; }
.buybox .actions .btn { min-height: 48px; padding: 12px 24px; display: inline-flex; align-items: center; }
.buybox .notice { flex: 1 1 100%; margin: 0; }

.btn {
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  padding: 11px 22px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  border-radius: var(--radius);
  transition: background 0.15s ease, color 0.15s ease;
}
.btn:hover { background: #000; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--mat); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

.specs { width: 100%; border-collapse: collapse; margin: 0 0 24px; font-size: 14px; }
.specs th, .specs td { text-align: left; padding: 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.specs th { color: var(--taupe-deep); font-weight: 400; width: 40%; padding-right: 16px; }
.specs td { color: var(--ink); }

.notice {
  border: 0;
  border-left: 2px solid var(--taupe);
  background: transparent;
  padding: 4px 0 4px 16px;
  font-size: 14px;
  margin: 1.2rem 0;
}
.notice.sold { border-left-color: var(--seal); }
.notice strong { color: var(--ink); }

.prose { max-width: 68ch; }
.prose h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.4rem, 2.2vw, 1.75rem);
  letter-spacing: var(--ls-m);
  color: var(--ink);
  margin: 2rem 0 0.6rem;
}
.prose h3 { font-size: 1rem; color: var(--ink); margin: 1.5rem 0 0.4rem; }
.prose p { margin: 0 0 1rem; }
.prose ul { padding-left: 1.1rem; }
.prose li { margin-bottom: 0.4rem; }
.prose li::marker { color: var(--taupe); }

/* ---------- секции главной ---------- */

.section { padding: clamp(2.2rem, 5vw, 3.5rem) 0; }
.section-head { display: flex; align-items: baseline; gap: 1rem; margin-bottom: 1.6rem; flex-wrap: wrap; }
.section-head h2 {
  font-variant-numeric: lining-nums tabular-nums;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  line-height: 1.05;
  color: var(--ink);
  margin: 0;
  letter-spacing: var(--ls-l);
}
.section-head .more { margin-left: auto; font-size: 14px; color: var(--ink); border-bottom: 1px solid var(--ink); padding-bottom: 4px; white-space: nowrap; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1px; background: var(--card); border: 1px solid var(--line); }
.tile + .tile { box-shadow: -1px 0 0 var(--line); }
.tile { background: var(--card); padding: 1.3rem 1.2rem; display: flex; flex-direction: column; gap: 0.3rem; min-height: 118px; }
.tile:hover { background: var(--mat); }
.tile .t {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
}
.tile .c { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

.trust { background: var(--taupe); color: #fff; padding: 1.6rem 0; }
.trust .wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.4rem; }
.trust b { display: block; font-size: 14px; margin-bottom: 2px; }
.trust span { font-size: 12.5px; opacity: 0.85; }

/* ---------- пагинация ---------- */

.pager { display: flex; gap: 4px; justify-content: center; align-items: center; padding: 40px 0 0; flex-wrap: wrap; }
.pager a, .pager span {
  min-width: 40px; height: 40px;
  padding: 0 8px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px;
  color: var(--body);
  border: 0; background: transparent;
  border-bottom: 1px solid transparent;
  font-variant-numeric: tabular-nums;
}
.pager a:hover { color: var(--ink); border-bottom-color: var(--line-strong); }
.pager .current { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }
.pager .dots { color: var(--taupe); }

/* ---------- подвал ---------- */

.footer { background: var(--ink); color: #cfd1d2; margin-top: 0; padding: 64px 0 24px; font-size: 13px; }
.footer .wrap { display: grid; grid-template-columns: 1.3fr 1.7fr 1fr 1fr; gap: 34px; }
.footer-brand p { margin: 20px 0 0; font-size: 14px; color: #fff; line-height: 1.5; }
.footer-brand small { display: block; font-size: 12px; color: #b6b9ba; margin-top: 9px; max-width: 27ch; line-height: 1.7; }
.footer-seal { font-family: var(--font-seal); font-size: 64px; line-height: 1; color: #fff; letter-spacing: -0.02em; }
.footer-catalog ul { columns: 2; column-gap: 24px; }
.footer-hours { color: #b6b9ba; margin-top: 8px; font-size: 12px; }
.footer h3 { font-size: 12px; letter-spacing: 0.02em; color: #b6b9ba; margin: 0 0 18px; font-weight: 400; }
.footer a:hover { color: #fff; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 8px; line-height: 1.6; break-inside: avoid; }
.footer li a { display: inline-block; padding: 3px 0; }
.footer .legal { grid-column: 1 / -1; border-top: 1px solid rgba(255, 255, 255, 0.13); margin-top: 35px; padding-top: 22px; font-size: 12px; color: #8b8f92; }
@media (max-width: 900px) { .footer .wrap { grid-template-columns: 1fr 1fr; } }
@media (max-width: 650px) {
  .footer { padding-top: 40px; }
  .footer .wrap { gap: 28px 20px; }
  .footer-brand, .footer-catalog { grid-column: 1 / -1; }
  .footer li a { padding: 8px 0; }
}

.empty { padding: 3rem 0; text-align: center; color: var(--muted); }


/* ---------- 2026: фото проявляются, «Вы смотрели», подсказка корзины, нижняя панель ---------- */

.imgfx .card .frame:not(.is-loaded),
.imgfx .cat-tile-img:not(.is-loaded),
.imgfx .series-face-img:not(.is-loaded) {
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.45) 50%, transparent 70%) var(--mat);
  background-size: 250% 100%;
  animation: sf-shimmer 1.4s linear infinite;
}
.imgfx .series-face-img:not(.is-loaded) { background-color: #2a2f30; }
.card .frame img:not(.flip), .cat-tile-img img, .series-face-img img { transition: transform .35s ease, opacity .4s ease; }
.imgfx .card .frame img:not(.flip):not(.is-loaded),
.imgfx .cat-tile-img img:not(.is-loaded),
.imgfx .series-face-img img:not(.is-loaded) { opacity: 0; }
@keyframes sf-shimmer { from { background-position: 100% 0; } to { background-position: -150% 0; } }

.reveal-on [data-reveal]:not([data-reveal="stagger"]) {
  opacity: 0; transform: translateY(16px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1);
}
.reveal-on [data-reveal="stagger"] > * {
  opacity: 0; transform: translateY(16px);
  transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.reveal-on [data-reveal].is-in:not([data-reveal="stagger"]),
.reveal-on [data-reveal="stagger"].is-in > * { opacity: 1; transform: none; }
[data-reveal="stagger"] > :nth-child(2) { --i: 1; } [data-reveal="stagger"] > :nth-child(3) { --i: 2; }
[data-reveal="stagger"] > :nth-child(4) { --i: 3; } [data-reveal="stagger"] > :nth-child(5) { --i: 4; }
[data-reveal="stagger"] > :nth-child(6) { --i: 5; } [data-reveal="stagger"] > :nth-child(7) { --i: 6; }
[data-reveal="stagger"] > :nth-child(n+8) { --i: 7; }

@media (prefers-reduced-motion: reduce) {
  .imgfx .card .frame, .imgfx .cat-tile-img, .imgfx .series-face-img { animation: none !important; }
}

/* «Вы смотрели» */
.section-seen[hidden] { display: none; }
.section-seen { padding: 32px 0 16px; border-top: 1px solid var(--line); }
.seen-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; }
.seen-head h2 { margin: 0; font-size: 22px; font-weight: 500; letter-spacing: var(--ls-m); color: var(--ink); }
.seen-clear { border: 0; background: none; padding: 10px 0; font: 13px var(--font-body); color: var(--taupe-deep); cursor: pointer; }
.seen-clear:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.seen-list {
  list-style: none; margin: 0; padding: 0 0 4px;
  display: grid; grid-auto-flow: column; grid-auto-columns: 132px; gap: 16px;
  overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: thin;
}
.seen-list > li { scroll-snap-align: start; }
.seen-item { display: block; color: var(--ink); }
.seen-img { display: block; aspect-ratio: 1; background: var(--mat); overflow: hidden; }
.seen-img img { width: 100%; height: 100%; object-fit: contain; transition: transform .4s ease; }
.seen-item:hover .seen-img img { transform: scale(1.04); }
.seen-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  margin-top: 8px; font-size: 13px; line-height: 1.35; letter-spacing: var(--ls-s); }
.seen-item small { display: block; margin-top: 2px; font-size: 12px; color: var(--taupe-deep); font-variant-numeric: tabular-nums; }
@media (max-width: 700px) { .seen-list { grid-auto-columns: 30%; gap: 12px; } }

/* Подсказка после добавления в корзину */
.sf-toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 80;
  display: flex; align-items: center; gap: 18px;
  max-width: calc(100vw - 32px); padding: 14px 18px;
  background: var(--ink); color: var(--paper); border-radius: var(--radius);
  font-size: 14px; box-shadow: 0 12px 32px -12px rgba(0,0,0,.45);
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  transition: opacity .25s ease, transform .3s cubic-bezier(.2,.7,.2,1);
}
.sf-toast.is-on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.sf-toast a { color: var(--paper); border-bottom: 1px solid #767977; padding: 4px 0; white-space: nowrap; }
.sf-toast small { display: block; color: #c2c1bc; font-size: 12px; }
.cart-count.is-bump { animation: sf-bump .45s cubic-bezier(.3,1.6,.5,1); }
@keyframes sf-bump { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .cart-count.is-bump { animation: none; } .sf-toast { transition: opacity .2s; transform: translate(-50%, 0); } }

/* Нижняя панель на телефоне: Каталог, Поиск, Позвонить, Корзина — подписи словами. */
.tabbar { display: none; }
@media (max-width: 700px) {
  body { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    display: grid; grid-template-columns: repeat(4, 1fr);
    padding-bottom: env(safe-area-inset-bottom);
    background: rgba(246,245,242,.94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border-top: 1px solid var(--line-strong);
  }
  .tabbar a {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    min-height: 60px; font-size: 12px; color: var(--body);
  }
  .tabbar a:active { background: var(--mat); }
  .tabbar .cart-count {
    position: absolute; top: 6px; left: calc(50% + 6px);
    min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px;
    background: var(--ink); color: #fff; font-size: 12px; line-height: 19px; text-align: center;
  }
  .tabbar .cart-count:not(.is-visible) { display: none; }
  .tabbar-cart.has-items { color: var(--ink); font-weight: 500; }
  .sf-toast { bottom: calc(76px + env(safe-area-inset-bottom)); }

  /* Меню прокручивается — мягкое затухание у правого края подсказывает, что дальше есть ещё. */
  .navbar .wrap {
    -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent);
            mask-image: linear-gradient(90deg, #000 82%, transparent);
    padding-right: 40px;
  }
}
