/* ==========================================================================
   正胜 · 法商汇   ——   设计令牌与通用组件
   配色方案 E · 晨曦暖砂
   主 #23405E   强调 #C2763A   点缀 #D98C4A
   底 #FFFDF9   hero #FBF3E7   正文 #6B6357
   ========================================================================== */

:root {
  /* ---- 品牌主色 ---- */
  --c-primary: #23405E;
  --c-primary-2: #2E5273;
  --c-primary-3: #3A5674;
  /* 顶部导航专用：鲜亮宝蓝（参照腾讯网导航配色），页脚 / banner 仍用 --c-primary */
  --c-nav-bg: #2E5BEA;

  /* ---- 暖色强调 ---- */
  --c-accent: #C2763A;
  --c-accent-2: #D98C4A;
  --c-accent-deep: #A9631F;
  /* 深底（#23405E）上使用的暖金，对比度 ≥ 5:1，替代 accent-deep 用于深色卡片 */
  --c-accent-on-dark: #E9B77E;

  /* ---- 底色体系 ---- */
  --c-bg: #FFFDF9;
  --c-surface: #FFFDF9;
  --c-tint: #FBF3E7;
  --c-tint-2: #F0E9DC;

  /* ---- 线条 ---- */
  --c-border: #E8E0D2;
  --c-divider: #F0E9DC;

  /* ---- 浅底文字 ---- */
  --c-heading: #23405E;
  --c-text: #6B6357;
  --c-text-strong: #3A342C;
  --c-text-deep: #4A443C;
  --c-muted: #A79B8A;

  /* ---- 深底文字 ---- */
  --c-on-dark-1: #E8D9C0;
  --c-on-dark-2: #D8C9B4;
  --c-on-dark-3: #C0AE93;
  --c-on-dark-4: #B3A189;
  --c-on-dark-5: #9A9086;

  /* ---- 标签 / 胶囊 ---- */
  --c-tag-bg: #FDEEDC;
  --c-tag-text: #A9631F;
  --c-chip: #FBF3E7;

  /* ---- 圆角 ---- */
  --r-xs: 8px;
  --r-sm: 10px;
  --r-card: 12px;
  --r-lg: 16px;
  --r-pill: 20px;
  --r-btn: 22px;

  /* ---- 阴影 ---- */
  --sh-1: 0 1px 2px rgba(58, 52, 44, .04), 0 2px 8px rgba(58, 52, 44, .05);
  --sh-2: 0 4px 16px rgba(58, 52, 44, .07);
  --sh-3: 0 10px 32px rgba(35, 64, 94, .10);

  /* ---- 尺寸 ---- */
  --maxw: 1200px;
  --nav-h: 72px;

  --font: "Inter", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}

/* ------------------------------- reset ---------------------------------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.7;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5 { margin: 0; color: var(--c-heading); font-weight: 600; line-height: 1.35; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 32px; }
.section { padding: 72px 0; }
.section--tint { background: var(--c-tint); }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }

/* -------------------------------- 文本 ----------------------------------- */
.eyebrow {
  font-size: 13px; font-weight: 600; letter-spacing: .14em;
  color: var(--c-accent); text-transform: uppercase;
}
.eyebrow--on-dark { color: var(--c-accent-2); }
.h2 { font-size: 30px; letter-spacing: -.01em; }
.h3 { font-size: 20px; }
.lead { font-size: 15px; color: var(--c-text); }
.sub { font-size: 14px; color: var(--c-muted); }
.strong { color: var(--c-text-strong); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 40px; }
.section-head .h2 { margin-top: 10px; }
.section-head .lead { margin-top: 12px; }

