/**
 * WOLKENTAKT · Layout · 头部「选购」下拉（品牌集合页入口）
 *
 * 用途：头部 .wt-header-shop 折叠面板（details/summary）。
 * 结构：由 inc/site-chrome.php 的 wt_header_shop_html() 注入；
 *       parts/header.html 里只留 <div class="wt-header-shop-slot"></div> 插槽。
 * 加载：全站（functions.php 的 $wt_base_styles 链，依赖 wolkentakt-header）。
 * 影响页面：全站头部。
 * 说明：为守住「单文件 ≤400 行」，本组件独立成文件，不并入 layout/header.css（315 行）。
 */

.wt-header-shop {
  position: relative;
}

.wt-header-shop > summary.wt-header-store-btn {
  cursor: pointer;
  list-style: none;
  gap: 6px;
}

.wt-header-shop > summary.wt-header-store-btn::-webkit-details-marker {
  display: none;
}

.wt-header-shop > summary.wt-header-store-btn:focus-visible {
  outline: 2px solid var(--wt-carbon);
  outline-offset: 3px;
}

.wt-header-shop__caret {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  transition: transform 0.2s ease;
}

.wt-header-shop[open] .wt-header-shop__caret {
  transform: rotate(180deg);
}

.wt-header-shop__panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 30;
  width: 300px;
  padding: 14px;
  background: var(--wt-surface-white);
  border: 1px solid var(--wt-border);
  border-radius: var(--wt-radius-card);
  box-shadow: var(--wt-shadow-hover);
}

.wt-header-shop__title {
  margin: 0 0 10px;
  font-size: var(--wt-fs-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--wt-text-muted);
}

.wt-header-shop__list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.wt-header-shop__brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: var(--wt-radius-control);
  background: var(--wt-surface-subtle);
  color: var(--wt-carbon);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
}

.wt-header-shop__brand:hover {
  background: var(--wt-border-subtle);
  color: var(--wt-carbon);
}

.wt-header-shop__count {
  flex: 0 0 auto;
  font-size: var(--wt-fs-xs);
  font-weight: 700;
  color: var(--wt-text-muted);
}

.wt-header-shop__all {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  margin-top: 10px;
  border-radius: var(--wt-radius-control);
  background: var(--wt-carbon);
  color: var(--wt-text-on-dark);
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 640px) {
  .wt-header-shop__panel {
    right: 0;
    left: auto;
    width: min(300px, calc(100vw - 24px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .wt-header-shop__caret {
    transition: none;
  }
}