/* 睿思造影案例库 · 独立子站（3d66 参考风格：浅色、卡片网格、左图右信息详情页）
   与主站解耦，不依赖 styles.css；配色沿用品牌蓝。 */

:root {
  --bg: #f5f6f8;
  --panel: #ffffff;
  --line: #e6e9f0;
  --text: #1f2430;
  --muted: #7a8499;
  --blue: #2b6bff;
  --blue-dark: #1f55d6;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(31, 36, 48, .06), 0 6px 18px rgba(31, 36, 48, .05);
  --shadow-hover: 0 4px 10px rgba(31, 36, 48, .08), 0 14px 34px rgba(31, 36, 48, .10);
}

* { box-sizing: border-box; }

/* display:grid/flex 类会压过 UA 的 hidden 规则，全局兜底 */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.6 "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  /* 页脚吸底：内容不足一屏时 footer 也贴住视口底部 */
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
body > main { flex: 1 0 auto; }

img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
button { font: inherit; cursor: pointer; }

/* ---------- 顶栏 ---------- */
.topbar {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 40;
}
.topbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 17px; }
/* 品牌 logo：HTML 静态直出，刷新不闪变；替换只需换 assets/logo.png */
.brand-logo { height: 28px; width: auto; display: block; object-fit: contain; }
.search-box { flex: 1; max-width: 420px; }
.search-box input {
  width: 100%;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  font-size: 14px;
  outline: none;
  transition: border-color .15s, background .15s;
}
.search-box input:focus { border-color: var(--blue); background: #fff; }
.back-link { margin-left: auto; font-size: 14px; color: var(--muted); }
.back-link:hover { color: var(--blue); }

/* ---------- 筛选条 ---------- */
.filter-bar {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 59px;
  z-index: 30;
}
.filter-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  overflow-x: auto;
}
.cat-tabs { display: flex; gap: 2px; padding: 3px 0; }
.cat-tab {
  border: none;
  background: transparent;
  padding: 4px 11px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.cat-tab:hover { color: var(--text); background: var(--bg); }
.cat-tab.active { background: var(--text); color: #fff; }
.type-tabs { display: flex; gap: 3px; padding: 3px 0; margin-left: auto; }
.type-tab {
  border: 1px solid var(--line);
  background: #fff;
  padding: 3px 11px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.type-tab.active { border-color: var(--blue); color: var(--blue); background: #eef3ff; }

/* ---------- 列表页 ---------- */
.page { max-width: 1280px; margin: 0 auto; padding: 18px 20px 48px; }
.result-bar { color: var(--muted); font-size: 13px; margin-bottom: 14px; }

.case-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.case-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform .18s, box-shadow .18s;
  display: flex;
  flex-direction: column;
}
.case-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #eceff4;
  overflow: hidden;
}
.card-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.case-card:hover .card-media img { transform: scale(1.04); }
.card-type-badge {
  position: absolute; top: 10px; left: 10px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(20, 24, 32, .72);
  color: #fff;
  backdrop-filter: blur(4px);
}
.card-gallery-badge {
  position: absolute; top: 10px; right: 10px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(43, 107, 255, .88);
  color: #fff;
}
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.card-cat {
  font-size: 12px;
  color: var(--blue);
  background: #eef3ff;
  padding: 2px 9px;
  border-radius: 6px;
}
.card-tag { font-size: 12px; color: var(--muted); background: var(--bg); padding: 2px 8px; border-radius: 6px; }
.card-date { margin-left: auto; font-size: 12px; color: var(--muted); }

.empty-box { text-align: center; padding: 72px 0 40px; color: var(--muted); }
.empty-icon { font-size: 42px; opacity: .4; }
.empty-title { font-size: 16px; font-weight: 600; margin-top: 10px; color: var(--text); }
.empty-hint { font-size: 13px; margin-top: 4px; }

/* ---------- 详情页 ---------- */
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 24px;
  align-items: stretch; /* 右侧信息卡片与左侧大图区等高 */
}
.viewer-main {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.viewer-main img, .viewer-main video {
  width: 100%;
  max-height: 640px;
  object-fit: contain;
  background: #10131a;
}
.viewer-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.viewer-thumb {
  width: 96px;
  height: 64px;
  flex: 0 0 auto;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  background: var(--panel);
  padding: 0;
}
.viewer-thumb img { width: 100%; height: 100%; object-fit: cover; }
.viewer-thumb.active { border-color: var(--blue); }
.viewer-thumb video { width: 100%; height: 100%; object-fit: cover; }

.info-col {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  /* 内部纵向 flex：信息表在顶、联系报价沉底，卡片整体被拉伸到与左列等高 */
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.detail-title { margin: 0 0 10px; font-size: 20px; line-height: 1.45; }
.detail-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.badge { font-size: 12px; padding: 3px 10px; border-radius: 6px; background: var(--bg); color: var(--muted); }
.badge.blue { background: #eef3ff; color: var(--blue); }

.info-table { border-top: 1px solid var(--line); margin-bottom: 20px; }
.info-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.info-row .k { color: var(--muted); flex: 0 0 auto; }
.info-row .v { text-align: right; word-break: break-all; }

.detail-desc h3, .detail-copy h3, .note-block h3 { font-size: 14px; margin: 0 0 8px; }
.detail-desc p, .note-block p { margin: 0; font-size: 14px; color: var(--text); }
.detail-copy div, .note-block div { font-size: 14px; white-space: pre-wrap; color: var(--text); }

/* 通栏：项目简介 + 文案说明（一张卡片，与页面同宽） */
.detail-note-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-top: 20px;
  box-shadow: var(--shadow);
}
.note-block + .note-block { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }

.detail-extlink { margin-top: 14px; }
.detail-extlink a { font-size: 14px; color: var(--blue); text-decoration: none; }
.detail-extlink a:hover { text-decoration: underline; }

/* 右侧联系报价 */
.contact-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: auto; /* 沉到卡片底部，与左列等高时按钮贴底 */
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--blue);
  border: 1px solid var(--blue);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s;
}
.contact-btn:hover { background: var(--blue-dark); color: #fff; }
.contact-note { margin-top: 8px; font-size: 12px; color: var(--muted); text-align: center; }

/* 底部相关案例推荐 */
.reco-section { margin-top: 44px; }
.reco-title {
  font-size: 17px;
  margin: 0 0 16px;
  padding-left: 10px;
  border-left: 3px solid var(--blue);
  line-height: 1.3;
}
.reco-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.download-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  transition: background .15s, border-color .15s;
}
.download-btn:hover { border-color: var(--blue); color: var(--blue); background: #f5f8ff; }
.download-btn.primary {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}
.download-btn.primary:hover { background: var(--blue-dark); color: #fff; }
.download-note { font-size: 12px; color: var(--muted); text-align: center; }

.detail-loading { text-align: center; padding: 80px 0; color: var(--muted); }
.not-found { text-align: center; padding: 80px 0; color: var(--muted); }
.not-found .back-link { display: inline-block; margin-top: 12px; }

/* ---------- 页脚 ---------- */
  /* 页脚吸底：body 为纵向 flex，auto = 贴住剩余空间底部 */
.site-footer { border-top: 1px solid var(--line); background: var(--panel); margin-top: auto; }
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 20px;
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
}
.icp { margin-left: auto; }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .case-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-layout { grid-template-columns: minmax(0, 1fr); }
  .reco-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .topbar-inner { padding: 10px 14px; gap: 10px; }
  .filter-inner { padding: 0 14px; }
  .type-tabs { margin-left: 0; }
  .page { padding: 14px 14px 40px; }
  .case-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .reco-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .info-col { padding: 16px; }
  .detail-note-card { padding: 16px; }
  .icp { margin-left: 0; }
}
