﻿/* ============================================================
   KASTON · 卡斯顿网络工作室 电商服务页样式
   高端克制 · 未来科技
   ============================================================ */

/* ---------- 设计令牌 ---------- */
:root {
  --bg-deep: #05070c;
  --bg-soft: #0a0f18;
  --ink: #f2f6fb;
  --ink-dim: #9aa8bd;
  --ink-faint: #64748f;
  --cyan: #7fd4ff;
  --cyan-deep: #2b8fc9;
  --line: rgba(148, 163, 184, 0.16);
  --line-soft: rgba(148, 163, 184, 0.1);
  --font-display: 'Orbitron', 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
  --font-body: 'Noto Sans SC', 'Microsoft YaHei', 'PingFang SC', sans-serif;
}

/* ---------- 基础 ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

/* ============================================================
   背景层
   ============================================================ */
.bg-stage {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background: var(--bg-deep);
}

.bg-hero {
  position: absolute;
  left: -4%;
  right: -4%;
  top: -12%;
  bottom: -12%;
  background-image: url('../images/bg-hero.jpg');
  background-size: cover;
  background-position: center 34%;
  opacity: 0.5;
}

.fx-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.bg-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(5, 7, 12, 0.6) 0%, rgba(5, 7, 12, 0.4) 42%, rgba(5, 7, 12, 0.65) 78%, rgba(5, 7, 12, 0.94) 100%);
}

/* ============================================================
   顶部导航
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(24px, 6vw, 80px);
  background: linear-gradient(180deg, rgba(5, 7, 12, 0.88), rgba(5, 7, 12, 0.5));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}

/* LOGO */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 4px 6px;
  opacity: 0.96;
  transition: opacity 0.3s ease;
  flex-shrink: 0;
}

.logo:hover {
  opacity: 1;
}

.logo-core {
  width: 38px;
  height: 38px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(127, 212, 255, 0.35);
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.34em;
  color: var(--ink);
}

/* 搜索栏 */
.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: min(380px, 42vw);
  flex-shrink: 1;
}

.search-icon {
  position: absolute;
  left: 16px;
  width: 17px;
  height: 17px;
  color: var(--ink-faint);
  pointer-events: none;
  transition: color 0.3s ease;
}

.search-input {
  width: 100%;
  padding: 11px 18px 11px 44px;
  font-size: 13.5px;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: var(--ink);
  background: rgba(10, 15, 24, 0.6);
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: none;
  transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.search-input::placeholder {
  color: var(--ink-faint);
  font-weight: 300;
}

.search-input:focus {
  border-color: rgba(127, 212, 255, 0.5);
  background: rgba(12, 19, 30, 0.8);
  box-shadow: 0 0 0 3px rgba(127, 212, 255, 0.08);
}

.search-wrap:focus-within .search-icon {
  color: var(--cyan);
}

/* ============================================================
   主内容
   ============================================================ */
.site-main {
  position: relative;
  z-index: 1;
  padding: 0 clamp(24px, 6vw, 80px);
  max-width: 1400px;
  margin: 0 auto;
}

/* 页面标题 */
.page-hero {
  text-align: center;
  padding: clamp(56px, 10vh, 96px) 0 clamp(36px, 6vh, 56px);
}

.page-eyebrow {
  font-family: var(--font-display);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.58em;
  text-indent: 0.58em;
  color: var(--ink-faint);
  margin-bottom: 22px;
}

.page-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(36px, 5.5vw, 58px);
  letter-spacing: 0.28em;
  text-indent: 0.28em;
  color: var(--ink);
  margin-bottom: 18px;
}

.page-desc {
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 0.18em;
  color: var(--ink-dim);
}

/* ============================================================
   分类导航
   ============================================================ */
.category-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 0 0 44px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 48px;
}

