/* ============================================================
 * QANSUN 中国最新流行新能源车 · 旗舰车型专区样式
 * 封面列表 + 照片夹 lightbox（外观/内饰/空间，左右键切换）
 * ============================================================ */

#flagship-section { padding: 24px 0 64px; }
#flagship-section .section-title { color: #fff; }
#flagship-section .section-title::after {
  content: ""; display: block; width: 74px; height: 3px; margin-top: 12px;
  border-radius: 2px;
  background: linear-gradient(90deg, #17b3a0, #6fe0d0, #0e8d7f);
  box-shadow: 0 0 12px rgba(23, 179, 160, .55);
}
#flagship-section .section-sub { color: #9db2c6; }

/* ---------- 封面列表网格 ---------- */
#flagship-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.fb-card {
  --accent: #17b3a0;
  background: linear-gradient(160deg, #0f2740 0%, #0b1026 100%);
  border: 1px solid rgba(23, 179, 160, .32);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 34px rgba(4, 8, 24, .5);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
  animation: fbCardUp .8s cubic-bezier(.22, .9, .3, 1) both;
}
.fb-card:hover {
  transform: translateY(-6px);
  border-color: rgba(23, 179, 160, .75);
  box-shadow: 0 18px 44px rgba(4, 8, 24, .65), 0 0 26px rgba(23, 179, 160, .14);
}
@keyframes fbCardUp {
  from { opacity: 0; transform: translateY(36px); }
  to { opacity: 1; transform: translateY(0); }
}