/* -------------------------------- 按钮 ----------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 24px; border: 0; border-radius: var(--r-btn);
  font-size: 15px; font-weight: 600; cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--c-accent-2); color: var(--c-primary); box-shadow: 0 6px 18px rgba(217, 140, 74, .28); }
.btn--primary:hover { background: #E39A57; }
.btn--dark { background: var(--c-primary); color: #fff; box-shadow: 0 6px 18px rgba(35, 64, 94, .22); }
.btn--dark:hover { background: var(--c-primary-2); }
.btn--ghost { background: transparent; color: var(--c-on-dark-2); border: 1px solid var(--c-primary-3); }
.btn--ghost:hover { border-color: var(--c-accent-2); color: var(--c-accent-2); }
.btn--outline { background: var(--c-surface); color: var(--c-primary); border: 1px solid var(--c-border); }
.btn--outline:hover { border-color: var(--c-accent-2); color: var(--c-accent-deep); }
.btn--sm { height: 36px; padding: 0 18px; font-size: 14px; border-radius: var(--r-pill); }
.btn--block { width: 100%; }

/* -------------------------------- 标签 ----------------------------------- */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 12px; border-radius: var(--r-pill);
  background: var(--c-tag-bg); color: var(--c-tag-text);
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.tag--accent { background: var(--c-accent-2); color: #fff; }
.tag--line { background: transparent; border: 1px solid var(--c-border); color: var(--c-muted); }
.tag--on-dark { background: rgba(233, 183, 126, .18); color: var(--c-accent-on-dark); border: 1px solid rgba(233, 183, 126, .42); }

/* -------------------------------- 卡片 ----------------------------------- */
.card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-card);
  padding: 24px;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.card--hover:hover { border-color: var(--c-accent-2); box-shadow: var(--sh-2); transform: translateY(-2px); }
