/* =========================================================
   products-v1b.css — 栏目页 v1b（分支版；v1 不动）

   设计依据（ui-ux-pro-max）：
   · style → Minimalism & Swiss Style：严格网格 / 高对比 / 无阴影装饰 /
             0 圆角控件 / 单一强调色 / hover 200–250ms
   · typo  → Inter 单字体族（real webfont + display=swap）
   · ux    → 焦点环可见、焦点不被固定导航遮挡、触控 ≥24px、
             懒加载、prefers-reduced-motion

   2026-11-27 第二轮：左栏去掉序号与计数，「All products」置顶显示全部；
   右侧去掉范围条与类目描述，只留网格。
   ========================================================= */

body.v1b {
  --ink:      #0C0A09;
  --ink-2:    #44403C;
  --ink-3:    #6B7280;   /* 4.83:1 on white — AA for 12–13px meta text */
  --ink-4:    #6B7280;   /* 层级交给字号/字距，不靠更浅的灰 */
  --rule:     #E4E6E9;
  --rule-2:   #C9CDD3;
  --paper:    #F7F8F9;
  --accent:   #B45309;
  --accent-2: #D97706;
  --accent-ink:#8A4B08;
  --ease:     cubic-bezier(.22,.61,.36,1);

  font-family: "Inter", "Inter Tight", -apple-system, BlinkMacSystemFont,
               "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-feature-settings: "kern" 1;
  color: var(--ink);
}

/* 固定导航 76/64px —— 键盘焦点滚进屏幕时不被压住 */
html { scroll-padding-top: 96px; }

.v1b .skip {
  position: fixed; left: 16px; top: -60px; z-index: 999;
  padding: 10px 16px;
  background: var(--ink); color: #fff;
  font-size: 13px; font-weight: 500;
  transition: top .18s var(--ease);
}
.v1b .skip:focus { top: 16px; }

/* 导航下拉里标出当前所在的二级分类（products.js 写 aria-current="page"）。
   选择器要压过 design.css 的 .drop-col a:not(.drop-head):not(.btn)。 */
.drop-col a:not(.drop-head):not(.btn)[aria-current="page"] {
  color: var(--text);
  font-weight: 600;
}

/* =========================================================
   hero
   ========================================================= */