.fb-media {
  position: relative;
  aspect-ratio: 16 / 10;
  cursor: pointer;
  overflow: hidden;
  border-bottom: 1px solid rgba(23, 179, 160, .22);
  background: linear-gradient(150deg, #0f2740 0%, #0b1026 100%);
}
.fb-cover {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .45s ease;
}
.fb-card:hover .fb-cover { transform: scale(1.05); }
.fb-hint {
  position: absolute; bottom: 12px; inset-inline-end: 12px;
  background: rgba(4, 8, 24, .78);
  border: 1px solid rgba(23, 179, 160, .6);
  color: #e9f5f3;
  font-size: 13px; font-weight: 600;
  padding: 6px 12px; border-radius: 20px;
  opacity: 0; transform: translateY(6px);
  transition: opacity .2s ease, transform .2s ease;
}
.fb-card:hover .fb-hint { opacity: 1; transform: translateY(0); }

.fb-body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.fb-body h3 { margin: 0; color: #fff; font-size: 20px; font-weight: 700; letter-spacing: .2px; }
.fb-tag { margin: 0; color: var(--accent); font-size: 13px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; }
.fb-desc { margin: 0; color: #a9c9cc; font-size: 14px; line-height: 1.6; }
.fb-specs { display: grid; gap: 6px; margin-top: 2px; }
.fb-spec {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 7px 12px; border-radius: 8px;
  background: rgba(133, 204, 198, .07);
  border: 1px solid rgba(133, 204, 198, .14);
  font-size: 13px;
}
.fb-spec-k { color: #9db2c6; white-space: nowrap; }
.fb-spec-v { color: #e9f5f3; text-align: end; font-weight: 600; }
.fb-cn { margin: 0; color: #c9a227; font-size: 13px; font-weight: 600; }
.fb-wa {
  display: inline-block; margin-top: auto; align-self: flex-start;
  background: linear-gradient(135deg, #17b3a0, #0e8d7f);
  color: #fff; text-decoration: none; font-weight: 700;
  padding: 10px 18px; border-radius: 10px; font-size: 14px;
  transition: filter .2s ease, transform .2s ease;
}
.fb-wa:hover { filter: brightness(1.12); transform: translateY(-2px); }

/* ---------- 照片夹 lightbox ---------- */
.fb-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(2, 10, 20, .88);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center; justify-content: center;
  padding: 24px;
}
.fb-overlay.open { display: flex; }
.fb-shell {
  width: min(1080px, 100%);
  max-height: 92vh;
  background: linear-gradient(160deg, #0f2740 0%, #0b1026 100%);
  border: 1px solid rgba(23, 179, 160, .4);
  border-radius: 18px;
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
}
.fb-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(23, 179, 160, .22);
}
.fb-title { color: #fff; font-size: 18px; font-weight: 700; }
.fb-close {
  background: rgba(255, 255, 255, .08); border: none; color: #fff;
  width: 36px; height: 36px; border-radius: 50%;
  font-size: 22px; line-height: 1; cursor: pointer;
  transition: background .2s ease;
}
.fb-close:hover { background: rgba(255, 255, 255, .2); }

.fb-tabs { display: flex; gap: 8px; padding: 14px 20px 0; flex-wrap: wrap; }
.fb-tab {
  background: rgba(133, 204, 198, .08);
  border: 1px solid rgba(133, 204, 198, .18);
  color: #a9c9cc; font-size: 14px; font-weight: 600;
  padding: 8px 16px; border-radius: 20px; cursor: pointer;
  transition: all .2s ease;
}
.fb-tab:hover { border-color: rgba(23, 179, 160, .6); color: #fff; }
.fb-tab.active {
  background: linear-gradient(135deg, #17b3a0, #0e8d7f);
  color: #fff; border-color: transparent;
}

.fb-stage {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  padding: 16px 56px; flex: 1; min-height: 0;
}
.fb-figure { margin: 0; max-height: 58vh; display: flex; flex-direction: column; align-items: center; }
.fb-img {
  max-width: 100%; max-height: 52vh;
  object-fit: contain; border-radius: 10px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .5);
  cursor: zoom-in;
  transition: max-height .28s ease, max-width .28s ease, border-radius .28s ease;
}

/* ---------- 高清全屏放大模式（点击主图触发） ---------- */
.fb-overlay.zoomed { padding: 0; }
.fb-overlay.zoomed .fb-shell {
  width: 100%; max-height: 100vh; height: 100vh;
  border-radius: 0; border: none;
  background: rgba(2, 8, 16, .97);
}
.fb-overlay.zoomed .fb-head,
.fb-overlay.zoomed .fb-tabs,
.fb-overlay.zoomed .fb-thumbs,
.fb-overlay.zoomed .fb-prev,
.fb-overlay.zoomed .fb-next,
.fb-overlay.zoomed .fb-cap { display: none; }
.fb-overlay.zoomed .fb-stage { padding: 12px; }
.fb-overlay.zoomed .fb-figure { max-height: none; width: 100%; height: 100%; justify-content: center; }
.fb-overlay.zoomed .fb-img {
  max-width: 100%; max-height: 96vh;
  width: auto; height: auto;
  border-radius: 0; cursor: zoom-out;
  box-shadow: none;
}
.fb-overlay.zoomed .fb-close {
  position: fixed; top: 16px; right: 16px; z-index: 10001;
  background: rgba(255, 255, 255, .12); width: 44px; height: 44px; font-size: 26px;
}
.fb-cap { color: #9db2c6; font-size: 13px; margin-top: 10px; text-align: center; }
.fb-prev, .fb-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(23, 179, 160, .4);
  color: #fff; font-size: 26px; line-height: 1; cursor: pointer;
  z-index: 5; transition: background .2s ease, border-color .2s ease;
}
.fb-prev:hover, .fb-next:hover { background: rgba(23, 179, 160, .35); }
.fb-prev { left: 12px; }
.fb-next { right: 12px; }

.fb-thumbs {
  display: flex; gap: 8px; padding: 12px 20px;
  border-top: 1px solid rgba(23, 179, 160, .18);
  overflow-x: auto; scrollbar-width: thin;
}
.fb-thumbs::-webkit-scrollbar { height: 4px; }
.fb-thumbs::-webkit-scrollbar-thumb { background: rgba(23, 179, 160, .35); border-radius: 4px; }
.fb-thumb {
  height: 56px; width: 84px; object-fit: cover; border-radius: 6px;
  border: 2px solid transparent; cursor: pointer; opacity: .65; flex: none;
  transition: opacity .15s, border-color .15s;
}
.fb-thumb:hover, .fb-thumb.active { opacity: 1; border-color: #17b3a0; }

@media (max-width: 720px) {
  #flagship-grid { grid-template-columns: 1fr; }
  .fb-stage { padding: 12px 46px; }
  .fb-prev, .fb-next { width: 38px; height: 38px; font-size: 20px; }
}

/* ============================================================
 * QANSUN 二手车现车推介 · 样式（复用 fb-* 卡片与 lightbox）
 * 金色系标题 + 现车徽章 / 年份标签
 * ============================================================ */

#used-cars-section { padding: 24px 0 64px; }
#used-cars-section .section-title { color: #fff; }
#used-cars-section .section-title::after {
  content: ""; display: block; width: 74px; height: 3px; margin-top: 12px;
  border-radius: 2px;
  background: linear-gradient(90deg, #e8c15a, #ffd98a, #c9a227);
  box-shadow: 0 0 12px rgba(232, 193, 90, .55);
}
#used-cars-section .section-sub { color: #cbb98a; }

#used-cars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

/* 现车徽章（封面左上角） */
.uc-badge {
  position: absolute; top: 12px; inset-inline-start: 12px; z-index: 3;
  padding: 5px 12px; border-radius: 20px;
  font-size: 12px; font-weight: 800; letter-spacing: .05em;
  text-transform: uppercase;
  pointer-events: none;
}
.uc-badge--near-new {
  background: linear-gradient(135deg, #e8c15a, #c9a227);
  color: #1a1505;
  box-shadow: 0 2px 10px rgba(232, 193, 90, .4);
}
.uc-badge--used {
  background: linear-gradient(135deg, #f2a154, #d96f2a);
  color: #1a0f05;
  box-shadow: 0 2px 10px rgba(242, 161, 84, .4);
}

/* 年份标签（封面右上角） */
.uc-year {
  position: absolute; top: 12px; inset-inline-end: 12px; z-index: 3;
  background: rgba(4, 8, 24, .78);
  color: #fff; font-size: 12px; font-weight: 700;
  padding: 5px 11px; border-radius: 8px;
  border: 1px solid rgba(232, 193, 90, .5);
  pointer-events: none;
}

/* 明码标价条（RMB 为主 + USD 参考） */
.uc-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  margin: 14px 0 2px;
  padding: 12px 14px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(232, 193, 90, .14), rgba(232, 193, 90, .03));
  border: 1px solid rgba(232, 193, 90, .38);
}
.uc-price-rmb {
  font-size: 22px;
  font-weight: 900;
  color: #e8c15a;
  letter-spacing: .01em;
}
.uc-price-usd {
  font-size: 15px;
  font-weight: 700;
  color: #f2a154;
}

@media (max-width: 720px) {
  #used-cars-grid { grid-template-columns: 1fr; }
}
