/* 客户展示页（来源 design-demos/pick.css）：方向二为底 ＋ 网格白卡片浅灰底分隔 ＋ 多图动态九宫格。零外部资源，系统字体。 */

:root {
  --ink: #1b1b1b;
  --ink2: #595959;
  --ink3: #6b6b6b;
  --icon-off: #767676;
  --line: #e8e8e8;
  --fill: #f4f4f3;
  --canvas: #f5f5f5;
  --card-radius: 8px;
  --gap: 6px;
  --pad: 16px;
  --bar-h: 48px;
  --radius: 4px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "MiSans",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

[hidden] { display: none !important; }
.load-failed .shop, .load-failed .bar { display: none; }
.load-pending .shop, .load-pending .bar { visibility: hidden; }

/* 滚动条：电脑上用浏览器默认的。手机版式保留，但做细、做淡，不挡内容（俊博 10/2）。
   真手机上系统自带的滚动指示本来就细、会自动消失；这几条主要管电脑上缩窄窗口和安卓的情况。 */
@media (max-width: 859px) {
  ::-webkit-scrollbar { width: 3px; height: 3px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, .22); border-radius: 3px; }
  @supports not selector(::-webkit-scrollbar) {
    html { scrollbar-width: thin; scrollbar-color: rgba(0, 0, 0, .22) transparent; }
  }
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

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

:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

img { -webkit-user-drag: none; }

/* 看详情时列表停在屏幕外（不销毁），回来时原样还在 */
.list-view.is-parked {
  position: fixed;
  left: 0;
  right: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ───────── 店名（手机：工具栏上面的一行） ───────── */

.shop {
  height: 44px;
  display: flex;
  align-items: center;
  padding: 0 var(--pad);
}
.shop-name {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ───────── 店铺 logo（后台「店铺信息」里上传；按原比例显示，不裁） ───────── */

.brand-logo { display: inline-block; vertical-align: middle; height: 28px; width: auto; object-fit: contain; }
.brand-logo.is-icon { max-width: 52px; margin-right: 8px; border-radius: 6px; }
.brand-logo.is-wide { max-width: 56vw; }
.brand-text { vertical-align: middle; }
.d-shop .brand-logo { height: 22px; }
.d-shop .brand-logo.is-icon { max-width: 40px; margin-right: 6px; border-radius: 5px; }
.d-shop .brand-logo.is-wide { max-width: 40vw; }

/* ───────── 吸顶工具栏 ───────── */

.bar-sentinel { height: 1px; margin-bottom: -1px; }

.bar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #fff;
}
.bar::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--line);
  opacity: 0;
  transition: opacity .15s;
}
.bar.is-stuck::after { opacity: 1; }

.bar-row {
  display: flex;
  align-items: center;
  height: var(--bar-h);
  padding: 0 6px;
}

.bar-name, .cat-strip, .field.field-desk { display: none; }

.cat-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 0 10px;
  min-width: 44px;
  max-width: 46vw;
  font-size: 15px;
}
.cat-btn svg { flex: none; }
.cat-btn-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cat-btn.is-on .cat-btn-label { font-weight: 600; }

.icon-btn {
  position: relative;
  flex: none;
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
}
.icon-btn .dot {
  position: absolute;
  top: 10px; right: 9px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 2px #fff;
}
.search-btn[aria-expanded="true"] { color: var(--ink); }

.modes {
  display: flex;
  margin-left: auto;
}
.mode {
  position: relative;
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  color: var(--icon-off);
}
.mode[aria-pressed="true"] { color: var(--ink); }
.mode::after,
.cat-tab::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 3px;
  width: 18px;
  height: 2px;
  margin-left: -9px;
  background: var(--ink);
  opacity: 0;
}
.mode[aria-pressed="true"]::after { opacity: 1; }

/* 搜索框 */

.search-row {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 6px 8px var(--pad);
}
.field {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 44px;
  display: flex;
  align-items: center;
  background: var(--fill);
  border-radius: 22px;
}
.field-icon {
  position: absolute;
  left: 14px;
  color: var(--ink3);
  pointer-events: none;
}
.field-input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 4px 0 40px;
  border: 0;
  border-radius: 22px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.field:focus-within { box-shadow: inset 0 0 0 1.5px var(--ink); }
.field-input::placeholder { color: var(--ink3); }
.field-input::-webkit-search-cancel-button,
.field-input::-webkit-search-decoration { -webkit-appearance: none; display: none; }
.field-clear {
  flex: none;
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  color: var(--ink2);
}
.fold-btn {
  flex: none;
  height: 44px;
  padding: 0 10px;
  font-size: 15px;
  color: var(--ink2);
}

