/* WOLKENTAKT · 商品归档的布局、导航与筛选。 */

/* 1. 归档页头 */
.wt-archive-head {
  padding-block: 40px 8px;
}

.wt-breadcrumb {
  font-size: 0.8125rem;
  color: var(--wt-text-muted);
  margin-bottom: 16px;
}

.wt-breadcrumb a {
  color: var(--wt-text-muted);
  text-decoration: none;
}

.wt-breadcrumb a:hover { color: var(--wt-link-blue); }

.wt-crumb-sep {
  margin: 0 6px;
  color: var(--wt-border);
}

.wt-archive-title {
  font-family: var(--wt-font-display);
  font-size: clamp(1.75rem, 2.8vw, 2.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--wt-carbon);
  margin: 0 0 10px;
}

/* 2. 分类 / 品牌页签 */
/* 三组导航：Produkttyp / Marke / Zugzahl（口数分类上线后由 8 个涨到 15 个，
   组内换行会让移动端首屏被挤爆 → 标签内联在左 + 组内横滑，首屏高度恒定） */
.wt-pill-tabs--archive {
  display: flex;
  flex-direction: column;
  /* 覆盖 components/tabs.css 的 align-items:center —— 否则三组会塌缩为 min-content，
     组内胶囊被压成竖排（实测 1440 下导航高 968px）。 */
  align-items: stretch;
  gap: 10px;
  margin-block: 24px 8px;
}

.wt-pill-group,
.wt-filter-group {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  align-items: center;
  width: 100%;
  gap: 10px;
}

.wt-pill-group__label,
.wt-filter-group__label {
  grid-column: 1;
  grid-row: 1;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1.2;
  color: var(--wt-text-muted);
}

/* wpautop 会在标签与容器之间注入空 <p>，会占掉一整列网格 → 隐藏 */
.wt-pill-tabs--archive > p,
.wt-pill-group > p {
  display: none;
}

.wt-pill-group__items,
.wt-filter-group__items {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
}

.wt-pill-tabs--archive .wt-pill-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-height: 40px;
  padding: 0 20px;
  border-radius: var(--wt-radius-pill);
  background: var(--wt-surface-subtle);
  color: var(--wt-carbon);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.wt-pill-tabs--archive .wt-pill-tab:hover {
  background: #E8EAEE;
  color: var(--wt-carbon);
}

.wt-pill-tabs--archive .wt-pill-tab.is-active {
  background: var(--wt-carbon);
  color: #FFFFFF;
  font-weight: 600;
}

/* 3. 工具条：结果数 + 排序 */
.wt-archive-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-block: 12px 20px;
  border-bottom: 1px solid var(--wt-border);
  margin-bottom: 24px;
}

.wt-archive-count {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--wt-text-secondary);
}

/* 排序下拉：把 WooCommerce 的表单收成单行，去掉 <br> 造成的行盒 */
.wt-archive-sort,
.wt-archive-sort form.woocommerce-ordering {
  display: flex;
  align-items: center;
  margin: 0;
}

.wt-archive-sort form.woocommerce-ordering br {
  display: none;
}

.wt-archive-sort select,
.woocommerce-ordering select {
  display: block;
  height: 40px;
  min-width: 220px;
  padding: 0 10px;
  border-radius: var(--wt-radius-control);
  border: 1px solid var(--wt-border);
  background: #FFFFFF;
  color: var(--wt-carbon);
  font-size: 0.875rem;
}

.woocommerce-notices-wrapper:empty {
  display: none;
}

/* 信任条：与首页同款度量（首页规则在 home-parts-1.css 的 .wt-home 作用域内） */
.wt-archive-trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 36px;
  list-style: none;
  margin: 0 0 28px;
  padding: 14px 0;
  border-block: 1px solid var(--wt-border);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--wt-carbon);
}

.wt-archive-trust li { display: inline-flex; align-items: center; gap: 7px; }
.wt-archive-trust li::before { content: "✓"; color: var(--wt-link-blue); font-weight: 700; }

