/* ============================================================
   V9 —— 展墙体系：图库页头 · 品类标签行 · 极简筛选条 · 装裱感图版
   ============================================================ */

/* ---------- 页头：策展导览 ---------- */
.lib-head { padding: 136px 0 0; }
.lib-head-inner {
  display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: flex-end;
  padding-bottom: 34px; border-bottom: 1px solid var(--ink);
}
.lib-head-main .eyebrow { font-family: var(--font); font-size: 9.5px; letter-spacing: 0.34em; text-transform: uppercase; color: var(--gold-deep); }
.lib-head-main .display-title {
  font-family: var(--mixed); font-weight: 300; font-size: clamp(34px, 4vw, 54px);
  letter-spacing: 0.06em; line-height: 1.25; margin: 20px 0 16px; color: var(--ink);
}
.lib-sub { font-family: var(--font); font-size: 12.5px; line-height: 2; color: var(--text-2); max-width: 52ch; }
.lib-head-meta { display: flex; gap: 40px; text-align: right; white-space: nowrap; }
.lib-head-meta b { display: block; font-family: var(--display); font-weight: 300; font-size: clamp(24px, 2.4vw, 32px); color: var(--ink); line-height: 1; }
.lib-head-meta span { display: block; margin-top: 10px; font-family: var(--font); font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-3); }

/* ---------- 一级筛选：品类标签行 ---------- */
.lib-cats {
  display: flex; flex-wrap: wrap; gap: 8px 34px;
  padding: 24px 5vw; border-bottom: 1px solid var(--hairline);
}
.lib-cats button {
  position: relative; font-family: var(--font); font-size: 12.5px; letter-spacing: 0.1em;
  color: var(--text-3); padding: 5px 0; transition: color var(--t);
}
.lib-cats button:hover { color: var(--ink); }
.lib-cats button.active { color: var(--ink); }
.lib-cats button.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--ink);
}

/* ---------- 二级筛选条 ---------- */
.lib-tools {
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 20px 0; border-bottom: 1px solid var(--hairline); flex-wrap: wrap;
}
.lt-left, .lt-right { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.lt-select, .lt-input, .lt-search {
  border: none; border-bottom: 1px solid var(--hairline); background: transparent;
  font-family: var(--font); font-size: 12.5px; color: var(--ink); padding: 6px 2px;
  transition: border-color var(--t);
}
.lt-select:focus, .lt-input:focus, .lt-search:focus { outline: none; border-bottom-color: var(--ink); }
.lt-input { width: 86px; }
.lt-search { width: 176px; }
.lt-sep { color: var(--text-3); font-size: 11px; }
.lt-apply, .lt-reset {
  font-family: var(--font); font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink); border-bottom: 1px solid var(--gold); padding: 5px 0; transition: all var(--t);
}
.lt-reset { color: var(--text-3); border-bottom-color: transparent; }
.lt-reset:hover { color: var(--ink); }
.lt-apply:hover { border-bottom-color: var(--ink); }

/* ---------- 作品墙 ---------- */
.lib-body { padding-top: 44px; padding-bottom: 148px; }
.result-count {
  font-family: var(--font); font-size: 10.5px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--text-3); margin-bottom: 42px;
}
.art-grid.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 62px 46px; }

/* ---------- 图版：统一画幅 · 完整不裁切 · 悬浮感（拍卖行图录的「图版」处理） ----------
   要点：图版容器本身不留可见底色与边框（与页面同底），阴影加在「画面」上，
   于是大画幅与小器物都呈现为「浮在纸上的图版」，不会出现「小图困在灰盒里」的观感。 */
.art-card .art-media {
  aspect-ratio: 4 / 3;
  background: transparent;
  border: none;
  box-shadow: none;
  display: flex; align-items: center; justify-content: center;
  overflow: visible;
}
/* contain：作品完整呈现，绝不裁切画心（不同画幅在统一图版内居中）
   关键：图片必须绝对定位——否则它的固有宽度会撑破 1fr 栅格列导致整页横向溢出；
   绝对定位 + inset:0 + margin:auto 可保持等比居中且不参与列宽计算。 */
.art-card .art-media { position: relative; }
.art-card .art-media img {
  position: absolute; inset: 0; margin: auto;
  max-width: 100%; max-height: 100%;
  width: auto; height: auto;
  object-fit: contain;
  transform-origin: center;
  filter: drop-shadow(0 16px 26px rgba(18, 18, 18, 0.16)) saturate(0.98);
  transition: filter 0.6s var(--ease), transform 0.6s var(--ease);
}
/* 栅格项禁止被内容撑开 */
.art-grid > .art-card { min-width: 0; }
.art-card:hover .art-media img {
  transform: translateY(-3px);
  filter: drop-shadow(0 22px 34px rgba(18, 18, 18, 0.2)) saturate(1) brightness(1.01);
}

/* 悬停浮出「查看作品」 */
.art-view {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 16px 20px 15px;
  font-family: var(--font); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: #FBFAF6;
  background: linear-gradient(180deg, rgba(18, 18, 18, 0) 0%, rgba(18, 18, 18, 0.66) 100%);
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
  display: flex; justify-content: space-between; align-items: baseline;
}
.art-view i { font-style: normal; }
.art-card:hover .art-view { opacity: 1; transform: none; }

/* ---------- 图版说明：严格纵向结构 · 行高固定（保证多列逐行对齐） ---------- */
.art-card .art-meta {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding-top: 18px;
  text-align: left;
}
/* 编号行：单行，超出省略，避免折行把后续内容顶下去 */
.art-card .art-plate {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.5;
  margin: 0 0 10px;
}
/* 标题：固定两行高度，长标题裁切——这是多列对齐的关键 */
.art-card .art-title {
  font-size: 19px;
  line-height: 1.42;
  font-weight: 400;
  margin: 0 0 8px;
  min-height: 2.84em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* 作者：单行省略 */
.art-card .art-artist {
  font-size: 13.5px;
  line-height: 1.6;
  margin: 0 0 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* 材质尺寸：单行省略 + 下划分隔线对齐 */
.art-card .art-spec {
  font-size: 11.5px;
  line-height: 1.7;
  margin: 0 0 14px;
  padding: 0 0 14px;
  border-bottom: 1px solid rgba(27, 25, 23, 0.08);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* 报价：独立一行 */
.art-card .art-price {
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.art-card .art-price .price-conv { display: block; }

/* ---------- 响应式 ---------- */
@media (max-width: 1100px) {
  .art-grid.gallery { grid-template-columns: repeat(2, 1fr); gap: 54px 40px; }
}
@media (max-width: 760px) {
  .lib-head { padding-top: 112px; }
  .lib-head-inner { grid-template-columns: 1fr; align-items: flex-start; gap: 28px; }
  .lib-head-meta { text-align: left; gap: 28px; }
  .lib-cats { gap: 6px 22px; padding: 18px 5vw; }
  .lt-left, .lt-right { width: 100%; }
  .lt-search { flex: 1; width: auto; }
  .art-grid.gallery { grid-template-columns: 1fr; gap: 48px; }
  .lib-body { padding-bottom: 96px; }
}
