/* 繁纪官网前台样式 —— 深浅双主题，通过 data-theme 切换 */
:root {
  --bg: #faf7f2;
  --bg-soft: #f3ede2;
  --card: #ffffff;
  --text: #2b2620;
  --text-soft: #6b6258;
  --accent: #9c3d1f;
  --accent-soft: #c46b4a;
  --border: #e8dfd1;
  --shadow: 0 6px 24px rgba(80, 60, 40, 0.08);
  --header-bg: rgba(250, 247, 242, 0.9);
}

[data-theme="dark"] {
  --bg: #191512;
  --bg-soft: #211c17;
  --card: #262019;
  --text: #ece4d8;
  --text-soft: #a89a88;
  --accent: #d0895f;
  --accent-soft: #b56b48;
  --border: #3a3128;
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  --header-bg: rgba(25, 21, 18, 0.9);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  transition: background 0.3s, color 0.3s;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* 顶栏 */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { font-size: 22px; font-weight: 700; letter-spacing: 2px; color: var(--text); text-decoration: none; }
.brand span { font-size: 13px; font-weight: 500; letter-spacing: 3px; color: var(--accent); margin-left: 8px; }
.nav { display: flex; gap: 28px; }
.nav a { color: var(--text-soft); text-decoration: none; font-size: 15px; transition: color 0.2s; }
.nav a:hover { color: var(--accent); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.theme-toggle { display: flex; align-items: center; justify-content: center; background: none; border: 1px solid var(--border); border-radius: 8px; width: 38px; height: 38px; cursor: pointer; color: var(--text); }
.nav-toggle { display: none; align-items: center; justify-content: center; background: none; border: 1px solid var(--border); border-radius: 8px; width: 38px; height: 38px; cursor: pointer; color: var(--text); }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  background: #191512;
  aspect-ratio: 1920 / 800;
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* 分区 */
.section { padding: 72px 0; }
.section-title {
  font-size: 26px; letter-spacing: 3px; text-align: center;
  margin-bottom: 40px; color: var(--text);
}
.section-title::after {
  content: ""; display: block; width: 40px; height: 2px;
  background: var(--accent); margin: 14px auto 0;
}

.brand-intro { max-width: 760px; margin: 0 auto; color: var(--text-soft); text-align: center; }
.brand-intro p { margin-bottom: 14px; }

/* 商品 */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 24px;
}
.product-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden;
  box-shadow: var(--shadow); transition: transform 0.25s, box-shadow 0.25s;
}
.product-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.14); }
.product-img { aspect-ratio: 3 / 4; background: var(--bg-soft); display: flex; align-items: center; justify-content: center; }
.product-img img { width: 100%; height: 100%; object-fit: cover; }
.product-img.placeholder { font-size: 34px; color: var(--accent); letter-spacing: 4px; font-weight: 700; }
.product-info { padding: 18px; }
.product-info h3 { font-size: 18px; letter-spacing: 1px; margin-bottom: 6px; }
.product-cat { font-size: 12px; color: var(--accent); margin-bottom: 8px; }
.product-desc { font-size: 13px; color: var(--text-soft); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { margin-top: 12px; font-size: 18px; font-weight: 700; color: var(--accent); }

/* 平台 */
.platforms { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.platform-btn {
  display: inline-block; padding: 12px 30px;
  border: 1px solid var(--accent); border-radius: 30px;
  color: var(--accent); text-decoration: none; font-size: 15px;
  transition: all 0.2s;
}
.platform-btn:hover { background: var(--accent); color: #fff; }
.platform-btn.disabled { border-color: var(--border); color: var(--text-soft); cursor: default; }

/* 联系 */
.contact { text-align: center; color: var(--text-soft); }
.contact p { margin-bottom: 8px; }

/* 页脚 */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  text-align: center;
  color: var(--text-soft);
  font-size: 13px;
}
.site-footer p { margin-bottom: 6px; }

/* 备案信息（ICP + 公安备案） */
.beian {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px 16px;
  margin-top: 4px;
}
.beian a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-soft);
  text-decoration: none;
  transition: color 0.2s ease;
}
.beian a:hover { color: var(--text); }
.beian-icon {
  height: 15px;
  width: auto;
  display: inline-block;
  vertical-align: middle;
}

.empty { text-align: center; color: var(--text-soft); padding: 30px 0; }

@media (max-width: 720px) {
  .nav { display: none; }
  .nav-toggle { display: flex; }
  .nav.open {
    display: flex; flex-direction: column; gap: 0;
    position: absolute; top: 64px; left: 0; right: 0;
    background: var(--header-bg); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border); padding: 6px 20px;
  }
  .nav.open a { padding: 13px 0; border-bottom: 1px solid var(--border); font-size: 16px; }
  .nav.open a:last-child { border-bottom: none; }
  .hero { aspect-ratio: 744 / 1000; }
}