/* 结果区布局：桌面 = 左侧栏筛选 + 右侧商品列表；移动端单列（筛选折叠） */
#wt-filter-shell { position: relative; }
#wt-filter-shell[aria-busy="true"] { opacity: 0.6; transition: opacity 0.15s ease; }
.wt-shop-layout { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 28px; align-items: start; }
.wt-filterbar-wrap { position: sticky; top: 88px; }
/* 侧栏内的筛选：标签在上、选项竖向排列（胶囊列宽 236px 放不下长名称） */
.wt-filterbar-wrap .wt-filterbar__body { padding: 14px 14px 16px; gap: 14px; }
.wt-filterbar-wrap .wt-filter-group { display: flex; flex-direction: column; gap: 7px; text-align: left; }
.wt-filterbar-wrap .wt-filter-group__items { flex-direction: column; align-items: stretch; gap: 5px; }
.wt-filterbar-wrap .wt-filter-opt {
  justify-content: flex-start; width: 100%; min-height: 32px;
  padding: 5px 12px; white-space: normal; text-align: left; line-height: 1.25;
}
.wt-filterbar-wrap .wt-filterbar__toggle { display: none; }

.wt-category-choice { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; margin:28px 0; }
.wt-category-choice a { display:flex; flex-direction:column; gap:6px; padding:18px; border:1px solid var(--wt-border); border-radius:var(--wt-radius-card); background:var(--wt-surface-subtle); color:var(--wt-carbon); text-decoration:none; }
.wt-category-choice strong { font-size:1rem; }
.wt-category-choice span { color:var(--wt-text-secondary); font-size:.8125rem; line-height:1.5; }
.wt-category-choice a:hover { border-color:var(--wt-carbon); }

/* 3b. 筛选栏（/shop/）：Produkttyp / Marke（单选）/ Zugzahl；点击局部刷新 */
.wt-filterbar { margin-bottom: 24px; }

.wt-filterbar__toggle { display: none; }

.wt-filterbar__body {
  display: flex; flex-direction: column; gap: 10px;
  padding: 16px 18px; border-radius: var(--wt-radius-card); background: var(--wt-surface-subtle);
}

.wt-filterbar__head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-size: 0.8125rem; color: var(--wt-text-secondary);
}

.wt-filterbar__reset { font-weight: 600; color: var(--wt-link-blue); text-decoration: none; }

.wt-filterbar__badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; margin-left: 6px; padding: 0 5px;
  border-radius: 9999px; background: var(--wt-carbon); color: #FFFFFF;
  font-size: 0.6875rem; font-weight: 700;
}

.wt-filter-opt {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 14px;
  border: 1px solid var(--wt-border);
  border-radius: var(--wt-radius-pill);
  background: #FFFFFF;
  color: var(--wt-carbon);
  font-size: 0.8125rem;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.wt-filter-opt:hover { border-color: var(--wt-carbon); }

.wt-filter-opt.is-active {
  background: var(--wt-carbon);
  border-color: var(--wt-carbon);
  color: #FFFFFF;
  font-weight: 600;
}

/* 4. 分页 */
.wt-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 40px 0 16px;
}

.wt-pagination .wt-page {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 38px; height: 38px; padding: 0 10px;
  border-radius: var(--wt-radius-sm); background: var(--wt-surface-subtle);
  color: var(--wt-carbon); font-size: 0.875rem; font-weight: 600; text-decoration: none;
}

.wt-pagination .wt-page:hover {
  background: #E8EAEE;
  color: var(--wt-carbon);
}

.wt-pagination .wt-page.is-current {
  background: var(--wt-carbon);
  color: #FFFFFF;
}

/* 5. 内容区块（列表之后）——只补归档页需要的安全规则 */
/* 长型号名（如 “VapSolo Quads 80K – 4 in 1 Vape”）不得撑破表格或卡片 */
.wt-sec-compare__table {
  overflow-wrap: anywhere;
}

/* 6. 响应式 */

/* 平板：页签与工具条都还放得下，仅压缩留白 */
@media (max-width: 1024px) {
  .wt-archive-head {
    padding-block: 32px 8px;
  }
}