.cat-btn {
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.1em;
  color: var(--ink-dim);
  background: rgba(10, 15, 24, 0.4);
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.cat-btn:hover {
  color: var(--cyan);
  border-color: rgba(127, 212, 255, 0.35);
  background: rgba(127, 212, 255, 0.05);
}

.cat-btn.active {
  color: var(--cyan);
  border-color: rgba(127, 212, 255, 0.55);
  background: rgba(127, 212, 255, 0.08);
  box-shadow: 0 0 12px rgba(127, 212, 255, 0.1);
}

/* ============================================================
   卡片网格
   ============================================================ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(14px, 1.8vw, 24px);
  padding-bottom: 72px;
}

.service-card {
  display: flex;
  flex-direction: column;
  background: rgba(10, 15, 24, 0.5);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  overflow: hidden;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: border-color 0.35s ease, background 0.35s ease, transform 0.35s ease, box-shadow 0.35s ease;
}

.service-card:hover {
  transform: translateY(-5px);
  background: rgba(12, 19, 30, 0.78);
  border-color: rgba(127, 212, 255, 0.35);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
}

/* 卡片缩略图（占位） */
.card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #ffffff;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.card-thumb::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(transparent 49.5%, rgba(127, 212, 255, 0.04) 49.5%, rgba(127, 212, 255, 0.04) 50.5%, transparent 50.5%),
    linear-gradient(90deg, transparent 49.5%, rgba(127, 212, 255, 0.04) 49.5%, rgba(127, 212, 255, 0.04) 50.5%, transparent 50.5%);
  background-size: 32px 32px;
  opacity: 0.3;
}

.thumb-placeholder {
  position: relative;
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.24em;
  color: var(--ink-faint);
  padding: 8px 18px;
  border: 1px dashed var(--line);
  border-radius: 4px;
  background: rgba(5, 7, 12, 0.4);
}

/* 卡片内容 */
.card-body {
  padding: 20px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.card-title {
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--ink);
  line-height: 1.5;
}

.card-desc {
  font-size: 12.5px;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: var(--ink-dim);
  line-height: 1.7;
  flex: 1;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
}

.card-tag {
  font-size: 10.5px;
  font-weight: 300;
  letter-spacing: 0.14em;
  color: var(--cyan);
  padding: 5px 12px;
  border: 1px solid rgba(127, 212, 255, 0.25);
  border-radius: 3px;
  background: rgba(127, 212, 255, 0.05);
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.card-price {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink);
  white-space: nowrap;
}

/* 卡片图片 */
.card-thumb {
  background: #fff;
}
.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* ============================================================
   结果统计栏
   ============================================================ */
.result-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px 20px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line-soft);
}

.result-count {
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: var(--ink-dim);
}

.result-sort {
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
}

/* ============================================================
   分页
   ============================================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 0 72px;
  flex-wrap: wrap;
}

.page-btn {
  min-width: 40px;
  height: 40px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: var(--ink-dim);
  background: rgba(10, 15, 24, 0.5);
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  transition: all 0.3s ease;
}

.page-btn:hover:not(:disabled):not(.active) {
  color: var(--cyan);
  border-color: rgba(127, 212, 255, 0.4);
  background: rgba(127, 212, 255, 0.06);
}

.page-btn.active {
  color: var(--cyan);
  border-color: rgba(127, 212, 255, 0.55);
  background: rgba(127, 212, 255, 0.1);
  box-shadow: 0 0 10px rgba(127, 212, 255, 0.12);
}

.page-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.page-ellipsis {
  font-size: 14px;
  color: var(--ink-faint);
  padding: 0 4px;
  letter-spacing: 0.1em;
}

/* ============================================================
   无结果提示
   ============================================================ */
.no-result {
  text-align: center;
  padding: 72px 24px;
  color: var(--ink-faint);
}

.no-result p {
  font-size: 16px;
  font-weight: 300;
  letter-spacing: 0.16em;
  margin-bottom: 10px;
  color: var(--ink-dim);
}

.no-result span {
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.08em;
}

/* ============================================================
   页脚
   ============================================================ */
.site-footer {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 28px 24px 32px;
  border-top: 1px solid var(--line-soft);
}

.icp-link {
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  transition: color 0.3s ease;
}

.icp-link:hover {
  color: var(--ink-dim);
}

