/* =====================================================================
   Film & colour library page — 覆膜花色子页面
   依赖 site.css 的设计变量（--gold / --ivory / --ink ...）
   ===================================================================== */

/* ---------- 主题首屏（随分类切换背景与文案） ---------- */
.film-hero {
  position: relative; overflow: hidden;
  min-height: clamp(400px, 50vh, 540px);
  display: flex; align-items: flex-end;
  background: #14110d;
  border-bottom: 1px solid var(--line);
  padding: clamp(70px, 12vh, 120px) 0 clamp(28px, 5vh, 52px);
}
.film-hero-bg {
  position: absolute; inset: 0;
  background-image: url("../img/hero-showroom.jpg");
  background-size: cover; background-position: center 45%;
  transform: scale(1.03);
  transition: opacity .35s ease;
}
.film-hero-veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(9, 7, 5, .9) 0%, rgba(9, 7, 5, .7) 32%, rgba(9, 7, 5, .34) 62%, rgba(9, 7, 5, .1) 100%),
    linear-gradient(100deg, rgba(9, 7, 5, .6) 0%, rgba(9, 7, 5, .18) 52%, rgba(9, 7, 5, 0) 78%);
}
.film-hero-inner { position: relative; z-index: 2; max-width: var(--container); }
.film-hero-inner > * { max-width: 700px; }
.film-hero .eyebrow { color: #d6bd8e; }
.film-hero .eyebrow::before { background: var(--gold); }
.film-hero h1 { font-size: clamp(27px, 3.5vw, 46px); letter-spacing: -.02em; color: #fff; }
.film-hero p {
  margin-top: 14px; max-width: 64ch;
  color: rgba(255, 255, 255, .78); font-size: 14.5px; line-height: 1.85;
}
.film-meta { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 22px; }
.film-meta li {
  display: inline-flex; align-items: baseline; gap: 8px;
  font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .6);
}
.film-meta b { font-family: var(--font-serif); font-size: 22px; color: #fff; letter-spacing: 0; }

.film-footnote {
  margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line);
  font-size: 12px; color: var(--muted); line-height: 1.8;
}
.film-footnote b { color: var(--ink); font-weight: 600; margin-right: 8px; }

/* ---------- toolbar ---------- */
.film-toolbar {
  position: sticky; top: var(--header-h); z-index: 40;
  background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding: 14px 0 12px;
}
.film-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.film-tab {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 16px; border-radius: 3px; border: 1px solid var(--line-strong);
  background: #fff; font-size: 12.5px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted);
  transition: all .2s ease;
}
.film-tab em {
  font-style: normal; font-size: 10.5px; font-weight: 700;
  padding: 1px 6px; border-radius: 999px; background: var(--ivory-2); color: var(--muted);
}
.film-tab:hover { border-color: var(--gold); color: var(--ink); }
.film-tab.is-active { background: var(--ink); border-color: var(--ink); color: #f7f2e8; }
.film-tab.is-active em { background: rgba(255, 255, 255, .16); color: #f3e9d4; }

.film-subrow {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-top: 10px; min-height: 30px;
}
.film-subtabs { display: flex; flex-wrap: wrap; gap: 6px; }
.film-sub {
  padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; font-size: 12px; color: var(--muted);
  transition: all .18s ease;
}
.film-sub:hover { border-color: var(--gold); color: var(--ink); }
.film-sub.is-active { background: var(--gold-soft); border-color: var(--gold); color: var(--gold-deep); font-weight: 600; }

.film-search { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.film-search input {
  width: 210px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 4px;
  font-size: 13px; background: #fff;
}
.film-search input:focus { outline: none; border-color: var(--gold-deep); box-shadow: 0 0 0 3px var(--gold-glow); }
.film-count { font-size: 12px; color: var(--muted); letter-spacing: .04em; white-space: nowrap; flex: none; }

/* ---------- grid ---------- */
.film-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px; padding: clamp(24px, 3vw, 40px) 0 0;
}
.film-card {
  background: #fff; border: 1px solid var(--line); border-radius: 6px; overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.film-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.film-media {
  position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: var(--ivory-2);
  cursor: zoom-in;
}
.film-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .8s cubic-bezier(.2, .6, .3, 1);
}
.film-card:hover .film-media img { transform: scale(1.05); }
.film-code {
  position: absolute; left: 8px; top: 8px;
  padding: 3px 8px; border-radius: 3px;
  background: rgba(255, 255, 255, .92); color: var(--ink);
  font-size: 10.5px; font-weight: 700; letter-spacing: .06em;
  font-variant-numeric: tabular-nums;
}
.film-body { padding: 12px 14px 14px; display: grid; gap: 4px; }
.film-name { font-family: var(--font-sans); font-size: 14px; font-weight: 600; color: var(--ink); }
.film-series { font-size: 11px; color: var(--muted-2); letter-spacing: .04em; }
.film-swatch-btn {
  margin-top: 6px; display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--gold-deep); background: none; border: 0; padding: 0; cursor: pointer;
}
.film-swatch-btn:hover { color: var(--ink); }
.film-swatch-btn .ico { width: 13px; height: 13px; }

/* ---------- empty / catalog links ---------- */
.film-empty {
  grid-column: 1 / -1; text-align: center; padding: clamp(36px, 6vw, 72px) 20px;
  background: var(--ivory); border: 1px dashed var(--line-strong); border-radius: 8px;
}
.film-empty h3 { font-size: 20px; margin-bottom: 8px; }
.film-empty p { font-size: 13.5px; color: var(--muted); max-width: 56ch; margin: 0 auto; }

.film-books { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.book-card {
  display: flex; align-items: center; gap: 16px;
  padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: 8px;
  transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}
.book-card:hover { border-color: var(--gold); box-shadow: var(--shadow-md); transform: translateY(-3px); text-decoration: none; }
.book-icon {
  width: 44px; height: 44px; flex: none; border-radius: 50%;
  display: grid; place-items: center; background: var(--gold-soft); color: var(--gold-deep);
}
.book-icon .ico { width: 20px; height: 20px; }
.book-card strong { display: block; font-size: 14.5px; color: var(--ink); font-weight: 600; }
.book-card small { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; }
.book-card .ico-arrow { margin-left: auto; width: 18px; height: 18px; color: var(--gold-deep); }

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: none; align-items: center; justify-content: center;
  background: rgba(15, 12, 8, .82); padding: 24px;
  backdrop-filter: blur(4px);
}
.lightbox.is-open { display: flex; animation: fadeUp .25s ease both; }
.lightbox-inner {
  background: #fff; border-radius: 8px; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 300px);
  max-width: 660px; width: 100%; max-height: 86vh;
}
.lightbox-inner img { width: 100%; height: 100%; object-fit: cover; max-height: 86vh; }
.lightbox-body { padding: 26px 24px; display: flex; flex-direction: column; gap: 10px; }
.lightbox-body h3 { font-size: 22px; }
.lightbox-body .lb-code { font-size: 12px; letter-spacing: .12em; color: var(--gold-deep); font-weight: 700; }
.lightbox-body p { font-size: 12.5px; color: var(--muted); line-height: 1.8; }
.lightbox-body .btn { margin-top: auto; }
.lightbox-close {
  position: absolute; top: 18px; right: 18px; width: 40px; height: 40px;
  border-radius: 50%; border: 1px solid rgba(255, 255, 255, .3); background: transparent;
  color: #fff; display: grid; place-items: center;
}
.lightbox-close:hover { background: rgba(255, 255, 255, .12); }

.film-cta {
  margin-top: clamp(28px, 4vw, 44px);
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  padding: 22px 24px; background: var(--ink); border-radius: 8px; color: #efe7d8;
}
.film-cta h3 { color: #fff; font-size: 19px; }
.film-cta p { font-size: 13px; color: #b8ab97; margin-top: 4px; }

@media (max-width: 1080px) {
  .film-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .film-hero-grid { grid-template-columns: 1fr; align-items: start; }
  .lightbox-inner { grid-template-columns: 1fr; max-width: 420px; overflow-y: auto; }
  .lightbox-inner img { max-height: 46vh; }
}

@media (max-width: 760px) {
  .film-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .film-search { margin-left: 0; width: 100%; }
  .film-search input { width: 100%; }
  .film-books { grid-template-columns: 1fr; }
  .film-toolbar { position: static; }
  .film-body { padding: 10px 11px 12px; }
  .film-name { font-size: 13px; }
}

@media (max-width: 420px) {
  .film-grid { grid-template-columns: 1fr; }
}