/* 移动端：工具条改为上下两段（结果数在上，排序下拉整行在下） */
@media (max-width: 640px) {
  .wt-archive-head {
    padding-block: 24px 4px;
  }

  .wt-pill-tabs--archive {
    gap: 8px;
    margin-block: 16px 4px;
  }

  /* 移动端：组内单行横滑（不换行），首屏高度不随分类/筛选数量增长 */
  .wt-pill-group,
  .wt-filter-group {
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 8px;
  }

  .wt-pill-group__items,
  .wt-filter-group__items {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }

  .wt-pill-group__items::-webkit-scrollbar,
  .wt-filter-group__items::-webkit-scrollbar {
    display: none;
  }

  .wt-pill-tabs--archive .wt-pill-tab,
  .wt-filter-opt {
    flex: 0 0 auto;
  }

  .wt-pill-tabs--archive .wt-pill-tab {
    min-height: 36px;
    padding: 0 14px;
    font-size: 0.875rem;
  }

  /* 筛选条折叠：默认收起，点 Filter 展开（有生效筛选时默认展开） */
  .wt-filterbar__toggle {
    display: inline-flex;
    align-items: center;
    height: 38px;
    padding: 0 16px;
    border: 1px solid var(--wt-border);
    border-radius: var(--wt-radius-pill);
    background: #FFFFFF;
    color: var(--wt-carbon);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
  }

  .wt-shop-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }

  .wt-filterbar-wrap { position: static; }

  .wt-category-choice { grid-template-columns:1fr; margin:20px 0; }

  .wt-filterbar__body {
    display: none;
    margin-top: 10px;
    padding: 14px;
    gap: 12px;
  }

  .wt-filterbar.is-open .wt-filterbar__body {
    display: flex;
  }

  .wt-archive-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding-block: 10px 16px;
    margin-bottom: 20px;
  }

  .wt-archive-count {
    font-size: 0.8125rem;
  }

  .wt-archive-sort,
  .wt-archive-sort form.woocommerce-ordering,
  .wt-archive-sort select,
  .woocommerce-ordering select {
    width: 100%;
    min-width: 0;
  }

  /* 对比表纵向卡片：型号名作为卡片标题提升一级（主体规则在 components/sections.css） */
  .wt-sec-compare__table th[scope="row"] {
    font-size: 1rem;
    font-weight: 800;
  }

  .wt-pagination {
    margin-top: 32px;
  }
}

/* ===== Archive trust strip as cards (brand + category), matches homepage ===== */
.wt-archive-trust {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 24px !important;
  max-width: 1200px;
  margin: 56px auto 48px !important;
  padding: 0 24px !important;
  border: 0 !important;
  list-style: none;
}
.wt-archive-trust > li {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 168px;
  padding: 30px 20px !important;
  border: 0 !important;
  border-radius: 20px !important;
  background: #f6f7f9 !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  line-height: 1.45;
  text-align: center;
  color: #101419 !important;
  transition: background-color 200ms ease, transform 200ms ease;
}
.wt-archive-trust > li:hover {
  background: #eff1f4 !important;
  transform: translateY(-2px);
}
.wt-archive-trust > li::before {
  content: "" !important;
  display: block;
  width: 48px;
  height: 48px;
  margin: 0 !important;
  border-radius: 50%;
  background-color: #fff;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 22px 22px;
  box-shadow: inset 0 0 0 1px #e3e6ea, 0 2px 6px rgba(16, 20, 25, 0.05);
}
/* 1 Originalware -> shield check */
.wt-archive-trust > li:nth-child(1)::before {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23101419' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2.8 20 6v6.2c0 5-3.6 8.2-8 9.2-4.4-1-8-4.2-8-9.2V6l8-3.2Z'/%3E%3Cpath d='M8.8 12.2l2.2 2.2 4.2-4.4'/%3E%3C/svg%3E");
}
/* 2 Versand aus Deutschland -> truck */
.wt-archive-trust > li:nth-child(2)::before {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23101419' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 16V7h11v9H3Z'/%3E%3Cpath d='M14 10h4l3 3v3h-7'/%3E%3Ccircle cx='7' cy='18' r='2'/%3E%3Ccircle cx='17' cy='18' r='2'/%3E%3C/svg%3E");
}
/* 3 Versandkostenfrei -> parcel */
.wt-archive-trust > li:nth-child(3)::before {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23101419' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2.5 3 7v10l9 4.5 9-4.5V7l-9-4.5Z'/%3E%3Cpath d='M3 7l9 4.5L21 7M12 11.5V21.5'/%3E%3C/svg%3E");
}
/* 4 Staffelpreise -> price tag */
.wt-archive-trust > li:nth-child(4)::before {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23101419' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.5 13.5 12 22 2 12V2h10l8.5 8.5a2 2 0 0 1 0 3Z'/%3E%3Ccircle cx='7' cy='7' r='1.6'/%3E%3C/svg%3E");
}
@media (max-width: 1023px) {
  .wt-archive-trust {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 16px !important;
    margin: 40px auto 32px !important;
    padding: 0 20px !important;
  }
  .wt-archive-trust > li {
    min-height: 140px;
    padding: 24px 14px !important;
    font-size: 14px !important;
  }
  .wt-archive-trust > li::before {
    width: 42px;
    height: 42px;
    background-size: 20px 20px;
  }
}
/* ===== Fix archive trust alignment / rhythm (2026-11-25) =====
   Problem: trust was max-width 1200 + 24px side padding -> 60px inset vs page container (1320).
   Fix: inherit container width, no side padding, consistent vertical rhythm. */
