/* EVERSHINE 展示站 — 前台样式（米白 + 橙 简洁商务风） */
:root {
  --bg: #faf7f2;          /* 米白底 */
  --bg-alt: #f3ede2;      /* 交替区块底 */
  --card: #fffdf9;
  --text: #3a3530;
  --text-light: #8a8074;
  --accent: #f59a00;      /* 品牌橙 */
  --accent-dark: #d98600;
  --line: #e8ddcd;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.7;
}
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
a { color: inherit; text-decoration: none; }

/* ---------- 语言切换：两份内容都渲染，按 body 类显示 ---------- */
body.lang-zh .lang-en { display: none; }
body.lang-en .lang-zh { display: none; }

/* ---------- 顶栏 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250, 247, 242, 0.95);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand img { max-height: 44px; max-width: 160px; object-fit: contain; }
.brand-name {
  font-size: 13px; font-weight: 600; letter-spacing: 0.4px;
  color: var(--text-light);
  max-width: 320px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nav { display: flex; align-items: center; gap: 26px; }
.nav a { font-size: 15px; transition: color .2s; }
.nav a:hover { color: var(--accent); }
#lang-btn {
  border: 1px solid var(--accent); background: none; color: var(--accent);
  padding: 4px 14px; border-radius: 999px; font-size: 13px; cursor: pointer;
  transition: all .2s;
}
#lang-btn:hover { background: var(--accent); color: #fff; }

/* ---------- Hero ---------- */
.hero {
  padding: 36px 0 24px;
  background:
    radial-gradient(ellipse at 85% 15%, rgba(245, 154, 0, 0.10), transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
  text-align: center;
}
.hero h2 { font-size: 30px; font-weight: 700; letter-spacing: 1px; line-height: 1.3; }
.hero-sub { margin-top: 12px; font-size: 16px; color: var(--text-light); }
.hero-more {
  display: inline-block; margin-top: 24px; font-size: 20px;
  color: var(--accent); animation: bob 1.8s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(8px); } }

/* ---------- 区块通用 ---------- */
.section { padding: 32px 0; }
.section-alt { background: var(--bg-alt); }
.sec-title {
  font-size: 26px; margin-bottom: 32px; padding-left: 14px;
  border-left: 5px solid var(--accent); line-height: 1.3;
}

/* ---------- 简介 ---------- */
.intro-text { max-width: 820px; font-size: 16px; white-space: pre-wrap; }

/* ---------- 产品分类 ---------- */
.cat-block { margin-bottom: 48px; }
.cat-title {
  font-size: 19px; margin-bottom: 14px; color: var(--accent-dark);
}
.table-scroll { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 8px; }
.cat-table { width: 100%; border-collapse: collapse; min-width: 560px; }
.cat-table thead th {
  text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 1px;
  color: var(--text-light); padding: 12px 18px; border-bottom: 1px solid var(--line);
}
.cat-table td { padding: 13px 18px; border-bottom: 1px solid #f0e8da; }
.cat-table tbody tr:last-child td { border-bottom: none; }
.prod-row { cursor: pointer; transition: background .15s; }
.prod-row:hover { background: #fdf3e0; }
.acc-arrow { width: 30px; color: var(--accent); text-align: center; transition: transform .2s; }
.prod-row.open .acc-arrow { transform: rotate(180deg); }
.prod-detail { display: none; }
.prod-detail.open { display: table-row; }
.prod-detail > td {
  background: #fdf9f1; border-left: 3px solid var(--accent);
  color: #5c554b; font-size: 15px; white-space: pre-wrap;
}
.empty { color: var(--text-light); text-align: center; padding: 24px !important; }

/* ---------- 联系方式浮动 ---------- */
.contact-float {
  position: fixed; right: 0; top: 50%; transform: translateY(-50%);
  z-index: 90; display: flex; align-items: center;
}
.contact-tab {
  writing-mode: vertical-rl; letter-spacing: 4px;
  background: var(--accent); color: #fff; border: none;
  padding: 18px 10px; border-radius: 8px 0 0 8px; cursor: pointer; font-size: 14px;
}
.contact-tab:hover { background: var(--accent-dark); }
.contact-panel {
  display: none; width: 280px; max-height: 70vh; overflow: auto;
  background: var(--card); border: 1px solid var(--line); border-right: none;
  border-radius: 8px 0 0 8px; padding: 20px;
  box-shadow: -6px 0 18px rgba(58, 53, 48, 0.08);
  white-space: pre-wrap; font-size: 14px;
}
.contact-float.open .contact-panel { display: block; }
.contact-float.open .contact-tab { display: none; }

/* ---------- 页脚 ---------- */
.site-footer {
  background: #423a31; color: #d9d2c7; padding: 36px 0; font-size: 14px;
}
.site-footer .copy { margin-top: 6px; color: #9c9384; font-size: 12px; }

/* ---------- 移动端 ---------- */
@media (max-width: 640px) {
  .brand-name { display: none; }
  .nav { gap: 16px; }
  .hero h2 { font-size: 22px; }
  .hero { padding: 40px 0 32px; }
  .section { padding: 52px 0; }

  /* 表格退化为卡片式行 */
  .cat-table { min-width: 0; }
  .cat-table thead { display: none; }
  .cat-table tr { display: block; border-bottom: 1px solid var(--line); }
  .cat-table td { display: flex; justify-content: space-between; gap: 16px; }
  .cat-table td[data-label]::before {
    content: attr(data-label); color: var(--text-light); font-size: 13px; flex-shrink: 0;
  }
  .acc-arrow { width: auto; align-items: center; }
  .prod-detail.open { display: block; }
  .prod-detail > td { border-top: 1px dashed var(--line); }

  /* 联系浮动改为右下角按钮 */
  .contact-float { top: auto; bottom: 24px; right: 20px; transform: none; }
  .contact-tab { writing-mode: horizontal-tb; letter-spacing: 0; border-radius: 999px; padding: 12px 20px; box-shadow: 0 4px 14px rgba(217, 134, 0, 0.4); }
  .contact-float.open .contact-tab { display: none; }
  .contact-panel {
    position: fixed; right: 20px; bottom: 80px; width: min(300px, calc(100vw - 40px));
    border-radius: 12px; border-right: 1px solid var(--line);
    box-shadow: 0 8px 28px rgba(58, 53, 48, 0.18);
  }
}
