/* ============================================================
   RUIS HAIR — 独立站样式
   配色：暖金 + 米白 + 深咖，走高端接发批发路线
   ============================================================ */

:root {
  --gold: #b98a3e;
  --gold-2: #d4a857;
  --gold-soft: #f3e7d3;
  --ink: #2b2622;
  --ink-2: #4a423a;
  --muted: #8a8279;
  --cream: #faf7f2;
  --cream-2: #f3ede4;
  --white: #ffffff;
  --line: #e9e1d6;
  --dark: #211d1a;
  --shadow: 0 14px 40px rgba(43, 38, 34, .10);
  --radius: 14px;
  --maxw: 1200px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  overflow-x: hidden;
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button, input, select, textarea { font-family: inherit; }

/* ---------- 工具 ---------- */
.wrap { width: min(100% - 40px, var(--maxw)); margin-inline: auto; }
.section { padding: 88px 0; }
.section-sm { padding: 56px 0; }
.eyebrow {
  display: inline-block; font-size: 12px; letter-spacing: .22em;
  text-transform: uppercase; color: var(--gold); font-weight: 700;
  margin-bottom: 14px;
}
.h2 { font-size: clamp(28px, 4vw, 42px); line-height: 1.25; font-weight: 700; letter-spacing: -.01em; }
.h3 { font-size: 21px; font-weight: 700; }
.muted { color: var(--muted); }
.center { text-align: center; }
.reveal { opacity: 0; transform: translateY(22px); transition: .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 14px 28px; border-radius: 6px; font-size: 14px; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; transition: .25s;
  white-space: nowrap;
}
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: var(--gold-2); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(185,138,62,.32); }
.btn-dark { background: var(--dark); color: #fff; }
.btn-dark:hover { background: #000; transform: translateY(-2px); }
.btn-outline { background: transparent; border-color: var(--gold); color: var(--gold); }
.btn-outline:hover { background: var(--gold); color: #fff; }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--gold-soft); }
.btn-block { width: 100%; }

/* ---------- 顶部公告 ---------- */
.topbar {
  background: var(--dark); color: #efe7db; font-size: 12.5px; letter-spacing: .02em;
}
.topbar .wrap { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 38px; text-align: center; }
.topbar b { color: var(--gold-2); font-weight: 600; }
@media (max-width: 620px) { .topbar span.tb-long { display: none; } }

/* ---------- 导航 ---------- */
.header {
  position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.96);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 28px; min-height: 74px; }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand img { width: 44px; height: 44px; object-fit: contain; }
.brand .btxt { font-size: 20px; font-weight: 800; letter-spacing: .12em; line-height: 1; }
.brand .btxt small { display: block; font-size: 8px; letter-spacing: .34em; color: var(--gold); font-weight: 600; margin-top: 5px; }
.menu { display: flex; align-items: center; gap: 26px; margin-left: auto; }
.menu > li { position: relative; }
.menu a { font-size: 14px; font-weight: 500; color: var(--ink-2); transition: color .2s; padding: 26px 0; display: inline-flex; align-items: center; gap: 5px; }
.menu a:hover, .menu a.active { color: var(--gold); }
.menu .drop > a::after { content: ''; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.dropdown {
  position: absolute; top: 100%; left: -16px; min-width: 210px; background: #fff;
  border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow);
  padding: 10px; opacity: 0; visibility: hidden; transform: translateY(8px); transition: .22s;
}
.drop:hover .dropdown { opacity: 1; visibility: visible; transform: none; }
.dropdown a { display: block; padding: 9px 12px; border-radius: 6px; font-size: 13.5px; color: var(--ink-2); }
.dropdown a:hover { background: var(--cream); color: var(--gold); }
.nav-actions { display: flex; align-items: center; gap: 8px; margin-left: 12px; }
.icon-btn {
  width: 38px; height: 38px; border: 0; background: transparent; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; color: var(--ink-2); position: relative; transition: .2s;
}
.icon-btn:hover { background: var(--cream-2); color: var(--gold); }
.icon-btn svg { width: 20px; height: 20px; }
.cart-count {
  position: absolute; top: 1px; right: 0; background: var(--gold); color: #fff;
  font-size: 10px; font-weight: 700; min-width: 17px; height: 17px; border-radius: 9px;
  display: grid; place-items: center; padding: 0 4px;
}
.menu-toggle { display: none; }
@media (max-width: 1000px) {
  .menu { display: none; }
  .menu-toggle { display: grid; }
  .nav-actions { margin-left: auto; }
}
@media (max-width: 480px) {
  .nav { gap: 8px; min-height: 66px; }
  .brand img { width: 38px; height: 38px; }
  .brand .btxt { font-size: 16px; }
  .brand .btxt small { letter-spacing: .22em; font-size: 7px; }
  .nav-actions { gap: 2px; }
  .icon-btn { width: 34px; height: 34px; }
  #searchBtn { display: none; }
}

/* 移动端菜单 */
.mobile-panel {
  position: fixed; inset: 0 0 0 auto; width: min(340px, 86vw); background: #fff; z-index: 200;
  transform: translateX(105%); transition: .3s cubic-bezier(.2,.7,.2,1); box-shadow: -20px 0 60px rgba(0,0,0,.15);
  overflow-y: auto; padding: 24px;
}
.mobile-panel.open { transform: none; }
.overlay { position: fixed; inset: 0; background: rgba(20,16,12,.5); z-index: 150; opacity: 0; visibility: hidden; transition: .3s; }
.overlay.show { opacity: 1; visibility: visible; }
.mobile-panel .mp-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.mobile-panel a { display: block; padding: 13px 4px; font-size: 15px; border-bottom: 1px solid var(--line); }
.mobile-panel a.sub { padding-left: 20px; font-size: 14px; color: var(--muted); }
.mobile-panel .btn { margin-top: 20px; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--cream); }
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 40px; min-height: 560px; padding: 60px 0; }
.hero-copy { position: relative; z-index: 2; }
.hero-copy h1 { font-size: clamp(34px, 5.6vw, 66px); line-height: 1.1; font-weight: 800; letter-spacing: -.02em; margin: 6px 0 20px; overflow-wrap: break-word; }
.hero-copy h1 em { font-style: normal; color: var(--gold); }
.hero-copy p.lead { font-size: 17px; color: var(--ink-2); max-width: 480px; margin-bottom: 30px; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 34px; }
.hero-tags span { background: #fff; border: 1px solid var(--line); border-radius: 30px; padding: 7px 15px; font-size: 12.5px; color: var(--ink-2); }
.hero-tags span b { color: var(--gold); }
.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-visual { position: relative; }
.hero-visual .frame { border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); background: #fff; }
.hero-visual img { width: 100%; height: 620px; object-fit: cover; object-position: center; }
.hero-visual .blob { position: absolute; width: 340px; height: 340px; border-radius: 50%; background: var(--gold-soft); top: -30px; right: -30px; z-index: -1; }
.hero-visual .badge {
  position: absolute; left: -26px; bottom: 34px; background: #fff; border-radius: 12px;
  box-shadow: var(--shadow); padding: 14px 20px; display: flex; align-items: center; gap: 12px;
}
.hero-visual .badge .n { font-size: 26px; font-weight: 800; color: var(--gold); line-height: 1; }
.hero-visual .badge small { font-size: 11.5px; color: var(--muted); display: block; }
@media (max-width: 960px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: center; padding: 48px 0 30px; }
  .hero-tags, .hero-btns { justify-content: center; }
  .hero-visual .frame { max-width: 480px; margin: 0 auto; }
  .hero-visual img { height: 380px; }
  .hero-visual .badge { left: 50%; transform: translateX(-50%); }
}