.rng-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #0B0D10;
  color: #fff;
}
.rng-hero-pic,
.rng-hero-pic img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 62%;
}
/* 切换分类时首屏图做一次淡入淡出 */
.rng-hero-pic img { transition: opacity .35s var(--ease); }
.rng-hero::after {
  content: "";
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(180deg, rgba(6,8,11,.88) 0%, rgba(6,8,11,.38) 38%,
                    rgba(6,8,11,.70) 78%, rgba(6,8,11,.94) 100%),
    linear-gradient(90deg, rgba(6,8,11,.55) 0%, rgba(6,8,11,0) 58%);
}
.rng-hero-in {
  position: relative; z-index: 2;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 164px var(--pad) 0;
}
.rng-crumb {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 34px;
  font-size: 12px; letter-spacing: .02em;
  color: rgba(255,255,255,.55);
}
.rng-crumb a { color: rgba(255,255,255,.75); }
.rng-crumb a:hover { color: #fff; }
.rng-kicker {
  margin: 0 0 20px;
  font-size: 11px; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--accent-2);
}
.rng-hero h1 {
  margin: 0 0 26px;
  max-width: 18ch;
  font-size: clamp(40px, 6vw, 84px);
  line-height: .98;
  letter-spacing: -.045em;
  font-weight: 600;
}
.rng-lead {
  margin: 0 0 38px;
  max-width: 46ch;
  font-size: 16px; line-height: 1.62;
  color: rgba(255,255,255,.72);
}
.rng-cta {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 48px; padding: 0 26px;
  background: var(--accent-2); color: #1A0F02;
  font-size: 14px; font-weight: 600; letter-spacing: .01em;
  transition: background .2s var(--ease);
}
.rng-cta:hover { background: #F0A83F; }
.rng-cta:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.rng-stats {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: repeat(4, minmax(0,1fr));
  max-width: var(--maxw);
  margin: clamp(56px, 7vw, 96px) auto 0;
  padding: 0 var(--pad);
  border-top: 1px solid rgba(255,255,255,.18);
}
.rng-stats > div {
  display: flex; flex-direction: column; gap: 10px;
  padding: 22px 0 36px;
  border-left: 1px solid rgba(255,255,255,.12);
  padding-left: clamp(14px, 2vw, 28px);
}
.rng-stats > div:first-child { border-left: 0; padding-left: 0; }
.rng-stats dt {
  order: 2;
  font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase;
  color: rgba(255,255,255,.55);
}
.rng-stats dd {
  order: 1;
  margin: 0;
  font-size: clamp(24px, 2.6vw, 34px);
  font-weight: 600; line-height: 1;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
.rng-stats em {
  font-style: normal;
  font-size: .52em; font-weight: 500;
  margin-left: 3px;
  color: rgba(255,255,255,.6);
}

/* =========================================================
   range shell
   ========================================================= */
.rng {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: clamp(32px, 4vw, 64px);
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(36px, 4.2vw, 56px) var(--pad) clamp(64px, 8vw, 112px);
  scroll-margin-top: 88px;
}

/* ---------------- rail ---------------- */
.rng-rail { position: sticky; top: 96px; align-self: start; min-width: 0; }
.rng-stage { min-width: 0; }
.rng-tabs { display: block; }

/* All products = 置顶项，和分类同一套外观，下边一条分隔 */
.rng-all {
  position: relative;
  display: block;
  width: calc(100% + 14px);
  margin: 0 0 10px -14px;
  padding: 12px 10px 14px 14px;
  border: 0;
  border-bottom: 1px solid var(--rule);
  background: none;
  color: var(--ink-2);
  font: inherit; font-size: 14.5px;
  text-align: left; cursor: pointer;
  transition: color .18s var(--ease);
}
.rng-all:hover { color: var(--ink); }
.rng-all.is-on { color: var(--ink); font-weight: 600; }
.rng-all.is-on::before {
  content: "";
  position: absolute; left: 0; top: 4px; bottom: 4px;
  width: 2px; background: var(--accent);
}

.rng-tab {
  position: relative;
  display: block;
  width: calc(100% + 14px);
  margin-left: -14px;
  padding: 12px 10px 12px 14px;
  border: 0;
  border-top: 1px solid var(--rule);
  background: none;
  color: var(--ink-2);
  font: inherit; font-size: 14.5px;
  text-align: left; cursor: pointer;
  transition: color .18s var(--ease);
}
.rng-tab:first-of-type { border-top: 0; }
.rng-tab:hover { color: var(--ink); }
.rng-tab.is-on { color: var(--ink); font-weight: 600; }
.rng-tab.is-on::before {
  content: "";
  position: absolute; left: 0; top: -1px; bottom: -1px;
  width: 2px; background: var(--accent);
}

.rng-subs { display: none; margin-left: -14px; padding: 2px 0 10px; }
.rng-subs.is-on { display: block; }
.rng-sub {
  display: block;
  width: 100%;
  min-height: 30px;
  padding: 6px 10px 6px 30px;
  border: 0; background: none;
  color: var(--ink-3);
  font: inherit; font-size: 12.5px; line-height: 1.45;
  text-align: left; cursor: pointer;
  transition: color .16s var(--ease);
}
.rng-sub:hover { color: var(--ink); }
.rng-sub.is-on { color: var(--accent-ink); font-weight: 600; }

/* mobile-only sub row (JS fills it from the active category) */
.rng-subrow { display: none; }

.rng-card {
  margin-top: 26px;
  padding: 18px;
  background: var(--paper);
}
.rng-card p {
  margin: 0 0 14px;
  font-size: 12.5px; line-height: 1.5; color: var(--ink-3);
}
.rng-card-btn {
  display: inline-flex; align-items: center;
  min-height: 38px; padding: 0 16px;
  background: var(--ink); color: #fff;
  font-size: 12.5px; font-weight: 500;
  transition: background .18s var(--ease);
}
.rng-card-btn:hover { background: #26221F; }

/* ---------------- hairline grid ---------------- */
.rng-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}
.tile {
  position: relative;
  display: flex; flex-direction: column;
  background: #fff;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  transition: background .2s var(--ease);
}
.tile:hover { background: #FBFCFD; }
.tile:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

.tile-media {
  display: grid; place-items: center;
  aspect-ratio: 1 / 1;
  padding: clamp(18px, 1.8vw, 26px);
}
.tile-media img {
  max-width: 100%; max-height: 100%;
  width: auto; height: auto;
  object-fit: contain;
  transition: transform .45s var(--ease);
}
.tile:hover .tile-media img { transform: scale(1.045); }

.tile-body {
  display: flex; flex-direction: column; gap: 5px;
  padding: 0 clamp(18px, 1.8vw, 24px) 18px;
}
.tile-cat {
  font-size: 10px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-4);
}
.tile-name {
  font-size: 16px; font-weight: 600;
  letter-spacing: -.02em; line-height: 1.28;
  color: var(--ink);
}
.tile-spec { font-size: 12.5px; line-height: 1.5; color: var(--ink-3); }

.tile-go {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: auto;
  padding: 13px clamp(18px, 1.8vw, 24px);
  border-top: 1px solid #F1F3F5;
  font-size: 11.5px; letter-spacing: .03em;
  color: var(--ink-3);
  transition: color .18s var(--ease), border-color .18s var(--ease);
}
.tile-go span { transition: transform .2s var(--ease); }
.tile:hover .tile-go { color: var(--accent-ink); border-color: var(--rule); }
.tile:hover .tile-go span { transform: translateX(4px); }
.tile[hidden] { display: none; }

/* 过滤后重排入场：只给可见的前 12 张，18ms 步进 */
.rng-grid.is-enter .tile:not([hidden]) {
  animation: tile-in .42s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 18ms);
}
@keyframes tile-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* =========================================================
   responsive
   ========================================================= */
@media (max-width: 1180px) {
  .rng-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .rng { grid-template-columns: 1fr; gap: 0; padding-top: 24px; }
  .rng-rail {
    position: sticky; top: 64px; z-index: 30;
    margin: 0 0 6px;
    padding: 8px 0 0;
    background: var(--bg);
    border-bottom: 1px solid var(--rule);
  }
  .rng-tabs {
    display: flex; gap: 6px;
    overflow-x: auto;
    padding-bottom: 9px;
    scrollbar-width: none;
  }
  .rng-tabs::-webkit-scrollbar { display: none; }

  .rng-all,
  .rng-tab {
    flex: none; width: auto;
    margin: 0;
    padding: 8px 12px;
    border: 1px solid var(--rule);
    font-size: 12.5px;
    white-space: nowrap;
  }
  .rng-all { order: -1; }
  .rng-all.is-on,
  .rng-tab.is-on {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
  }
  .rng-all.is-on::before,
  .rng-tab.is-on::before { display: none; }

  .rng-subs { display: none !important; }
  .rng-subrow {
    display: flex; gap: 6px;
    overflow-x: auto;
    padding-bottom: 10px;
    scrollbar-width: none;
  }
  .rng-subrow[hidden] { display: none; }
  .rng-subrow::-webkit-scrollbar { display: none; }
  .rng-subrow .rng-sub {
    display: flex; align-items: center;
    flex: none; width: auto;
    min-height: 32px;
    padding: 7px 12px;
    border: 1px solid var(--rule);
    font-size: 12px;
    white-space: nowrap;
  }
  .rng-subrow .rng-sub.is-on {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
  }
  .rng-card { display: none; }
  .rng-hero-in { padding-top: 128px; }
}
@media (max-width: 860px) {
  .rng-stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .rng-stats > div:nth-child(3) { border-left: 0; padding-left: 0; }
}
@media (max-width: 680px) {
  .rng-grid { grid-template-columns: 1fr; }
  .tile-media { aspect-ratio: 4 / 3; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .v1b *,
  .v1b *::before,
  .v1b *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
