:root {
  --bg: #0b0a08;
  --panel: #12100d;
  --card: #14110e;
  --well: #17140f;
  --gold: #d2c4a8;
  --gold-dim: #9a8d74;
  --bone: #e9e0cf;
  --muted: #8c8274;
  --line: rgba(210, 196, 168, 0.13);
  --line-strong: rgba(210, 196, 168, 0.26);
  --radius: 14px;
  --topbar: 64px;
}

* { box-sizing: border-box; }
html { overflow-x: clip; -webkit-text-size-adjust: 100%; }
html, body { margin: 0; background: var(--bg); color: var(--bone); }
body {
  font-family: Inter, system-ui, sans-serif;
  font-size: 14px;
  font-weight: 300;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: clip;
}
h1, h2, h3 { margin: 0; font-weight: 500; line-height: 1.2; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ── Шапка ─────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(11, 10, 8, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  padding: 10px clamp(16px, 2.6vw, 56px);
}
.mark { flex: 0 0 auto; display: flex; align-items: center; line-height: 0; text-decoration: none; }
.mark img { display: block; height: 30px; width: auto; }

.search {
  display: flex;
  flex: 1 1 auto;
  gap: 8px;
  max-width: 680px;
  min-width: 0;
}
.search-field {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
}
.search input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 40px 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--well);
  outline: none;
  font-size: 14px;
}
.search input::placeholder { color: #6f6659; }
.search input:focus { border-color: var(--gold-dim); background: #1b1712; }
.search > button {
  flex: 0 0 auto;
  height: 42px;
  padding: 0 22px;
  border: 0;
  border-radius: 10px;
  background: var(--gold);
  color: #1a1612;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
}
.search > button:hover { background: #e0d3ba; }
.search > button:disabled { opacity: 0.55; cursor: progress; }

.search-clear {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(210, 196, 168, 0.14);
  color: var(--bone);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.search-clear:hover { background: rgba(210, 196, 168, 0.28); color: #1a1612; }
.search-clear[hidden] { display: none; }

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
  flex: 0 0 auto;
}
.rate { color: var(--gold-dim); font-size: 12px; white-space: nowrap; }
.cargo-link {
  color: var(--bone);
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}
.cargo-link:hover { color: var(--gold); }
.cargo-link.is-on { color: var(--gold); }
.cargo-link span:not(:empty) {
  display: inline-block;
  margin-left: 6px;
  min-width: 1.4em;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--gold);
  color: #1a1612;
  letter-spacing: 0;
  text-align: center;
}
.cargo-link span { margin: 0; }

/* ── Строка разделов ───────────────────────────────────── */
.catbar { border-top: 1px solid var(--line); }
.catbar-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px clamp(16px, 2.6vw, 56px);
  overflow-x: auto;
  scrollbar-width: none;
}
.catbar-inner::-webkit-scrollbar { display: none; }
.catbtn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(210, 196, 168, 0.06);
  color: var(--bone);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.catbtn-icon,
.catbtn-icon::before,
.catbtn-icon::after {
  display: block;
  width: 14px;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
}
.catbtn-icon { position: relative; }
.catbtn-icon::before,
.catbtn-icon::after { content: ""; position: absolute; left: 0; }
.catbtn-icon::before { top: -4px; }
.catbtn-icon::after { top: 4px; }
.catbtn:hover,
.catbtn[aria-expanded="true"] { border-color: var(--gold-dim); color: var(--gold); }
.cat-chips { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cat-chip {
  flex: 0 0 auto;
  height: 34px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}
.cat-chip:hover { color: var(--bone); background: rgba(210, 196, 168, 0.06); }
.cat-chip.is-on {
  border-color: var(--line-strong);
  background: rgba(210, 196, 168, 0.12);
  color: var(--gold);
}

/* ── Каталог ───────────────────────────────────────────── */
.catalog[hidden] { display: none !important; }
.catalog {
  position: fixed;
  z-index: 50;
  background: #100e0c;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}
.catalog button {
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  border: 0;
  background: transparent;
  color: var(--bone);
  text-align: left;
}
.catalog-panes { display: grid; grid-template-columns: 240px minmax(0, 1fr); max-height: min(72vh, 560px); }
.catalog-depts,
.catalog-subs {
  list-style: none;
  margin: 0;
  padding: 8px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(210, 196, 168, 0.35) transparent;
}
.catalog-depts { background: #0b0a08; border-right: 1px solid var(--line); }
.catalog-subs { background: #100e0c; }
.catalog-dept,
.catalog-sub,
.catalog-back,
.catalog-close {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.3;
}
.catalog-label { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.catalog-dept:hover,
.catalog-sub:hover { color: var(--gold); background: rgba(210, 196, 168, 0.06); }
.catalog-dept.is-on,
.catalog-sub.is-on { color: var(--gold); background: rgba(210, 196, 168, 0.08); }
.catalog-chevron {
  width: 6px;
  height: 6px;
  margin-left: auto;
  border-top: 1.5px solid var(--muted);
  border-right: 1.5px solid var(--muted);
  transform: rotate(45deg);
  flex: 0 0 auto;
}
.catalog-dept.is-on .catalog-chevron { border-color: var(--gold); }
.catalog-back .catalog-chevron { margin: 0 8px 0 0; border-color: currentColor; transform: rotate(-135deg); }
.catalog-heading {
  margin: 8px 12px 4px;
  font-size: 13px;
  font-weight: 500;
  color: var(--gold-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.catalog-sheet-title { font-size: 15px; font-weight: 600; }
.catalog-mobile-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; }
.catalog-close { width: auto; flex: 0 0 auto; color: var(--muted); }
.catalog-back { width: auto; flex: 1 1 auto; }
.catalog-all { border-radius: 0; margin-bottom: 6px; box-shadow: inset 0 -1px 0 var(--line); }
.catalog-dept:focus-visible,
.catalog-sub:focus-visible,
.catalog-back:focus-visible,
.catalog-close:focus-visible,
.catbtn:focus-visible,
.cat-chip:focus-visible { outline: 1px solid var(--gold-dim); outline-offset: -2px; }

/* ── Основная колонка ──────────────────────────────────── */
.wrap {
  width: 100%;
  padding: 24px clamp(16px, 2.6vw, 56px) 96px;
  min-width: 0;
}
.hero { padding: 0 0 16px; }
h1 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(30px, 3vw, 38px);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.lead { max-width: 620px; margin: 6px 0 0; color: var(--muted); font-size: 14px; }

/* ── Панель управления ─────────────────────────────────── */
.panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.panel-left,
.panel-right { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; min-width: 0; }
.panel-right { margin-left: auto; }

.photo { display: flex; align-items: center; gap: 10px; min-width: 0; }
.photo-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
}
.photo-btn:hover { border-color: var(--gold-dim); color: var(--gold); }
.photo-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.photo-icon {
  width: 12px;
  height: 10px;
  border: 1.5px solid currentColor;
  border-radius: 3px;
  position: relative;
}
.photo-icon::after {
  content: "";
  position: absolute;
  top: 1.5px;
  right: 1.5px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
}
#preview { display: none; width: 34px; height: 34px; object-fit: cover; border-radius: 8px; background: var(--well); }
#preview.show { display: block; }
#photo-hint { color: var(--muted); font-size: 12px; white-space: nowrap; }
#photo-hint.is-busy { color: var(--gold); }

.reset-search {
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}
.reset-search:hover { color: var(--gold); border-color: var(--gold-dim); }
.reset-search[hidden] { display: none; }

.catalog-current { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; color: var(--bone); }
.catalog-current[hidden] { display: none !important; }
.catalog-crumb { min-width: 0; overflow-wrap: anywhere; }
.catalog-reset {
  flex: 0 0 auto;
  height: 28px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
}
.catalog-reset:hover { color: var(--gold); border-color: var(--gold-dim); }

.sort-group {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--well);
}
.sort-group button {
  height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.sort-group button:hover { color: var(--bone); }
.sort-group button.is-on { background: rgba(210, 196, 168, 0.16); color: var(--bone); }
.sort-group button[data-sort="price-asc"].is-on,
.sort-group button[data-sort="price-desc"].is-on { background: rgba(210, 196, 168, 0.24); color: var(--gold); }

.view {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--well);
}
.view button {
  height: 28px;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
}
.view button.is-on { background: rgba(210, 196, 168, 0.16); color: var(--bone); }
.view button:hover { color: var(--bone); }

.filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 0 0; }
.filters[hidden] { display: none; }
.chip {
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.chip:hover { color: var(--bone); border-color: var(--line-strong); }
.chip.is-on { background: rgba(210, 196, 168, 0.14); border-color: var(--gold-dim); color: var(--gold); }
.chip .chip-count { margin-left: 6px; color: var(--gold-dim); font-variant-numeric: tabular-nums; }
.chip.is-on .chip-count { color: var(--gold); }

/* ── Выдача ────────────────────────────────────────────── */
.out { margin-top: 18px; }
.result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--muted);
}
.result-head p { margin: 0; }
.result-head strong { color: var(--bone); font-weight: 500; }
.result-source { color: var(--gold-dim); }

.sources-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 14px;
  font-size: 12px;
  color: var(--muted);
}
.sources-label { margin-right: 2px; color: var(--gold-dim); }
.src {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  white-space: nowrap;
}
.src::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #6b6357;
}
.src.ok { color: var(--gold); border-color: rgba(210, 196, 168, 0.32); }
.src.ok::before { background: var(--gold); }
.src.off { color: #7a7264; }
.query-line { margin: 0 0 14px; color: var(--muted); font-size: 13px; }
.query-line b { color: var(--bone); font-weight: 500; }

.intro {
  padding: 44px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
  text-align: center;
}
.intro-title {
  margin: 0 0 14px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 26px;
  color: var(--bone);
}
.intro-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.intro-chips button {
  height: 34px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--bone);
  font-size: 13px;
}
.intro-chips button:hover { border-color: var(--gold-dim); color: var(--gold); }
.intro-note { margin: 16px 0 0; color: var(--muted); font-size: 12px; }

.note, .error { color: var(--muted); overflow-wrap: anywhere; }
.error { color: #e0a48b; }
.note.wait { display: flex; align-items: center; gap: 12px; }
.spin {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  border: 2px solid var(--line);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation: none; } }

.search-links { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 12px 0 0; }
.search-links a { color: var(--gold); font-size: 13px; text-decoration: none; }
.search-links a:hover { text-decoration: underline; }

/* ── Карточки ──────────────────────────────────────────── */
.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 208px), 1fr));
  gap: 16px;
}
.product {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.product:hover { border-color: var(--line-strong); }
.card-media {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  background: #0e0c0a;
  overflow: hidden;
}
.card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.card-media .frame { width: 100%; height: 100%; display: block; background: repeating-linear-gradient(45deg, #14110e, #14110e 10px, #17140f 10px, #17140f 20px); }
.card-body { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px 12px; flex: 1 1 auto; min-width: 0; }
.product h3 {
  font-family: Inter, sans-serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
  overflow-wrap: anywhere;
}
.product-cat {
  color: var(--gold-dim);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.product-title-link { text-decoration: none; color: inherit; }

.offers { list-style: none; margin: auto 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.offer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  padding: 6px 0;
  border-top: 1px solid var(--line);
}
.offer:first-child { border-top: 0; }
.offer.cheap { background: rgba(210, 196, 168, 0.06); border-radius: 8px; margin: 0 -6px; padding: 6px; }
.offer-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  text-decoration: none;
}
.offer-name { color: var(--muted); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.offer.cheap .offer-name { color: var(--gold); }
.offer-price { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; min-width: 0; white-space: nowrap; }
.price-row { display: flex; align-items: baseline; gap: 5px; }
.offer-add {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  line-height: 1;
  padding: 0;
}
.offer-add:hover { color: var(--gold); border-color: var(--gold-dim); }
.offer.miss { grid-template-columns: 1fr auto; color: #6b6357; }
.offer .miss { color: #6b6357; font-size: 12px; }

.rub {
  font-family: Inter, sans-serif;
  font-weight: 600;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  color: #f3ecdf;
  line-height: 1.1;
}
.dash {
  font-family: Inter, sans-serif;
  font-weight: 500;
  font-size: 15px;
  line-height: 1.1;
  color: #6b6357;
}
.from {
  margin-right: 3px;
  font-family: Inter, sans-serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted);
  vertical-align: 1px;
}
.rub, .dash, .cny { white-space: nowrap; }
.cny { font-family: Inter, sans-serif; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cell-note { display: block; margin-top: 2px; font-size: 11px; line-height: 1.25; color: var(--muted); }
.offer-price .cell-note { margin: 0; }

/* ── Таблица ───────────────────────────────────────────── */
.sheet-wrap {
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  scrollbar-width: thin;
  scrollbar-color: rgba(210, 196, 168, 0.35) transparent;
}
.sheet { width: max-content; min-width: 100%; border-collapse: collapse; }
.sheet th,
.sheet td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  text-align: left;
}
.sheet thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--well);
  font-size: 12px;
  font-weight: 500;
  color: var(--bone);
  white-space: nowrap;
}
.sheet tbody tr:hover td { background: rgba(210, 196, 168, 0.03); }
.sheet .corner,
.sheet .product-cell {
  position: sticky;
  left: 0;
  z-index: 1;
  width: 300px;
  min-width: 240px;
  max-width: 340px;
  background: var(--card);
  box-shadow: 1px 0 0 var(--line);
}
.sheet .corner { z-index: 3; background: var(--well); }
.sheet th.plat,
.sheet td.price { min-width: 150px; }
.sheet th.priority .plat-name { color: var(--gold); }
.sheet th.plat { padding: 8px 10px; }
.plat-sort {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 4px;
  margin: -2px -4px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.plat-sort:hover { background: rgba(210, 196, 168, 0.1); color: var(--gold); }
.plat-sort.is-on { color: var(--gold); }
.plat-sort .plat-name { display: inline; }
.sort-arrow { font-size: 10px; color: var(--gold-dim); }
.plat-name { display: block; font-size: 13px; }
.plat-role { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; font-weight: 400; white-space: normal; }
.sheet td.cheap { background: rgba(210, 196, 168, 0.05); box-shadow: inset 2px 0 0 var(--gold-dim); }
.product-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.product-copy { min-width: 0; }
.product-main img,
.product-main .frame {
  display: block;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 8px;
  background: var(--well);
  object-fit: cover;
}
.sheet h3 { font-size: 13px; font-weight: 400; line-height: 1.3; overflow-wrap: anywhere; }
.sheet .rub, .sheet .dash { font-size: 14px; }
.price a,
.price button {
  display: inline-flex;
  align-items: center;
  height: 26px;
  margin: 4px 10px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 12px;
  text-decoration: none;
}
.price a { color: var(--gold); }
.price button { color: var(--gold-dim); }

/* ── Скелетон ──────────────────────────────────────────── */
.skeleton-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 232px), 1fr)); gap: 14px; }
.skel { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--card); }
.skel-media { aspect-ratio: 1 / 1; }
.skel-line { height: 10px; margin: 10px 12px; border-radius: 4px; }
.skel-line.short { width: 55%; }
.skel-media, .skel-line {
  background: linear-gradient(100deg, #14110e 30%, #1d1913 50%, #14110e 70%);
  background-size: 200% 100%;
  animation: shine 1.3s ease-in-out infinite;
}
@keyframes shine { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skel-media, .skel-line { animation: none; } }

/* ── Пагинация ─────────────────────────────────────────── */
.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 26px 0 8px;
}
.pager-step,
.pager-num {
  height: 34px;
  min-width: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: transparent;
  color: var(--bone);
  font-size: 13px;
}
.pager-step:hover:not(:disabled),
.pager-num:hover { border-color: var(--gold-dim); color: var(--gold); }
.pager-step:disabled { opacity: 0.35; cursor: default; }
.pager-nums { display: flex; align-items: center; gap: 4px; color: var(--muted); }
.pager-num {
  min-width: 34px;
  padding: 0 8px;
  font-variant-numeric: tabular-nums;
}
.pager-num.is-on {
  background: var(--gold);
  border-color: var(--gold);
  color: #1a1612;
  font-weight: 600;
}
.pager-info { width: 100%; text-align: center; color: var(--muted); font-size: 12px; }
@media (max-width: 480px) {
  .pager { gap: 6px; }
  .pager-step { padding: 0 10px; }
}

