/* ===== 详情页面公共样式 ===== */

html {
  overflow: auto;
  height: auto;
}

body {
  overflow-y: auto;
  overflow-x: hidden;
  height: auto;
  width: 100%;
  max-width: 100vw;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body::-webkit-scrollbar {
  display: none;
}

.detail-page {
  min-height: 100vh;
  background-color: var(--bg);
  /* 与首页 products 页一致的全局渐变背景（同 shared.css 的 .bg-layer） */
  background-image:
    radial-gradient(ellipse 80% 60% at 20% 40%, rgba(99,102,241,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(139,92,246,0.1) 0%, transparent 50%),
    linear-gradient(180deg, #0a0e1a 0%, #0f1420 50%, #0a0e1a 100%);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  position: relative;
}

.detail-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 2rem;
  padding: 0 clamp(20px, 6vw, 120px);
  backdrop-filter: blur(20px);
  background: rgba(10,14,26,0.8);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.back-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: 'GeistMono', 'SiteCJK', monospace;
  font-size: clamp(0.9rem, 1.1vw, 1.1rem);
  color: var(--muted);
  text-decoration: none;
  padding: 0.6rem 1.2rem;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: transparent;
  transition: all 0.3s;
}

.back-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-glow);
}

.back-btn .arrow-left {
  width: 10px;
  height: 10px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

.detail-title {
  font-family: 'Outfit', 'SiteCJK', sans-serif;
  font-size: clamp(1.2rem, 1.5vw, 1.6rem);
  font-weight: 700;
}

.detail-tag {
  display: inline-flex;
  align-items: center;
  background: var(--accent-glow);
  color: var(--accent);
  font-size: clamp(0.8rem, 0.9vw, 1rem);
  padding: 0.4rem 1.1rem;
  border-radius: 999px;
  font-family: 'GeistMono', 'SiteCJK', monospace;
  letter-spacing: 0.05em;
  font-weight: 500;
}

.detail-content {
  padding-top: 120px;
  padding-bottom: 60px;
  padding-left: clamp(40px, 6vw, 120px);
  padding-right: clamp(40px, 6vw, 120px);
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
}

.detail-gallery {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.detail-gallery img {
  width: 100%;
  height: auto;
  display: block;
  margin: 0;
  padding: 0;
}

/* ===== 移动端适配 ===== */
@media (max-width: 768px) {
  .detail-content {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .detail-gallery img {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
}

/* ===== 图片全屏查看层 ===== */
.img-lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.95);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  cursor: pointer;
}

.img-lightbox.active {
  display: flex;
}

.img-lightbox img {
  max-width: 95vw;
  max-height: 85vh;
  object-fit: contain;
  cursor: default;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  z-index: 10000;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
}

.lightbox-close:hover {
  background: rgba(255,255,255,0.2);
}
