/* =========================================================
   公共样式：全站统一变量 / 基础重置 / 布局 / 按钮 / 导航 /
   页脚 / 客服悬浮窗 / 通用区块标题
   创联软件官网 · 浅色商务风格
   ========================================================= */

/* ---------- 主题变量 ---------- */
:root {
  /* 主色系：鲜亮暖橙主品牌 + 琥珀金点缀（hero 暖橙活力，辅以少量多彩图标，明快通透） */
  --blue-500: #FF7A3D;        /* 主品牌鲜亮暖橙 */
  --blue-600: #E8601C;        /* 深暖橙（hover） */
  --cyan-400: #FFB04D;        /* 琥珀金点缀（更亮） */
  --grad-main: linear-gradient(135deg, #FF7A3D, #FFB04D);

  /* 背景与文字（更亮净，降低灰闷感） */
  --bg-white: #FFFFFF;        /* 主背景 */
  --bg-gray: #FFF7EE;         /* 浅暖亮区块背景 */
  --text-title: #23201C;      /* 标题深色（近中性黑） */
  --text-body: #5B554C;       /* 正文 */
  --text-sub: #8A8277;        /* 次级说明文字 */
  --border: #F2E7D8;          /* 边框（更柔和亮） */

  --radius: 12px;
  --shadow: 0 10px 30px rgba(30, 25, 20, 0.08);
  --shadow-hover: 0 18px 44px rgba(30, 25, 20, 0.14);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

/* 图片加载失败兜底占位（配合 common.js 全局 error 监听） */
.img-fallback {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  background: linear-gradient(135deg, #FDEEDF, #FFF7EE);
}

.img-fallback::after {
  content: attr(data-fallback);
  color: #C99168;
  font-size: 15px;
  font-weight: 600;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Source Han Sans CN", Arial, sans-serif;
  color: var(--text-body);
  background: var(--bg-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

img {
  max-width: 100%;
  display: block;
}

/* 全站展示图视觉增强：提亮 + 提鲜艳 + 稍增对比，让照片更鲜活不显暗 */
.project-img img,
.pcard-img img,
.featured-img img,
.case-card img,
.product-card img,
.news-card img,
.about-img img {
  filter: brightness(1.06) saturate(1.15) contrast(1.04);
}

button {
  font-family: inherit;
  cursor: pointer;
}

/* ---------- 通用容器 ---------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- 通用按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  padding: 10px 22px;
  transition: all 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  border: 1px solid transparent;
  white-space: nowrap;
  letter-spacing: 0.3px;
}

/* 主按钮：蓝色渐变 */
.btn-primary {
  background: var(--grad-main);
  color: #fff;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(255, 122, 61, 0.35);
}

/* 描边按钮（浅色底场景） */
.btn-outline {
  background: transparent;
  color: var(--blue-500);
  border-color: var(--blue-500);
}

.btn-outline:hover {
  background: var(--blue-500);
  color: #fff;
}

/* 白色按钮（深色/渐变底场景） */
.btn-white {
  background: #fff;
  color: var(--blue-500);
}

.btn-white:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

/* 浅色描边按钮（深色/渐变底场景） */
.btn-ghost-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.6);
}

.btn-ghost-light:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #fff;
}

.btn-lg {
  padding: 14px 36px;
  font-size: 16px;
}

.btn-sm {
  padding: 8px 18px;
  font-size: 14px;
}

/* ---------- 通用区块标题 ---------- */
.section {
  padding: 90px 0;
}

.section-head {
  text-align: center;
  margin-bottom: 56px;
}

.section-tag {
  display: inline-block;
  font-size: 13px;
  letter-spacing: 5px;
  color: var(--blue-500);
  text-transform: uppercase;
  margin-bottom: 12px;
  font-weight: 700;
}

.section-title {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--text-title);
  margin-bottom: 16px;
}

.section-title::after {
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  border-radius: 2px;
  background: var(--grad-main);
  margin: 16px auto 0;
}

.section-desc {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-sub);
}

/* =========================================================
   产品组件（通用：产品区背景 / 需求速查 / 分类Tab / 产品卡片）
   ========================================================= */
.products {
  background: var(--bg-gray);
}

/* 按需求快速查找入口 */
.need-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-bottom: 34px;
  padding: 20px 24px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 14px rgba(30, 25, 20, 0.05);
}

.need-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-title);
  margin-right: 6px;
}

.need-chip {
  padding: 8px 18px;
  border-radius: 22px;
  border: 1px solid rgba(255, 122, 61, 0.30);
  background: rgba(255, 122, 61, 0.06);
  color: var(--blue-500);
  font-size: 14px;
  font-weight: 600;
  transition: all 0.25s ease;
}

.need-chip:hover {
  background: var(--grad-main);
  color: #fff;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(255, 122, 61, 0.30);
}

/* 产品分类 Tab */
.product-tabs {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 44px;
}

.tab-btn {
  padding: 9px 26px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-body);
  font-size: 14px;
  transition: all 0.25s ease;
}

