:root {
  --brand: #e8763e;
  --brand-dark: #c95f2b;
  --brand-light: #fdf0e8;
  --ink: #2b2b2b;
  --ink-soft: #6b6b6b;
  --line: #ececec;
  --bg: #faf9f7;
  --card: #ffffff;
  --radius: 14px;
  --shadow: 0 2px 16px rgba(43, 43, 43, 0.06);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

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

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.5px;
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), #f2a35e);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
}

.logo em { font-style: normal; color: var(--brand); }

/* 后台可配置的品牌 Logo 图片 */
.logo-mark.has-img {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #fff;
  border: 1px solid var(--line, #efe6dc);
  font-size: 0;
  overflow: hidden;
}
.logo-mark.has-img::after { content: none; }

.main-nav { display: flex; gap: 6px; }

.main-nav a {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 15px;
  color: var(--ink-soft);
  transition: all 0.2s;
}

.main-nav a:hover { color: var(--brand); background: var(--brand-light); }

.main-nav a.active { color: var(--brand); background: var(--brand-light); font-weight: 600; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--ink);
  padding: 4px 8px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #fff8f2 0%, #fdf0e8 55%, #fde4d3 100%);
  padding: 84px 0 92px;
  text-align: center;
}

/* 后台设置了横幅背景图时生效 */
.hero.has-bg {
  background-image: var(--hero-img);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 104px 0 112px;
}

.hero.has-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(24, 16, 10, var(--hero-overlay, 0.45));
}

.hero > .container { position: relative; z-index: 1; }

.hero.has-bg h1,
.hero.has-bg h1 em { color: #fff; }

.hero.has-bg h1 { text-shadow: 0 2px 18px rgba(0, 0, 0, 0.25); }

.hero.has-bg p { color: rgba(255, 255, 255, 0.92); }

.hero.has-bg .btn-ghost { background: rgba(255, 255, 255, 0.94); }

.hero h1 { font-size: 42px; font-weight: 800; letter-spacing: 1px; }

.hero h1 em { font-style: normal; color: var(--brand); }

.hero p {
  margin: 18px auto 0;
  max-width: 560px;
  color: var(--ink-soft);
  font-size: 17px;
}

.hero-actions { margin-top: 34px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary { background: var(--brand); color: #fff; }

.btn-primary:hover { background: var(--brand-dark); transform: translateY(-1px); }

.btn-ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }

.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }

.btn-sm { padding: 7px 16px; font-size: 13px; border-radius: 8px; }

.btn-danger { background: #fdecec; color: #d64545; }

.btn-danger:hover { background: #f9d7d7; }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }

.section.alt { background: #fff; }

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

.section-head h2 { font-size: 30px; font-weight: 700; }

.section-head p { margin-top: 10px; color: var(--ink-soft); }

.section-more { text-align: center; margin-top: 36px; }

/* ---------- Category chips ---------- */
.cat-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 36px;
}

.cat-chip {
  padding: 9px 22px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--ink-soft);
}

.cat-chip:hover { border-color: var(--brand); color: var(--brand); }

.cat-chip.active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }

/* ---------- Product grid ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 22px;
}

.product-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.product-card:hover { transform: translateY(-4px); box-shadow: 0 10px 28px rgba(43, 43, 43, 0.1); }

.product-thumb {
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, #f6f1ec, #efe7de);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c9b8a8;
  font-size: 44px;
  overflow: hidden;
}

.product-thumb img { width: 100%; height: 100%; object-fit: cover; }

.product-info { padding: 16px 18px 20px; flex: 1; display: flex; flex-direction: column; }

.product-cat { font-size: 12px; color: var(--brand); font-weight: 600; margin-bottom: 6px; }

.product-name { font-size: 16px; font-weight: 600; }

.product-desc {
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.product-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }

.product-price { color: var(--brand); font-weight: 700; font-size: 18px; }

.badge-feature {
  font-size: 11px;
  background: var(--brand-light);
  color: var(--brand);
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 600;
}

/* ---------- Feature strip ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }

.feature-item { text-align: center; padding: 12px; }

.feature-item .icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 16px;
  background: var(--brand-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}

.feature-item h3 { font-size: 16px; margin-bottom: 6px; }

.feature-item p { font-size: 13px; color: var(--ink-soft); }

/* ---------- Brand intro ---------- */
.brand-intro { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }

.brand-intro h2 { font-size: 30px; margin-bottom: 18px; }

.brand-intro p { color: var(--ink-soft); margin-bottom: 14px; }

.brand-visual {
  border-radius: 20px;
  background: linear-gradient(135deg, var(--brand), #f2a35e);
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 84px;
  font-weight: 800;
  letter-spacing: 2px;
}

/* ---------- News ---------- */
.news-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 22px; }

.news-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.2s;
}

