/* ============================================================
 * QANSUN qcautoev.com — 二手车详情页「三夹相册」样式  v1
 * 配合 assets/js/used-car-albums.js 使用（图册弹层样式在 flagship.css 的 .fb-*）
 * ============================================================ */

.album-block { margin-top: 30px; }

/* 标题 + 张数徽章 */
.album-block h2 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.album-count {
  display: inline-block;
  padding: 2px 11px;
  border-radius: 999px;
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .02em;
  color: #5eead4;
  background: rgba(23, 179, 160, .16);
  border: 1px solid rgba(23, 179, 160, .38);
  white-space: nowrap;
}

/* 缩略图：整张可点 → 打开本夹完整图册 */
.album-block figure.photo { position: relative; cursor: zoom-in; }
.album-block figure.photo img {
  display: block;
  width: 100%;
  border-radius: 12px;
  transition: transform .22s ease, box-shadow .22s ease, filter .22s ease;
}
.album-block figure.photo:hover img,
.album-block figure.photo:focus-visible img {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .45);
  filter: brightness(1.06);
}
.album-block figure.photo:focus-visible { outline: 2px solid #c9a227; outline-offset: 4px; }

.photo-zoom-hint {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  line-height: 1;
  color: #fff;
  background: rgba(6, 18, 32, .62);
  border: 1px solid rgba(201, 162, 39, .55);
  opacity: 0;
  transform: scale(.9);
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: none;
}
.album-block figure.photo:hover .photo-zoom-hint,
.album-block figure.photo:focus-visible .photo-zoom-hint { opacity: 1; transform: scale(1); }

/* 「查看全部 N 张照片」按钮：暗蓝立体 + 特细沙金边（与全站导航同风格） */
.album-open {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 4px;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1px solid rgba(201, 162, 39, .55);
  background: linear-gradient(180deg, #24508c 0%, #16325c 55%, #0d1f3d 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 2px 0 rgba(4, 12, 24, .55);
  color: #f6e7bb;
  font-size: .92rem;
  font-weight: 700;
  letter-spacing: .01em;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.album-open:hover {
  transform: translateY(-1px);
  border-color: #c9a227;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 3px 0 rgba(4, 12, 24, .55), 0 0 14px rgba(201, 162, 39, .32);
}
.album-open:active {
  transform: translateY(1px);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .45);
}
.album-open-ico { font-size: 1rem; opacity: .9; }
.album-open-arrow { font-weight: 900; color: #e8c15a; }

/* 图册标签上的张数 */
.fb-tab-n {
  display: inline-block;
  margin-left: 4px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  font-size: .74rem;
  font-weight: 800;
}
.fb-tab.active .fb-tab-n { background: rgba(0, 0, 0, .22); }

/* 三夹统一 3 列预览（原先 exterior=4 / interior=3 / space=5 列，只有 3 张时宽窄不一） */
.album-block .photo-grid,
.album-block .photo-grid.exterior,
.album-block .photo-grid.interior,
.album-block .photo-grid.space {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* 「+N」剩余张数角标（贴在最后一张预览图左上角） */
.photo-more {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 800;
  color: #f6e7bb;
  background: rgba(6, 18, 32, .8);
  border: 1px solid rgba(201, 162, 39, .6);
  letter-spacing: .02em;
  pointer-events: none;
}

/* RTL（阿语） */
html[dir="rtl"] .album-block h2 { flex-direction: row-reverse; justify-content: flex-end; }
html[dir="rtl"] .photo-zoom-hint { right: auto; left: 8px; }
html[dir="rtl"] .photo-more { left: auto; right: 8px; }
html[dir="rtl"] .album-open { flex-direction: row-reverse; }
html[dir="rtl"] .album-open-arrow { transform: scaleX(-1); }
html[dir="rtl"] .fb-tab-n { margin-left: 0; margin-right: 4px; }

/* 窄屏 */
@media (max-width: 860px) {
  .album-block .photo-grid,
  .album-block .photo-grid.exterior,
  .album-block .photo-grid.interior,
  .album-block .photo-grid.space { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .album-open { width: 100%; justify-content: center; padding: 12px 16px; }
  .album-count { font-size: .7rem; }
  .album-block { margin-top: 24px; }
  /* 3 张预览落在 2 列时，让第 3 张占满一行，避免右侧留空 */
  .album-block .photo-grid figure.photo:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