/* ───────── 内容区 ───────── */

.main { padding: 0 var(--pad) 56px; }

.status {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  column-gap: 6px;
  min-height: 36px;
  padding-bottom: 6px;
  font-size: 13px;
  color: var(--ink2);
}
.status .st-cat { color: var(--ink); }
.status .st-sep { color: var(--ink3); }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 44px;
  margin: -8px 0;
  padding: 0 2px;
  font-size: 13px;
  color: var(--ink);
}
.chip-in {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 8px 0 10px;
  border-radius: 14px;
  background: var(--fill);
  max-width: 52vw;
}
.chip-in span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip-in svg { flex: none; color: var(--ink2); }

.price {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.price .yen { font-size: .86em; font-weight: 500; margin-right: 1px; }
/* 两个价：一个价一行，备注小一号写在前面；动态里两个价排在同一行。三个以上只写最低价，后面跟「起」。 */
.price .from { font-size: 12px; font-weight: 400; color: var(--ink2); margin-left: 3px; }
.price-multi { display: inline-flex; flex-direction: column; min-width: 0; max-width: 100%; white-space: normal; }
.pl { display: flex; align-items: baseline; min-width: 0; max-width: 100%; }
.pl-k { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 400; color: var(--ink2); margin-right: 5px; }
.pl-v { flex: none; white-space: nowrap; }
.p-row .price-multi { flex-direction: row; flex-wrap: wrap; gap: 0 16px; }
.d-price { overflow-wrap: anywhere; }
.d-pk { font-size: 14px; color: var(--ink2); margin-right: 8px; }
.k { font-size: 12px; color: var(--ink3); margin-right: 5px; font-weight: 400; }

.ph {
  display: block;
  background: var(--fill);
  border-radius: var(--radius);
  overflow: hidden;
}
.ph img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* —— 图片网格：定宽不定高的双列流。浅灰底上一张张白卡片，卡片之间留窄缝（俊博点名照小红书） —— */

.list-view { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
.main { flex: 1 0 auto; }
.main.m-grid { background: var(--canvas); padding-left: var(--gap); padding-right: var(--gap); }
.main.m-grid .status { padding-left: calc(var(--pad) - var(--gap)); padding-right: calc(var(--pad) - var(--gap)); padding-top: 4px; }

.results.is-grid {
  display: flex;
  align-items: flex-start;
  gap: var(--gap);
}
.col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}
.tile {
  display: block;
  background: #fff;
  border-radius: var(--card-radius);
  overflow: hidden;
  padding-bottom: 10px;
}
.tile .ph { border-radius: 0; }
.tile:active .ph { opacity: .86; }
.tile .t-main, .tile .t-row { margin-left: 10px; margin-right: 10px; }
.t-main {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.is-name { font-weight: 600; }
.t-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0 8px;
  margin-top: 3px;
}
.t-row .price { font-size: 15px; }
.date { font-size: 12px; color: var(--ink3); white-space: nowrap; }

/* —— 单图列表 —— */

.results.is-list { display: block; }
.ledger-head { display: none; }
.row {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  column-gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.ledger-head + .row { border-top: 0; padding-top: 2px; }
.row:active .ph { opacity: .86; }
.row .ph { align-self: start; }
.r-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.r-main {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.r-sku { font-size: 13px; color: var(--ink2); overflow-wrap: anywhere; }
.r-sku.is-dup { display: none; }
.r-price { font-size: 16px; margin-top: 2px; }
.r-meta { font-size: 12px; color: var(--ink3); margin-top: 2px; overflow-wrap: anywhere; }
.r-cat:not(:empty)::after { content: " · "; }
.r-date { white-space: nowrap; }

/* —— 多图动态：朋友圈九宫格的节奏。先文字，再整套图按行拼成等高（原比例，不裁），最后售价和日期 —— */

.results.is-feed { display: block; }
.post { padding: 0 0 20px; }
.post + .post { border-top: 1px solid var(--line); padding-top: 20px; }
/* 只有一行名字时也要有 44px 的可点高度：用上下内边距撑开，再用负外边距收回，版面不变 */
.post-text { display: block; padding: 10px 0; margin: -10px 0; }
.p-main {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: 16px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.p-main.is-desc { -webkit-line-clamp: 6; font-size: 15px; line-height: 1.65; white-space: pre-line; }
.p-sku { display: block; font-size: 13px; color: var(--ink2); margin-top: 2px; overflow-wrap: anywhere; }
.g9 { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; }
.post > .g9:first-child { margin-top: 0; }
.g9-row { display: flex; gap: 4px; }
.g9-row.is-1 { max-width: 66%; }
.g9-row.is-1.is-tall { max-width: 46%; }
.g9-im {
  flex: calc(var(--r, 1) * 100) 1 0%;
  min-width: 0;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--fill);
}
.g9-im img { display: block; width: 100%; height: auto; }
.g9-im:active { opacity: .86; }
.p-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}
.p-row .price { font-size: 17px; }

/* —— 续载、到底、空状态 —— */

.more { display: flex; justify-content: center; padding-top: 28px; }
.more-btn {
  height: 44px;
  padding: 0 24px;
  border: 1px solid var(--ink);
  border-radius: 22px;
  font-size: 14px;
  background: #fff;
}
.more-btn:active { background: var(--fill); }
.end {
  margin: 0;
  padding-top: 30px;
  text-align: center;
  font-size: 12px;
  color: var(--ink3);
}
.empty { padding: 64px 0 40px; text-align: center; }
.empty-title { margin: 0; font-size: 16px; overflow-wrap: anywhere; }
.empty-sub { margin: 6px 0 22px; font-size: 14px; color: var(--ink2); }
.empty-sub:empty { margin-top: 0; }

/* ───────── 手机分类面板 ───────── */

.drawer { position: fixed; inset: 0; z-index: 50; }
.drawer-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .42);
  opacity: 0;
  transition: opacity .22s ease;
}
.drawer-panel:focus { outline: none; }
.drawer-panel {
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: min(80vw, 320px);
  background: #fff;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform .26s cubic-bezier(.2, .8, .2, 1);
  padding-bottom: env(safe-area-inset-bottom);
}
.drawer.is-open .drawer-mask { opacity: 1; }
.drawer.is-open .drawer-panel { transform: none; }
.drawer-head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  padding: 0 4px 0 var(--pad);
}
.drawer-title { font-size: 17px; font-weight: 600; }
.drawer-list { flex: 1; overflow-y: auto; padding: 0 0 16px; }
.cat-item {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 52px;
  padding: 0 var(--pad);
  font-size: 16px;
  text-align: left;
  color: var(--ink2);
}
.cat-item .lab {
  flex: 0 1 auto;
  min-width: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  line-height: 1.35;
  padding: 8px 0;
  overflow-wrap: anywhere;
}
.cat-item .n {
  flex: none;
  margin-left: auto;
  padding-left: 12px;
  font-size: 13px;
  color: var(--ink3);
  font-variant-numeric: tabular-nums;
}
.cat-item svg { flex: none; margin-left: 8px; visibility: hidden; }
.cat-item.is-on { color: var(--ink); font-weight: 600; }
.cat-item.is-on .n { color: var(--ink); font-weight: 400; }
.cat-item.is-on svg { visibility: visible; }
.cat-item:active { background: var(--fill); }