.wt-archive-trust {
  max-width: none !important;
  width: 100% !important;
  margin: 48px 0 48px !important;
  padding: 0 !important;
}
.wt-archive-trust > li {
  min-height: 156px !important;
  padding: 28px 18px !important;
}
@media (max-width: 1023px) {
  .wt-archive-trust {
    margin: 32px 0 32px !important;
    padding: 0 !important;
  }
  .wt-archive-trust > li {
    min-height: 132px !important;
    padding: 22px 14px !important;
  }
}
/* ===== Category-specific icon mapping (2026-11-25) =====
   Category trust order: Versand(Lager) / Staffelpreise / Alle Modelle / Originalware
   Brand trust order:    Originalware / Versand DE / Versandkostenfrei / Staffelpreise */
.tax-product_cat .wt-archive-trust > li:nth-child(1)::before {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23101419' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 21V9l9-5 9 5v12'/%3E%3Cpath d='M9 21v-6h6v6'/%3E%3C/svg%3E");
}
.tax-product_cat .wt-archive-trust > li:nth-child(2)::before {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23101419' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.5 13.5 12 22 2 12V2h10l8.5 8.5a2 2 0 0 1 0 3Z'/%3E%3Ccircle cx='7' cy='7' r='1.6'/%3E%3C/svg%3E");
}
.tax-product_cat .wt-archive-trust > li:nth-child(3)::before {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23101419' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2.5 3 7v10l9 4.5 9-4.5V7l-9-4.5Z'/%3E%3Cpath d='M3 7l9 4.5L21 7M12 11.5V21.5'/%3E%3C/svg%3E");
}
.tax-product_cat .wt-archive-trust > li:nth-child(4)::before {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23101419' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2.8 20 6v6.2c0 5-3.6 8.2-8 9.2-4.4-1-8-4.2-8-9.2V6l8-3.2Z'/%3E%3Cpath d='M8.8 12.2l2.2 2.2 4.2-4.4'/%3E%3C/svg%3E");
}
/* ===== Flavors block unified (2026-11-25): rounded card + tidy layout ===== */
.wt-brand-flavors {
  margin: 32px 0 40px !important;
  padding: 28px 26px 24px !important;
  border: 0 !important;
  border-radius: 20px !important;
  background: #f6f7f9 !important;
}
.wt-brand-flavors > h3 {
  margin: 0 0 16px !important;
  font-size: 16px !important;
  font-weight: 800 !important;
  line-height: 1.3;
  color: #101419 !important;
}
.wt-brand-flavors > ul {
  display: flex !important;
  flex-wrap: wrap;
  gap: 10px !important;
  margin: 0 0 16px !important;
  padding: 0 !important;
  list-style: none !important;
}
.wt-brand-flavors > ul > li {
  margin: 0 !important;
  padding: 8px 14px !important;
  border: 1px solid #e3e6ea !important;
  border-radius: 999px !important;
  background: #fff !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  line-height: 1.3;
  color: #101419 !important;
}
.wt-brand-flavors > ul > li::before { content: none !important; }
.wt-brand-flavors > p,
.wt-brand-flavors .wt-brand-flavors__note {
  margin: 0 !important;
  font-size: 12px !important;
  line-height: 1.5;
  color: #8a919c !important;
}
/* ????????????????? */
.wt-brand-choice {
  border-radius: 20px !important;
}
@media (max-width: 1023px) {
  .wt-brand-flavors {
    margin: 24px 0 32px !important;
    padding: 22px 18px 18px !important;
    border-radius: 16px !important;
  }
  .wt-brand-flavors > h3 { font-size: 15px !important; margin-bottom: 12px !important; }
  .wt-brand-flavors > ul { gap: 8px !important; margin-bottom: 12px !important; }
  .wt-brand-flavors > ul > li { padding: 7px 12px !important; font-size: 13px !important; }
}
/* Category page flavors block: constrain to the page container (1320) */
.tax-product_cat .wt-brand-flavors {
  max-width: 1320px !important;
  width: auto !important;
  margin: 32px auto 40px !important;
}
@media (max-width: 1380px) {
  .tax-product_cat .wt-brand-flavors {
    margin-left: 24px !important;
    margin-right: 24px !important;
  }
}
@media (max-width: 1023px) {
  .tax-product_cat .wt-brand-flavors {
    margin: 24px 20px 32px !important;
    padding: 22px 18px 18px !important;
  }
}