/* ── Карго: выезжающая панель ──────────────────────────── */
.cargo-link {
  border: 0;
  padding: 0;
  background: transparent;
  font-family: inherit;
}
.cargo-backdrop {
  position: fixed;
  inset: 0;
  z-index: 64;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease, visibility 0.18s ease;
}
.cargo-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  display: flex;
  flex-direction: column;
  width: min(420px, 100%);
  background: var(--panel);
  border-left: 1px solid var(--line);
  box-shadow: -24px 0 64px rgba(0, 0, 0, 0.45);
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.22s ease, visibility 0.22s ease;
}
body.cargo-open { overflow: hidden; }
body.cargo-open .cargo-backdrop { opacity: 1; visibility: visible; }
body.cargo-open .cargo-panel { transform: translateX(0); visibility: visible; }.cargo-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 8px;
}
.cargo-panel-head h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 24px;
  font-weight: 600;
}
.cargo-close {
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
}
.cargo-close:hover { color: var(--gold); border-color: var(--gold-dim); }
.cargo-hint { margin: 0; padding: 0 20px 12px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.cargo-list {
  flex: 1 1 auto;
  overflow: auto;
  margin: 0;
  padding: 0 20px;
  list-style: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(210, 196, 168, 0.35) transparent;
}
.cargo-list li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.cargo-list li:first-child { border-top: 0; }
.cargo-copy { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1 1 auto; }
.cargo-platform { color: var(--gold-dim); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; }
.cargo-copy strong { font-weight: 400; font-size: 13px; line-height: 1.35; overflow-wrap: anywhere; }
.cargo-copy a { color: var(--gold); font-size: 11px; overflow-wrap: anywhere; }
.cargo-list button {
  flex: 0 0 auto;
  align-self: flex-start;
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
}
.cargo-list button:hover { color: var(--gold); border-color: var(--gold-dim); }
.cargo-empty {
  border-top: 0 !important;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  padding-top: 4px;
}
.cargo-tools {
  display: flex;
  gap: 10px;
  padding: 14px 20px calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}
.cargo-tools button {
  flex: 1 1 0;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  font-size: 13px;
}
.cargo-tools button:hover:not(:disabled) { border-color: var(--gold-dim); color: var(--gold); }
.cargo-tools button:disabled { opacity: 0.4; cursor: default; }

/* ── Адаптив ───────────────────────────────────────────── */
@media (max-width: 1100px) {
  .topbar-inner { flex-wrap: wrap; gap: 12px; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .topbar-actions { margin-left: auto; }
}

@media (max-width: 860px) {
  .cargo-panel { width: 100%; border-left: 0; }
  .cargo-panel-head { padding: 16px 16px 8px; }
  .cargo-hint { padding: 0 16px 12px; }
  .cargo-list { padding: 0 16px; }
  .cargo-tools { padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); }
  .topbar-inner { padding: 10px 16px; }
  .mark img { height: 26px; }
  .rate { display: none; }
  .catbar-inner { padding: 6px 16px; }
  .wrap { padding: 18px 16px 72px; }
  h1 { font-size: 28px; }
  .panel { gap: 10px; }
  .panel-right { margin-left: 0; width: 100%; justify-content: space-between; }
  .products, .skeleton-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 164px), 1fr)); gap: 10px; }
  .card-body { padding: 8px 10px 10px; }
  .product h3 { font-size: 12px; }
  .intro { padding: 32px 14px; }
  .sheet .corner,
  .sheet .product-cell { width: 190px; min-width: 170px; max-width: 200px; }
  .sheet th, .sheet td { padding: 8px 10px; }
  .product-main img, .product-main .frame { width: 38px; height: 38px; flex-basis: 38px; }
  .sheet h3 { font-size: 12px; }

  #catalog {
    position: fixed;
    inset: 0;
    z-index: 60;
    width: auto;
    max-height: none;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: #0b0a08;
    overflow: auto;
    padding:
      max(10px, env(safe-area-inset-top))
      max(14px, env(safe-area-inset-right))
      max(16px, env(safe-area-inset-bottom))
      max(14px, env(safe-area-inset-left));
  }
  body.catalog-open { overflow: hidden; }
  .catalog-panes { display: block; max-height: none; }
  .catalog-depts, .catalog-subs { padding: 0; overflow: visible; max-height: none; border: 0; }
  .catalog-dept, .catalog-sub, .catalog-back, .catalog-close { min-height: 48px; border-radius: 0; }
  .catalog-dept, .catalog-sub { border-bottom: 1px solid var(--line); }
  .catalog-mobile-head {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #0b0a08;
    border-bottom: 1px solid var(--line);
  }
  .search-links a { min-height: 40px; }
}

@media (max-width: 480px) {
  .wrap { padding-left: 14px; padding-right: 14px; }
  .search button { padding: 0 16px; }
  .topbar-actions { gap: 12px; }
  .panel-left { width: 100%; }
  .photo { width: 100%; }
}