/* ───────── 详情页 ───────── */

.detail:focus { outline: none; }
.d-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  height: var(--bar-h);
  padding: 0 6px;
  background: #fff;
}
.back {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 44px;
  padding: 0 12px 0 6px;
  font-size: 15px;
}
.d-shop {
  position: absolute;
  left: 92px; right: 92px;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stage {
  --ar: 1;
  position: relative;
  width: 100%;
  aspect-ratio: var(--ar);
  max-height: calc(100vh - var(--bar-h) - 96px);
  max-height: calc(100svh - var(--bar-h) - 96px);
  background: #fff;
}
.track {
  display: flex;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  outline: none;
}
.track::-webkit-scrollbar { display: none; }
.slide {
  flex: none;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  scroll-snap-align: center;
  scroll-snap-stop: always;
}
.slide img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.nav {
  position: absolute;
  top: 50%;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  display: grid;
  place-items: center;
}
.nav-prev { left: 4px; }
.nav-next { right: 4px; }
.nav .disc {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  border: 1px solid var(--line);
}
.nav:active .disc { background: var(--fill); }
.counter {
  position: absolute;
  top: 10px;
  right: 12px;
  padding: 2px 9px;
  border-radius: 11px;
  background: rgba(0, 0, 0, .58);
  color: #fff;
  font-size: 12px;
  line-height: 18px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
  pointer-events: none;
}

.thumbs {
  position: relative;
  display: flex;
  gap: 8px;
  padding: 10px var(--pad) 4px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.thumbs::-webkit-scrollbar { display: none; }
.thumbs::after { content: ""; flex: none; width: 8px; }
.th {
  --tar: 1;
  flex: none;
  height: 56px;
  aspect-ratio: var(--tar);
  border-radius: 3px;
  overflow: hidden;
  background: var(--fill);
  opacity: .55;
  outline-offset: 1px;
}
.th img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.th[aria-current="true"] {
  opacity: 1;
  outline: 2px solid var(--ink);
}

.info { padding: 14px var(--pad) 64px; }
.d-name {
  margin: 0 0 6px;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.d-price { margin: 0 0 2px; font-size: 22px; line-height: 1.4; }
.d-sku { margin: 2px 0 0; font-size: 14px; color: var(--ink); overflow-wrap: anywhere; }
.d-sku .k { font-size: 13px; }
.d-desc {
  margin: 12px 0 0;
  font-size: 15px;
  line-height: 1.8;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.info > .d-desc:first-child { margin-top: 0; }
.d-date { margin: 16px 0 0; font-size: 13px; color: var(--ink3); }
.info > .d-date:first-child { margin-top: 0; }

/* ───────── 中屏（平板竖放等） ───────── */

@media (min-width: 600px) {
  :root { --gap: 10px; }
  .post { max-width: 560px; }
  .row { grid-template-columns: 132px minmax(0, 1fr); column-gap: 20px; }
}

/* ───────── 电脑：没有侧栏，分类、搜索、排版在同一条吸顶栏里 ───────── */

@media (min-width: 860px) {
  :root { --pad: 32px; --bar-h: 60px; }

  .shop, .search-btn, .search-row { display: none !important; }
  .cat-btn { display: none; max-width: 260px; margin-left: -10px; }
  .bar.is-compact .cat-btn { display: inline-flex; }
  .bar.is-compact .cat-strip { display: none; }

  .bar-row { padding: 0 var(--pad); gap: 20px; }
  .bar-name {
    display: block;
    flex: none;
    max-width: 220px;
    margin-right: 12px;
    font-size: 18px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .cat-strip {
    display: flex;
    flex: 0 0 auto;      /* 按内容的自然宽度占位，不压缩；整行放不下时由脚本切到「分类」按钮 */
    align-self: stretch;
  }
  .cat-tab {
    position: relative;
    flex: none;
    height: 100%;
    min-width: 44px;
    padding: 0 14px;
    font-size: 15px;
    color: var(--ink2);
    white-space: nowrap;
  }
  .cat-tab:first-child { margin-left: -14px; }
  .cat-tab .n {
    margin-left: 5px;
    font-size: 12px;
    color: var(--ink3);
    font-variant-numeric: tabular-nums;
  }
  .cat-tab:hover { color: var(--ink); }
  .cat-tab.is-on { color: var(--ink); font-weight: 600; }
  .cat-tab.is-on .n { font-weight: 400; }
  .cat-tab::after { bottom: 0; width: auto; left: 14px; right: 14px; margin-left: 0; }
  .cat-tab.is-on::after { opacity: 1; }

  .brand-logo { height: 30px; }
  .brand-logo.is-wide { max-width: 200px; }
  .d-shop .brand-logo.is-wide { max-width: 240px; }
  .field.field-desk { display: flex; flex: 0 1 280px; min-width: 200px; margin-left: auto; }  /* 靠右；没有分类时也不会挤到左边 */
  .field-desk .field-input { font-size: 14px; }
  .modes { margin-left: 0; margin-right: -11px; }
  .mode:hover { color: var(--ink); }
  .mode::after { bottom: 5px; }

  .main { padding-bottom: 80px; }
  .status { min-height: 48px; padding-bottom: 8px; }
  .chip-in { max-width: 320px; }

  /* 网格 */
  :root { --gap: 14px; --card-radius: 10px; }
  .main.m-grid { padding-left: calc(var(--pad) - 8px); padding-right: calc(var(--pad) - 8px); }
  .main.m-grid .status { padding-left: 8px; padding-right: 8px; padding-top: 6px; }
  .tile { padding-bottom: 14px; }
  .tile .t-main, .tile .t-row { margin-left: 14px; margin-right: 14px; }
  .t-main { margin-top: 10px; font-size: 15px; }
  .t-row { margin-top: 4px; }
  .t-row .price { font-size: 16px; }
  .tile:hover .t-main, .row:hover .r-main, .post-text:hover .p-main {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
  }

  /* 列表：电脑上排成对齐的栏，方便按货号、售价扫 */
  .ledger-head, .row {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr) 120px 110px 96px 112px;
    column-gap: 28px;
  }
  .ledger-head {
    padding: 0 0 10px;
    font-size: 12px;
    color: var(--ink3);
    border-bottom: 1px solid var(--line);
  }
  .ledger-head span:nth-child(5), .ledger-head span:nth-child(6) { text-align: right; }
  .ledger-head + .row { padding-top: 14px; }
  .row { padding: 14px 0; align-items: start; }
  .r-body, .r-meta { display: contents; }
  .r-main { grid-column: 2; grid-row: 1; -webkit-line-clamp: 3; max-width: 46em; }
  .r-main.is-skuonly { display: none; }
  .r-sku, .r-sku.is-dup { display: block; grid-column: 3; grid-row: 1; font-size: 14px; color: var(--ink); }
  .r-sku .k { display: none; }
  .r-cat { grid-column: 4; grid-row: 1; font-size: 14px; color: var(--ink2); overflow-wrap: anywhere; }
  .r-cat:not(:empty)::after { content: none; }
  .r-price { grid-column: 5; grid-row: 1; margin: 0; text-align: right; }
  .r-price.price-multi { align-items: flex-end; }   /* 两个价也跟一个价一样靠右对齐 */
  .r-date { grid-column: 6; grid-row: 1; font-size: 13px; color: var(--ink3); text-align: right; line-height: 24px; }
  .r-main, .r-sku, .r-cat { line-height: 24px; }

  /* 多图动态：左边整套图，右边紧挨着文字和售价，一眼看成一件 */
  .post {
    display: grid;
    grid-template-columns: minmax(0, 500px) minmax(0, 34em);
    grid-template-rows: auto 1fr;
    column-gap: 40px;
    padding: 0 0 30px;
    max-width: none;
  }
  .post + .post { padding-top: 30px; }
  .g9 { grid-column: 1; grid-row: 1 / span 2; margin-top: 0; max-width: none; gap: 6px; }
  .g9-row { gap: 6px; }
  .post-text { grid-column: 2; grid-row: 1; }
  .p-row { grid-column: 2; grid-row: 2; align-self: start; justify-content: flex-start; gap: 16px; margin-top: 12px; }
  .post > .p-row:nth-child(2) { grid-row: 1; margin-top: 0; }
  .p-row .price { font-size: 18px; }
  .p-main.is-desc { -webkit-line-clamp: 9; }

  /* 详情：860～1239 宽仍是上下排，内容居中限宽，图不会比手机上还小；图、小图、文字左边对齐 */
  .d-bar { padding: 0 calc(var(--pad) - 10px); }
  .back { padding: 0 14px 0 4px; }
  .back:hover span { text-decoration: underline; text-underline-offset: 3px; }
  .d-shop { font-size: 18px; left: 200px; right: 200px; }
  .d-body { max-width: 720px; margin: 0 auto; }
  .thumbs { flex-wrap: wrap; overflow: visible; padding-left: 0; padding-right: 0; }
  .th { height: 54px; }  /* 9 张横图正好排满一行，不让第 9 张单独掉下去 */
  .thumbs::after { content: none; }
  .info { padding-left: 0; padding-right: 0; }
}

/* ───────── 宽屏：详情左右分栏（小图竖排在左、大图居中、文字在右） ───────── */

@media (min-width: 1240px) {
  .d-body {
    max-width: none;
    margin: 0;
    --sh: max(360px, calc(100vh - var(--bar-h) - 48px));
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    padding: 20px var(--pad) 64px;
  }
  /* 看图框：宽度照这套图里最宽的那张给，高度照最高的那张给，都不超过一屏 */
  .stage {
    order: 2;
    flex: 0 1 calc(var(--ar-wide) * var(--sh));
    width: auto;
    min-width: 0;
    max-height: var(--sh);
  }
  .nav-prev { left: 8px; }
  .nav-next { right: 8px; }
  .nav .disc { width: 44px; height: 44px; background: #fff; }
  .nav:hover .disc { border-color: var(--ink); }
  .counter { top: auto; bottom: 12px; right: 12px; }
  .thumbs {
    order: 1;
    flex: none;
    flex-direction: column;
    flex-wrap: nowrap;
    max-height: var(--sh);
    padding: 3px;
    overflow-x: hidden;
    overflow-y: auto;
  }
  .thumbs::after { content: none; }
  .th { width: 64px; height: auto; }
  .th:hover { opacity: 1; }
  .info {
    order: 3;
    flex: 1 1 360px;
    min-width: 340px;
    max-width: 440px;
    position: sticky;
    top: calc(var(--bar-h) + 20px);
    padding: 0 0 0 28px;
  }
  .d-name { font-size: 22px; margin-bottom: 8px; }
  .d-price { font-size: 26px; }
  .d-desc { margin-top: 16px; }
  .d-date { margin-top: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0s !important;
    animation-duration: 0s !important;
    scroll-behavior: auto !important;
  }
}