.card--accent { border-color: var(--c-accent-2); }
.card--dark { background: var(--c-primary); border-color: var(--c-primary); color: var(--c-on-dark-2); }
.card--dark h3, .card--dark h4 { color: #fff; }

/* ------------------------------ 顶部导航 --------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(180deg, #3366F2 0%, #2E5BEA 55%, #2A52DC 100%);
}
.nav__inner {
  height: var(--nav-h); display: flex; align-items: center; gap: 40px;
  max-width: var(--maxw); margin: 0 auto; padding: 0 32px; position: relative;
}
.nav__brand { display: flex; align-items: center; gap: 12px; }
.nav__mark {
  width: 44px; height: 44px; border-radius: var(--r-xs);
  background: var(--c-accent-2); color: var(--c-primary);
  display: grid; place-items: center; font-size: 22px; font-weight: 700;
}
/* 圆形徽章 logo 图标版 */
.nav__mark--img {
  display: block; object-fit: contain; box-sizing: border-box;
  background: #fff; padding: 2px; border-radius: 50%;
}
.nav__name {
  color: #fff; font-size: 24px; font-weight: 800; line-height: 1.2;
  letter-spacing: .04em; white-space: nowrap;
}
.nav__en { color: rgba(255, 255, 255, .62); font-size: 10px; letter-spacing: .14em; line-height: 1.2; }
.nav__menu { display: flex; align-items: center; gap: 28px; margin-right: auto; }
.nav__menu a { font-size: 15px; color: rgba(255, 255, 255, .88); transition: color .16s ease; white-space: nowrap; flex: none; }
.nav__menu a:hover { color: #fff; }
.nav__menu a.is-active { color: #FFD9A0; font-weight: 600; }
.nav__actions { display: flex; align-items: center; gap: 20px; flex: none; }
.nav__actions > * { white-space: nowrap; flex: none; }
.nav__actions .login { font-size: 15px; color: rgba(255, 255, 255, .88); }
.nav__actions .login:hover { color: #fff; }
.nav__toggle { display: none; }

/* -------------------------------- 页脚 ----------------------------------- */
.footer { background: var(--c-primary); color: var(--c-on-dark-3); padding: 56px 0 28px; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; }
.footer__brand .nav__name { color: #fff; font-size: 18px; font-weight: 700; }
.footer__brand p { margin-top: 14px; font-size: 13px; line-height: 1.9; }
.footer h5 { color: #fff; font-size: 14px; margin-bottom: 14px; }
.footer li { font-size: 13px; line-height: 2.1; }
.footer li a:hover { color: var(--c-accent-2); }
.footer__line { height: 1px; background: var(--c-primary-3); margin: 36px 0 20px; }
.footer__copy { font-size: 12px; color: var(--c-on-dark-5); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ------------------------------- 页头区 ---------------------------------- */
.pagehead { background: var(--c-tint); padding: 34px 0 40px; border-bottom: 1px solid var(--c-border); }
.pagehead--plain { background: var(--c-bg); }
.crumb { font-size: 13px; color: var(--c-muted); }
.crumb a:hover { color: var(--c-accent-deep); }
.pagehead h1 { font-size: 30px; margin-top: 10px; }
.pagehead p { margin-top: 10px; max-width: 820px; font-size: 14px; }

/* ------------------------------- 表单件 ---------------------------------- */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 13px; font-weight: 600; color: var(--c-primary); }
.input, .select, textarea.input {
  height: 42px; padding: 0 14px; border-radius: var(--r-sm);
  border: 1px solid var(--c-border); background: var(--c-surface);
  color: var(--c-text-strong); outline: none; transition: border-color .16s ease;
  width: 100%;
}
textarea.input { height: auto; padding: 12px 14px; resize: vertical; min-height: 96px; }
.input::placeholder { color: var(--c-muted); }
.input:focus, .select:focus, textarea.input:focus { border-color: var(--c-accent-2); }
.select { appearance: none; cursor: pointer; }

/* -------------------------------- 分页 ----------------------------------- */
.pager { display: flex; justify-content: center; gap: 8px; margin-top: 40px; }
.pager a, .pager span {
  min-width: 38px; height: 38px; padding: 0 12px; border-radius: var(--r-pill);
  display: grid; place-items: center; font-size: 14px;
  border: 1px solid var(--c-border); background: var(--c-surface); color: var(--c-text);
}
.pager a:hover { border-color: var(--c-accent-2); color: var(--c-accent-deep); }
.pager .is-current { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }

/* ------------------------------- 响应式 ---------------------------------- */
@media (max-width: 1280px) {
  .nav__en { display: none; }              /* 空间紧张时先收英文副标 */
  .nav__inner { gap: 24px; }
  .nav__menu { gap: 20px; }
  .nav__menu a { font-size: 14px; }
}
@media (max-width: 1024px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .nav__inner { gap: 16px; }
  .nav__menu { gap: 12px; }
  .nav__menu a { font-size: 13px; }
  .nav__actions { gap: 12px; }
  .nav__actions .nav__center { display: none; }  /* 登录后经「会员」入口进会员中心 */
  .nav__actions .btn--sm { padding: 0 14px; }
}
@media (max-width: 860px) {
  .wrap, .nav__inner { padding: 0 20px; }
  .nav__menu { display: none; }
  .nav__toggle {
    display: grid; place-items: center; width: 40px; height: 40px; margin-left: auto;
    border-radius: var(--r-xs); border: 1px solid var(--c-primary-3);
    background: transparent; color: var(--c-on-dark-2); font-size: 18px; cursor: pointer;
  }
  .nav.is-open .nav__menu {
    display: flex; flex-direction: column; align-items: stretch; gap: 0;
    position: absolute; left: 0; right: 0; top: var(--nav-h);
    background: var(--c-nav-bg); padding: 8px 20px 16px; border-top: 1px solid var(--c-primary-3);
  }
  .nav.is-open .nav__menu a { padding: 12px 0; border-bottom: 1px solid rgba(255, 255, 255, .06); }
  .h2, .pagehead h1 { font-size: 24px; }
  .section { padding: 48px 0; }
  .footer__grid { grid-template-columns: 1fr; gap: 28px; }
}

/* =====================================================================
 * 通用弹窗与媒体上传组件（前台会员中心 / 企业主页 与 管理后台共用）
 * 放在 theme.css —— 前台与后台页面都会加载这一份，避免样式重复维护
 * =================================================================== */
.zs-modal {
  position: fixed; inset: 0; z-index: 9998; display: flex; align-items: flex-start; justify-content: center;
  background: rgba(35, 64, 94, .42); padding: 40px 20px; overflow-y: auto;
}
.zs-modal__box {
  background: var(--c-surface); border-radius: var(--r-lg); width: 100%; max-width: 760px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .24); display: flex; flex-direction: column;
}
.zs-modal__box--wide { max-width: 900px; }
.zs-modal__hd {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 20px 26px; border-bottom: 1px solid var(--c-divider);
}
.zs-modal__hd h3 { font-size: 18px; color: var(--c-text-strong); }
.zs-modal__x {
  font: inherit; font-size: 24px; line-height: 1; color: var(--c-muted);
  background: none; border: 0; cursor: pointer; padding: 0 4px;
}
.zs-modal__x:hover { color: var(--c-accent-deep); }
.zs-modal__bd { padding: 22px 26px; }
.zs-modal__ft {
  display: flex; align-items: center; gap: 12px; padding: 16px 26px 20px;
  border-top: 1px solid var(--c-divider); flex-wrap: wrap;
}
.zs-modal__tip { font-size: 12.5px; color: var(--c-muted); margin-right: auto; line-height: 1.7; }

/* 弹窗内的表单栅格（.field 沿用全局样式） */
.zs-form { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 18px; }
.zs-form .field.full { grid-column: 1 / -1; }
.zs-form textarea.input { height: auto; padding: 12px 14px; line-height: 1.8; resize: vertical; }
.zs-form .req { color: #B23A3A; font-style: normal; }

/* 详情查看器（弹窗内的图集 / 视频 / 正文 / 键值行） */
.zs-viewer__gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 16px; }
.zs-viewer__gallery figure {
  margin: 0; border: 1px solid var(--c-border); border-radius: var(--r-xs); overflow: hidden; background: var(--c-tint);
}
.zs-viewer__gallery img { width: 100%; display: block; }
.zs-viewer__video { margin-top: 16px; }
.zs-viewer__video video { width: 100%; border-radius: var(--r-xs); background: #000; display: block; }
.zs-viewer__body { margin-top: 16px; font-size: 14px; line-height: 2; color: var(--c-text); white-space: pre-line; }
.zs-viewer__kv { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 14px; }
.zs-viewer__kv span { font-size: 13px; color: var(--c-muted); }
.zs-viewer__one { border: 1px solid var(--c-border); border-radius: var(--r-xs); overflow: hidden; margin-top: 16px; }
.zs-viewer__one img { width: 100%; display: block; }
.zs-empty-tip { font-size: 13.5px; color: var(--c-muted); line-height: 1.9; }

/* 媒体上传区：缩略图 + 删除角标 + 添加磁贴 */
.zs-media { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; }
.zs-media__item {
  position: relative; width: 148px; aspect-ratio: 16 / 9; border-radius: var(--r-xs);
  overflow: hidden; border: 1px solid var(--c-border); background: var(--c-tint);
}
.zs-media__item img, .zs-media__item video { width: 100%; height: 100%; object-fit: cover; display: block; }
.zs-media__item--video { width: 240px; }
.zs-media__del {
  position: absolute; right: 5px; top: 5px; width: 22px; height: 22px; border-radius: 50%;
  border: 0; cursor: pointer; font-size: 15px; line-height: 1;
  background: rgba(0, 0, 0, .55); color: #fff;
}
.zs-media__del:hover { background: #B23A3A; }
.zs-media__add {
  font: inherit; font-size: 13px; color: var(--c-accent-deep); cursor: pointer;
  background: #FBF6EE; border: 1px dashed rgba(169, 99, 31, .45); border-radius: var(--r-xs);
  width: 148px; aspect-ratio: 16 / 9; transition: all .15s ease;
}
.zs-media__add:hover { background: #F7EDDD; border-color: var(--c-accent-deep); }
.zs-media__add--video { width: 240px; }
@media (max-width: 860px) {
  .zs-form { grid-template-columns: 1fr; }
  .zs-modal { padding: 16px 12px; }
  .zs-modal__bd, .zs-modal__hd, .zs-modal__ft { padding-left: 18px; padding-right: 18px; }
  .zs-viewer__gallery { grid-template-columns: 1fr; }
}

/* =====================================================================
 * 通用标签页与提示条（前台会员中心 / 供需大厅 与 管理后台共用）
 * =================================================================== */
.tabs { display: flex; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.tab {
  height: 40px; padding: 0 22px; border-radius: var(--r-pill); font-size: 14px; font-weight: 600;
  display: inline-flex; align-items: center; cursor: pointer;
  background: var(--c-surface); border: 1px solid var(--c-border); color: var(--c-text);
}
.tab:hover { border-color: var(--c-accent-2); }
.tab.is-active { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }

.notice {
  margin-top: 32px; padding: 16px 20px; border-radius: var(--r-card);
  background: var(--c-tint); border: 1px solid var(--c-border);
  font-size: 13px; color: var(--c-text);
}
.notice--warn { background: #FDF3EC; border-color: #F0D6C2; color: #7A4A2C; }