/* ---------- 右侧悬浮社媒按钮组（INS / FB / TK，与 WhatsApp 统一风格） ---------- */
.social-float {
  position: fixed; right: 22px; bottom: calc(50% + 102px);
  display: flex; flex-direction: column; gap: 12px; z-index: 89;
}
.social-float a {
  width: 52px; height: 52px; border-radius: 50%;
  background: #fff; border: 1px solid var(--line);
  display: grid; place-items: center; color: var(--ink);
  box-shadow: 0 4px 14px rgba(0,0,0,.08);
  transition: .2s;
}
.social-float a:hover { background: var(--gold); border-color: var(--gold); color: #fff; transform: scale(1.08); }
.social-float svg { width: 22px; height: 22px; }

/* ---------- 特性条 ---------- */
.perks { background: #fff; border-bottom: 1px solid var(--line); }
.perks .wrap { display: grid; grid-template-columns: repeat(4, 1fr); }
.perk { display: flex; align-items: center; gap: 14px; padding: 26px 20px; border-right: 1px solid var(--line); }
.perk:last-child { border-right: 0; }
.perk .ic { width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; background: var(--gold-soft); color: var(--gold); display: grid; place-items: center; }
.perk .ic svg { width: 22px; height: 22px; }
.perk h4 { font-size: 14px; font-weight: 700; }
.perk p { font-size: 12px; color: var(--muted); line-height: 1.4; }
@media (max-width: 860px) { .perks .wrap { grid-template-columns: repeat(2, 1fr); } .perk:nth-child(2) { border-right: 0; } .perk:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }
@media (max-width: 420px) { .perks .wrap { grid-template-columns: 1fr; } .perk { border-right: 0 !important; border-bottom: 1px solid var(--line); } }

/* ---------- 分类 ---------- */
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 40px; }
.sec-head p { color: var(--muted); max-width: 520px; margin-top: 8px; }
.link-all { color: var(--gold); font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.link-all:hover { gap: 10px; }
.cat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.cat-card { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 1/1; background: var(--cream-2); }
.cat-card img { width: 100%; height: 100%; object-fit: cover; transition: .5s; }
.cat-card:hover img { transform: scale(1.08); }
.cat-card .cap {
  position: absolute; inset: auto 0 0 0; padding: 26px 14px 16px; color: #fff; text-align: center;
  background: linear-gradient(transparent, rgba(20,16,12,.82)); font-weight: 700; font-size: 15px;
}
.cat-card .cap small { display: block; font-size: 11px; font-weight: 400; opacity: .85; margin-top: 2px; }
@media (max-width: 1040px) { .cat-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 760px) { .cat-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; } .cat-card .cap { font-size: 12px; padding: 20px 8px 10px; } }
@media (max-width: 460px) { .cat-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- 产品卡片 / 网格 ---------- */
.products-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.pcard { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: .3s; position: relative; }
.pcard:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.pcard .imgbox { position: relative; aspect-ratio: 1/1; overflow: hidden; background: var(--cream); }
.pcard .imgbox img { width: 100%; height: 100%; object-fit: cover; transition: .5s; }
.pcard:hover .imgbox img { transform: scale(1.06); }
.pcard .badge-sale { position: absolute; top: 12px; left: 12px; background: var(--gold); color: #fff; font-size: 10.5px; font-weight: 700; padding: 4px 10px; border-radius: 4px; letter-spacing: .05em; }
.pcard .quick {
  position: absolute; left: 0; right: 0; bottom: 0; opacity: 0; transform: translateY(12px);
  transition: .3s; padding: 0 14px 14px; pointer-events: none;
}
.pcard:hover .quick { opacity: 1; transform: none; pointer-events: auto; }
.quick button { width: 100%; }
.pcard .info { padding: 16px 16px 18px; }
.pcard .cat-name { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.pcard .pname { font-size: 14.5px; font-weight: 600; line-height: 1.45; margin: 6px 0 10px; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard .price { color: var(--ink); font-weight: 700; font-size: 16px; }
.pcard .price small { color: var(--muted); font-size: 11px; font-weight: 400; }
.pcard .price .p-wa { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; margin-left: 6px; vertical-align: middle; color: #128C7E; background: #e7f5f2; border-radius: 50%; cursor: pointer; }
.pcard .price .p-wa:hover { background: #128C7E; color: #fff; }
.pcard .price .p-wa svg { width: 13px; height: 13px; }
@media (max-width: 1040px) { .products-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } .pcard .pname { font-size: 13px; min-height: 38px; } }
@media (max-width: 380px) { .products-grid { grid-template-columns: 1fr; } }

/* ---------- 关于预览 ---------- */
.about-split { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.about-img { position: relative; border-radius: var(--radius); overflow: hidden; }
.about-img img { width: 100%; height: 460px; object-fit: cover; }
.about-img .exp { position: absolute; right: -18px; bottom: -18px; background: var(--gold); color: #fff; padding: 22px 26px; border-radius: 12px; text-align: center; box-shadow: var(--shadow); }
.about-img .exp b { font-size: 34px; display: block; line-height: 1; }
.about-img .exp small { font-size: 11px; letter-spacing: .1em; }
.about-copy p { color: var(--ink-2); margin: 14px 0; }
.check-list { margin: 22px 0 28px; display: grid; gap: 12px; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; }
.check-list svg { width: 20px; height: 20px; color: var(--gold); flex-shrink: 0; margin-top: 3px; }
@media (max-width: 900px) { .about-split { grid-template-columns: 1fr; gap: 36px; } .about-img .exp { right: 12px; bottom: 12px; } }

/* ---------- 数据亮点 ---------- */
.stats { background: var(--cream); }
.stats .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.stat b { font-size: clamp(32px, 5vw, 48px); color: var(--gold); line-height: 1; display: block; font-weight: 800; }
.stat b i { font-style: normal; font-size: .6em; }
.stat span { font-size: 13px; color: var(--ink-2); display: block; margin-top: 8px; }
@media (max-width: 640px) { .stats .wrap { grid-template-columns: repeat(2, 1fr); } }

/* ---------- 为什么选我们 ---------- */
.why { background: var(--dark); color: #efe8de; }
.why .h2 { color: #fff; }
.why .eyebrow { color: var(--gold-2); }
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; margin-top: 46px; }
.why-item { border: 1px solid rgba(255,255,255,.1); border-radius: var(--radius); padding: 30px 24px; transition: .3s; }
.why-item:hover { background: rgba(255,255,255,.04); border-color: rgba(212,168,87,.4); transform: translateY(-4px); }
.why-item .num { font-size: 30px; font-weight: 800; color: var(--gold); opacity: .5; }
.why-item h3 { color: #fff; margin: 14px 0 8px; font-size: 17px; }
.why-item p { font-size: 13.5px; color: #b9b0a5; }
@media (max-width: 960px) { .why-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .why-grid { grid-template-columns: 1fr; } }

/* ---------- 展会风采图集（关于我们页） ---------- */
.ex-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }
.ex-item { border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.ex-item img { width: 100%; height: 240px; object-fit: cover; display: block; transition: .5s; }
.ex-item:hover img { transform: scale(1.05); }
@media (max-width: 820px) { .ex-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .ex-grid { grid-template-columns: 1fr; } .ex-item img { height: 200px; } }

/* ---------- CTA ---------- */
.cta-band { background: var(--gold); color: #fff; }
.cta-band .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.cta-band h2 { font-size: clamp(24px, 3.4vw, 34px); }
.cta-band p { opacity: .92; font-size: 14.5px; }
@media (max-width: 700px) { .cta-band .wrap { flex-direction: column; text-align: center; } }

/* ---------- 页脚 ---------- */
.footer { background: #191614; color: #c9c1b8; font-size: 13.5px; }
.footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding-top: 64px; padding-bottom: 40px; }
.footer .brand img { width: 54px; height: 54px; }
.footer .brand .btxt { color: #fff; }
.footer .fdesc { margin-top: 18px; line-height: 1.8; color: #9d958c; }
.fcol h4 { color: #fff; font-size: 14px; margin-bottom: 18px; letter-spacing: .04em; }
.fcol li { margin-bottom: 10px; }
.fcol a:hover { color: var(--gold-2); }
.fcol .fa { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 13px; color: #9d958c; line-height: 1.6; }
.fcol .fa svg { width: 17px; height: 17px; color: var(--gold); flex-shrink: 0; margin-top: 3px; }
.socials { display: flex; gap: 9px; margin-top: 18px; }
.socials a { width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255,255,255,.16); display: grid; place-items: center; transition: .2s; }
.socials a:hover { background: var(--gold); border-color: var(--gold); color: #fff; }
.socials svg { width: 16px; height: 16px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 20px 0; text-align: center; color: #837b73; font-size: 12.5px; }
.footer-bottom .wrap { display: flex; justify-content: center; gap: 22px; flex-wrap: wrap; }
.footer-bottom a:hover { color: var(--gold-2); }
@media (max-width: 900px) { .footer .wrap { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .footer .wrap { grid-template-columns: 1fr; gap: 30px; } }

/* ---------- 浮动 WhatsApp（右侧中部，按钮放大） ---------- */
.wa-float {
  position: fixed; right: 22px; top: 50%; transform: translateY(-50%); z-index: 90;
  width: 52px; height: 52px;
  border-radius: 50%; background: #25d366; display: grid; place-items: center; box-shadow: 0 8px 24px rgba(37,211,102,.4);
  transition: .2s;
}
.wa-float:hover { transform: translateY(-50%) scale(1.08); }
.wa-float svg { width: 28px; height: 28px; fill: #fff; }

/* 业务员直连按钮：居中显示，带脉冲动画引导点击 */
.wa-float-direct {
  top: 50%; background: #25d366; animation: waPulse 2.2s infinite;
}
.wa-float-direct::after {
  content: 'WhatsApp'; position: absolute; right: 62px; top: 50%; transform: translateY(-50%);
  background: #fff; color: #1e7a3c; font-size: 12px; font-weight: 700; padding: 6px 12px;
  border-radius: 20px; box-shadow: 0 4px 14px rgba(0,0,0,.15); white-space: nowrap; opacity: 0; pointer-events: none; transition: .25s;
}
.wa-float-direct:hover::after { opacity: 1; }
@keyframes waPulse {
  0% { box-shadow: 0 8px 24px rgba(37,211,102,.4), 0 0 0 0 rgba(37,211,102,.5); }
  70% { box-shadow: 0 8px 24px rgba(37,211,102,.4), 0 0 0 16px rgba(37,211,102,0); }
  100% { box-shadow: 0 8px 24px rgba(37,211,102,.4), 0 0 0 0 rgba(37,211,102,0); }
}

/* ---------- 页面标题条 ---------- */
.page-hero { background: var(--cream); padding: 56px 0 50px; border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(30px, 4.6vw, 44px); }
.crumb { font-size: 12.5px; color: var(--muted); margin-bottom: 12px; }
.crumb a:hover { color: var(--gold); }
.crumb span { margin: 0 8px; opacity: .5; }

/* ---------- 产品列表页 ---------- */
.shop-layout { display: grid; grid-template-columns: 236px 1fr; gap: 34px; align-items: start; }
.shop-layout > main { min-width: 0; }
.products-grid { min-width: 0; }
.filter-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; position: sticky; top: 96px; }
.filter-box h4 { font-size: 15px; margin-bottom: 14px; }
.filter-box .cat-list li { margin-bottom: 3px; }
.filter-box .cat-list a { display: flex; justify-content: space-between; padding: 8px 10px; border-radius: 6px; font-size: 13.5px; color: var(--ink-2); }
.filter-box .cat-list a:hover, .filter-box .cat-list a.active { background: var(--gold-soft); color: var(--gold); font-weight: 600; }
.filter-box .cat-list a span { color: var(--muted); font-size: 12px; }
.shop-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.shop-toolbar .result { color: var(--muted); font-size: 13.5px; }
.shop-toolbar select { border: 1px solid var(--line); border-radius: 6px; padding: 9px 12px; font-size: 13px; background: #fff; color: var(--ink); max-width: 100%; }
.toolbar-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; min-width: 0; }
.search-form { display: flex; gap: 6px; min-width: 0; }
.search-form input { border: 1px solid var(--line); border-radius: 6px; padding: 9px 12px; font-size: 13px; width: 190px; max-width: 100%; }
.search-form .btn { padding: 9px 16px; white-space: nowrap; }
@media (max-width: 880px) { .shop-layout { grid-template-columns: 1fr; } .filter-box { position: static; } .filter-box .cat-list { display: flex; flex-wrap: wrap; gap: 6px; } }
@media (max-width: 600px) {
  .shop-toolbar { gap: 10px; }
  .toolbar-actions { width: 100%; justify-content: space-between; }
  .search-form { flex: 1; min-width: 0; }
  .search-form input { flex: 1; width: auto; min-width: 0; }
  .shop-toolbar select { flex: 0 0 auto; }
}

/* ---------- 产品详情页 ---------- */
.pd-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: start; }
.pd-gallery { display: grid; grid-template-columns: 78px 1fr; gap: 14px; }
.pd-thumbs { display: flex; flex-direction: column; gap: 10px; }
.pd-thumbs img { width: 78px; height: 78px; object-fit: cover; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; transition: .2s; }
.pd-thumbs img.active, .pd-thumbs img:hover { border-color: var(--gold); }
.pd-mainimg { border-radius: var(--radius); overflow: hidden; background: var(--cream); aspect-ratio: 1/1; }
.pd-mainimg img { width: 100%; height: 100%; object-fit: cover; }
.pd-info h1 { font-size: clamp(24px, 3vw, 32px); line-height: 1.3; margin-bottom: 12px; }
.pd-price { font-size: 30px; font-weight: 800; color: var(--gold); margin: 16px 0; }
.pd-price small { font-size: 13px; color: var(--muted); font-weight: 400; }
.pd-deal { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 700; color: #128C7E; background: #e7f5f2; border: 1px solid #bfe5dd; border-radius: 10px; padding: 14px 22px; margin-bottom: 16px; text-decoration: none; transition: .2s; }
.pd-deal:hover { background: #128C7E; color: #fff; border-color: #128C7E; }
.pd-desc { color: var(--ink-2); margin-bottom: 22px; }
.pd-opt { margin-bottom: 22px; }
.pd-opt .lbl { font-size: 13px; font-weight: 700; margin-bottom: 10px; }
.swatches { display: flex; flex-wrap: wrap; gap: 9px; }
.swatch { width: 34px; height: 34px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; transition: .2s; }
.swatch.active { box-shadow: 0 0 0 2px var(--gold); transform: scale(1.05); }
.opt-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pill { padding: 12px 22px; border: 1px solid var(--line); border-radius: 8px; font-size: 15px; cursor: pointer; transition: .2s; background: #fff; }
.pill.active { border-color: var(--gold); color: var(--gold); background: var(--gold-soft); font-weight: 700; }
.qty-row { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.qty { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.qty button { width: 38px; height: 42px; border: 0; background: var(--cream); cursor: pointer; font-size: 18px; color: var(--ink); }
.qty button:hover { background: var(--gold-soft); }
.qty input { width: 54px; height: 42px; border: 0; text-align: center; font-weight: 600; }
.pd-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.pd-actions .btn { padding: 16px 34px; font-size: 16px; border-radius: 8px; }
.pd-meta { margin-top: 26px; border-top: 1px solid var(--line); padding-top: 20px; font-size: 13px; color: var(--muted); }
.pd-meta div { margin-bottom: 8px; }
.pd-pay { margin-top: 20px; background: var(--cream); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; }
.pd-pay-title { font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 10px; }
.pd-pay-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.pd-pay-tag { font-size: 12px; font-weight: 600; color: var(--ink-2); background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 5px 12px; text-decoration: none; cursor: pointer; transition: .2s; }
.pd-pay-tag:hover { color: #128C7E; border-color: #128C7E; background: #e7f5f2; }
.pd-pay-note { font-size: 12.5px; color: var(--muted); line-height: 1.6; margin: 0; }
.pd-pay-link { color: var(--gold); font-weight: 600; }
.pd-tabs { margin-top: 60px; }
.tab-heads { display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.tab-heads button { border: 0; background: transparent; padding: 13px 22px; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; }
.tab-heads button.active { color: var(--gold); border-color: var(--gold); }
.tab-pane { display: none; padding: 26px 0; color: var(--ink-2); }
.tab-pane.active { display: block; }
.tab-pane table { width: 100%; border-collapse: collapse; max-width: 620px; }
.tab-pane td { padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.tab-pane td:first-child { color: var(--muted); width: 40%; }
@media (max-width: 900px) { .pd-layout { grid-template-columns: 1fr; gap: 30px; } }

/* ---------- 关于页 ---------- */
.timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 40px; }
.tl-item { padding: 0 20px; border-left: 2px solid var(--gold-soft); position: relative; }
.tl-item::before { content: ''; position: absolute; left: -7px; top: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--gold); }
.tl-item b { display: block; font-size: 22px; color: var(--gold); }
.tl-item h4 { margin: 6px 0; }
.tl-item p { font-size: 13px; color: var(--muted); }
@media (max-width: 760px) { .timeline { grid-template-columns: repeat(2, 1fr); gap: 24px 0; } }
@media (max-width: 460px) { .timeline { grid-template-columns: 1fr; } }

/* ---------- 联系页 ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; }
.form-card { background: var(--cream); border-radius: var(--radius); padding: 34px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 7px; }
.field input, .field textarea, .field select {
  width: 100%; border: 1px solid var(--line); border-radius: 7px; padding: 12px 14px;
  font-size: 14px; background: #fff; color: var(--ink); outline: none; transition: .2s;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.field textarea { min-height: 120px; resize: vertical; }
.contact-list li { display: flex; gap: 16px; margin-bottom: 24px; }
.contact-list .ic { width: 46px; height: 46px; border-radius: 50%; background: var(--gold-soft); color: var(--gold); display: grid; place-items: center; flex-shrink: 0; }
.contact-list .ic svg { width: 21px; height: 21px; }
.contact-list h4 { font-size: 14px; margin-bottom: 3px; }
.contact-list p { color: var(--muted); font-size: 14px; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .form-row { grid-template-columns: 1fr; } }

/* ---------- 收款方式 ---------- */
.pay-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.pay-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 22px; transition: .25s; text-decoration: none; color: inherit; }
.pay-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--gold); }
.pay-name { font-size: 16px; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pay-tag { font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #fff; background: var(--gold); border-radius: 20px; padding: 3px 9px; }
.pay-note { font-size: 13px; color: var(--muted); margin-top: 10px; line-height: 1.6; }
.pay-cta { display: inline-block; margin-top: 16px; font-size: 13px; font-weight: 600; color: #128C7E; }
.pay-card:hover .pay-cta { text-decoration: underline; }
@media (max-width: 900px) { .pay-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .pay-grid { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq-list { max-width: 860px; margin: 0 auto; }
.faq-item { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 12px; overflow: hidden; }
.faq-q { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 22px; background: #fff; border: 0; cursor: pointer; text-align: left; font-size: 15px; font-weight: 600; color: var(--ink); }
.faq-q .plus { font-size: 22px; color: var(--gold); transition: .25s; flex-shrink: 0; }
.faq-item.open .faq-q .plus { transform: rotate(45deg); }
.faq-a { display: none; padding: 0 22px 20px; color: var(--ink-2); font-size: 14px; }
.faq-item.open .faq-a { display: block; }

/* ---------- 购物车抽屉 ---------- */
.cart-drawer { position: fixed; inset: 0 0 0 auto; width: min(420px, 92vw); background: #fff; z-index: 210; transform: translateX(105%); transition: .32s cubic-bezier(.2,.7,.2,1); box-shadow: -20px 0 60px rgba(0,0,0,.16); display: flex; flex-direction: column; }
.cart-drawer.open { transform: none; }
.cart-head { display: flex; justify-content: space-between; align-items: center; padding: 22px; border-bottom: 1px solid var(--line); }
.cart-head h3 { font-size: 18px; }
.cart-body { flex: 1; overflow-y: auto; padding: 18px 22px; }
.cart-empty { text-align: center; color: var(--muted); padding: 70px 20px; }
.cart-empty svg { width: 56px; height: 56px; margin: 0 auto 16px; color: var(--line); }
.cart-item { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-item img { width: 74px; height: 74px; object-fit: cover; border-radius: 8px; }
.cart-item .ci-info { flex: 1; min-width: 0; }
.cart-item .ci-name { font-size: 13px; font-weight: 600; line-height: 1.4; }
.cart-item .ci-meta { font-size: 11.5px; color: var(--muted); margin: 3px 0; }
.cart-item .ci-price { color: var(--gold); font-weight: 700; font-size: 14px; }
.cart-item .ci-rm { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 12px; }
.cart-item .ci-rm:hover { color: #c0392b; }
.cart-foot { padding: 20px 22px; border-top: 1px solid var(--line); }
.cart-total { display: flex; justify-content: space-between; font-size: 17px; font-weight: 700; margin-bottom: 16px; }
.cart-total b { color: var(--gold); }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: 30px; transform: translate(-50%, 20px); background: var(--dark); color: #fff; padding: 13px 22px; border-radius: 8px; font-size: 14px; z-index: 300; opacity: 0; visibility: hidden; transition: .3s; box-shadow: var(--shadow); }
.toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* ============================================================
   后台管理样式
   ============================================================ */
.admin-body { background: #f4f2ee; }
.admin-login {
  min-height: 100vh; display: grid; place-items: center; padding: 20px;
  background: linear-gradient(135deg, #211d1a 0%, #3a3229 100%);
}
.login-card { width: min(100%, 400px); background: #fff; border-radius: 16px; padding: 40px; box-shadow: 0 24px 70px rgba(0,0,0,.35); }
.login-card .brand { justify-content: center; margin-bottom: 8px; }
.login-card h2 { text-align: center; font-size: 22px; margin-bottom: 6px; }
.login-card .sub { text-align: center; color: var(--muted); font-size: 13px; margin-bottom: 26px; }
.login-hint { margin-top: 18px; padding: 12px 14px; background: var(--gold-soft); border-radius: 8px; font-size: 12px; color: var(--ink-2); text-align: center; }

.admin-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-side { background: var(--dark); color: #cfc7bd; padding: 24px 0; position: sticky; top: 0; height: 100vh; }
.admin-side .brand { padding: 0 24px 26px; border-bottom: 1px solid rgba(255,255,255,.08); }
.admin-side .brand .btxt { color: #fff; }
.admin-nav { padding: 18px 14px; }
.admin-nav a { display: flex; align-items: center; gap: 11px; padding: 12px 14px; border-radius: 8px; color: #bdb4aa; font-size: 14px; cursor: pointer; margin-bottom: 4px; }
.admin-nav a:hover, .admin-nav a.active { background: rgba(212,168,87,.14); color: var(--gold-2); }
.admin-nav a svg { width: 19px; height: 19px; flex-shrink: 0; }
.admin-side .logout { margin: 0 14px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.08); }
.admin-main { padding: 30px 36px; min-width: 0; }
.admin-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; }
.admin-top h1 { font-size: 24px; }
.admin-top .who { font-size: 13px; color: var(--muted); }
.view { display: none; }
.view.active { display: block; }
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 28px; }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 22px; }
.stat-card .lbl { font-size: 12.5px; color: var(--muted); }
.stat-card .val { font-size: 32px; font-weight: 800; color: var(--gold); line-height: 1.2; margin-top: 6px; }

.panel { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.panel-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.panel-head h3 { font-size: 16px; }
.tbl-wrap { overflow-x: auto; }
table.admin-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-tbl th, .admin-tbl td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-tbl th { background: var(--cream); color: var(--ink-2); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.admin-tbl tr:last-child td { border-bottom: 0; }
.admin-tbl img { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; }
.tag { display: inline-block; font-size: 11px; padding: 3px 9px; border-radius: 20px; background: var(--gold-soft); color: var(--gold); font-weight: 600; }
.tag.gray { background: #eee; color: #777; }
.row-act { display: flex; gap: 6px; }
.row-act button { border: 0; background: transparent; cursor: pointer; font-size: 12px; padding: 5px 9px; border-radius: 5px; }
.btn-edit { color: #185FA5; background: #E6F1FB; }
.btn-del { color: #A32D2D; background: #FCEBEB; }
.btn-edit:hover { background: #B5D4F4; }
.btn-del:hover { background: #F7C1C1; }

.modal-mask { position: fixed; inset: 0; background: rgba(20,16,12,.55); z-index: 400; display: none; align-items: flex-start; justify-content: center; padding: 40px 20px; overflow-y: auto; }
.modal-mask.show { display: flex; }
.modal { width: min(100%, 640px); background: #fff; border-radius: 14px; box-shadow: var(--shadow); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 17px; }
.modal-body { padding: 24px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 18px 24px; border-top: 1px solid var(--line); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.img-pick { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.img-pick label { cursor: pointer; position: relative; }
.img-pick input { position: absolute; opacity: 0; }
.img-pick img { width: 54px; height: 54px; object-fit: cover; border-radius: 7px; border: 2px solid transparent; }
.img-pick input:checked + img { border-color: var(--gold); }
.spec-rows .sr { display: grid; grid-template-columns: 1fr 1fr 34px; gap: 8px; margin-bottom: 8px; }
.spec-rows input { border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; font-size: 13px; }
.spec-rows button { border: 0; background: #FCEBEB; color: #A32D2D; border-radius: 6px; cursor: pointer; }
@media (max-width: 1100px) { .stat-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 820px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { height: auto; position: static; padding: 14px 0; }
  .admin-side .brand { padding-bottom: 14px; }
  .admin-nav { display: flex; flex-wrap: wrap; padding: 12px; }
  .admin-nav a { margin-bottom: 0; }
  .admin-side .logout { margin-top: 10px; }
  .admin-main { padding: 20px; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
}

/* ============================================================
   网页内嵌在线聊天窗口（无需安装 WhatsApp 也能留言）
   ============================================================ */
/* 聊天按钮是 <button> 元素，需重置其默认外观（不覆盖 position，position 由上方 .wa-float 定义） */
button.wa-float { border: 0; cursor: pointer; padding: 0; }
.wa-float-direct { text-decoration: none; }
.chat-dot {
  position: absolute; top: 2px; right: 2px; width: 12px; height: 12px;
  background: #e53935; border: 2px solid #fff; border-radius: 50%;
  animation: chatPulse 1.8s infinite;
}
@keyframes chatPulse { 0%,100%{ transform: scale(1); } 50%{ transform: scale(1.25); } }

.chat-panel {
  position: fixed; right: 22px; bottom: 90px; z-index: 95;
  width: 360px; max-width: calc(100vw - 28px); height: min(560px, calc(100vh - 118px));
  background: #fff; border-radius: 16px; overflow: hidden;
  box-shadow: 0 18px 60px rgba(20,16,12,.28);
  display: flex; flex-direction: column;
  transform: translateY(14px) scale(.96); transform-origin: bottom right;
  opacity: 0; pointer-events: none; transition: .25s cubic-bezier(.2,.8,.2,1);
}
.chat-panel.open { transform: none; opacity: 1; pointer-events: auto; }
.chat-head {
  background: linear-gradient(135deg, #075e54 0%, #128c7e 100%);
  color: #fff; padding: 14px 16px; display: flex; align-items: center; gap: 11px; flex-shrink: 0;
}
.chat-avatar {
  width: 40px; height: 40px; border-radius: 50%; background: #fff;
  display: grid; place-items: center; flex-shrink: 0;
}
.chat-avatar svg { width: 26px; height: 26px; fill: #075e54; }
.chat-title { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.chat-title b { font-size: 14px; }
.chat-title span { font-size: 11px; opacity: .9; display: flex; align-items: center; gap: 5px; }
.chat-online { width: 7px; height: 7px; background: #69f0ae; border-radius: 50%; display: inline-block; }
.chat-close { margin-left: auto; border: 0; background: transparent; color: #fff; cursor: pointer; padding: 5px; }
.chat-close svg { width: 20px; height: 20px; stroke: #fff; }
.chat-body {
  flex: 1; overflow-y: auto; padding: 16px 14px;
  background: #f0ece5; display: flex; flex-direction: column; gap: 10px;
}
.chat-day { align-self: center; font-size: 10.5px; color: #8a8177; background: #e3ddd4; padding: 3px 12px; border-radius: 20px; }
.chat-msg { display: flex; }
.chat-msg.me { justify-content: flex-end; }
.chat-bubble {
  max-width: 86%; padding: 9px 12px; font-size: 12.8px; line-height: 1.55;
  background: #fff; border-radius: 12px 12px 12px 3px;
  box-shadow: 0 1px 2px rgba(0,0,0,.06); word-break: break-word; white-space: pre-wrap;
}
.chat-msg.me .chat-bubble { background: #d9fdd3; border-radius: 12px 12px 3px 12px; }
.chat-bubble a { color: #128c7e; font-weight: 600; text-decoration: underline; }
.chat-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.chat-quick button {
  border: 1px solid #25d366; color: #0f7a58; background: #fff;
  border-radius: 20px; padding: 6px 11px; font-size: 11.5px; cursor: pointer; transition: .2s;
}
.chat-quick button:hover { background: #e6f7ee; }
.chat-foot { border-top: 1px solid var(--line); padding: 10px 12px; background: #fff; flex-shrink: 0; }
.chat-name {
  width: 100%; border: 1px solid var(--line); border-radius: 8px;
  padding: 6px 10px; font-size: 12px; margin-bottom: 8px; outline: none;
}
.chat-name:focus, .chat-input:focus { border-color: #25d366; }
.chat-input-row { display: flex; gap: 8px; }
.chat-input {
  flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 20px;
  padding: 9px 14px; font-size: 13px; outline: none;
}
.chat-send {
  width: 38px; height: 38px; border-radius: 50%; border: 0; background: #25d366;
  color: #fff; cursor: pointer; display: grid; place-items: center; flex-shrink: 0; transition: .2s;
}
.chat-send:hover { background: #1ebe5d; }
.chat-send svg { width: 18px; height: 18px; }
.chat-alt { font-size: 10.5px; color: #9a9187; text-align: center; margin-top: 8px; line-height: 1.5; }
.chat-alt a { color: #0f7a58; font-weight: 600; text-decoration: underline; cursor: pointer; }
@media (max-width: 480px) {
  .wa-float { right: 12px; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; }
  .wa-float svg { width: 26px; height: 26px; }
  .wa-float-direct { top: 50%; }
  .wa-float-direct::after { display: none; }
  .social-float { right: 12px; bottom: calc(50% + 96px); gap: 10px; }
  .social-float a { width: 48px; height: 48px; }
  .social-float svg { width: 20px; height: 20px; }
}

/* ---------- 内容管理 tabs ---------- */
.cm-tabs {
  display: flex; flex-wrap: wrap; gap: 4px; padding: 12px 16px 0;
  border-bottom: 1px solid var(--line); background: var(--cream);
}
.cm-tabs a {
  padding: 10px 18px; font-size: 13.5px; cursor: pointer; border-radius: 8px 8px 0 0;
  color: var(--ink-2); border: 1px solid transparent; border-bottom: 0; margin-bottom: -1px;
}
.cm-tabs a:hover { color: var(--gold); }
.cm-tabs a.active { background: #fff; color: var(--gold); font-weight: 700; border-color: var(--line); }

/* ---------- 开关组件（内容管理用） ---------- */
.switch-field { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.switch-field label:first-child { font-size: 14px; color: var(--ink); font-weight: 600; }
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute; cursor: pointer; inset: 0; background: #cfc8bd;
  border-radius: 999px; transition: background .2s;
}
.switch .slider::before {
  content: ''; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.switch input:checked + .slider { background: var(--gold); }
.switch input:checked + .slider::before { transform: translateX(20px); }

/* ---------- 首页活动弹窗 ---------- */
.popup-mask {
  position: fixed; inset: 0; z-index: 9999; background: rgba(20,16,12,.55);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s ease;
}
.popup-mask.show { opacity: 1; visibility: visible; }
.popup-card {
  position: relative; width: 100%; max-width: 440px; background: #fff;
  border-radius: 16px; overflow: hidden; box-shadow: 0 24px 60px rgba(0,0,0,.35);
  transform: translateY(18px) scale(.97); transition: transform .32s cubic-bezier(.2,.8,.2,1);
}
.popup-mask.show .popup-card { transform: translateY(0) scale(1); }
.popup-close {
  position: absolute; top: 12px; right: 12px; z-index: 2; width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center; border: none; cursor: pointer;
  border-radius: 50%; background: rgba(0,0,0,.38); color: #fff;
}
.popup-close svg { width: 16px; height: 16px; }
.popup-close:hover { background: rgba(0,0,0,.6); }
.popup-img img { display: block; width: 100%; max-height: 240px; object-fit: cover; }
.popup-body { padding: 26px 28px 28px; text-align: center; }
.popup-badge {
  display: inline-block; padding: 4px 14px; font-size: 11.5px; letter-spacing: .08em;
  text-transform: uppercase; font-weight: 700; color: #fff; background: var(--gold);
  border-radius: 999px; margin-bottom: 14px;
}
.popup-title { font-size: 24px; font-weight: 800; color: var(--ink); margin: 0 0 10px; line-height: 1.25; }
.popup-sub { font-size: 14.5px; color: var(--ink-2); line-height: 1.6; margin: 0 0 20px; }
.popup-note { font-size: 12px; color: #9a9187; margin-top: 12px; }
@media (max-width: 480px) {
  .popup-card { max-width: calc(100vw - 40px); }
  .popup-title { font-size: 20px; }
}

/* ---------- 后台品类编辑（颜色尺寸价格表） ---------- */
#ceColorTable th, #ceColorTable td { padding: 8px 10px; }
#ceColorTable input { border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; font-size: 13px; background: #fff; color: var(--ink); }
#ceColorTable input:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 2px var(--gold-soft); }
#ceColorTable .ce-price { width: 60px; }
#ceColorTable .ce-cname { width: 86px; }
#ceColorTable .ce-cimg { width: 150px; font-size: 11px; }
#ceColorTable td img { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; }
#ceColorRows tr:hover td { background: var(--cream); }
.ce-detail-input { flex: 1; border: 1px solid var(--line); border-radius: 6px; padding: 9px 12px; font-size: 13px; background: #fff; color: var(--ink); }
.ce-detail-input:focus { border-color: var(--gold); outline: none; }

/* ---------- 品类详情页：颜色网格 + 细节图滚动 ---------- */
.pd-gallery-v2 { display: flex; flex-direction: column; gap: 14px; }
.pd-gallery-v2 .pd-mainimg { aspect-ratio: 1/1; }
.pd-thumbs-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.pd-thumbs-grid img { width: 100%; height: auto; aspect-ratio: 1/1; object-fit: cover; border: 2px solid var(--line); border-radius: 8px; cursor: pointer; transition: .2s; }
.pd-thumbs-grid img.active, .pd-thumbs-grid img:hover { border-color: var(--gold); }

.color-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 10px; }
.cg-item { text-align: center; cursor: pointer; }
.cg-item img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 8px; border: 2px solid var(--line); transition: .2s; }
.cg-item.active img { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold-soft); }
.cg-item span { display: block; font-size: 10.5px; color: var(--ink-2); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cg-item.active span { color: var(--gold); font-weight: 600; }

.detail-strip-sec { background: #fff; }
.detail-strip { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 10px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.detail-strip .ds-item { flex: 0 0 auto; width: 280px; scroll-snap-align: start; }
.detail-strip .ds-item img { width: 100%; height: 280px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); }
.detail-strip::-webkit-scrollbar { height: 8px; }
.detail-strip::-webkit-scrollbar-thumb { background: var(--gold-soft); border-radius: 4px; }

/* 随机颜色推荐 */
.color-rec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.color-rec-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: .25s; cursor: pointer; }
.color-rec-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(0,0,0,.1); }
.color-rec-card img { width: 100%; height: 220px; object-fit: cover; display: block; }
.color-rec-card .cr-info { padding: 14px 16px; }
.color-rec-card .cr-name { font-weight: 700; font-size: 15px; color: var(--ink); }
.color-rec-card .cr-price { font-size: 15px; color: var(--gold); font-weight: 700; margin-top: 4px; }
.color-rec-card .cr-price small { font-size: 11px; color: var(--muted); font-weight: 400; }

@media (max-width: 900px) {
  .color-grid { grid-template-columns: repeat(5, 1fr); }
  .pd-thumbs-grid { grid-template-columns: repeat(5, 1fr); }
  .color-rec-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .color-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .pd-thumbs-grid { grid-template-columns: repeat(4, 1fr); }
  .detail-strip .ds-item { width: 220px; }
  .detail-strip .ds-item img { height: 220px; }
  .color-rec-grid { grid-template-columns: 1fr; }
}

/* ---------- 主页 hero 多图轮播 ---------- */
.hero-slider { position: relative; height: 620px; }
.hero-slider img { position: absolute; inset: 0; width: 100%; height: 100% !important; object-fit: cover; object-position: center; opacity: 0; transition: opacity .8s ease; }
.hero-slider img.on { opacity: 1; }
.hero-dots { position: absolute; bottom: -28px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 3; }
.hero-dots span { width: 9px; height: 9px; border-radius: 50%; background: #d8cfc2; cursor: pointer; transition: .2s; }
.hero-dots span.on { background: var(--gold); width: 22px; border-radius: 5px; }
@media (max-width: 900px) { .hero-slider { height: 380px; } }

/* ---------- Tips 文章列表 + 详情 ---------- */
.tips-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.tip-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: .25s; text-decoration: none; color: inherit; }
.tip-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.tip-card-img { aspect-ratio: 16/10; overflow: hidden; background: var(--cream); }
.tip-card-img img { width: 100%; height: 100%; object-fit: cover; transition: .4s; }
.tip-card:hover .tip-card-img img { transform: scale(1.05); }
.tip-card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.tip-card-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.tip-card-meta .muted { font-size: 12px; }
.tip-card-body h3 { font-size: 17px; line-height: 1.4; margin-bottom: 8px; font-weight: 700; }
.tip-card-body p { font-size: 13.5px; color: var(--ink-2); line-height: 1.6; flex: 1; }
.tip-card-body .read-more { margin-top: 12px; font-size: 13px; color: var(--gold); font-weight: 600; }

.tip-article .tip-hero-img { width: 100%; aspect-ratio: 21/9; object-fit: cover; border-radius: var(--radius); margin-bottom: 22px; }
.tip-article .tip-meta { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.tip-article .tip-title { font-size: clamp(26px, 3.5vw, 38px); line-height: 1.25; font-weight: 800; margin-bottom: 22px; }
.tip-article .tip-body { font-size: 16px; line-height: 1.85; color: var(--ink-2); }
.tip-article .tip-body p { margin-bottom: 16px; }
.tip-article .tip-body .tip-li { padding-left: 8px; }

@media (max-width: 900px) {
  .tips-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .tips-grid { grid-template-columns: 1fr; }
}

/* ---------- 后台文章图片上传 ---------- */
.tip-img-upload { display: flex; flex-direction: column; gap: 10px; }
.tip-img-upload img { max-width: 200px; max-height: 140px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.tip-upload-btns { display: flex; gap: 8px; align-items: center; }
#tipImg { flex: 1; border: 1px solid var(--line); border-radius: 6px; padding: 9px 12px; font-size: 13px; background: #fff; color: var(--ink); }
#tipImg:focus { border-color: var(--gold); outline: none; }

/* ---------- 首页客户好评（由左往右自动循环滚动，随机取最多 10 条） ---------- */
.reviews-wrap { position: relative; display: flex; align-items: center; gap: 12px; }
.reviews-viewport { flex: 1; overflow: hidden; }
.reviews-track {
  display: flex;
  gap: 16px;
  transition: transform .5s cubic-bezier(.4,0,.2,1);
  will-change: transform;
}
.reviews-track.anim { transition: transform .5s cubic-bezier(.4,0,.2,1); }
.rev-arrow {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
  transition: .2s;
  z-index: 2;
}
.rev-arrow:hover { background: var(--gold); color: #fff; border-color: var(--gold); }
.rev-arrow svg { width: 18px; height: 18px; }
.review-card {
  flex: 0 0 auto;
  width: 260px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 3px 12px rgba(0,0,0,.03);
}
.review-top { display: flex; gap: 10px; align-items: flex-start; }
.review-avatar { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; flex-shrink: 0; background: var(--cream); border: 2px solid var(--gold-soft); }
.review-avatar img { width: 100%; height: 100%; object-fit: cover; }
.review-avatar-fallback { background: var(--gold-soft); }
.review-avatar-fallback::after { content: ''; width: 100%; height: 100%; display: block; background: radial-gradient(circle at 35% 30%, #fff 0 22%, var(--gold-2) 22% 52%, #fff 52% 100%); }
.review-head { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.review-name { font-weight: 700; font-size: 14px; color: var(--ink); }
.review-meta { font-size: 11.5px; color: var(--muted); }
.review-date { font-size: 11px; color: var(--muted); opacity: .85; white-space: nowrap; }
.review-card .stars { color: var(--gold); font-size: 13px; letter-spacing: 1px; line-height: 1; margin-top: 2px; }
/* 配图：小尺寸，部分卡片无图 */
.review-photo { border-radius: 8px; overflow: hidden; background: var(--cream); }
.review-photo img { width: 100%; height: 120px; object-fit: cover; display: block; }
.review-card.no-photo .review-text { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.review-text { font-size: 13px; line-height: 1.55; color: var(--ink-2); flex: 1; margin: 0; }
.review-prod { font-size: 11.5px; color: var(--gold); font-weight: 600; }
.reviews-nav { display: flex; justify-content: center; gap: 6px; margin-top: 14px; }
.reviews-nav button { width: 8px; height: 8px; border-radius: 50%; border: 0; background: var(--cream-2); cursor: pointer; padding: 0; transition: .25s; }
.reviews-nav button.on { background: var(--gold); width: 22px; border-radius: 5px; }

@media (max-width: 720px) {
  .review-card { width: 78vw; }
  .rev-arrow { display: none; }
}

/* 后台好评评分选择 */
.rating-pick { display: flex; gap: 4px; }
.rating-pick button { background: transparent; border: 0; font-size: 26px; cursor: pointer; color: var(--cream-2); padding: 0; line-height: 1; transition: .15s; }
.rating-pick button.on { color: var(--gold); }
#reviewImgPreview { width: 56px; height: 56px; }

/* ---------- 客户账户（注册 / 验证码登录） ---------- */
.acc-tabs { display: flex; border-bottom: 1px solid var(--line); }
.acc-tab { flex: 1; padding: 14px; border: 0; background: transparent; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; transition: .2s; }
.acc-tab.active { color: var(--gold); border-bottom-color: var(--gold); }
.acc-pane { display: block; }
.code-row { display: flex; gap: 10px; align-items: center; }
.code-row input { flex: 1; border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; font-size: 15px; letter-spacing: 4px; text-align: center; }
.code-row .btn { white-space: nowrap; flex-shrink: 0; }
.code-hint { display: none; margin-top: 8px; font-size: 12.5px; color: var(--gold); background: var(--gold-soft); border-radius: 6px; padding: 8px 12px; }
.nav-avatar { display: inline-flex; width: 22px; height: 22px; border-radius: 50%; overflow: hidden; }
.nav-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* 账户下拉菜单 */
.account-menu {
  position: fixed; z-index: 450; min-width: 240px; background: #fff;
  border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
  overflow: hidden; padding: 6px;
}
.account-menu .am-head { display: flex; gap: 12px; align-items: center; padding: 12px 12px 14px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.account-menu .am-avatar { width: 42px; height: 42px; border-radius: 50%; overflow: hidden; background: var(--gold-soft); flex-shrink: 0; }
.account-menu .am-avatar img { width: 100%; height: 100%; object-fit: cover; }
.account-menu .am-avatar-fb { background: var(--gold-soft); }
.account-menu .am-avatar-fb::after { content: ''; width: 100%; height: 100%; display: block; background: radial-gradient(circle at 35% 30%, #fff 0 22%, var(--gold-2) 22% 52%, #fff 52% 100%); }
.account-menu .am-head b { display: block; font-size: 14px; color: var(--ink); }
.account-menu .am-head span { display: block; font-size: 12px; color: var(--muted); max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-menu a { display: block; padding: 10px 12px; font-size: 13.5px; color: var(--ink-2); border-radius: 8px; text-decoration: none; cursor: pointer; }
.account-menu a:hover { background: var(--cream); color: var(--gold); }