.tab-btn:hover {
  color: var(--blue-500);
  border-color: var(--blue-500);
}

.tab-btn.active {
  background: var(--grad-main);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 18px rgba(255, 122, 61, 0.30);
}

/* 产品卡片网格：auto-fit 避免筛选后只剩 1～2 张卡时左侧空一大块 */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}

.product-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 24px;
  box-shadow: 0 4px 14px rgba(30, 25, 20, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.product-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 122, 61, 0.35);
  box-shadow: var(--shadow-hover);
}

/* 产品图标（按分类着色的圆角渐变标识） */
.product-icon {
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 18px;
}

.icon-mini     { background: linear-gradient(135deg, #FF7A3D, #FFB04D); }   /* 主橙 */
.icon-mall     { background: linear-gradient(135deg, #8FA3C9, #A9B8D6); }   /* 雾蓝 */
.icon-catering { background: linear-gradient(135deg, #B5974E, #C9B072); }   /* 暖沙金 */
.icon-manage   { background: linear-gradient(135deg, #7FA98F, #9DBF9F); }   /* 苔绿 */

.product-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-title);
  margin-bottom: 10px;
}

.product-desc {
  font-size: 14px;
  color: var(--text-sub);
  margin-bottom: 16px;
  flex-grow: 1;
}

/* 产品核心功能标签 */
.product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.product-tag {
  padding: 4px 12px;
  border-radius: 6px;
  background: var(--bg-gray);
  border: 1px solid var(--border);
  color: var(--text-body);
  font-size: 12px;
}

/* 产品卡片底部操作行 */
.product-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.product-more {
  font-size: 14px;
  color: var(--blue-500);
  font-weight: 600;
  transition: color 0.25s ease;
}

.product-more:hover {
  color: var(--cyan-400);
}

/* =========================================================
   底部 CTA 横幅（通用）
   ========================================================= */
.cta-banner {
  background:
    radial-gradient(circle at 85% 30%, rgba(255, 176, 77, 0.16), transparent 45%),
    radial-gradient(circle at 15% 80%, rgba(255, 122, 61, 0.12), transparent 40%),
    linear-gradient(135deg, #FDEFE3 0%, #FBE6D2 100%);
  padding: 90px 0;
  text-align: center;
}

.cta-inner h2 {
  font-size: 34px;
  color: var(--text-title);
  margin-bottom: 14px;
}

.cta-inner p {
  font-size: 16px;
  color: var(--text-body);
  margin-bottom: 34px;
}

.cta-actions {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

/* CTA 内主按钮：用暖橙渐变点缀 */
.cta-banner .btn-primary {
  background: var(--grad-main);
  color: #fff;
}

/* CTA 内次要按钮：深橙描边（浅暖底上用深橙） */
.cta-banner .btn-ghost-light {
  background: transparent;
  color: var(--blue-600);
  border-color: var(--blue-600);
}

.cta-banner .btn-ghost-light:hover {
  background: var(--blue-600);
  color: #fff;
  border-color: transparent;
}

/* =========================================================
   页面 Banner（通用：浅色渐变 + 居中标题 + 面包屑）
   ========================================================= */
.page-banner {
  background: linear-gradient(180deg, #FFF1E3 0%, #FFF9F2 100%);
  padding: 150px 0 70px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.banner-inner {
  max-width: 720px;
}

.banner-title {
  font-size: 42px;
  font-weight: 700;
  color: var(--text-title);
  margin-bottom: 14px;
}

.banner-desc {
  font-size: 16px;
  color: var(--text-sub);
  margin-bottom: 20px;
}

/* banner 副标题（产品详情页等使用，突出产品定位） */
.banner-sub {
  font-size: 18px;
  color: var(--blue-500);
  font-weight: 600;
  margin-bottom: 10px;
}

/* 面包屑 */
.breadcrumb {
  font-size: 14px;
  color: var(--text-sub);
}

.breadcrumb a {
  color: var(--blue-500);
  transition: color 0.25s ease;
}

.breadcrumb a:hover {
  color: var(--cyan-400);
}

.breadcrumb-sep {
  margin: 0 8px;
  color: #D8C3AF;
}

.breadcrumb-current {
  color: var(--text-sub);
}

/* =========================================================
   顶部导航（全站公共）
   ========================================================= */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s ease;
}

.header.scrolled {
  background: #fff;
  box-shadow: 0 4px 20px rgba(30, 25, 20, 0.08);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

/* 品牌 Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--grad-main);
  color: #fff;
  font-size: 20px;
  font-weight: 700;
}

.logo-text {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-title);
  letter-spacing: 1px;
}

/* 主导航 */
.nav {
  display: flex;
  gap: 34px;
}

/* 移动端抽屉内的咨询入口（桌面端已有右侧按钮，此处隐藏） */
.nav-link-cta {
  display: none;
}

.nav-link {
  font-size: 15px;
  color: var(--text-body);
  position: relative;
  padding: 6px 0;
  transition: color 0.25s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--grad-main);
  transition: width 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--blue-500);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* 导航右侧 */
.nav-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-tel {
  font-size: 16px;
  font-weight: 600;
  color: var(--blue-500);
  letter-spacing: 0.5px;
}

/* 移动端菜单按钮（默认隐藏） */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 6px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-title);
  border-radius: 2px;
}

/* =========================================================
   页脚（全站公共，黑色大气底）
   ========================================================= */
.footer {
  background: #1B1B1F;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  padding: 60px 20px;
}

.footer-logo {
  margin-bottom: 16px;
}

/* 页脚 Logo 文字使用白色，在黑色底上醒目 */
.footer-logo .logo-text {
  color: #FFFFFF;
}

.footer-col h4 {
  color: #FFFFFF;
  font-size: 16px;
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  color: #D6DFF0;
  font-size: 14px;
  margin-bottom: 10px;
  transition: color 0.25s ease;
}

.footer-col a:hover {
  color: var(--cyan-400);
}

.footer-brand p,
.footer-contact p {
  color: #D6DFF0;
  font-size: 14px;
  margin-bottom: 8px;
}

.footer-contact a {
  display: inline;
  color: var(--cyan-400);
}

.footer-contact a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 0;
  background: #121216;
}

.footer-bottom .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  color: #A9B3C4;
}

.footer-bottom a {
  color: #A9B3C4;
}

.footer-bottom a:hover {
  color: var(--cyan-400);
}

/* =========================================================
   在线客服悬浮窗（全站公共，浅色）
   ========================================================= */
.consult-float {
  position: fixed;
  right: 24px;
  bottom: 60px;
  z-index: 999;
}

.consult-btn {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: none;
  background: var(--grad-main);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  box-shadow: 0 8px 24px rgba(255, 122, 61, 0.45);
  transition: transform 0.25s ease;
}

.consult-btn:hover {
  transform: scale(1.06);
}

.consult-panel {
  position: absolute;
  right: 0;
  bottom: 66px;
  width: 220px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

.consult-panel.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.consult-panel-head {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-title);
  margin-bottom: 12px;
}

.consult-item {
  display: block;
  font-size: 13px;
  color: var(--text-body);
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.25s ease;
}

.consult-item:last-child {
  border-bottom: none;
}

.consult-item:hover {
  color: var(--blue-500);
}

.consult-qr {
  width: 120px;
  height: 120px;
  margin: 10px auto 0;
  display: block;
  object-fit: contain;
  border-radius: 8px;
}

/* =========================================================
   返回顶部按钮（全站公共）
   ========================================================= */
.back-top {
  position: fixed;
  right: 24px;
  bottom: 128px;
  z-index: 998;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--blue-500);
  font-size: 18px;
  box-shadow: var(--shadow);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

.back-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-top:hover {
  background: var(--grad-main);
  color: #fff;
  border-color: transparent;
}

/* =========================================================
   滚动入场动画（reveal）：进入视口时淡入上移
   由 common.js 的 initReveal 添加 .revealed 触发
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* 子元素错峰：配合 .reveal-group 时网格卡片依次出现 */
.reveal-group > * {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-group.revealed > * {
  opacity: 1;
  transform: translateY(0);
}

.reveal-group.revealed > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-group.revealed > *:nth-child(2) { transition-delay: 0.12s; }
.reveal-group.revealed > *:nth-child(3) { transition-delay: 0.19s; }
.reveal-group.revealed > *:nth-child(4) { transition-delay: 0.26s; }
.reveal-group.revealed > *:nth-child(5) { transition-delay: 0.33s; }
.reveal-group.revealed > *:nth-child(6) { transition-delay: 0.40s; }

/* 尊重系统减弱动画偏好 */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-group > * {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* =========================================================
   响应式适配
   ========================================================= */
@media (max-width: 992px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }

  /* 中等屏幕：隐藏电话、缩小导航间距，避免溢出 */
  .nav {
    gap: 20px;
  }

  .nav-tel {
    display: none;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 60px 0;
  }

  .section-title {
    font-size: 28px;
  }

  .cta-inner h2 {
    font-size: 26px;
  }

  .page-banner {
    padding: 120px 0 50px;
  }

  .banner-title {
    font-size: 32px;
  }

  .banner-desc {
    font-size: 15px;
  }

  /* 移动端：导航收起为抽屉 */
  .nav-toggle {
    display: flex;
  }

  .nav {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: #fff;
    padding: 12px 20px 20px;
    border-bottom: 1px solid var(--border);
    display: none;
    box-shadow: 0 20px 30px rgba(30, 25, 20, 0.1);
  }

  .nav.open {
    display: flex;
  }

  .nav-link {
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
  }

  .nav-link-cta {
    display: block;
    margin-top: 8px;
    padding: 12px 0;
    text-align: center;
    border-bottom: none;
    border-radius: 8px;
    background: var(--grad-main);
    color: #fff;
    font-weight: 600;
  }

  .nav-link-cta::after {
    display: none;
  }

  .nav-link-cta:hover,
  .nav-link-cta.active {
    color: #fff;
  }

  .nav-right {
    display: none;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 44px 20px;
  }
}
