/* =========================================================
   Template D · 紧凑列表风（密集 SKU 一览）
   白底 · 表格行 · 数字等宽 · 操作快速
   ========================================================= */

*{ box-sizing:border-box; margin:0; padding:0; }

:root{
  --d-bg:        #ffffff;
  --d-canvas:    #f8fafb;
  --d-ink:       #0f172a;
  --d-ink-soft:  #475569;
  --d-muted:     #94a3b8;
  --d-line:      #e2e8f0;
  --d-line-soft: #f1f5f9;
  --d-row-hover: #f8fafc;
}

html,body{
  background: var(--d-bg);
  color: var(--d-ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a{ color:inherit; text-decoration:none; }
button{ font: inherit; cursor: pointer; }
img{ display: block; max-width: 100%; }

/* ─── Header ─── */
.tnd-header{
  background: #fff;
  border-bottom: 1px solid var(--d-line);
  position: sticky; top: 0; z-index: 100;
}
.tnd-header-inner{
  max-width: 1320px; margin: 0 auto;
  padding: 12px 24px;
  display: flex; align-items: center; gap: 18px;
}
.tnd-logo{
  font-size: 15px; font-weight: 700; color: var(--d-ink);
  letter-spacing: -.01em; flex-shrink: 0;
  display: flex; align-items: center; gap: 8px;
}
.tnd-logo .dot{
  width: 8px; height: 8px; background: var(--d-accent);
  border-radius: 2px;
}

.tnd-search{
  flex: 1; max-width: 420px;
  display: flex; align-items: center; gap: 8px;
  background: var(--d-canvas);
  border: 1px solid var(--d-line);
  border-radius: 6px;
  padding: 7px 12px;
  transition: background .15s, border-color .15s;
}
.tnd-search:focus-within{ background: #fff; border-color: var(--d-accent); }
.tnd-search svg{ width: 13px; height: 13px; color: var(--d-muted); flex-shrink: 0; }
.tnd-search input{
  flex: 1; background: transparent; border: 0; outline: none;
  font-size: 13px; color: var(--d-ink); min-width: 0;
}
.tnd-search input::placeholder{ color: var(--d-muted); }

.tnd-nav{
  margin-left: auto;
  display: flex; gap: 4px; align-items: center;
}
.tnd-nav a, .tnd-nav button.linklike{
  padding: 7px 12px; font-size: 13px; color: var(--d-ink-soft);
  border-radius: 5px; transition: background .15s, color .15s;
  background: transparent; border: 0;
}
.tnd-nav a:hover, .tnd-nav button.linklike:hover{
  background: var(--d-line-soft); color: var(--d-ink);
}
.tnd-nav .btn-primary{
  background: var(--d-accent); color: #fff;
  font-weight: 500;
}
.tnd-nav .btn-primary:hover{ background: var(--d-accent); opacity: .9; color: #fff; }

/* ─── Toolbar：分类下拉 + 计数 + 排序 ─── */
.tnd-toolbar{
  max-width: 1320px; margin: 0 auto;
  padding: 18px 24px 12px;
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap;
}
.tnd-tools-left{
  display: flex; gap: 10px; align-items: center;
}
.tnd-pill{
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; background: var(--d-canvas);
  border: 1px solid var(--d-line); border-radius: 999px;
  font-size: 12px; color: var(--d-ink-soft);
  cursor: pointer; transition: all .15s;
}
.tnd-pill:hover{ border-color: var(--d-ink); color: var(--d-ink); }
.tnd-pill.active{ background: var(--d-ink); color: #fff; border-color: var(--d-ink); }
.tnd-pill .count{
  font-size: 11px; opacity: .65; padding: 0 4px;
  background: rgba(0,0,0,.06); border-radius: 999px;
}
.tnd-pill.active .count{ background: rgba(255,255,255,.16); }

.tnd-stats{
  font-size: 12px; color: var(--d-muted);
  margin-left: auto;
  display: flex; align-items: center; gap: 8px;
}
.tnd-stats select{
  border: 1px solid var(--d-line); background: #fff;
  padding: 5px 8px; border-radius: 5px;
  font-size: 12px; color: var(--d-ink); outline: none;
  cursor: pointer;
}
.tnd-stats .clear{ color: var(--d-accent); font-weight: 500; }

/* ─── Shell: 左侧栏 + 右侧主 ─── */
.tnd-shell{
  max-width: 1320px; margin: 0 auto;
  padding: 12px 24px 0;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 22px;
  align-items: start;
}
.tnd-shell > .tnd-cats-wrap{ display: none; }   /* 桌面端：横滑 pill 隐藏 */
.tnd-shell > .tnd-main{ min-width: 0; }
.tnd-shell > .tnd-main .tnd-toolbar,
.tnd-shell > .tnd-main .tnd-table-wrap{ max-width: none; padding-left: 0; padding-right: 0; margin: 0; }

/* 左侧栏 */
.tnd-sidebar{
  background: #fff; border: 1px solid var(--d-line);
  border-radius: 10px;
  padding: 6px 0;
  position: sticky; top: 72px;
}
.tnd-side-head{
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px 10px;
  font-size: 11px; font-weight: 700;
  color: var(--d-muted);
  text-transform: uppercase; letter-spacing: .08em;
  border-bottom: 1px solid var(--d-line-soft);
  margin-bottom: 4px;
}
.tnd-side-head svg{ color: var(--d-ink-soft); }

.tnd-side-nav{
  display: flex; flex-direction: column;
  max-height: calc(100vh - 180px); overflow-y: auto;
  scrollbar-width: thin;
}
.tnd-side-nav::-webkit-scrollbar{ width: 4px; }
.tnd-side-nav::-webkit-scrollbar-thumb{ background: var(--d-line); border-radius: 2px; }

.tnd-side-item{
  --pill-tint: var(--d-ink);
  position: relative;
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px 9px 18px;
  font-size: 13px; color: var(--d-ink-soft);
  font-weight: 500;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: background .15s, color .15s, border-left-color .15s;
}
.tnd-side-item:hover{ background: var(--d-canvas); color: var(--d-ink); }
.tnd-side-item.active{
  background: color-mix(in srgb, var(--pill-tint) 8%, transparent);
  color: var(--pill-tint);
  font-weight: 600;
  border-left-color: var(--pill-tint);
}
.tnd-side-item .ic{
  width: 18px; height: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.tnd-side-item .ic svg{ width: 16px; height: 16px; }
.tnd-side-item.active .ic{ color: var(--pill-tint) !important; }
.tnd-side-item .nm{
  flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tnd-side-item .count{
  font-size: 11px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-weight: 600;
  padding: 1px 7px;
  background: var(--d-canvas);
  color: var(--d-muted);
  border-radius: 999px;
  letter-spacing: -.02em;
  flex-shrink: 0;
}
.tnd-side-item.active .count{
  background: color-mix(in srgb, var(--pill-tint) 18%, transparent);
  color: var(--pill-tint);
}
.tnd-side-item.active .ic.ic-all{ color: var(--pill-tint) !important; }

/* ─── 移动端 横滑 pill（保留） ─── */
.tnd-cats-wrap{
  max-width: 1320px; margin: 0 auto;
  padding: 4px 24px 14px;
  position: relative;
}
.tnd-cats{
  display: flex; gap: 8px; flex-wrap: wrap;
}
.tnd-cats::-webkit-scrollbar{ display: none; }
.tnd-cats .tnd-pill{ flex-shrink: 0; }

/* 重写 pill：更精致、带 icon、hover 上浮、active 用品牌色 */
.tnd-pill{
  position: relative;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px 7px 10px;
  background: #fff;
  border: 1px solid var(--d-line);
  border-radius: 999px;
  font-size: 12.5px; color: var(--d-ink); font-weight: 500;
  text-decoration: none;
  transition: transform .15s cubic-bezier(.2,.7,.3,1), box-shadow .18s, border-color .15s, background .15s;
  --pill-tint: var(--d-ink);
}
.tnd-pill:hover{
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--pill-tint) 35%, var(--d-line));
  box-shadow: 0 4px 12px color-mix(in srgb, var(--pill-tint) 14%, transparent);
}
.tnd-pill:active{ transform: translateY(0); }
.tnd-pill.active{
  background: var(--pill-tint);
  border-color: var(--pill-tint);
  color: #fff;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--pill-tint) 28%, transparent);
}
.tnd-pill .ic{
  width: 18px; height: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: transform .2s;
}
.tnd-pill .ic svg{ width: 14px; height: 14px; }
.tnd-pill:hover .ic{ transform: scale(1.1) rotate(-3deg); }
.tnd-pill.active .ic{ color: #fff !important; }
.tnd-pill .ic.ic-all{ color: var(--d-ink-soft); }
.tnd-pill.active .ic.ic-all{ color: #fff; }
.tnd-pill .nm{ white-space: nowrap; }
.tnd-pill .count{
  font-size: 11px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-weight: 600;
  padding: 1px 7px;
  background: var(--d-canvas);
  color: var(--d-muted);
  border-radius: 999px;
  letter-spacing: -.02em;
}
.tnd-pill.active .count{
  background: rgba(255,255,255,.22);
  color: #fff;
}

/* "全部" pill 专属：稍粗的字体强调主入口 */
.tnd-pill[data-pill="all"]{ --pill-tint: var(--d-ink); font-weight: 600; }
.tnd-pill[data-pill="all"]:not(.active){ background: var(--d-canvas); }

/* 桌面端：隐藏分类按钮和遮罩 */
.tnd-cat-toggle{ display: none; }
.tnd-cat-backdrop{ display: none; }

/* 移动端：sidebar 改成抽屉；按钮触发；横滑 pill 隐藏 */
@media (max-width: 960px){
  .tnd-shell{ display: block; padding: 0; }
  .tnd-shell > .tnd-cats-wrap{ display: none; } /* 老的横滑 pill 不再用 */

  /* 分类按钮（在 toolbar 里）显示 */
  .tnd-cat-toggle{
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--d-canvas);
    border: 1px solid var(--d-line); border-radius: 6px;
    padding: 7px 12px; font-size: 13px;
    color: var(--d-ink); font-weight: 500;
    cursor: pointer;
  }
  .tnd-cat-toggle:hover{ background: var(--d-line-soft); }
  .tnd-cat-toggle svg{ color: var(--d-ink-soft); }

  /* sidebar 改抽屉：默认隐藏 + transform 滑入
     ⚠ 用 !important 是因为 reseller-airy.css 用 !important 把 sidebar 设为半透明背景，
     必须强制覆盖，否则抽屉滑出后看起来是透明的（"没样式"） */
  .tnd-shell > .tnd-sidebar{
    display: block !important;
    position: fixed !important;
    top: 0 !important; left: 0 !important; bottom: 0 !important;
    width: 280px !important; max-width: 85vw !important;
    height: 100vh !important;
    z-index: 9999 !important;
    transform: translateX(-100%);
    transition: transform .25s ease;
    background: #fff !important;
    border: 0 !important;
    border-right: 1px solid var(--d-line) !important;
    border-radius: 0 !important;
    box-shadow: 8px 0 30px rgba(0,0,0,.15) !important;
    overflow-y: auto;
    padding: 12px 0 !important;
  }
  .tnd-shell > .tnd-sidebar.open{ transform: translateX(0); }

  /* 抽屉内菜单：占满高度 + 强制覆盖 airy.css 的 padding/border */
  .tnd-side-nav{ max-height: none !important; padding: 0 !important; }
  .tnd-side-head{
    padding: 16px 16px 12px !important;
    border-bottom: 1px solid rgba(15,23,42,.08) !important;
    background: #fafbfc;
  }
  .tnd-side-item{
    padding: 12px 16px 12px 18px !important;
    font-size: 14px !important;
  }
  .tnd-side-item .ic{ width: 18px; height: 18px; }
  .tnd-side-item .count{ font-size: 11px; }

  /* backdrop 遮罩 */
  .tnd-cat-backdrop{
    display: block;
    position: fixed; inset: 0;
    background: rgba(15,23,42,.45);
    z-index: 9998;
    opacity: 0; visibility: hidden;
    transition: opacity .2s ease, visibility 0s linear .2s;
  }
  .tnd-cat-backdrop.show{
    opacity: 1; visibility: visible;
    transition: opacity .2s ease, visibility 0s;
  }
}
@media (max-width: 760px){
  .tnd-cats-wrap{ padding: 0 0 8px; }
  .tnd-cats{
    flex-wrap: nowrap; overflow-x: auto; gap: 6px;
    padding: 0 16px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }
  .tnd-pill{ scroll-snap-align: start; }
}

/* ─── Table ─── */
.tnd-table-wrap{
  max-width: 1320px; margin: 0 auto;
  padding: 0 24px 32px;
}
/* table 容器（外层 div）负责圆角和裁剪，table 本身保持纯 table 渲染避免列宽错乱 */
.tnd-table-card{
  background: #fff; border: 1px solid var(--d-line);
  border-radius: 10px; overflow: hidden;
}
.tnd-table{
  width: 100%; border-collapse: separate; border-spacing: 0;
  background: #fff;
}
/* 防御性：禁止 table 内部任何元素被 transform/will-change 干扰列宽算法 */
.tnd-table, .tnd-table thead, .tnd-table tbody, .tnd-table tr, .tnd-table th, .tnd-table td{
  transform: none !important;
  will-change: auto !important;
}
.tnd-table thead{
  background: var(--d-canvas);
}
.tnd-table th{
  padding: 11px 14px;
  font-size: 11px; font-weight: 600; color: var(--d-muted);
  text-align: left; text-transform: uppercase; letter-spacing: .06em;
  border-bottom: 1px solid var(--d-line);
  white-space: nowrap;
}
.tnd-table th.right{ text-align: right; }
.tnd-table th.center{ text-align: center; }

.tnd-table tbody tr{
  border-bottom: 1px solid var(--d-line-soft);
  transition: background .12s;
  cursor: pointer;
}
.tnd-table tbody tr:hover{ background: var(--d-row-hover); }
.tnd-table tbody tr:last-child{ border-bottom: 0; }

.tnd-table td{
  padding: 12px 14px; vertical-align: middle;
  font-size: 13px; color: var(--d-ink);
}

.tnd-table td.tnd-row-product{ min-width: 320px; }
.tnd-cell-product{
  display: flex; align-items: center; gap: 12px;
}
.tnd-thumb{
  width: 44px; height: 44px;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border: 1px solid var(--d-line); border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0;
}
.tnd-thumb img{ width: 100%; height: 100%; object-fit: cover; }
.tnd-thumb .glyph{ font-size: 18px; font-weight: 800; color: var(--d-muted); }

.tnd-cell-name{
  display: flex; flex-direction: column; gap: 2px;
  min-width: 0;
}
.tnd-cell-name .nm{
  font-size: 13px; color: var(--d-ink); font-weight: 500;
  white-space: normal;
  word-break: break-word;
  line-height: 1.45;
}
.tnd-cell-name .meta{
  font-size: 11px; color: var(--d-muted);
}
.tnd-cell-name .meta .tag{
  display: inline-block; padding: 1px 6px;
  background: var(--d-line-soft); border-radius: 3px;
  margin-right: 6px; font-size: 10px; color: var(--d-ink-soft);
}

.tnd-cell-cat{
  font-size: 12px; color: var(--d-ink-soft);
  white-space: nowrap;
}

.tnd-cell-stock{
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px; color: var(--d-ink-soft);
  white-space: nowrap;
}
.tnd-cell-stock.low{ color: #dc2626; font-weight: 600; }

.tnd-cell-sku{
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px; color: var(--d-muted);
}

.tnd-cell-price{
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 14px; font-weight: 700; color: var(--d-ink);
  text-align: right; white-space: nowrap;
  letter-spacing: -.01em;
}
.tnd-cell-price .cur{ font-size: 11px; color: var(--d-muted); margin-right: 1px; font-weight: 500; }

.tnd-cell-action{
  text-align: right; white-space: nowrap;
}
.tnd-buy-btn{
  background: var(--d-ink); color: #fff; border: 0;
  padding: 6px 14px; font-size: 12px; font-weight: 500;
  border-radius: 5px; transition: background .15s, opacity .15s;
}
.tnd-buy-btn:hover{ background: var(--d-accent); }

/* ─── Empty ─── */
.tnd-empty{
  background: #fff; border: 1px solid var(--d-line); border-radius: 10px;
  padding: 80px 24px; text-align: center; color: var(--d-muted);
}
.tnd-empty .glyph{ font-size: 36px; opacity: .35; margin-bottom: 12px; }
.tnd-empty .text{ font-size: 13px; margin-bottom: 12px; }
.tnd-empty a{ color: var(--d-accent); font-weight: 500; }

/* ─── Footer ─── */
.tnd-footer{
  border-top: 1px solid var(--d-line);
  background: #fff;
}
.tnd-footer-inner{
  max-width: 1320px; margin: 0 auto;
  padding: 24px;
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  font-size: 12px; color: var(--d-muted);
}
.tnd-footer a{ color: var(--d-ink-soft); margin-right: 14px; }
.tnd-footer a:hover{ color: var(--d-accent); }

/* ─── Mobile 合并 meta（桌面端隐藏）─── */
.tnd-mob-meta{ display: none; }

/* ─── Mobile：桌面表格转卡片（满宽贴边）─── */
@media (max-width: 760px){
  /* 移动端外框透明，让 tr 卡片成为视觉单位 */
  .tnd-table-card{ background: transparent; border: 0; border-radius: 0; overflow: visible; }
  .tnd-table thead, .tnd-table colgroup{ display: none; }
  .tnd-table, .tnd-table tbody{ display: block; width: 100%; }

  /* 外层 padding 在满宽模式下取消左右 */
  .tnd-table-wrap{ padding: 0 0 24px !important; }

  .tnd-table{ border: 0; background: transparent; border-radius: 0; }
  .tnd-table tbody tr{
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "product product"
      "price action";
    column-gap: 10px; row-gap: 10px;
    background: #fff;
    border: 0; border-bottom: 1px solid var(--d-line);
    border-radius: 0;
    margin-bottom: 0; padding: 14px 16px;
    cursor: pointer;
  }
  .tnd-table tbody tr:active{ background: var(--d-row-hover); }
  /* 桌面端单独的 meta td 在 mobile 下隐藏（已被 .tnd-mob-meta 取代）*/
  .tnd-table td.tnd-d-only{ display: none; }

  .tnd-table td{
    display: block; padding: 0; border-bottom: 0 !important;
  }
  .tnd-table td.tnd-row-product{
    grid-area: product;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--d-line-soft) !important;
  }
  .tnd-table td.tnd-cell-price{
    grid-area: price;
    text-align: left; font-size: 16px;
    align-self: center;
  }
  .tnd-table td.tnd-cell-action{
    grid-area: action;
    text-align: right;
  }

  .tnd-cell-name .nm{ max-width: none; white-space: normal; font-size: 14px; line-height: 1.4; margin-bottom: 3px; }
  .tnd-cell-product{ gap: 10px; }
  .tnd-thumb{ width: 48px; height: 48px; }

  .tnd-mob-meta{
    display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px;
    font-size: 11px; color: var(--d-muted);
    font-family: 'JetBrains Mono', ui-monospace, monospace;
  }
  .tnd-mob-meta .low{ color: #dc2626; font-weight: 600; }

  .tnd-buy-btn{ padding: 7px 16px; font-size: 12px; }
}

/* ===========================================================
   Detail page · D 模板的详情页（与列表风一致：紧凑、专业感）
   =========================================================== */
.tnd-detail{
  max-width: 1100px; margin: 0 auto; padding: 24px;
}
.tnd-detail-crumbs{
  font-size: 12px; color: var(--d-muted); margin-bottom: 16px;
  display: flex; align-items: center; gap: 6px;
}
.tnd-detail-crumbs a{ color: var(--d-ink-soft); }
.tnd-detail-crumbs a:hover{ color: var(--d-accent); }
.tnd-detail-crumbs .sep{ color: var(--d-muted); }
.tnd-detail-crumbs .curr{ color: var(--d-ink); font-weight: 500; }

.tnd-detail-card{
  background: #fff; border: 1px solid var(--d-line); border-radius: 10px;
  display: grid; grid-template-columns: 220px 1fr 280px;
  overflow: hidden;
}
@media (max-width: 900px){
  .tnd-detail-card{ grid-template-columns: 1fr; }
}

.tnd-detail-image{
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  border-right: 1px solid var(--d-line);
}
.tnd-detail-image img{ width:100%; height:100%; object-fit: cover; }
.tnd-detail-image .glyph{ font-size: 80px; color: #cbd5e1; font-weight: 800; }
.tnd-detail-flag{
  position: absolute; top: 12px; left: 12px;
  background: var(--d-ink); color: #fff;
  font-size: 11px; padding: 3px 8px; border-radius: 4px; font-weight: 500;
}
.tnd-detail-flag.flag-low{ background: #dc2626; }

.tnd-detail-meta{
  padding: 22px 24px;
  display: flex; flex-direction: column; gap: 12px;
  border-right: 1px solid var(--d-line);
}
@media (max-width: 900px){
  .tnd-detail-meta{ border-right: 0; border-bottom: 1px solid var(--d-line); }
  .tnd-detail-image{ border-right: 0; border-bottom: 1px solid var(--d-line); }
}
.tnd-detail-cat{
  font-size: 11px; color: var(--d-muted);
  text-transform: uppercase; letter-spacing: .06em;
}
.tnd-detail-meta h1{
  font-size: 20px; font-weight: 700; color: var(--d-ink);
  line-height: 1.35;
}
.tnd-meta-grid{
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px;
  background: var(--d-line); border: 1px solid var(--d-line); border-radius: 6px;
  margin-top: 6px;
}
.tnd-meta-cell{
  background: #fff; padding: 10px 14px;
  display: flex; flex-direction: column; gap: 2px;
}
.tnd-meta-cell .k{ font-size: 11px; color: var(--d-muted); }
.tnd-meta-cell .v{ font-size: 13px; color: var(--d-ink); font-weight: 500; }

.tnd-detail-buy{
  padding: 22px 24px; background: var(--d-canvas);
  display: flex; flex-direction: column; gap: 12px;
}
.tnd-buy-price{
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 28px; font-weight: 800; color: var(--d-ink);
  letter-spacing: -.01em; line-height: 1;
}
.tnd-buy-price .cur{ font-size: 14px; color: var(--d-muted); margin-right: 3px; font-weight: 500; }
.tnd-buy-stock{ font-size: 12px; color: var(--d-muted); }
.tnd-buy-qty{
  display: flex; gap: 8px; align-items: center;
}
.tnd-qty{
  display: flex; border: 1px solid var(--d-line); border-radius: 5px;
  background: #fff; overflow: hidden;
}
.tnd-qty button{
  width: 30px; height: 32px; background: transparent; border: 0;
  font-size: 14px; color: var(--d-ink-soft);
}
.tnd-qty button:hover{ background: var(--d-line-soft); color: var(--d-ink); }
.tnd-qty input{
  width: 44px; text-align: center; border: 0; outline: none;
  font-size: 12px; font-weight: 600;
  border-left: 1px solid var(--d-line); border-right: 1px solid var(--d-line);
  font-family: 'JetBrains Mono', monospace;
}
.tnd-buy-btn-lg{
  background: var(--d-ink); color: #fff; border: 0;
  padding: 11px; font-size: 13px; font-weight: 600;
  border-radius: 6px; transition: background .15s;
}
.tnd-buy-btn-lg:hover{ background: var(--d-accent); }
.tnd-buy-btn-lg.ghost{
  background: #fff; color: var(--d-ink); border: 1px solid var(--d-line);
}
.tnd-buy-btn-lg.ghost:hover{ border-color: var(--d-ink); background: var(--d-canvas); }

.tnd-section{
  margin-top: 18px;
  background: #fff; border: 1px solid var(--d-line); border-radius: 10px;
  padding: 22px 24px;
}
.tnd-section h3{
  font-size: 13px; font-weight: 600; color: var(--d-ink);
  margin-bottom: 10px; padding-bottom: 8px;
  border-bottom: 1px solid var(--d-line-soft);
}
.tnd-section p{
  font-size: 13px; color: var(--d-ink-soft); line-height: 1.7;
  margin-bottom: 8px;
}
.tnd-section ul{
  list-style: none; padding: 0;
  display: grid; gap: 4px;
}
.tnd-section li{
  position: relative; padding: 4px 0 4px 20px;
  font-size: 12px; color: var(--d-ink-soft);
}
.tnd-section li::before{
  content: '✓'; position: absolute; left: 0; top: 4px;
  color: var(--d-accent); font-weight: 700; font-size: 11px;
}

/* Polish & focus */
::selection{ background: rgba(15,23,42,.16); color: var(--d-ink); }
button, a{ -webkit-tap-highlight-color: transparent; }
.tnd-search:focus-within, select:focus, .tnd-buy-btn:focus-visible{
  outline: 2px solid rgba(15,23,42,.3); outline-offset: 1px;
}
.tnd-table tbody tr{ will-change: background; }

/* 注：原本桌面端用 sticky thead 固定，但 sticky 应用在 <th> 上配合外层 overflow:hidden 容器，
   会让 thead 列宽算法异常（thead 整体塌缩到左侧）。直接去掉 sticky，保留普通滚动。 */

@media (max-width: 760px){
  .tnd-header-inner{ padding: 10px 16px; gap: 12px; }
  .tnd-search{ display: none; }
  .tnd-cats{ padding: 0 16px 8px; }
  .tnd-toolbar{ padding: 14px 16px 10px; gap: 8px; }
  .tnd-stats{ font-size: 11px; gap: 6px; }
  .tnd-table-wrap{ padding: 0 16px 24px; }
  .tnd-detail{ padding: 16px; }
  .tnd-detail-card{ grid-template-columns: 1fr; }
  .tnd-detail-meta h1{ font-size: 18px; }
  .tnd-buy-price{ font-size: 24px !important; }
  .tnd-section{ padding: 18px 16px; }
}
