/* SOFANY — каталоги в стиле .ui-* (/catalog/modern/, /catalog/chairs/). Макет design-mockups/divany-kresla-mock.html,
   «да, верстай» владельца 01.10.2026. Собирается tools/build-catalog-ui.py, поведение — js/catalog-ui.js. Всё под main.cux. */
body.cux-body { margin: 0; background: var(--ui-page); }
.cux [hidden] { display: none !important; }   /* «Показать ещё» и пустой результат прячутся атрибутом hidden */

/* первый экран */
.cux .cu-hero { min-height: min(80vh, 760px); }
.cux .ui-h1 .ui-br { display: block; font-weight: 300; color: var(--ui-accent); }
.cux .cu-stats { display: flex; flex-wrap: wrap; gap: 20px 44px; margin-top: 34px; }
.cux .cu-stats b { display: block; font-family: 'Unbounded', sans-serif; font-weight: 200; font-size: 34px; color: #F5ECE2; line-height: 1; }
.cux .cu-stats span { display: block; margin-top: 8px; font-size: 12px; color: #A08E7C; }

/* подбор */
#pick, [data-cu-bar] { scroll-margin-top: 96px; }
.cux .fx { padding: 34px 36px; border-radius: 28px; background: var(--ui-card); border: 1px solid var(--ui-line); }
.cux .fx-h { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 30px; }
.cux .fx-h .ui-k { margin-bottom: 12px; }
.cux .fx-h button { background: none; border: 0; padding: 0; font: 400 14px 'Onest', system-ui, sans-serif; color: var(--ui-accent); cursor: pointer; white-space: nowrap; }
.cux .fx-sec + .fx-sec { margin-top: 30px; }
.cux .fx-lbl { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.cux .fx-lbl i { font-style: normal; flex: none; width: 26px; height: 26px; border-radius: 50%; background: rgba(200,118,60,.14); color: var(--ui-accent);
  font: 300 12px 'Unbounded', sans-serif; display: flex; align-items: center; justify-content: center; }
.cux .fx-lbl b { font: 300 16px 'Unbounded', sans-serif; color: var(--ui-strong); }
.cux .fx-lbl span { font-size: 13px; color: var(--ui-muted); }
.cux .fx-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.cux .fx-tiles.b2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cux .fx-tiles.b4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cux .fx-t { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 8px 14px; border-radius: 18px;
  background: var(--ui-field); border: 1px solid transparent; color: var(--ui-nav); cursor: pointer; font-family: 'Onest', system-ui, sans-serif;
  transition: border-color .15s, background .15s, opacity .15s; }
.cux .fx-t:hover { border-color: rgba(200,118,60,.4); }
.cux .fx-t svg { width: 72px; height: 54px; color: var(--ui-nav); transition: color .15s; }
.cux .fx-t b { font-weight: 400; font-size: 14px; color: var(--ui-strong); text-align: center; }
.cux .fx-t small { font-size: 12px; color: var(--ui-muted); }
.cux .fx-t[aria-pressed="true"] { border-color: var(--ui-accent); background: rgba(200,118,60,.12); }
.cux .fx-t[aria-pressed="true"] svg { color: var(--ui-accent); }
.cux .fx-t[aria-pressed="true"]::after { content: "✓"; position: absolute; top: 10px; right: 10px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--ui-accent); color: #fff; font-size: 11px; display: flex; align-items: center; justify-content: center; }
.cux .fx-t.is-empty { opacity: .4; }
.cux .fx-row { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 28px; margin-top: 30px; }
.cux .fx-b { flex-direction: row; justify-content: flex-start; align-items: center; gap: 14px; padding: 18px; text-align: left; }
.cux .fx-b b { font-size: 15px; white-space: nowrap; }
.cux .fx-b small { margin-left: auto; padding-right: 26px; white-space: nowrap; }
.cux .fx-coins { display: flex; gap: 3px; }
.cux .fx-coins i { width: 20px; height: 20px; border-radius: 50%; border: 1px solid rgba(200,118,60,.35); color: rgba(200,118,60,.35);
  font: 500 10px 'Onest', sans-serif; font-style: normal; display: flex; align-items: center; justify-content: center; }
.cux .fx-coins i.on { background: rgba(200,118,60,.18); border-color: var(--ui-accent); color: var(--ui-accent); }
.cux .fx-b[aria-pressed="true"] .fx-coins i.on { background: var(--ui-accent); color: #fff; }
.cux .fx-f { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--ui-line); }
.cux .fx-f > b { font: 300 20px 'Unbounded', sans-serif; color: var(--ui-strong); }
[data-cu]:not(.is-js) .fx-f, [data-cu]:not(.is-js) .cu-bar { display: none; }

/* строка над сеткой */
.cux .cu-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 40px 0 22px; }
.cux .cu-search { flex: 1 1 320px; max-width: 520px; height: 50px; border-radius: 999px; background: var(--ui-field); display: flex; align-items: center; gap: 12px; padding: 0 20px; }
.cux .cu-search svg { width: 18px; height: 18px; color: var(--ui-muted); flex: none; }
.cux .cu-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: 400 15px 'Onest', system-ui, sans-serif; color: var(--ui-strong); }
.cux .cu-search input::placeholder { color: var(--ui-muted); opacity: 1; }
.cux [data-cu-tags] { display: flex; flex-wrap: wrap; gap: 8px; }
.cux .cu-tag { padding: 8px 14px; border-radius: 999px; background: rgba(200,118,60,.12); border: 1px solid rgba(200,118,60,.4); font: 400 13px 'Onest', sans-serif; color: var(--ui-strong); cursor: pointer; }
.cux .cu-sp { flex: 1; }
.cux .cu-sort { height: 46px; padding: 0 40px 0 18px; border-radius: 999px; border: 1px solid var(--ui-line); background: transparent;
  font: 400 14px 'Onest', system-ui, sans-serif; color: var(--ui-strong); -webkit-appearance: none; appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--ui-accent) 50%), linear-gradient(135deg, var(--ui-accent) 50%, transparent 50%);
  background-position: calc(100% - 22px) 50%, calc(100% - 17px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.cux .cu-sort option { color: #20150E; }

/* карточки: фото во всю карточку, второе — при наведении */
.cux .cu-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.cux .cu-card { position: relative; display: block; aspect-ratio: 4 / 3.4; border-radius: 22px; overflow: hidden; background: #fff; isolation: isolate; }
.cux .cu-card[hidden] { display: none; }
.cux .cu-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; z-index: -2; transition: opacity .45s ease; }
.cux .cu-card img + img { opacity: 0; }
.cux .cu-card::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(15,10,8,0) 50%, rgba(15,10,8,.55) 72%, rgba(15,10,8,.9) 100%); }
@media (hover: hover) {
  .cux .cu-card:hover img + img { opacity: 1; }
  .cux .cu-card:hover img:first-of-type:not(:last-of-type) { opacity: 0; }
  .cux .cu-card:hover > i { background: var(--ui-accent); border-color: var(--ui-accent); }
}
.cux .cu-card .ui-card-t { left: 22px; right: 70px; bottom: 20px; }
.cux .cu-card .ui-card-t small { font-size: 12px; }
.cux .cu-card .ui-card-t b { font-size: 20px; }
.cux .cu-card .ui-card-t em { font-style: normal; color: #F4D27A; font-size: 15px; white-space: nowrap; }
.cux .cu-card > i { position: absolute; right: 20px; bottom: 20px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(245,236,226,.45);
  display: flex; align-items: center; justify-content: center; color: #F5ECE2; font-style: normal; transition: background .2s, border-color .2s; }
.cux .cu-more { display: flex; justify-content: center; margin-top: 36px; }
.cux .cu-empty { padding: 48px 20px; text-align: center; color: var(--ui-muted); }
.cux .cu-empty button { margin-top: 16px; }

/* текст: таблицы в подборках (размеры, механизмы) */
.cux .ui-prose-body table { width: 100%; border-collapse: collapse; margin: 6px 0 24px; font-size: 15px; }
.cux .ui-prose-body th, .cux .ui-prose-body td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--ui-line); vertical-align: top; }
.cux .ui-prose-body th { font: 400 12px 'Onest', sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--ui-accent); }
.cux .ui-prose-body tr:nth-child(even) td { background: var(--ui-field); }
@media (max-width: 1023px) { .cux .ui-prose-body table { display: block; overflow-x: auto; font-size: 14px; } }