.news-card:hover { transform: translateY(-3px); }

.news-date { font-size: 12px; color: var(--brand); font-weight: 600; }

.news-card h3 { font-size: 17px; margin: 8px 0; }

.news-card p {
  font-size: 13px;
  color: var(--ink-soft);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Forms ---------- */
.form-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px;
  max-width: 560px;
  margin: 0 auto;
}

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* 网站标识（Logo + 站名）设置区 */
.brand-grid {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 640px) {
  .brand-grid { grid-template-columns: 1fr; gap: 14px; }
}

.form-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }

.form-field.full { grid-column: 1 / -1; }

.form-field label { font-size: 13px; font-weight: 600; }

.form-field input, .form-field textarea, .form-field select {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s;
}

.form-field input:focus, .form-field textarea:focus, .form-field select:focus { border-color: var(--brand); }

.form-field textarea { resize: vertical; min-height: 110px; }

.form-msg { margin-top: 12px; font-size: 13px; min-height: 20px; }

.form-msg.ok { color: #2e9e5b; }

.form-msg.err { color: #d64545; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  background: linear-gradient(135deg, #fff8f2, #fde4d3);
  padding: 52px 0;
  text-align: center;
}

.page-hero h1 { font-size: 32px; }

.page-hero p { color: var(--ink-soft); margin-top: 8px; }

/* ---------- Footer ---------- */
.site-footer { background: #232323; color: #b9b9b9; padding: 44px 0 30px; margin-top: 60px; }

.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }

.footer-inner .logo { color: #fff; }

.footer-nav { display: flex; gap: 18px; font-size: 13px; flex-wrap: wrap; }

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

.footer-copy { margin-top: 24px; font-size: 12px; color: #7d7d7d; text-align: center; }

.footer-copy a { color: #9a9a9a; text-decoration: underline; }

/* ---------- Empty / loading ---------- */
.empty-tip { text-align: center; color: var(--ink-soft); padding: 48px 0; font-size: 14px; }

/* ---------- Modal ---------- */
.modal-mask {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-mask.open { display: flex; }

.modal {
  background: #fff;
  border-radius: 16px;
  max-width: 640px;
  width: 100%;
  max-height: 84vh;
  overflow: auto;
  padding: 30px;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  border: none;
  background: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--ink-soft);
}

.modal h3 { font-size: 20px; margin-bottom: 6px; padding-right: 30px; }

.modal .news-date { display: block; margin-bottom: 14px; }

.modal-body { color: var(--ink-soft); white-space: pre-wrap; }

/* ---------- 首页团队风采预览条 ---------- */
.team-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.team-thumb {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #f1ece6;
}

.team-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s;
}

.team-thumb:hover img { transform: scale(1.06); }

.team-thumb-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 22px 14px 11px;
  font-size: 12px;
  color: #fff;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

/* ---------- 团队相册 ---------- */.photo-wall { columns: 3; column-gap: 18px; }

@media (max-width: 900px) { .photo-wall { columns: 2; } }

@media (max-width: 560px) { .photo-wall { columns: 1; } }

.photo-item {
  break-inside: avoid;
  margin: 0 0 18px;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow);
  cursor: zoom-in;
}

.photo-item img { width: 100%; display: block; transition: transform 0.35s; }

.photo-item:hover img { transform: scale(1.04); }

.photo-cap { padding: 11px 15px; font-size: 13px; color: var(--ink-soft); }

/* 大图查看 */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  z-index: 300;
  align-items: center;
  justify-content: center;
  padding: 40px 30px;
}

.lightbox.open { display: flex; }

.lightbox img { max-width: 92vw; max-height: 82vh; border-radius: 10px; box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5); }