.beian-icon {
  display: inline-block;
  height: 14px;
  width: auto;
  vertical-align: middle;
  margin-right: 4px;
  margin-top: -2px;
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1100px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .site-header {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 16px 20px;
  }

  .logo {
    justify-content: center;
  }

  .search-wrap {
    width: 100%;
  }

  .page-hero {
    padding-top: 44px;
  }

  .card-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .category-nav {
    gap: 8px;
  }

  .cat-btn {
    padding: 7px 14px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .card-grid {
    grid-template-columns: 1fr;
  }

  .page-title {
    letter-spacing: 0.18em;
    text-indent: 0.18em;
  }
}

/* ---------- 动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ============================================================
   详情页样式
   ============================================================ */
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.14em;
  color: var(--ink-dim);
  border: 1px solid var(--line);
  border-radius: 4px;
  background: transparent;
  transition: all 0.3s ease;
}

.btn-back:hover {
  color: var(--cyan);
  border-color: rgba(127, 212, 255, 0.5);
  background: rgba(127, 212, 255, 0.06);
}

.detail-main {
  padding-top: clamp(40px, 7vh, 72px);
  padding-bottom: 72px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
  min-height: 420px;
}

.detail-image {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background:
    linear-gradient(135deg, rgba(127, 212, 255, 0.04), rgba(127, 212, 255, 0.01)),
    rgba(8, 12, 20, 0.6);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.detail-image {
  background: #fff;
}

.detail-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.detail-info {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding-top: 0;
  justify-content: center;
}

.detail-crumb {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
}

.detail-crumb a {
  color: var(--ink-dim);
  transition: color 0.3s ease;
}

.detail-crumb a:hover {
  color: var(--cyan);
}

.crumb-sep {
  opacity: 0.5;
}

.detail-title {
  font-size: clamp(28px, 3.8vw, 42px);
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--ink);
  line-height: 1.35;
  margin-bottom: 4px;
}

.detail-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  line-height: 1;
}

.detail-price {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--cyan);
  line-height: 1;
}

.detail-desc {
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-dim);
  font-weight: 300;
  letter-spacing: 0.04em;
  color: var(--ink-dim);
  line-height: 1.9;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line-soft);
}

.detail-body {
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 0.03em;
  color: var(--ink-dim);
  line-height: 2;
}

.detail-body p {
  margin-bottom: 14px;
}

.detail-actions {
  display: flex;
  gap: 14px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 32px;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.18em;
  color: var(--bg-deep);
  background: var(--cyan);
  border: 1px solid var(--cyan);
  border-radius: 4px;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: #a3e0ff;
  border-color: #a3e0ff;
  box-shadow: 0 4px 20px rgba(127, 212, 255, 0.3);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 32px;
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 0.18em;
  color: var(--ink-dim);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 4px;
  transition: all 0.3s ease;
}

.btn-ghost:hover {
  color: var(--cyan);
  border-color: rgba(127, 212, 255, 0.5);
  background: rgba(127, 212, 255, 0.06);
}

.detail-empty {
  text-align: center;
  padding: 100px 24px;
}

.detail-empty p {
  font-size: 18px;
  font-weight: 300;
  letter-spacing: 0.16em;
  color: var(--ink-dim);
  margin-bottom: 28px;
}

/* 详情页响应式 */
@media (max-width: 860px) {
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-image {
    max-width: 560px;
    margin: 0 auto;
  }
.detail-image {
  background: #fff;
}
}

/* ============================================================
   详情页：视频 + 图片画廊
   ============================================================ */
.detail-section {
  margin-bottom: 56px;
}

.section-title {
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.14em;
  color: var(--ink);
  margin-bottom: 24px;
  padding-left: 16px;
  border-left: 2px solid var(--cyan);
}

/* 视频容器 16:9 */
.video-wrap {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: rgba(5, 7, 12, 0.6);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  overflow: hidden;
}

.video-wrap iframe,
.video-wrap video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* 图片画廊网格 */
.image-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.gallery-item {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  cursor: pointer;
  background: rgba(8, 12, 20, 0.5);
  transition: all 0.3s ease;
}

.gallery-item:hover {
  border-color: rgba(127, 212, 255, 0.4);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

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

/* 图片点击放大 */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  cursor: zoom-out;
  padding: 40px;
}

.lightbox-overlay img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 32px;
  font-size: 36px;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  line-height: 1;
  transition: color 0.3s ease;
}

.lightbox-close:hover {
  color: #fff;
}

/* 画廊响应式 */
@media (max-width: 1100px) {
  .image-gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}

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

  .detail-section {
    padding: 0 16px;
    margin-bottom: 40px;
  }
}

