/* 产品画册网站：手机优先（扫码打开），电脑上居中成一列。 */
:root {
  --bg: #F4F4F2;
  --card: #FFFFFF;
  --ink: #151515;
  --ink-2: #3A3A3A;
  --muted: #7A7A78;
  --line: #E3E3DF;
  --photo: #D1D1D1;          /* 产品照片的浅灰底，图片边缘接得上 */
  --dark: #050505;
  --dark-ink: #F2F2F0;
  --dark-muted: #9A9A98;
  --draft: #B7791F;
  --draft-bg: #FFF6E5;
  --radius: 14px;
  --gutter: 20px;
  --col: 560px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;   /* 西文字体在前：英文 / 数字用西文字形，中文落到苹方 / 雅黑 */
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #E9E9E6;
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

.page {
  max-width: var(--col);
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  overflow-x: hidden;
}
@media (min-width: 600px) {
  .page { box-shadow: 0 0 0 1px rgba(0,0,0,.04), 0 20px 60px rgba(0,0,0,.08); }
}

/* ---------------------------------------------------------------- 顶栏 */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  height: 52px; padding: 0 var(--gutter);
  background: rgba(244,244,242,.86);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid rgba(0,0,0,.05);
}
.topbar .back { font-size: 14px; color: var(--ink-2); white-space: nowrap; }
.topbar .brand { flex: 1; min-width: 0; font-weight: 600; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .brand img { height: 26px; width: auto; }
/* 语言：10 种（10-16 晚），用原生下拉菜单（手机上弹系统选择器，最好点） */
.lang {
  position: relative; display: inline-flex; align-items: center; gap: 4px; flex: none;
  height: 30px; padding: 0 26px 0 10px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--card); font-size: 13px; color: var(--ink-2); cursor: pointer;
}
.lang .globe { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; opacity: .7; }
.lang select {
  -webkit-appearance: none; appearance: none; border: 0; background: transparent; font: inherit; color: inherit;
  padding: 0; margin: 0; cursor: pointer; outline: none;
}
.lang::after {                                   /* 小三角 */
  content: ""; position: absolute; inset-inline-end: 11px; top: 12px; width: 6px; height: 6px;
  border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); pointer-events: none;
}
.lang:focus-within { border-color: var(--ink-2); }
/* 阿拉伯语整页从右往左；图片轮播仍按从左往右滚（图片没有方向，滚动位置计算也保持简单） */
[dir="rtl"] .slides { direction: ltr; }
[dir="rtl"] .dots { direction: ltr; }
/* 返回箭头用 CSS 画（不靠字符镜像）：从左往右的语言指向左，阿拉伯语指向右 */
.topbar .back::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-inline-end: 7px; vertical-align: 1px;
  border-left: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); }
[dir="rtl"] .topbar .back::before { transform: rotate(-135deg); }
[dir="rtl"] .lang { padding: 0 10px 0 26px; }

/* ---------------------------------------------------------------- 预览模式的「待填」 */
.todo {
  display: inline-block; padding: 0 8px; border-radius: 6px;
  border: 1px dashed var(--draft); background: var(--draft-bg); color: var(--draft);
  font-size: 12px; line-height: 20px; font-weight: 500;
}
.todo-box {
  display: flex; align-items: center; justify-content: center; text-align: center;
  border: 1.5px dashed var(--draft); background: var(--draft-bg); color: var(--draft);
  border-radius: var(--radius); padding: 28px 16px; font-size: 13px;
}

/* ---------------------------------------------------------------- 列表页 */
.hero-list { padding: 34px var(--gutter) 18px; }
.eyebrow { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.hero-list h1 { margin: 6px 0 0; font-size: 30px; line-height: 1.2; font-weight: 650; letter-spacing: -.01em; }
.chips { display: flex; gap: 8px; padding: 6px var(--gutter) 2px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; padding: 6px 14px; border-radius: 999px; font-size: 13px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink-2);
}
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 16px var(--gutter) 40px; }
.card { background: var(--card); border-radius: var(--radius); overflow: hidden; transition: transform .2s ease; }
.card:active { transform: scale(.985); }
.card .ph { aspect-ratio: 4 / 5; background: var(--photo); overflow: hidden; }
.card .ph img { width: 100%; height: 100%; object-fit: cover; }
.card .meta { padding: 11px 12px 13px; }
.card .nm { font-size: 14px; font-weight: 600; line-height: 1.35; }
.card .sub { margin-top: 4px; font-size: 12px; color: var(--muted); }
.card.soon { display: flex; align-items: center; justify-content: center; min-height: 180px; background: transparent; border: 1.5px dashed var(--line); color: var(--muted); font-size: 13px; text-align: center; padding: 16px; }

/* ---------------------------------------------------------------- 详情页：图库 */
.gallery { position: relative; background: var(--photo); }
.slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.slides::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; aspect-ratio: 4 / 5; scroll-snap-align: center; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.dots { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; justify-content: center; gap: 6px; pointer-events: none; }
.dots i { width: 6px; height: 6px; border-radius: 3px; background: rgba(0,0,0,.22); transition: width .25s ease, background .25s ease; }
.dots i.on { width: 18px; background: rgba(0,0,0,.65); }