/* ===== 图片模块（新增迭代） ===== */

/* 品牌介绍板块图片 */
.brand-media { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; max-width: 900px; margin: 24px auto 0; }
.brand-media-item { display: block; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--border); }
.brand-media-item img { display: block; width: 100%; height: 220px; object-fit: cover; transition: transform 0.3s; }
.brand-media-item:hover img { transform: scale(1.04); }

/* 商品卡片点击跳转（链接形态） */
.product-card-link { display: block; text-decoration: none; color: inherit; }
.product-card-link:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.14); }

/* 商品多图自动轮播：淡入淡出切换 */
.product-carousel { position: relative; width: 100%; height: 100%; overflow: hidden; }
.product-carousel-img {
  position: absolute; inset: 0; opacity: 0;
  transition: opacity 0.6s ease;
}
.product-carousel-img.active { opacity: 1; }
.product-carousel-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-dots {
  position: absolute; left: 0; right: 0; bottom: 10px;
  display: flex; justify-content: center; gap: 6px; z-index: 2;
}
.product-dot {
  width: 8px; height: 8px; border-radius: 50%;
  border: none; padding: 0; cursor: pointer;
  background: rgba(255, 255, 255, 0.45);
  transition: background 0.2s, transform 0.2s;
}
.product-dot.active { background: #fff; transform: scale(1.25); }

/* 平台图标 */
.platform-btn { display: inline-flex; align-items: center; gap: 8px; }
.platform-icon { display: inline-flex; width: 22px; height: 22px; flex-shrink: 0; }
.platform-icon img { width: 100%; height: 100%; object-fit: contain; }
.platform-name { line-height: 1; }

/* 联系我们图片 */
.contact-media-wrap { max-width: 560px; margin: 20px auto 0; }
.contact-media-wrap img { display: block; width: 100%; max-height: 360px; object-fit: contain; border-radius: 12px; }
.contact-media-wrap a { display: block; }

/* 移动端适配 */
@media (max-width: 720px) {
  .brand-media { grid-template-columns: 1fr; margin-top: 18px; }
  .brand-media-item img { height: 200px; }
}

/* 商品图淡入效果（仅单图，直接子元素；多图轮播不受影响） */
.product-img > img { opacity: 0; transition: opacity 0.5s ease; }
.product-img > img.loaded { opacity: 1; }

/* ===== 设计团队模块 ===== */
.team-lead { max-width: 640px; margin: -6px auto 40px; text-align: center; color: var(--text-soft); font-size: 15px; }
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.team-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 34px 26px;
  box-shadow: var(--shadow); text-align: center;
  transition: transform 0.25s, box-shadow 0.25s;
}
.team-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.14); }
.team-avatar {
  width: 76px; height: 76px; margin: 0 auto 16px;
  border-radius: 50%; background: var(--accent-soft);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 30px; font-weight: 700; letter-spacing: 2px;
}
.team-name { font-size: 20px; letter-spacing: 2px; margin-bottom: 4px; }
.team-role { font-size: 13px; color: var(--accent); letter-spacing: 1px; margin-bottom: 14px; }
.team-tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 14px; list-style: none; }
.team-tags li {
  font-size: 12px; color: var(--text-soft);
  border: 1px solid var(--border); border-radius: 20px; padding: 2px 10px;
}
.team-desc { font-size: 13px; color: var(--text-soft); line-height: 1.8; text-align: left; }

@media (max-width: 720px) {
  .team-grid { grid-template-columns: 1fr; }
  .team-lead { margin-top: 0; }
}



/* ===== 模块列表 ===== */
.module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; max-width: 900px; margin: 0 auto; }
.module-card {
  display: block; background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 28px 20px; text-align: center;
  box-shadow: var(--shadow); text-decoration: none; color: inherit;
  transition: transform 0.25s, box-shadow 0.25s;
}
.module-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.14); }
.module-icon {
  width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 50%;
  background: var(--accent-soft); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700; letter-spacing: 2px;
}
.module-name { font-size: 17px; letter-spacing: 2px; margin-bottom: 6px; }
.module-desc { font-size: 13px; color: var(--text-soft); }

@media (max-width: 720px) {
  .module-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}