/* текст */
.cux .ui-prose-aside .ui-h2 { font-size: clamp(24px, 2vw, 30px) !important; }

@media (max-width: 1200px) {
  .cux .fx-row { grid-template-columns: minmax(0, 1fr); }
  .cux .cu-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1023px) {
  .cux .cu-hero { min-height: 0; }
  .cux .cu-stats { gap: 18px 0; }
  .cux .cu-stats > div { flex: 0 0 50%; }
  .cux .cu-stats b { font-size: 26px; }
  .cux .fx { padding: 22px 16px; border-radius: 22px; }
  .cux .fx-h { flex-direction: column; align-items: flex-start; gap: 10px; margin-bottom: 22px; }
  .cux .fx-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cux .fx-tiles.b4 { grid-template-columns: minmax(0, 1fr); }
  .cux .fx-t svg { width: 56px; height: 42px; }
  .cux .fx-t b { font-size: 12px; }
  .cux .fx-b { padding: 14px 16px; gap: 10px; }
  .cux .fx-b b { font-size: 14px; }
  .cux .fx-b small { padding-right: 0; }
  .cux .fx-b[aria-pressed="true"] small { padding-right: 26px; }
  .cux .fx-coins i { width: 16px; height: 16px; font-size: 8px; }
  .cux .fx-f { flex-direction: column; align-items: stretch; }
  .cux .fx-f .ui-btn { width: 100%; }
  .cux .cu-bar { margin-top: 28px; }
  .cux .cu-search { flex-basis: 100%; max-width: none; }
  .cux .cu-sp { display: none; }
  .cux .cu-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .cux .cu-card { aspect-ratio: 4 / 3.6; border-radius: 18px; }
  .cux .cu-card .ui-card-t { left: 18px; right: 64px; bottom: 16px; }
}