.head { padding: 22px var(--gutter) 6px; }
.head h1 { margin: 0; font-size: 25px; line-height: 1.25; font-weight: 650; letter-spacing: -.01em; }
.head .tag { margin-top: 8px; color: var(--ink-2); font-size: 14px; }
.head .model { margin-top: 10px; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; }

.variants { padding: 14px var(--gutter) 6px; }
.label { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.vlist { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.vlist::-webkit-scrollbar { display: none; }
.vbtn { flex: none; width: 64px; border-radius: 10px; overflow: hidden; background: var(--photo); outline: 2px solid transparent; outline-offset: 2px; transition: outline-color .2s; }
.vbtn img { width: 64px; height: 80px; object-fit: cover; }
.vbtn[aria-pressed="true"] { outline-color: var(--ink); }
.vname { margin-top: 10px; font-size: 14px; font-weight: 500; }

/* ---------------------------------------------------------------- 详情页：视频 */
.video { margin: 22px var(--gutter) 0; border-radius: var(--radius); overflow: hidden; background: var(--dark); aspect-ratio: 1 / 1; }
.video video { width: 100%; height: 100%; display: block; object-fit: cover; }
.video.todo-box { aspect-ratio: auto; background: var(--draft-bg); }
/* 播放键（没在播时）和加载转圈（缓冲时），app.js 的 bindVideo() 切 is-paused / is-loading */
.video { position: relative; cursor: pointer; }
.video .vplay, .video .vspin { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px;
  border-radius: 50%; background: rgba(0,0,0,.45); display: none; pointer-events: none; }
.video .vplay::before { content: ""; position: absolute; left: 25px; top: 20px;
  border-style: solid; border-width: 12px 0 12px 20px; border-color: transparent transparent transparent #fff; }
.video .vspin::before { content: ""; position: absolute; inset: 16px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.3); border-top-color: #fff; animation: vspin .8s linear infinite; }
.video.is-paused .vplay, .video.is-loading .vspin { display: block; }
@keyframes vspin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- 卖点块 */
.sec { padding: 40px var(--gutter) 8px; }
.sec .kicker { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.sec h2 { margin: 6px 0 10px; font-size: 22px; line-height: 1.3; font-weight: 650; letter-spacing: -.005em; }
.sec p { margin: 0; color: var(--ink-2); }
.sec .pics { display: grid; gap: 10px; margin-top: 18px; }
.sec .pics.two { grid-template-columns: 1fr 1fr; }
.sec figure { margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--photo); position: relative; }
.sec figure img { width: 100%; height: 100%; object-fit: cover; }
.sec .pics.two figure { aspect-ratio: 3 / 4; }
.sec .pics.one figure { aspect-ratio: 1 / 1; }
.sec figcaption { position: absolute; left: 10px; bottom: 10px; font-size: 12px; padding: 2px 9px; border-radius: 999px; background: rgba(255,255,255,.88); color: var(--ink); }

.sec.dark { background: var(--dark); color: var(--dark-ink); margin-top: 32px; padding-top: 44px; padding-bottom: 34px; }
.sec.dark .kicker { color: var(--dark-muted); }
.sec.dark p { color: #C9C9C6; }
.sec.dark figure { background: #000; }
.sec.dark figcaption { background: rgba(0,0,0,.6); color: #fff; }

/* 卖点图（画册式往下排） */
.listing { display: grid; gap: 10px; padding: 22px var(--gutter) 6px; }
.listing img { width: 100%; border-radius: var(--radius); background: var(--photo); aspect-ratio: 1 / 1; object-fit: cover; }

/* 滤芯卡片 */
.filters { display: grid; gap: 10px; margin-top: 18px; }
.fcard { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: center; background: var(--card); border-radius: var(--radius); overflow: hidden; }
.fcard .fimg { background: var(--photo); height: 120px; }
.fcard .fimg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 72%; }
.fcard .fn { font-weight: 600; font-size: 15px; }
.fcard .ft { font-size: 13px; color: var(--ink-2); margin-top: 3px; padding-right: 12px; }

/* 参数表 */
.specs { margin-top: 16px; background: var(--card); border-radius: var(--radius); overflow: hidden; }
.specs .row { display: grid; grid-template-columns: 40% 1fr; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); font-size: 14px; }
.specs .row:first-child { border-top: 0; }
.specs .k { color: var(--muted); }
.specs .v { color: var(--ink); font-weight: 500; }

/* 包装、联系 */
.pack { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.pack figure { margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--photo); aspect-ratio: 1 / 1; }
.pack img { width: 100%; height: 100%; object-fit: cover; }
.contact { margin-top: 16px; background: var(--card); border-radius: var(--radius); overflow: hidden; }
.contact a, .contact div.item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border-top: 1px solid var(--line); font-size: 14px; }
.contact > :first-child { border-top: 0; }
.contact .k { color: var(--muted); }

.foot { padding: 34px var(--gutter) 44px; font-size: 12px; color: var(--muted); text-align: center; }

/* 看大图 */
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.94); display: none; align-items: center; justify-content: center; }
.lightbox.on { display: flex; }
.lightbox img { max-width: 100vw; max-height: 100vh; object-fit: contain; }
.lightbox .x { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border-radius: 20px; background: rgba(255,255,255,.12); color: #fff; font-size: 22px; line-height: 40px; text-align: center; }

.notfound { padding: 80px var(--gutter); text-align: center; color: var(--muted); }
