/* ============================================================
   mz-dropdown.css —— 首页「热门分类」下拉面板（2026-10-11 二次修订，对齐原站交互）
   ------------------------------------------------------------
   原站做法（见 _dev_archive/_src_pages/home.html:7053 与 indexV4.css）：
     · 结构：<em class="types-box"><span class="tag">精选分类</span>
                 <div class="types"><span class="item">…</span></div></em>
     · CSS 把 .types 设为 display:none，靠 JS 给 .types-box 加 .typeCur 才展开
     · 鼠标停在「▼ 三角」上就弹出（.tag::after 就是那个三角），面板紧跟标签下方，
       并带一个指向三角的小尖角（原站用 typesTagIcon.png 位图）
   历史问题（站方反馈「下拉图标是假的」「你搞这个是固定的」）：
     ① 我们原先没搬这段 JS → 面板永不展开（假图标）
     ② 修好后触发区仍是原站写死的 .types-box{width:95px}，
        而 ▼ 挂在文字右侧、文字宽 + 20px 内边距可能超出 95px
        → 鼠标停在三角上其实落在触发框外，看着像「点了没反应」
   本文件负责：触发区贴合内容 + 面板视觉（两列网格 + 指向三角 + 轻滚动条）。
   mz- 前缀自建类，不覆盖原站皮肤。
   ============================================================ */

/* ---------- 1. 触发区：贴合内容，保证「三角形」也在悬停范围内 ---------- */
.art-list .mark-sub-new .types-box.mz-dd-box {
  /* 绝对定位元素，改宽度不影响页面其它布局 */
  width: auto !important;
  min-width: 95px;
}
.art-list .mark-sub-new .types-box.mz-dd-box .tag {
  cursor: pointer;
  user-select: none;
  padding-right: 22px; /* 给 ▼ 留位，避免压到文字 */
}

/* ---------- 2. 展开面板 ---------- */
/* 2026-10-11 二次调整：站方要求「跟原站一样只放几个词就好」——
   模板已改回只输出 5 个一级分类（offset 0 length 5），
   故面板回归原站的「单列窄面板」形态（原站 110×260 单列），
   两列网格会给 5 项留出空位，视觉上很怪。 */
.art-list .mark-sub-new .types-box.mz-dd-box.typeCur .types {
  display: block !important;
  left: 0;
  top: 44px;   /* 紧跟标签下方（原站用 bottom:-255px，改 top 定位更稳） */
  bottom: auto;
  width: 124px;
  height: auto;
  max-height: 300px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 6px 0 8px;
  box-sizing: border-box;
  border: 1px solid #ececec;
  border-radius: 0 0 8px 8px;
  background-color: #fff;
  box-shadow: 5px 6px 14px 0 rgb(38 38 38 / 14%);
}

/* 指向 ▼ 的小三角（纯 CSS，免依赖原站位图）。
   位置靠 JS 量出标签宽度后写入 --dd-arrow-left —— 面板是 216px 两列，
   若沿用原站的 right:13px，三角会跑到面板最右端，而不是标签的 ▼ 下方。 */
.art-list .mark-sub-new .types-box.mz-dd-box.typeCur .types::before {
  content: '';
  display: block;
  position: absolute;
  top: -7px;
  right: auto;
  left: var(--dd-arrow-left, 96px);
  width: 0;
  height: 0;
  background: none !important;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 7px solid #fff;
  filter: drop-shadow(0 -1px 0 #ececec);
}

/* ---------- 3. 单个分类项 ---------- */
.art-list .mark-sub-new .types-box .types .item.mz-dd-item {
  display: block;
  height: 34px;
  line-height: 34px;
  padding: 0 14px;
  font-size: 13px;
  text-align: left;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background .15s linear, color .15s linear;
}
.art-list .mark-sub-new .types-box .types .item.mz-dd-item:hover {
  background: #fdf0f0;
  color: #ee4444;
}

/* ---------- 4. 轻量滚动条（分类多时才出现） ---------- */
.art-list .mark-sub-new .types-box.mz-dd-box.typeCur .types::-webkit-scrollbar {
  width: 6px;
}
.art-list .mark-sub-new .types-box.mz-dd-box.typeCur .types::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 3px;
}
.art-list .mark-sub-new .types-box.mz-dd-box.typeCur .types::-webkit-scrollbar-track {
  background: #f5f5f5;
}

/* ---------- 5. 键盘可达 ---------- */
.art-list .mark-sub-new .types-box.mz-dd-box .tag:focus-visible {
  outline: 2px solid #ee4444;
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- 6. 窄屏（平板 768-1023 / 用户实机约 872px） ---------- */
@media (max-width: 1023px) {
  .art-list .mark-sub-new .types-box.mz-dd-box.typeCur .types {
    width: 132px;
  }
  .art-list .mark-sub-new .types-box.mz-dd-box.typeCur .types .item.mz-dd-item {
    font-size: 12px;
  }
}

/* ============ 分类页「本分类暂无货 → 已展示上级」提示条（2026-10-11）============
   站方反馈「点分类商品不变、以为没反应」，光靠回退列表看不出来，这里明确告知。
   选择器顶到 body 级别 + !important：皮肤 CSS 有大量 body xxx 规则会静默压掉裸类名。 */
body .mz-cate-note{margin:0 0 12px;padding:9px 14px;background:#fff8f0;border:1px solid #ffe0c2;border-radius:4px;color:#a8661c;font-size:13px;line-height:20px;}
