:root {
  /* Палитра лендинга SARKISSIAN Rare Color Diamonds: чёрный текст, taupe — подписи, золото — единственный акцент (кнопки) */
  --bg: #fafafa;
  --bg-soft: #f7f7f7;
  --surface: #ffffff;
  --ink: #000000;
  --graphite: #302d2e;
  --muted: #6f6f6e;                 /* taupe */
  --line: rgba(48, 45, 46, .14);
  --gold: #dcca9a;
  --gold-hover: #ede6d5;
  --silver: #d3d7d7;
  --accent: #302d2e;                /* акцентный текст и метки — графит (золото на белом нечитаемо) */
  --accent-ink: #ffffff;
  --accent-soft: #f5efe1;           /* светлое золото — фон меток */
  --danger: #b4483c;
  --ok: #3f7d5a;
  --radius: 10px;
  --shadow: none;                   /* без теней: глубину дают тонкие линии */
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { scrollbar-gutter: stable; overflow-y: scroll; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.45 Montserrat, system-ui, sans-serif;
  font-variant-numeric: tabular-nums;          /* цены, количества и таблицы — ровными колонками */
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

/* ---------- Шапка ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.top__inner {
  max-width: 1840px; margin: 0 auto; padding: 12px 24px;
  display: flex; align-items: center; gap: 24px;
}
.brand { display: flex; flex-direction: column; line-height: 1.1; min-width: 180px; color: inherit; text-decoration: none; }
.brand:hover .brand__name { color: var(--accent); }
.brand__name { font: 600 24px/1 'Cormorant', 'Times New Roman', serif; letter-spacing: .14em; }
.brand__sub { color: var(--muted); font-size: 12px; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#stockAt { font-size: 11px; }        /* «Актуальные остатки на …» целиком над колонкой фильтров (250 px) */
.search {
  flex: 1; max-width: 520px; position: relative; display: flex; align-items: center;
}
.search svg { position: absolute; left: 12px; width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; }
.search input {
  width: 100%; height: 40px; padding: 0 12px 0 38px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--bg); outline: none;
}
.search input:focus { border-color: var(--accent); background: #fff; }
.cart-btn {
  margin-left: auto; display: flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--ink); background: var(--ink); color: #fff;
}
.cart-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cart-btn__count {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
  background: #fff; color: var(--ink); font-size: 12px; display: grid; place-items: center;
}

/* ---------- Раскладка ---------- */
.layout {
  max-width: 1840px; margin: 0 auto; padding: 20px 24px 48px;
  display: grid; grid-template-columns: 250px 1fr; gap: 24px; align-items: start;
}
.filters {
  position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px;
}
.filters__head { display: flex; align-items: baseline; justify-content: space-between; }
.filters h2 { font-size: 15px; margin: 0; }
.f-block { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 14px; }
.f-block h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 10px; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 10px; font-size: 13px;
}
.chip small { color: var(--muted); margin-left: 4px; }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip[aria-pressed="true"] small { color: rgba(255,255,255,.7); }
.price-range { display: flex; align-items: center; gap: 6px; }
.price-range input, .stone-search {
  width: 100%; height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; outline: none;
}
.price-range input:focus, .stone-search:focus { border-color: var(--accent); }
.stone-search { margin-bottom: 8px; }
.stones { display: flex; flex-direction: column; gap: 2px; }
.stone {
  display: flex; align-items: center; gap: 8px; padding: 4px 4px; border-radius: 6px; cursor: pointer;
}
.stone:hover { background: var(--bg); }
.stone input { accent-color: var(--accent); }
.stone span { flex: 1; }
.stone small { color: var(--muted); }
.link { background: none; border: 0; padding: 0; color: var(--accent); font-size: 13px; }
.link:hover { text-decoration: underline; }
.link--muted { color: var(--muted); }

