/* FGD Wheels — 画廊页样式 */

.gallery-hero {
  padding-top: 30px;
}

.gallery-meta {
  margin-top: 8px;
  color: var(--accent);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 20px;
}

.gallery-grid .gallery-item {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: var(--radius);
  position: relative;
  background: var(--bg-2);
  border: 1px solid var(--border);
  cursor: pointer;
  text-decoration: none;
}

.gallery-grid .gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.5s;
}

.gallery-grid .gallery-item:hover img {
  transform: scale(1.07);
}

.gallery-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 28px 16px 12px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.78));
  opacity: 0;
  transition: opacity 0.3s;
}

.gallery-grid .gallery-item:hover .gallery-cap {
  opacity: 1;
}

.gallery-cap span {
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.gallery-cta {
  text-align: center;
  margin-top: 40px;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-2);
}

.gallery-cta p {
  color: var(--text-2);
  margin-bottom: 18px;
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-3);
  padding: 60px 0;
}

/* ---- Lightbox 放大视图 ---- */
/* z-index 设为 99，低于导航栏(topbar z-index 100)，保证导航栏始终浮在最上、可点击 */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 99;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(6, 6, 8, 0.94);
  padding: 40px 72px;
  opacity: 0;
  transition: opacity 0.25s;
}

.lightbox.open {
  display: flex;
  opacity: 1;
}

.lb-figure {
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin: 0;
}

.lb-figure img {
  max-width: 100%;
  max-height: calc(100vh - 190px);
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.lb-cap {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #fff;
  text-align: center;
}

.lb-vehicle {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.lb-series {
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lb-close {
  position: absolute;
  top: 24px;
  right: 28px;
  width: 48px;
  height: 48px;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 32px;
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.lb-close:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: rotate(90deg);
}

.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 36px;
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s;
}

.lb-nav:hover { background: rgba(255, 255, 255, 0.2); }
.lb-prev { left: 24px; }
.lb-next { right: 24px; }

/* ---- 底部返回/关闭按钮条 ---- */
/* 跟随 figure 的 flex 流，位于车型文字下方，避免与车型文字重叠 */
.lb-close-bar {
  display: flex;
  gap: 12px;
  margin-top: 4px;
}
.lb-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 12px 26px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.lb-back:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.4);
}
.lb-back .lb-back-icon {
  font-size: 18px;
  line-height: 1;
}

@media (max-width: 720px) {
  .lightbox { padding: 24px 12px; }
  .lb-nav { width: 42px; height: 42px; font-size: 28px; }
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
  .lb-close { top: 14px; right: 14px; width: 42px; height: 42px; font-size: 28px; }
  .lb-vehicle { font-size: 16px; }
  .lb-back { padding: 10px 20px; font-size: 13px; }
}

@media (max-width: 1024px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 720px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-cap { opacity: 1; }
}