/* ===== 语言切换器 ===== */
.lang-switch { position: relative; }
.lang-toggle {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: none; border: 1px solid var(--border); border-radius: 8px;
  height: 38px; padding: 0 10px; cursor: pointer; color: var(--text);
  font-size: 13px; font-weight: 600; letter-spacing: 1px;
  transition: color 0.2s, border-color 0.2s;
}
.lang-toggle:hover { color: var(--accent); border-color: var(--accent); }
.lang-code { line-height: 1; }
.lang-menu {
  position: absolute; top: 46px; right: 0; min-width: 150px;
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: var(--shadow); padding: 6px; z-index: 200;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}
.lang-menu.open { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-option {
  display: block; width: 100%; text-align: left; padding: 9px 14px;
  background: none; border: none; border-radius: 6px; cursor: pointer;
  color: var(--text); font-size: 14px; line-height: 1.4;
  transition: background 0.15s, color 0.15s;
}
.lang-option:hover { background: var(--bg-soft); }
.lang-option.active { color: var(--accent); font-weight: 600; }

@media (max-width: 720px) {
  .lang-toggle { height: 38px; padding: 0 8px; }
  .lang-menu { right: 0; min-width: 138px; }
}



/* ===== 光影特效（铜器流光 / 鼠标聚光灯 / 丁达尔光束）===== */

/* 主题化变量：铜色渐变 + 聚光灯柔光 */
:root {
  --copper-1: #7a5c3e;
  --copper-2: #a87a4a;
  --copper-3: #c9955e;
  --copper-4: #d9a86b;
  --spot-dim: rgba(250, 247, 242, 0.82);
  --spot-dim-strong: rgba(250, 247, 242, 0.94);
}
[data-theme="dark"] {
  --copper-1: #8a6e50;
  --copper-2: #c99b6a;
  --copper-3: #e8c896;
  --copper-4: #f5d9a8;
  --spot-dim: rgba(18, 14, 10, 0.75);
  --spot-dim-strong: rgba(18, 14, 10, 0.88);
}

/* 铜器流光：顶栏品牌文字金属高光周期性扫过 */
@supports (-webkit-background-clip: text) or (background-clip: text) {
  .brand, .brand span {
    background-image: linear-gradient(90deg,
      var(--copper-1) 0%, var(--copper-2) 20%, var(--copper-3) 40%, var(--copper-4) 50%,
      var(--copper-3) 60%, var(--copper-2) 80%, var(--copper-1) 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: copperSweep 4s linear infinite;
  }
}
@keyframes copperSweep {
  0% { background-position: 200% 50%; }
  100% { background-position: -200% 50%; }
}

/* 鼠标聚光灯：商品区整块展厅射灯 */
.products-stage { position: relative; }
.spotlight-mask {
  position: absolute; inset: 0; z-index: 3;
  pointer-events: none;
  background: var(--spot-dim);
  border-radius: 12px;
}
/* 触屏设备（无悬停）不置灰，聚光灯关闭 */
@media (hover: none), (pointer: coarse) {
  .spotlight-mask { display: none; }
}

/* 丁达尔光束：Hero 斜射暖色光束 + 浮尘 */
.hero-fx { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.tyndall-beams { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.beam {
  position: absolute; top: -20%; width: 120px; height: 140%;
  background: linear-gradient(180deg,
    rgba(240, 192, 144, 0) 0%, rgba(240, 192, 144, 0.12) 20%,
    rgba(240, 192, 144, 0.08) 50%, rgba(240, 192, 144, 0) 100%);
  filter: blur(20px);
  transform-origin: top center;
}
.beam-1 { left: 25%; transform: rotate(-8deg); animation: beamBreath 6s ease-in-out infinite; }
.beam-2 {
  left: 45%; width: 180px; transform: rotate(-5deg);
  animation: beamBreath 7s ease-in-out 1s infinite;
  background: linear-gradient(180deg,
    rgba(240, 192, 144, 0) 0%, rgba(240, 192, 144, 0.18) 25%,
    rgba(240, 192, 144, 0.1) 55%, rgba(240, 192, 144, 0) 100%);
}
.beam-3 { left: 65%; width: 100px; transform: rotate(-3deg); animation: beamBreath 5.5s ease-in-out 2s infinite; }
.beam-4 { left: 80%; width: 80px; transform: rotate(-6deg); animation: beamBreath 8s ease-in-out 0.5s infinite; }
.beam-5 { left: 15%; width: 90px; transform: rotate(-10deg); animation: beamBreath 9s ease-in-out 1.5s infinite; }
.beam-6 { left: 90%; width: 70px; transform: rotate(-2deg); animation: beamBreath 6.5s ease-in-out 3s infinite; }
@keyframes beamBreath {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}
.dust-container { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.dust-particle {
  position: absolute; border-radius: 50%;
  background: rgba(240, 200, 160, 0.6);
  opacity: 0;
  animation: dustFloat linear infinite;
}
@keyframes dustFloat {
  0% { transform: translate(0, 100vh) scale(0.8); opacity: 0; }
  10% { opacity: 0.6; }
  90% { opacity: 0.4; }
  100% { transform: translate(var(--drift-x, 40px), -20vh) scale(1.1); opacity: 0; }
}