/* ---------- Панель над сеткой ---------- */
.toolbar {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px;
}
.toolbar__count { color: var(--muted); }
.toolbar__count b { color: var(--ink); }
.toolbar__right { margin-left: auto; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.select { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.select select { height: 34px; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 0 8px; color: var(--ink); }
.per-page { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.per-page button {
  height: 34px; min-width: 44px; border: 1px solid var(--line); background: #fff; border-radius: 8px;
}
.per-page button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.filters-toggle { display: none; height: 34px; padding: 0 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }

/* ---------- Карточки ---------- */
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(210px, 100%), 1fr)); gap: 16px;
}
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  display: flex; flex-direction: column; overflow: hidden; transition: box-shadow .15s;
}
.card:hover { box-shadow: var(--shadow); }
.card.in-cart { border-color: var(--accent); }
.card__img { aspect-ratio: 1; background: #fafafa; position: relative; }
.card__img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.card__badge {
  position: absolute; top: 8px; left: 8px; background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px;
}
.card__body { padding: 12px 12px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card__art { font: 600 12px/1.2 Montserrat, system-ui, sans-serif; color: var(--muted); letter-spacing: .02em; }
.card__art { display: flex; justify-content: space-between; align-items: center; gap: 4px 6px; flex-wrap: wrap; min-width: 0; overflow-wrap: anywhere; }
.card__set { font-weight: 500; color: var(--accent); background: var(--accent-soft); padding: 0 6px; border-radius: 4px; }
.card__name { font-size: 13px; min-height: 2.9em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card__meta { font-size: 12px; color: var(--muted); }
.prices { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.price-main { font-size: 18px; font-weight: 600; }
.price-spec { font-size: 12px; color: var(--muted); }
.price-spec b { color: var(--ink); font-weight: 500; }
.price-note { font-size: 11px; color: var(--danger); }
.size-block__label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 4px; }
.size-block__hint { font-size: 11px; color: var(--muted); margin-top: 4px; }
.sizes { display: flex; flex-wrap: wrap; gap: 6px; }
.size {
  min-width: 48px; padding: 4px 8px; border: 1px solid var(--line); background: #fff; border-radius: 8px;
  display: flex; flex-direction: column; align-items: center; line-height: 1.15;
}
.size:hover { border-color: var(--ink); }
.size__v { font-size: 15px; font-weight: 600; }
.size__q { font-size: 10px; color: var(--muted); }
.size--range .size__v { font-size: 13px; }
.size[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }
.size[aria-pressed="true"] .size__q { color: rgba(255,255,255,.75); }
.size--out { opacity: .45; }
.size--out .size__q { color: var(--danger); }
.buy { display: flex; gap: 8px; margin-top: auto; }
.stepper { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; height: 34px; }
.stepper button { width: 30px; border: 0; background: #fff; font-size: 16px; }
.stepper button:disabled { color: #c8c2bb; cursor: default; }
.stepper input { width: 40px; border: 0; text-align: center; outline: none; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stock { font-size: 11px; color: var(--muted); }

.btn {
  height: 34px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--ink); background: #fff; font-weight: 500;
}
.btn--primary { background: var(--gold); border-color: var(--gold); color: #000; }
.btn--primary:hover { background: var(--gold-hover); border-color: var(--gold-hover); color: var(--muted); }
.btn:focus-visible { outline: 2px solid var(--graphite); outline-offset: 2px; }
.btn:disabled { opacity: .4; cursor: default; }
.btn--wide { width: 100%; height: 44px; }
.buy .btn { flex: 1; white-space: nowrap; padding: 0 10px; min-width: 0; }

.empty { padding: 60px 0; text-align: center; color: var(--muted); }

/* ---------- Пагинация ---------- */
.pager { display: flex; justify-content: center; gap: 6px; margin-top: 28px; flex-wrap: wrap; }
.pager button, .pager span {
  min-width: 36px; height: 36px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line); background: #fff;
  display: grid; place-items: center;
}
.pager span { border-color: transparent; background: none; color: var(--muted); }
.pager button[aria-current="page"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.pager button:disabled { opacity: .4; cursor: default; }

/* ---------- Корзина ---------- */
.scrim { position: fixed; inset: 0; background: rgba(20, 18, 16, .35); z-index: 40; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(480px, 100vw); z-index: 41;
  background: var(--surface); display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .22s ease; box-shadow: -8px 0 24px rgba(0,0,0,.08);
}
.drawer.open { transform: none; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.drawer__head h2 { margin: 0; font: 600 22px 'Cormorant', 'Times New Roman', serif; }
.icon-btn { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: #fff; }
.drawer__body { flex: 1; min-height: 0; overflow: auto; padding: 8px 20px; }
.drawer__foot { border-top: 1px solid var(--line); padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 10px; }
.drawer__foot textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; resize: vertical; outline: none; }
.totals > div { display: flex; justify-content: space-between; padding: 2px 0; color: var(--muted); }
.totals b { color: var(--ink); }
.totals__main b { font-size: 18px; }
.cart-empty { color: var(--muted); text-align: center; padding: 48px 0; }

.line { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.line img { width: 64px; height: 64px; object-fit: contain; background: #fafafa; border-radius: 6px; }
.line__art { font: 600 12px Montserrat, system-ui, sans-serif; }
.line__name { font-size: 12px; color: var(--muted); }
.line__ctrl { display: flex; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.line__ctrl select { height: 30px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.line .stepper { height: 30px; }
.line__sum { text-align: right; white-space: nowrap; }
.line__sum b { display: block; }
.line__sum small { color: var(--muted); }
.line__remove { background: none; border: 0; color: var(--muted); font-size: 12px; padding: 0; margin-top: 6px; }
.line__remove:hover { color: var(--danger); }

/* ---------- Модалка и тост ---------- */
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(20,18,16,.45); display: grid; place-items: center; padding: 16px; }
.modal__card { background: #fff; border-radius: 14px; width: min(560px, 100%); max-height: 90vh; overflow: auto; padding: 24px; }
.modal__card h2 { margin: 0 0 12px; font: 600 24px 'Cormorant', 'Times New Roman', serif; }
.modal__actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
.summary { width: 100%; border-collapse: collapse; font-size: 13px; }
.summary td { padding: 6px 0; border-bottom: 1px solid var(--line); }
.summary td:last-child { text-align: right; }
.note { background: var(--accent-soft); border-radius: 8px; padding: 10px 12px; font-size: 13px; margin-top: 12px; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 70;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 13px; box-shadow: var(--shadow);
}

/* ---------- Мобильная версия ---------- */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; padding: 16px; }
  .filters {
    position: fixed; inset: 0 auto 0 0; top: 0; width: min(320px, 90vw); max-height: none; z-index: 41;
    border-radius: 0; transform: translateX(-100%); transition: transform .22s ease;
  }
  .filters.open { transform: none; }
  .filters-toggle { display: inline-block; }
  .top__inner { padding: 10px 16px; gap: 12px; flex-wrap: wrap; }
  .brand { min-width: 0; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .cart-btn span { display: none; }
  .user-nav { gap: 6px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
  .buy { flex-direction: column; }
  .buy .stepper { width: 100%; }
  .buy .btn { flex: none; height: 36px; }
  .buy .stepper input { flex: 1; }
  .price-main { font-size: 16px; }
  .toolbar__right { margin-left: 0; }
}

/* ---------- Пользователь в шапке ---------- */
.user-nav { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 13px; white-space: nowrap; }
.user-nav a { color: var(--ink); text-decoration: none; }
.user-nav + .cart-btn { margin-left: 0; }

/* ---------- Мои заказы ---------- */
.orders { display: flex; flex-direction: column; gap: 10px; max-width: 900px; }
.order { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.order summary { display: flex; align-items: center; gap: 16px; padding: 14px 18px; cursor: pointer; list-style: none; flex-wrap: wrap; }
.order summary::-webkit-details-marker { display: none; }
.order[open] summary { border-bottom: 1px solid var(--line); }
.order__no { font-weight: 600; }
.order__date, .order__qty { color: var(--muted); font-size: 13px; }
.order__sum { margin-left: auto; }
.order .summary { width: calc(100% - 36px); margin: 8px 18px 14px; }
.order__comment { margin: 0; padding: 0 18px 14px; }
.order .summary small { color: var(--muted); }
.order .summary td { vertical-align: middle; }
.order .summary .ol__img { width: 64px; padding-right: 12px; }
.ol__img img { display: block; width: 56px; height: 56px; object-fit: cover; border-radius: 8px; background: var(--line); }
.status { font-size: 12px; padding: 2px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.status--done { background: #e6f2ea; color: var(--ok); }
.status--cancelled { background: #f6e3e0; color: var(--danger); }
.status--in_work { background: #e7eef8; color: #3a5f8f; }
.problems { color: var(--danger); padding-left: 18px; }

/* ---------- Страница корзины ---------- */
.btn--ghost { display: grid; place-items: center; text-decoration: none; color: var(--ink); background: #fff; }
.btn--ghost:hover { background: var(--bg); }
.cart-page { max-width: 1280px; margin: 0 auto; padding: 20px 24px 64px; }
.cart-page__head { margin-bottom: 16px; }
.cart-page__head h1 { font: 600 34px/1.1 'Cormorant', 'Times New Roman', serif; margin: 8px 0 0; }
.cart-page__head h1 span { font: 400 16px Montserrat, system-ui, sans-serif; color: var(--muted); }
.back { color: var(--accent); text-decoration: none; font-size: 14px; }
.back:hover { text-decoration: underline; }
.cart-page__grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.cp-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.cp-row {
  display: grid; grid-template-columns: 112px minmax(0, 1fr) auto auto; gap: 20px; align-items: center;
  padding: 16px 20px; border-bottom: 1px solid var(--line);
}
.cp-row:last-child { border-bottom: 0; }
.cp-row img { width: 112px; height: 112px; object-fit: contain; background: #fafafa; border-radius: 8px; }
.cp-info { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cp-info .card__art { justify-content: flex-start; }
.cp-name { font-size: 15px; }
.cp-meta { font-size: 12px; color: var(--muted); }
.cp-unit { font-size: 13px; color: var(--muted); }
.cp-unit b { color: var(--ink); font-weight: 600; }
.cp-ctrl { display: grid; grid-template-columns: repeat(2, 128px); gap: 6px 12px; align-items: end; }
.cp-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cp-field__label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.cp-field select, .cp-static, .cp-field .stepper { width: 100%; height: 38px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.cp-field select { padding: 0 10px; font-weight: 600; cursor: pointer; }
.cp-field select:focus { outline: none; border-color: var(--accent); }
.cp-static { display: grid; place-items: center; color: var(--muted); background: var(--bg); }
.cp-field .stepper button { width: 36px; }
.cp-field .stepper input { flex: 1; min-width: 0; font-weight: 600; }
.cp-avail { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }
.cp-sum { min-width: 130px; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.cp-sum b { font-size: 17px; }
.cp-sum small { color: var(--muted); }
.cp-sum .line__remove { margin-top: 10px; }
.cp-empty { padding: 56px 20px; text-align: center; color: var(--muted); }
.cp-empty a { color: var(--accent); }
.cp-summary {
  position: sticky; top: 84px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; display: flex; flex-direction: column; gap: 14px;
}
.cp-summary h2 { margin: 0; font: 600 24px 'Cormorant', 'Times New Roman', serif; }
.cp-comment { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.cp-comment textarea { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; resize: vertical; outline: none; color: var(--ink); }
.cp-comment textarea:focus { border-color: var(--accent); }

@media (max-width: 900px) {
  .cart-page { padding: 16px 16px 48px; }
  .cart-page__grid { grid-template-columns: 1fr; }
  .cp-summary { position: static; }
}
/* Строки корзины в компактном виде, когда рядом сводка или экран узкий */
@media (max-width: 1200px) {
  .cp-row { grid-template-columns: 88px minmax(0, 1fr); gap: 12px 14px; padding: 14px; }
  .cp-row img { width: 88px; height: 88px; grid-row: span 3; align-self: start; }
  .cp-ctrl { grid-column: 2; grid-template-columns: repeat(2, minmax(0, 168px)); }
  .cp-sum { grid-column: 2; flex-direction: row; align-items: baseline; gap: 10px; flex-wrap: wrap; text-align: left; }
  .cp-sum .line__remove { margin: 0 0 0 auto; }
}
@media (max-width: 420px) {
  .cart-page__head h1 { font-size: 28px; }
  .cp-row { grid-template-columns: 64px minmax(0, 1fr); }
  .cp-ctrl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cp-row img { width: 64px; height: 64px; }
}

/* Большие экраны: шире сайдбар и крупнее карточки */
@media (min-width: 1700px) {
  .layout { grid-template-columns: 270px 1fr; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
}

/* Невысокие экраны (ноутбуки, телефон в горизонтали): корзина прокручивается целиком */
@media (max-height: 640px) {
  .drawer { overflow: auto; }
  .drawer__body { flex: none; overflow: visible; }
  .filters { top: 76px; max-height: calc(100vh - 88px); }
}

/* Узкие телефоны */
@media (max-width: 520px) {
  .layout { padding: 12px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .card__body { padding: 10px 8px 12px; gap: 6px; }
  .card__name { font-size: 12px; }
  .card__set { font-size: 10px; }
  .toolbar { gap: 8px; margin-bottom: 12px; }
  .toolbar__count { flex: 1; font-size: 12px; text-align: right; }
  .toolbar__right { width: 100%; gap: 8px; justify-content: space-between; flex-wrap: nowrap; }
  .select > span, .per-page > span { display: none; }
  .select select { max-width: 160px; }
  .size { min-width: 40px; padding: 3px 6px; }
  .size__v { font-size: 14px; }
  .pager button { min-width: 32px; height: 32px; padding: 0 6px; }
  .modal__card { padding: 18px; }
  .line { grid-template-columns: 52px 1fr; }
  .line img { width: 52px; height: 52px; }
  .line__sum { grid-column: 2; text-align: left; }
}
@media (max-width: 340px) {
  .brand__name { font-size: 20px; }
  .brand__sub { display: none; }
  .price-spec { font-size: 11px; }
}

/* Очень большие мониторы (2K/4K) */
@media (min-width: 2200px) {
  .top__inner, .layout { max-width: 2400px; }
  body { font-size: 15px; }
}

/* История заказов: переход к товару и повтор */
.ol__go { color: inherit; text-decoration: none; }
.ol__go:hover { color: var(--accent); text-decoration: underline; }
.ol__go img { transition: opacity .15s; }
.ol__go:hover img { opacity: .8; }
.ol__out { font-size: 12px; color: var(--muted); }
.order__actions { display: flex; justify-content: flex-end; padding: 0 18px 14px; }
.order__actions .btn { height: 38px; padding: 0 16px; }
.card--flash { animation: card-flash 1.8s ease-out; }
@keyframes card-flash { 0%, 40% { box-shadow: 0 0 0 3px var(--accent); } 100% { box-shadow: 0 0 0 0 transparent; } }

/* «+ Другой размер» в корзине */
.line__links { display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap; }
.line__addsize { border: 0; background: none; padding: 0; margin-top: 6px; font: inherit; font-size: 13px; color: var(--accent); cursor: pointer; }
.line__addsize:hover { text-decoration: underline; }
.cp-field .line__addsize { display: block; text-align: left; align-self: flex-start; }

/* ---------- Значок увеличения на карточке ---------- */
.card__img { cursor: zoom-in; }
.card__zoom {
  position: absolute; right: 10px; bottom: 10px; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; color: var(--ink); pointer-events: none;
  background: rgba(255, 255, 255, .88); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 2px 8px rgba(29, 27, 25, .14), inset 0 0 0 1px rgba(29, 27, 25, .06);
  opacity: 0; transform: scale(.85); transition: opacity .18s, transform .18s, background .18s, color .18s;
}
.card__zoom svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.card:hover .card__zoom { opacity: 1; transform: none; }
.card__img:hover .card__zoom { background: var(--ink); color: #fff; }
@media (hover: none) { .card__zoom { opacity: 1; transform: none; width: 32px; height: 32px; } }

/* ---------- Быстрый просмотр: фото с увеличением + покупка ---------- */
.lb {
  position: fixed; inset: 0; z-index: 65; display: grid; place-items: center; padding: 24px;
  background: rgba(20, 18, 16, .5); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  animation: lb-fade .18s ease-out;
}
.lb__box {
  position: relative; width: min(1040px, 100%); max-height: calc(100vh - 48px);
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, 1fr);
  background: var(--surface); border-radius: 18px; overflow: hidden; box-shadow: 0 24px 70px rgba(20, 18, 16, .35);
  animation: lb-pop .22s cubic-bezier(.2, .8, .3, 1);
}
@keyframes lb-fade { from { opacity: 0; } }
@keyframes lb-pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@keyframes lb-up { from { opacity: 0; transform: translateY(40px); } }
.lb__stage {
  position: relative; aspect-ratio: 1; max-height: calc(100vh - 48px); background: #fafafa; overflow: hidden;
  cursor: zoom-in; touch-action: pinch-zoom;
}
.lb__stage img { width: 100%; height: 100%; object-fit: contain; display: block; transition: transform .25s ease; user-select: none; -webkit-user-drag: none; }
.lb.zoomed .lb__stage { cursor: zoom-out; touch-action: none; }
.lb.zoomed .lb__stage img { transform: scale(2.5); }
.lb__hint {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; align-items: center; gap: 8px;
  padding: 7px 14px 7px 10px; border-radius: 999px; font-size: 12px; color: var(--ink); white-space: nowrap; pointer-events: none;
  background: rgba(255, 255, 255, .9); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 2px 10px rgba(29, 27, 25, .12); transition: opacity .2s;
}
.lb__hint svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.lb.zoomed .lb__hint { opacity: 0; }
.lb__close {
  position: absolute; top: 14px; right: 14px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 0;
  display: grid; place-items: center; background: var(--bg); color: var(--ink); transition: background .15s, transform .2s;
}
.lb__close:hover { background: var(--line); transform: rotate(90deg); }
.lb__close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

.lb__info { padding: 34px 30px 28px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; border-left: 1px solid var(--line); }
.lb__art {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-right: 44px;
  font: 600 12px/1.2 Montserrat, system-ui, sans-serif; color: var(--muted); letter-spacing: .03em;
}
.lb__name { margin: 0; font: 600 28px/1.15 'Cormorant', 'Times New Roman', serif; letter-spacing: .01em; }
.lb__meta { font-size: 13px; color: var(--muted); }
/* «Больше фото на сайте» — ссылка на карточку изделия на sarkissian.ru */
.site-link { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; color: var(--accent);
  text-decoration: none; font-size: 12px; font-weight: 500; }
.site-link svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.site-link:hover, .site-link:focus-visible { text-decoration: underline; text-underline-offset: 2px; }
.art-link { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 3px; }
.art-link svg { width: 11px; height: 11px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.art-link:hover, .art-link:focus-visible { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.site-link--lb { margin: 6px 0 2px; font-size: 13px; }
.lb__price { padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.lb__price .price-main { font-size: 26px; }
.lb__info .size { min-width: 56px; padding: 6px 10px; }
.lb__info .stock { font-size: 13px; color: var(--muted); }
.lb__incart { font-size: 13px; color: var(--accent); }
.lb__incart a { color: inherit; font-weight: 600; }
.lb__buy { display: flex; gap: 10px; margin-top: auto; padding-top: 6px; }
.lb__buy .stepper { height: 46px; border-radius: 10px; }
.lb__buy .stepper button { width: 40px; font-size: 18px; }
.lb__buy .stepper input { width: 48px; font-size: 15px; }
.lb__buy .btn { flex: 1; height: 46px; border-radius: 10px; font-size: 15px; }

@media (max-width: 760px) {
  .lb { padding: 0; place-items: end stretch; }
  .lb__box {
    grid-template-columns: 1fr; max-height: 100%; border-radius: 18px 18px 0 0; overflow-y: auto;
    animation-name: lb-up;
  }
  .lb__stage { max-height: 58vh; width: 100%; justify-self: center; }
  .lb__info { border-left: 0; border-top: 1px solid var(--line); padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); gap: 12px; overflow: visible; }
  .lb__art { padding-right: 0; }
  .lb__name { font-size: 24px; }
  .lb__price { padding: 10px 0; }
  .lb__price .price-main { font-size: 22px; }
  .lb__close { background: rgba(255, 255, 255, .9); box-shadow: 0 2px 8px rgba(0, 0, 0, .12); }
}

/* Заказы: цвет по статусу — новые заметны сразу */
.order { border-left: 4px solid var(--line); transition: background .15s; }
.order--new { border-left-color: #d9822b; background: #fff8ef; box-shadow: 0 1px 0 rgba(217, 130, 43, .15); }
.order--new .order__no, .order--new .order__sum { color: #8f4e0f; }
.order--in_work { border-left-color: #4a78b5; }
.order--done { border-left-color: var(--ok); }
.order--cancelled { border-left-color: #c9c3bb; background: #faf9f7; }
.order--cancelled summary > :not(.status) { opacity: .55; }
.order--cancelled .order__sum { text-decoration: line-through; }
.order .status { font-weight: 500; }
.order--new .status { background: #d9822b; color: #fff; }
.status--cancelled { background: #eeeae5; color: #7a736b; }

/* Фильтр заказов (партнёр и админка) */
.ofilter { max-width: 900px; margin-bottom: 14px; display: flex; flex-direction: column; gap: 10px; }
.admin .ofilter, #tab-orders .ofilter { max-width: none; }
.ofilter__chips { display: flex; gap: 6px; flex-wrap: wrap; }
.ofilter__chip {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); font-size: 13px; color: var(--ink); transition: border-color .15s, background .15s;
}
.ofilter__chip:hover { border-color: var(--ink); }
.ofilter__chip small { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ofilter__chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--line)); }
.ofilter__chip[data-st="new"] { --c: #d9822b; }
.ofilter__chip[data-st="in_work"] { --c: #4a78b5; }
.ofilter__chip[data-st="done"] { --c: var(--ok); }
.ofilter__chip[data-st="cancelled"] { --c: #b9b2a9; }
.ofilter__chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.ofilter__chip[aria-pressed="true"] small { color: rgba(255, 255, 255, .7); }
.ofilter__chip[aria-pressed="true"] i { box-shadow: 0 0 0 2px rgba(255, 255, 255, .35); }
.ofilter__row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ofilter__q {
  flex: 1 1 220px; display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface);
}
.ofilter__q:focus-within { border-color: var(--accent); }
.ofilter__q svg { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; }
.ofilter__q input { flex: 1; min-width: 0; border: 0; outline: none; background: none; height: 100%; }
.ofilter__sel, .ofilter__dates input {
  height: 38px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); padding: 0 10px; outline: none;
}
.ofilter__sel { max-width: 240px; }
.ofilter__dates { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.ofilter__dates input { width: 150px; }
.ofilter__dates input:focus, .ofilter__sel:focus { border-color: var(--accent); }
.ofilter__reset { height: 38px; padding: 0 12px; border: 0; background: none; color: var(--accent); font-size: 13px; }
.ofilter__reset:hover { text-decoration: underline; }
.ofilter__sum { font-size: 13px; color: var(--muted); }
.ofilter__sum b { color: var(--ink); }
@media (max-width: 640px) {
  .ofilter__chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
  .ofilter__chips::-webkit-scrollbar { display: none; }
  .ofilter__chip { flex: none; }
  .ofilter__dates { flex: 1 1 100%; }
  .ofilter__dates input { flex: 1; width: auto; min-width: 0; }
  .ofilter__sel { flex: 1 1 calc(50% - 4px); min-width: 0; max-width: none; }   /* партнёр и условия — рядом */
}

/* ---------- 6. Комплект на карточке ---------- */
.card__kit {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 7px; margin-top: -2px;
  border: 1px solid var(--accent-soft); border-radius: 999px; background: var(--accent-soft); color: var(--accent);
  font-size: 12px; font-weight: 500; transition: border-color .15s, background .15s;
}
.card__kit:hover { border-color: var(--accent); background: #fff; }
.card__kit svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.lb__info .card__kit { font-size: 13px; padding: 5px 12px 5px 9px; margin: 0; }

/* ---------- 5. Активные фильтры ---------- */
.active-filters { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 14px; }
.af {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 8px 0 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); font-size: 13px; color: var(--ink); transition: border-color .15s;
}
.af b { font-weight: 600; }
.af svg { width: 14px; height: 14px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.af:hover { border-color: var(--ink); }
.af:hover svg { stroke: var(--danger); }
.af--all { border: 0; background: none; color: var(--accent); padding: 0 8px; }
.af--all:hover { text-decoration: underline; }

/* ---------- 7. Счётчик корзины «подпрыгивает», уведомление с «Отменить» ---------- */
@keyframes bump { 0% { transform: scale(1); } 30% { transform: scale(1.45); } 60% { transform: scale(.9); } 100% { transform: scale(1); } }
.bump { animation: bump .45s ease; }
.toast { display: flex; align-items: center; gap: 14px; max-width: calc(100vw - 32px); }
.toast button {
  flex: none; border: 0; background: none; color: #f0c98f; font-weight: 600; font-size: 13px; padding: 0; text-decoration: underline;
  text-underline-offset: 3px;
}
.toast button:hover { color: #fff; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px); } }
.toast--in { animation: toast-in .2s ease-out; }

/* ---------- 3. Нижняя панель корзины на телефоне ---------- */
.mbar { display: none; }
@media (max-width: 760px) {
  .mbar:not([hidden]) {
    position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 30;
    display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 14px; border-radius: 16px;
    background: var(--ink); color: #fff; text-decoration: none; box-shadow: 0 10px 30px rgba(20, 18, 16, .3);
    animation: toast-in .25s ease-out;
  }
  @keyframes mbar-in { from { transform: translateY(20px); opacity: 0; } }
  .mbar:not([hidden]) { animation-name: mbar-in; }
  .mbar__icon { position: relative; display: grid; place-items: center; width: 30px; }
  .mbar__icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  .mbar__icon b {
    position: absolute; top: -8px; right: -8px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
    background: #f0c98f; color: var(--ink); font-size: 11px; display: grid; place-items: center;
  }
  .mbar__info { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
  .mbar__info small { font-size: 11px; color: rgba(255, 255, 255, .65); }
  .mbar__info b { font-size: 16px; font-variant-numeric: tabular-nums; }
  .mbar__go {
    margin-left: auto; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 16px; border-radius: 11px;
    background: #fff; color: var(--ink); font-weight: 600; font-size: 14px;
  }
  .mbar__go svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  body.has-mbar { padding-bottom: 84px; }
  body.has-mbar .toast { bottom: calc(84px + env(safe-area-inset-bottom)); }
}

/* ---------- «Добавлено в корзину» — карточка под кнопкой корзины ---------- */
.cpop {
  position: fixed; right: max(16px, calc((100vw - 1600px) / 2 + 16px)); top: 72px; z-index: 72; width: min(380px, calc(100vw - 24px));
  display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: start; padding: 12px 12px 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  box-shadow: 0 14px 40px rgba(20, 18, 16, .18);
}
.cpop::before {                                  /* «хвостик» к кнопке корзины */
  content: ''; position: absolute; top: -6px; right: var(--tail, 34px); width: 12px; height: 12px; transform: rotate(45deg);
  background: var(--surface); border-left: 1px solid var(--line); border-top: 1px solid var(--line);
}
@keyframes cpop-in { from { opacity: 0; transform: translateY(-8px) scale(.98); } }
.cpop--in { animation: cpop-in .22s cubic-bezier(.2, .8, .3, 1); }
.cpop__img { width: 56px; height: 56px; border-radius: 10px; object-fit: contain; background: #fafafa; }
.cpop__body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.cpop__title { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; color: var(--ok); }
.cpop__title svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.cpop__text { font-size: 13px; }
.cpop__text b { font: 600 12px Montserrat, system-ui, sans-serif; }
.cpop__text span { display: block; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cpop__actions { display: flex; gap: 16px; margin-top: 6px; font-size: 13px; }
.cpop__actions button { border: 0; background: none; padding: 0; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.cpop__actions button:hover { color: var(--danger); }
.cpop__actions a { color: var(--accent); font-weight: 600; text-decoration: none; }
.cpop__actions a:hover { text-decoration: underline; }
.cpop__close { border: 0; background: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); padding: 0; }
.cpop__close:hover { background: var(--bg); color: var(--ink); }
.cpop__close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.cpop__timer {                                   /* полоска: сколько осталось до закрытия */
  position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--accent); opacity: .5; transform-origin: left;
  animation: cpop-timer 2s linear forwards;
}
.cpop--hold .cpop__timer { animation-play-state: paused; }
@keyframes cpop-timer { to { transform: scaleX(0); } }
@media (max-width: 760px) {
  .cpop { right: 12px; left: 12px; width: auto; }
}

/* ---------- Окно подтверждения (вместо системного confirm) ---------- */
.ask {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px;
  background: rgba(20, 18, 16, .45); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  animation: lb-fade .15s ease-out;
}
.ask--out { opacity: 0; transition: opacity .15s; }
.ask__card {
  width: min(400px, 100%); background: var(--surface); border-radius: 18px; padding: 26px 24px 20px; text-align: center;
  box-shadow: 0 24px 60px rgba(20, 18, 16, .3); animation: lb-pop .2s cubic-bezier(.2, .8, .3, 1);
}
.ask__icon {
  width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
}
.ask__icon--danger { background: #f8e6e3; color: var(--danger); }
.ask__icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ask h3 { margin: 0 0 6px; font: 600 24px/1.2 'Cormorant', 'Times New Roman', serif; }
.ask p { margin: 0 0 4px; color: var(--muted); font-size: 14px; }
.ask__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.ask__actions .btn { height: 44px; border-radius: 10px; font-size: 14px; }
.btn--danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn--danger:hover { background: #9c3b30; }

/* Условия работы: выкуп / комиссия */
.dtag { font-size: 11px; border-radius: 999px; padding: 1px 8px; font-weight: 500; }
.dtag--buyout { background: #e8f0ea; color: #2f6b4a; }
.dtag--commission { background: #ece6f5; color: #5d4590; }
.deal-note { color: var(--muted); font-size: 13px; }
.deal-note b { color: var(--ink); }

/* ---------- Шапка: «Мои заказы» и профиль ---------- */
.nav-pill {
  position: relative; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 999px;
  color: var(--ink); font-weight: 500; transition: background .15s, color .15s;
}
.nav-pill svg, .acct__menu svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav-pill:hover { background: var(--bg); }
.nav-pill--on { background: var(--accent-soft); color: var(--accent) !important; }
.nav-pill__badge {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center;
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums;
}

.acct { position: relative; }
.acct__btn {
  display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 10px 0 4px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); transition: border-color .15s, box-shadow .15s;
}
.acct__btn:hover, .acct--open .acct__btn { border-color: var(--ink); }
.acct--open .acct__btn { box-shadow: 0 0 0 3px var(--accent-soft); }
.acct__avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--gold); color: #000; font: 600 16px/1 'Cormorant', 'Times New Roman', serif;
}
.acct__avatar--lg { width: 44px; height: 44px; font-size: 22px; }
.acct__name { max-width: 180px; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.acct__chev { width: 16px; height: 16px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.acct--open .acct__chev { transform: rotate(180deg); }

.acct__menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; width: 270px; padding: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 40px rgba(20, 18, 16, .16);
  white-space: normal; animation: cpop-in .16s ease-out;
}
.acct__head { display: flex; align-items: center; gap: 12px; padding: 8px 8px 10px; }
.acct__head b { display: block; font-size: 14px; line-height: 1.25; }
.acct__head small { color: var(--muted); font: 12px Montserrat, system-ui, sans-serif; }
.acct__terms { padding: 0 8px 10px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.acct__terms .dtag { background: var(--bg); color: var(--muted); }
.acct__terms .dtag--buyout { background: #e8f0ea; color: #2f6b4a; }
.acct__terms .dtag--commission { background: #ece6f5; color: #5d4590; }
.acct__menu a, .acct__menu button[role="menuitem"] {
  display: flex; align-items: center; gap: 10px; width: 100%; height: 40px; padding: 0 10px; border: 0; border-radius: 9px;
  background: none; color: var(--ink); font-size: 14px; text-align: left;
}
.acct__menu a:hover, .acct__menu button[role="menuitem"]:hover { background: var(--bg); }
.acct__menu svg { color: var(--muted); }
.acct__logout { margin-top: 4px; border-top: 1px solid var(--line) !important; border-radius: 0 0 9px 9px !important; color: var(--danger) !important; }
.acct__logout svg { color: var(--danger) !important; }

@media (max-width: 900px) {
  .nav-pill span, .acct__name, .acct__chev { display: none; }
  .nav-pill { width: 40px; padding: 0; justify-content: center; }
  .nav-pill__badge { position: absolute; top: -2px; right: -4px; min-width: 18px; height: 18px; font-size: 10px; box-shadow: 0 0 0 2px var(--surface); }
  .acct__btn { padding: 0 3px; width: 40px; justify-content: center; }
}
/* Средние экраны: профиль — только аватар, чтобы поиску хватало места */
.search { min-width: 220px; }
@media (max-width: 1240px) and (min-width: 901px) {
  .acct__name, .acct__chev { display: none; }
  .acct__btn { padding: 0 3px; width: 40px; justify-content: center; }
}
@media (max-width: 900px) { .search { min-width: 0; } }
/* Телефон: логотип, «Мои заказы», профиль и корзина — в одну строку, поиск под ними */
@media (max-width: 520px) {
  .top__inner { gap: 8px; }
  .brand { min-width: 0; margin-right: auto; }
  .brand__name { font-size: 20px; letter-spacing: .1em; }
  .brand__sub { font-size: 11px; }
  .user-nav { margin-left: 0; }
  .cart-btn { padding: 0 12px; }
}

/* ---------- Пустые состояния ---------- */
.empty-state {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px;
  padding: 56px 24px 48px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  animation: lb-fade .25s ease-out;
}
.empty-state__icon {
  position: relative; width: 88px; height: 88px; margin-bottom: 6px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 30% 25%, #fff 0, var(--accent-soft) 70%); color: var(--accent);
  box-shadow: 0 0 0 10px rgba(243, 236, 226, .45);
}
.empty-state__icon svg { width: 38px; height: 38px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.empty-state h3 { margin: 0; font: 600 28px/1.15 'Cormorant', 'Times New Roman', serif; }
.empty-state p { margin: 0; max-width: 420px; color: var(--muted); font-size: 14px; }
.empty-state__btn { margin-top: 10px; height: 44px; padding: 0 22px; border-radius: 999px; display: inline-grid; place-items: center; text-decoration: none; font-size: 14px; }
a.btn--primary.empty-state__btn { color: #000; }
.empty-state--compact { padding: 36px 20px; border: 0; background: none; }
.empty-state--compact .empty-state__icon { width: 68px; height: 68px; box-shadow: 0 0 0 8px rgba(243, 236, 226, .45); }
.empty-state--compact .empty-state__icon svg { width: 30px; height: 30px; }
.empty-state--compact h3 { font-size: 22px; }
.empty-steps {
  list-style: none; margin: 26px 0 0; padding: 22px 0 0; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; width: min(640px, 100%);
}
.empty-steps li { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.empty-steps b {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line); color: var(--accent); font: 600 15px 'Cormorant', 'Times New Roman', serif;
}
@media (max-width: 560px) {
  .empty-state { padding: 40px 18px 34px; }
  .empty-steps { grid-template-columns: 1fr; gap: 12px; }
  .empty-steps li { flex-direction: row; text-align: left; }
}
/* Загрузка истории — «скелет» вместо текста */
.orders-skeleton { display: flex; flex-direction: column; gap: 10px; }
.orders-skeleton i {
  height: 52px; border-radius: var(--radius); border: 1px solid var(--line);
  background: linear-gradient(90deg, var(--surface) 25%, #f6f2ec 50%, var(--surface) 75%) 0 0 / 200% 100%;
  animation: skeleton 1.2s ease-in-out infinite;
}
@keyframes skeleton { to { background-position: -200% 0; } }
/* Пустая корзина — блок на всю ширину, без правой колонки «Ваш заказ» */
.cart-page__grid:has(#cpSummary[hidden]) { grid-template-columns: minmax(0, 900px); }

/* «Мои заказы» — только в меню профиля; число заказов в работе — справа в пункте */
.acct__badge {
  margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center;
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.acct__item--on { background: var(--accent-soft) !important; color: var(--accent) !important; }
.acct__item--on svg { color: var(--accent) !important; }

/* ---------- Выбор условий заказа (партнёр «выкуп и комиссия») ---------- */
.deal-pick { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 10px; }
.deal-pick__label { font-size: 12px; color: var(--muted); }
.deal-pick__opts { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 3px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); }
.deal-pick__opts label { position: relative; cursor: pointer; }
.deal-pick__opts input { position: absolute; opacity: 0; pointer-events: none; }
.deal-pick__opts span {
  display: flex; align-items: center; justify-content: center; gap: 6px; height: 34px; border-radius: 8px;
  font-size: 13px; font-weight: 500; color: var(--muted); transition: background .15s, color .15s, box-shadow .15s;
}
.deal-pick__opts span::before {
  content: ''; width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid currentColor; box-sizing: border-box; opacity: .6;
}
.deal-pick__opts label:hover span { color: var(--ink); }
.deal-pick__opts input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(29, 27, 25, .12); }
.deal-pick__opts input[value="buyout"]:checked + span::before { border: 4px solid #2f6b4a; opacity: 1; }
.deal-pick__opts input[value="commission"]:checked + span::before { border: 4px solid #5d4590; opacity: 1; }
.deal-pick__opts input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
@keyframes deal-shake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }
.deal-pick--warn .deal-pick__opts { border-color: var(--danger); animation: deal-shake .35s; }
.deal-pick--warn .deal-pick__label { color: var(--danger); }
.deal-note span { color: var(--muted); font-size: 12px; }

/* ---------- Контактное лицо (обязательно) ---------- */
.contact-field { display: flex; flex-direction: column; gap: 6px; margin: 2px 0 10px; font-size: 12px; color: var(--muted); }
.contact-field i { color: var(--danger); font-style: normal; }
.contact-field input {
  height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; outline: none;
  font-size: 14px; color: var(--ink);
}
.contact-field input:focus { border-color: var(--accent); }
.contact-field--warn { color: var(--danger); }
.contact-field--warn input { border-color: var(--danger); animation: deal-shake .35s; }

/* ---------- Выравнивание карточек в ряду: артикул, название, цена, размеры и кнопка — на одной линии ---------- */
@supports (grid-template-rows: subgrid) {
  /* промежуток между рядами — отступом карточки: row-gap сетки в Chrome раздувает пустые строки subgrid */
  .grid { --grid-gap: 16px; row-gap: 0; }
  .grid > .card { margin-bottom: var(--grid-gap); }
  @media (max-width: 900px) { .grid { --grid-gap: 10px; } }
  @media (max-width: 520px) { .grid { --grid-gap: 8px; } }
  @media (min-width: 1700px) { .grid { --grid-gap: 20px; } }
  .grid > .card { display: grid; grid-row: span 7; grid-template-rows: subgrid; row-gap: 0; }
  .grid > .card > .card__body { grid-row: span 6; display: grid; grid-template-rows: subgrid; row-gap: 0; }
  .grid .card__body > * + * { margin-top: 8px; }
  @media (max-width: 520px) { .grid .card__body > * + * { margin-top: 6px; } }
  .grid .card__body > :empty { margin-top: 0; }
  .grid .card__kit { margin-top: 0; }
  .grid .card__meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .grid .buy { align-self: end; }
}
.card__price { display: flex; flex-direction: column; gap: 2px; }
.price-main { font-variant-numeric: tabular-nums; }
/* Вторая цена (видна только админу) — всегда отдельной строкой, а не то рядом, то под основной */
.card .prices { flex-direction: column; align-items: flex-start; gap: 2px; }

/* ---------- Корзина: единый вид полей и итогов ---------- */
.totals > div { align-items: baseline; gap: 12px; }
.totals b { font-variant-numeric: tabular-nums; white-space: nowrap; }
/* подписи полей в сводке — одного размера и цвета */
.deal-pick__label, .contact-field > span, .cp-comment > span { font-size: 13px; color: var(--muted); }
.contact-field { margin: 0; }
.deal-pick { margin: 0; }
/* поля ввода в сводке — одной высоты, радиуса и рамки */
.contact-field input { height: 40px; }
.cp-comment textarea, .drawer__foot textarea { font: inherit; font-size: 14px; padding: 9px 12px; line-height: 1.4; color: var(--ink); }
.drawer__foot textarea:focus { border-color: var(--accent); }
/* у изделия без размера — спокойная надпись вместо пустого «неактивного» поля */
.cp-static { background: none; border-color: transparent !important; justify-content: start; place-items: center start; font-size: 13px; }
.cp-sum b, .line__sum b, .cp-unit b { font-variant-numeric: tabular-nums; }
/* «+ Другой размер» под списком размеров не должен опускать поле «Количество» */
.cp-ctrl { align-items: start; }
/* ---------- Единые боковые отступы шапки и страниц ---------- */
@media (max-width: 520px) {
  .top__inner { padding-left: 12px; padding-right: 12px; }
  .cart-page { padding-left: 12px; padding-right: 12px; }
}

/* ---------- Заказы: одинаковые «пилюли» и ровные колонки ---------- */
.order summary .status, .order summary .dtag, .order summary .ptag {
  display: inline-flex; align-items: center; justify-content: center; height: 22px; padding: 0 10px;
  font-size: 12px; line-height: 1; white-space: nowrap; box-sizing: border-box;
}
.order summary .ptag { border: 1px solid var(--line); }
.order__sum { white-space: nowrap; font-variant-numeric: tabular-nums; }
.order__partner { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Широкий экран: каждая часть заказа в своей колонке — статусы, условия и суммы стоят ровно друг под другом */
@media (min-width: 761px) {
  .order summary { display: grid; align-items: center; column-gap: 14px; }
  #ordersList .order summary { grid-template-columns: 64px 138px 104px 64px 96px minmax(0, 1fr); }
  .admin .order summary { grid-template-columns: 56px 132px minmax(0, 1fr) 96px 60px 92px 84px 116px; }
  .order summary > * { justify-self: start; }
  .order summary > .order__sum { justify-self: end; }
}
/* Телефон: строка 1 — номер, дата, статус справа; строка 2 — партнёр; строка 3 — штуки, условия, сумма справа */
@media (max-width: 760px) {
  .order summary { gap: 0 10px; padding: 12px 14px; }
  .order summary::after { content: ''; order: 4; flex-basis: 100%; height: 8px; }   /* перенос строки */
  .admin .order summary::after { display: none; }
  .order__partner { margin: 6px 0; }
  .order__no { order: 1; } .order__date { order: 2; }
  .order summary .status { order: 3; margin-left: auto; }
  .order__partner { order: 4; flex-basis: 100%; }
  .order__qty { order: 5; } .order summary .dtag { order: 6; } .order summary .ptag { order: 7; }
  .order__sum { order: 8; }
  .order .summary { width: calc(100% - 28px); margin: 8px 14px 12px; }
  .order__comment, .order__actions { padding-left: 14px; padding-right: 14px; }
}

/* ---------- Карточка: «Комплект» на фото, размеры одной строкой ---------- */
.card__img .card__kit {
  position: absolute; left: 8px; bottom: 8px; margin: 0; max-width: calc(100% - 60px);
  padding: 4px 10px 4px 8px; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: rgba(255, 255, 255, .9); border-color: rgba(29, 27, 25, .08); color: var(--accent);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); box-shadow: 0 1px 4px rgba(29, 27, 25, .1);
  cursor: pointer;
}
.card__img .card__kit:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
/* «На сайте ↗» — правый верхний угол фото (слева вверху — «В корзине», внизу — «Комплект» и лупа) */
.card__site {
  position: absolute; top: 8px; right: 8px; display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 9px; border-radius: 999px; font-size: 12px; font-weight: 500; text-decoration: none; cursor: pointer;
  color: var(--accent); background: rgba(255, 255, 255, .9); border: 1px solid rgba(29, 27, 25, .08);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); box-shadow: 0 1px 4px rgba(29, 27, 25, .1);
  transition: background .15s, color .15s, border-color .15s;
}
.card__site svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.card__site:hover, .card__site:focus-visible { background: var(--ink); border-color: var(--ink); color: #fff; }
/* в узкой карточке (телефон, много колонок) — только значок ↗, чтобы не наезжать на «В корзине» */
.card__img { container-type: inline-size; }
@container (max-width: 220px) {
  .card__site { padding: 0; width: 28px; height: 28px; justify-content: center; }
  .card__site-t { display: none; }
  .card__site svg { width: 14px; height: 14px; }
}
.card__opts { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.card__opts .size-block__label { margin: 0; }
.card .sizes {
  flex-wrap: nowrap; gap: 5px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.card .sizes::-webkit-scrollbar { display: none; }
.card .size { flex: none; min-width: 44px; height: 40px; padding: 0 7px; justify-content: center; scroll-snap-align: start; }
.card .size__v { font-size: 14px; }
.card .size--range .size__v { font-size: 12.5px; }
/* край строки гаснет, если есть ещё размеры за ним */
.sizes--more-r { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent); }
.sizes--more-l { -webkit-mask-image: linear-gradient(90deg, transparent, #000 32px); mask-image: linear-gradient(90deg, transparent, #000 32px); }
.sizes--more-l.sizes--more-r { -webkit-mask-image: linear-gradient(90deg, transparent, #000 32px, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(90deg, transparent, #000 32px, #000 calc(100% - 32px), transparent); }
/* изделие без размера — такая же «плашка», чтобы все карточки были одной высоты */
.card .size--solo { align-items: flex-start; padding: 0 12px; background: var(--bg); border-color: transparent; cursor: default; }
.card .size--solo .size__v { font-size: 14px; font-weight: 600; }
@media (max-width: 520px) {
  .card .size { min-width: 40px; height: 38px; padding: 0 5px; }
  .card__img .card__kit { left: 6px; bottom: 6px; font-size: 11px; padding: 3px 8px 3px 6px; }
  .card__site { top: 6px; right: 6px; font-size: 11px; }
}

/* ---------- Корзина: выбор дополнительного размера ---------- */
.line__addsize.is-open { color: var(--muted); }
.addsize {
  grid-column: 1 / -1; margin-top: 8px; padding: 10px 12px; border-radius: 10px;
  background: var(--accent-soft); display: flex; flex-direction: column; gap: 8px; animation: addsize-in .18s ease-out;
}
.addsize__label { font-size: 12px; color: var(--accent); font-weight: 500; }
.addsize__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.addsize .size { min-width: 46px; height: 40px; padding: 0 8px; justify-content: center; background: #fff; border-color: transparent; box-shadow: 0 1px 2px rgba(29, 27, 25, .08); }
.addsize .size:hover { border-color: var(--ink); background: var(--ink); color: #fff; }
.addsize .size:hover .size__q { color: rgba(255, 255, 255, .75); }
.addsize .size__v { font-size: 14px; }
@keyframes addsize-in { from { opacity: 0; transform: translateY(-4px); } }
.line--new { animation: line-new 1.6s ease-out; }
@keyframes line-new { 0%, 35% { background: var(--accent-soft); } 100% { background: transparent; } }
/* «В наличии» — под количеством, на уровне «+ Другой размер» */
.cp-field .cp-avail { grid-column: auto; margin-top: 6px; font-size: 13px; line-height: 1.2; }

/* ---------- Шапка магазина: поиск начинается ровно над сеткой товаров (колонка логотипа = ширина фильтров) ---------- */
@media (min-width: 901px) {
  .top__inner--shop .brand { flex: 0 0 250px; min-width: 0; }
}
@media (min-width: 1700px) {
  .top__inner--shop .brand { flex-basis: 270px; }
}
.card__body { padding: 14px; }
@media (max-width: 520px) { .card__body { padding: 10px; } }

/* ---------- Корзина и «Мои заказы»: тот же контейнер, что у шапки и каталога — левый край совпадает везде ---------- */
.cart-page { max-width: 1840px; }
@media (min-width: 2200px) { .cart-page { max-width: 2400px; } }
/* Строка корзины: всё от верхнего края, цена — на уровне полей ввода, «Удалить» — под ней */
@media (min-width: 1201px) {
  .cp-row { align-items: start; }
  /* высота = высоте блока «Размер / Количество»: цена на уровне полей, «Удалить» — на одной линии с «В наличии» */
  .cp-sum { padding-top: 26px; min-height: 86px; box-sizing: border-box; }
  .cp-sum .line__remove { margin-top: auto; line-height: 18px; }
  .cp-sum { gap: 0; } .cp-sum small { line-height: 16px; }
}
.line__addsize, .cp-field .cp-avail { line-height: 18px; margin-top: 6px; }
/* Быстрый просмотр: одинаковые поля со всех сторон, крестик по центру первой строки */
@media (min-width: 761px) {
  .lb__info { padding: 32px; }
  .lb__close { top: 20px; right: 20px; }
  .lb__art { padding-right: 56px; min-height: 16px; }
}

/* ---------- Фильтры: одинаковые поля слева и справа ---------- */
@media (min-width: 901px) {
  /* полоса прокрутки съедала правое поле — прячем её (прокрутка колесом/тачпадом остаётся) */
  .filters { top: 86px; max-height: calc(100vh - 106px); padding: 18px; scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
}
.filters__head { align-items: center; min-height: 24px; }
.f-block { margin-top: 16px; padding-top: 16px; }
.f-block h3 { margin-top: 0; }
/* строка камня: фон при наведении выходит за край, а текст стоит ровно под заголовком */
.stone { margin: 0 -6px; padding: 5px 6px; }
.chip { display: inline-flex; align-items: center; height: 30px; padding: 0 11px; }
.price-range input, .stone-search { height: 36px; }
.ofilter { margin-bottom: 16px; }
@media (min-width: 521px) and (max-width: 760px) { .mbar:not([hidden]) { left: 16px; right: 16px; } }
/* Корзина на телефоне: строки и блок «Ваш заказ» с одинаковым внутренним отступом — содержимое на одной вертикали */
@media (max-width: 760px) {
  .cp-row, .cp-summary { padding: 16px; }
}
/* Боковая корзина: одинаковые поля 20px по всем сторонам шапки и низа */
.drawer__head, .drawer__foot { padding: 20px; }

/* ---------- Карточка никогда не шире своей колонки ---------- */
/* Раньше нижняя строка («− 1 +» и «В корзину») требовала ~256px, и в узких колонках правый край карточки обрезался.
   Теперь: помещаются оба — в одну строку; не помещаются — каждый на всю ширину, друг под другом. */
.grid > .card { min-width: 0; }
@supports (grid-template-rows: subgrid) {
  .grid > .card { grid-template-columns: minmax(0, 1fr); }
  .grid > .card > .card__body { grid-template-columns: minmax(0, 1fr); min-width: 0; }
}
.card .buy { flex-wrap: wrap; flex-direction: row; }
.card .buy .stepper { flex: 1 0 102px; }
.card .buy .stepper input { flex: 1; width: auto; min-width: 0; }
.card .buy .btn { flex: 1 0 118px; }

/* ---------- Пустая корзина / нет заказов: сообщение по центру страницы, а не в левой колонке ---------- */
.cart-page__grid:has(> #cpSummary[hidden]) { grid-template-columns: minmax(0, 1fr); }
.orders:has(> .empty-state:only-child) { max-width: none; }
/* без двойной рамки: у пустого состояния своя карточка */
.cp-list:has(> .empty-state) { background: none; border: 0; }
/* одинаковые поля сверху и снизу */
.empty-state { padding: 52px 24px; }
@media (max-width: 760px) { .empty-state { padding: 36px 18px; } }
.empty-state.empty-state--compact { padding: 36px 20px; }

/* ================= Единая шкала размеров (дизайн-система) =================
   Высота элементов управления: 30 — фильтр-«чипы», 36 — обычные кнопки и поля, 40 — шапка и поля форм, 44 — главная кнопка.
   Размеры шрифта: 10 · 11 · 12 · 13 · 14 · 16 · 18 (+ заголовки Cormorant). Никаких «дробных» 10,83 / 11,67 px. */
.btn, .select select, .per-page button, .stepper, .pager button { height: 36px; }
.icon-btn { width: 36px; height: 36px; }
.cp-field select, .cp-static, .cp-field .stepper { height: 40px; }
.chip small { font-size: 11px; }
.stone small { font-size: 12px; }
.card .size--range .size__v { font-size: 12px; }
.filters h2 { font-size: 16px; font-weight: 600; }
.btn.btn--wide, .empty-state__btn { height: 44px; }
/* Боковая корзина: размер и количество — обычной высоты 36px, со скруглением как у остальных полей */
.line__ctrl select { height: 36px; padding: 0 8px; border-radius: 8px; }
.line .stepper { height: 36px; }
/* Фильтр заказов (партнёр и админ): чипы 30, поля 40 — по общей шкале */
.ofilter__chip { height: 30px; }
.ofilter__q, .ofilter__sel, .ofilter__dates input { height: 40px; }
.ask__card { padding: 24px; }   /* одинаковые поля со всех сторон */
/* Телефон: текстовые ссылки-кнопки получают зону нажатия ≥ 36px, внешне ничего не сдвигается */
@media (max-width: 760px) {
  .back, #resetFilters, .line__addsize, .line__remove, .lb__incart a, #cpClear, #clearCart {
    display: inline-block; padding-top: 9px; padding-bottom: 9px; margin-top: -9px; margin-bottom: -9px;
  }
  .line__addsize, .line__remove { margin-top: -3px; }          /* у них был отступ 6px сверху */
  .cp-sum .line__remove { margin-top: -9px; margin-bottom: -9px; }
}
.nowrap { white-space: nowrap; }
/* Админка, заказы: колонки помещаются только от 1024px; уже — та же аккуратная раскладка в 3 строки, что на телефоне */
@media (min-width: 761px) and (max-width: 1023px) {
  .admin .order summary { display: flex; flex-wrap: wrap; align-items: center; gap: 0 10px; padding: 12px 16px; }
  .admin .order summary::after { display: none; }
  .admin .order__no { order: 1; } .admin .order__date { order: 2; }
  .admin .order summary .status { order: 3; margin-left: auto; }
  .admin .order__partner { order: 4; flex-basis: 100%; margin: 6px 0; }
  .admin .order__qty { order: 5; } .admin .order summary .dtag { order: 6; } .admin .order summary .ptag { order: 7; }
  .admin .order__sum { order: 8; margin-left: auto; }
}
/* Быстрый просмотр: фото на всю высоту окна — без светлой полосы под ним, когда описание выше квадрата */
@media (min-width: 761px) { .lb__stage { align-self: stretch; width: 100%; } }   /* ширина = колонке, высота = высоте окна */
/* Быстрый просмотр: текст кнопки в одну строку; не помещается рядом с количеством — кнопка уходит на строку ниже во всю ширину */
.lb__buy { flex-wrap: wrap; }
.lb__buy .stepper { flex: 1 0 120px; }
.lb__buy .stepper input { flex: 1; width: auto; min-width: 0; }
.lb__buy .btn { flex: 1 0 140px; white-space: nowrap; }
.lb__buy .stepper, .lb__buy .btn { height: 44px; }   /* главная кнопка — 44px, как «Подтвердить заказ» */
/* Кнопка «Показать N изделий» внизу панели фильтров — только на телефоне/планшете */
.filters__apply { display: none; }
@media (max-width: 900px) {
  .filters { display: flex; flex-direction: column; padding-bottom: 0; }
  .filters__apply {
    display: block; position: sticky; bottom: 0; margin: 16px -16px 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: var(--surface); border-top: 1px solid var(--line); margin-top: auto;
  }
}

/* ---------- Плашки «Размер» и «Наличие» — единый вид и шрифт ----------
   Одна и та же плашка: белый фон, тонкая рамка, текст по центру; сверху значение (14/600), снизу подпись (10/500). */
.card .size, .card .size--solo {
  height: 40px; padding: 0 9px; border: 1px solid var(--line); border-radius: 8px; background: #fff;
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
}
.card .size__v, .card .size--range .size__v, .card .size--solo .size__v {
  font-size: 14px; font-weight: 600; line-height: 1.1; letter-spacing: 0; font-variant-numeric: tabular-nums;
}
.card .size__q, .card .size--solo .size__q { font-size: 10px; font-weight: 500; line-height: 1.1; color: var(--muted); }
.card .size[aria-pressed="true"] .size__q { color: rgba(255, 255, 255, .75); }
/* «Наличие» — не кнопка: без реакции на наведение */
.card .size--solo { min-width: 64px; cursor: default; }
.card .size--solo:hover { border-color: var(--line); }
@media (max-width: 520px) { .card .size, .card .size--solo { height: 38px; padding: 0 6px; } }
.card .size[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.card .size:not(.size--solo):not([aria-pressed="true"]):hover { border-color: var(--ink); }

/* ---------- «Мои заказы»: фильтр и список — на всю ширину страницы, как шапка, каталог и админка ----------
   Раньше были ограничены 900px и прижаты влево: справа оставалась пустая половина экрана. */
.orders, .ofilter { max-width: none; }
@media (min-width: 761px) { .ofilter__dates input { width: 170px; } }   /* на телефоне даты делят строку пополам */

/* ---------- Размеры в карточке: одна строка, плашки одинаковой ширины, без прокрутки и затемнения ---------- */
.card .sizes.sizes--fit {
  display: grid; grid-template-columns: repeat(var(--slots, 5), minmax(0, 1fr)); gap: 4px;
  overflow: visible; -webkit-mask-image: none; mask-image: none;
}
.card .sizes--fit .size { min-width: 0; width: 100%; padding: 0 2px; }
.card .sizes--fit .size--range { grid-column: span 2; }
.card .sizes--fit .size__v { font-size: 13px; white-space: nowrap; }
.card .size--more { background: var(--bg); border-color: transparent; }
.card .size--more .size__v { color: var(--accent); }
.card .size--more:hover { border-color: var(--accent) !important; }

/* ---------- Итог сборки в «Мои заказы» ---------- */
.order__new { display: inline-block; margin-left: 6px; padding: 0 8px; border-radius: 999px; background: var(--accent); color: var(--accent-ink);
  font-size: 12px; line-height: 20px; vertical-align: 1px; font-weight: 600; }
.order__result { margin: 0 18px 14px; padding: 12px 14px; border-radius: var(--radius); background: var(--accent-soft); font-size: 14px; }
.res__line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.res__arrow { color: var(--accent); font-weight: 600; }
.res__doc, .res__note { margin-top: 6px; color: var(--muted); font-size: 13px; }
.res__un { margin-top: 10px; }
.res__un ul { margin: 4px 0 0; padding-left: 18px; }
.res__un li + li { margin-top: 2px; }
.res__why, .ol__unshipped { display: inline-block; padding: 0 8px; border-radius: 999px; background: #f6e3e0; color: var(--danger);
  font-size: 12px; line-height: 20px; }
.acct__badge--new { background: var(--accent); color: var(--accent-ink); }
.acct--unread #acctBtn { position: relative; }
.acct--unread #acctBtn::after { content: ''; position: absolute; top: 0; right: 0; width: 10px; height: 10px; border-radius: 50%;
  background: var(--danger); box-shadow: 0 0 0 2px var(--surface); }
@media (max-width: 760px) { .order__result { margin-left: 14px; margin-right: 14px; } }

/* ---------- Мои данные (#profile) ---------- */
.prof { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; align-items: start; }
.prof__card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.prof__card h2 { margin: 0 0 4px; font: 600 20px/1.2 'Cormorant', 'Times New Roman', serif; }
.prof__terms { margin: 0; display: grid; gap: 10px; }
.prof__terms div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.prof__terms dt { color: var(--muted); font-size: 13px; }
.prof__terms dd { margin: 0; font-weight: 500; text-align: right; }
.prof__hint { margin: 0; font-size: 12px; color: var(--muted); }
.prof__field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.prof__field input { font: inherit; font-size: 14px; color: var(--ink); padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.prof__field input:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.prof__field small { font-size: 11px; }
.prof__err { color: var(--danger); font-size: 13px; min-height: 0; }
.prof__err:empty { display: none; }
.prof .btn { align-self: flex-start; }

/* ---------- Демо-доступ ---------- */
.demo-note { margin: 0 0 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--accent-soft); font-size: 13px; line-height: 1.45; }
.buy--demo { display: flex; align-items: center; justify-content: center; min-height: 40px; padding: 6px 10px; text-align: center;
  font-size: 12px; color: var(--muted); border: 1px dashed var(--line); border-radius: 8px; }

/* Корзина: фото и название ведут к изделию в каталоге */
.line [data-goto], .cp-row [data-goto] { cursor: pointer; }
.line__name[data-goto]:hover, .cp-name[data-goto]:hover { text-decoration: underline; text-underline-offset: 2px; }

/* Телефон: Montserrat шире прежнего шрифта — дата остатков переносится (не выталкивает корзину из ряда),
   артикул в узкой карточке на 1px мельче, чтобы не уходил на вторую строку */
@media (max-width: 600px) {
  .top__inner--shop .brand { flex: 1 1 0; min-width: 0; }
  #stockAt { white-space: normal; }
  .card__art { font-size: 11px; letter-spacing: 0; }
}