.lightbox .lb-cap {
  position: absolute;
  bottom: 22px;
  left: 20px;
  right: 20px;
  text-align: center;
  color: #efefef;
  font-size: 14px;
}

.lb-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lb-btn:hover { background: rgba(255, 255, 255, 0.3); }

.lb-prev { left: 18px; }
.lb-next { right: 18px; }

.lb-close {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}

.lb-close:hover { background: rgba(255, 255, 255, 0.3); }

.team-preview { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }

.team-preview img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; }

/* ---------- Admin ---------- */
.admin-body { background: #f4f3f1; }

.login-wrap {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card { width: 100%; max-width: 400px; text-align: center; }

.login-card .logo { justify-content: center; margin-bottom: 8px; }

.login-card p.hint { color: var(--ink-soft); font-size: 13px; margin-bottom: 24px; }

.admin-tabs {
  display: flex;
  gap: 4px;
  background: #fff;
  border-radius: 12px;
  padding: 6px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
  overflow-x: auto;
}

.admin-tab {
  flex: 1;
  border: none;
  background: none;
  padding: 10px 14px;
  border-radius: 9px;
  font-size: 14px;
  cursor: pointer;
  color: var(--ink-soft);
  white-space: nowrap;
  font-family: inherit;
}

.admin-tab.active { background: var(--brand); color: #fff; font-weight: 600; }

.admin-panel { display: none; }

.admin-panel.active { display: block; }

.admin-layout { display: grid; grid-template-columns: 360px 1fr; gap: 24px; align-items: start; }

.panel-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; margin-bottom: 24px; }

.panel-card h3 { font-size: 16px; margin-bottom: 16px; }

.admin-item {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 12px;
  background: #fff;
}

.admin-item .thumb {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  background: #f1ece6;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c9b8a8;
  font-size: 22px;
  overflow: hidden;
}

.admin-item .thumb img { width: 100%; height: 100%; object-fit: cover; }

.admin-item .meta { flex: 1; min-width: 0; }

.admin-item .meta .t { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.admin-item .meta .s { font-size: 12px; color: var(--ink-soft); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.admin-item .ops { display: flex; gap: 8px; flex-shrink: 0; }

.msg-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin-bottom: 12px; }

.msg-card .m-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }

.msg-card .m-name { font-weight: 600; font-size: 14px; }

.msg-card .m-contact { color: var(--brand); font-size: 13px; margin-left: 10px; }

.msg-card .m-time { font-size: 12px; color: var(--ink-soft); }

.msg-card .m-body { margin-top: 8px; font-size: 14px; color: var(--ink-soft); white-space: pre-wrap; }

.img-preview {
  margin-bottom: 12px;
  border-radius: 10px;
  border: 1px dashed var(--line);
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #b5a988;
  overflow: hidden;
}

.img-preview img { max-height: 220px; width: auto; }

.upload-row { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }

.upload-row input[type="file"] { font-size: 13px; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .admin-layout { grid-template-columns: 1fr; }
  .brand-intro { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }

  .main-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 10px 16px 16px;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
  }

  .main-nav.open { display: flex; }

  .hero h1 { font-size: 30px; }
  .hero { padding: 60px 0 68px; }
  .section { padding: 52px 0; }
  .section-head h2 { font-size: 24px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-card { padding: 24px; }
  .brand-visual { min-height: 220px; font-size: 56px; }
}
