/* ============================================================
   大陶匠社区V2 - 通用板块导航样式
   全社区所有板块页面统一调用
   ============================================================ */

/* 板块导航容器 */
.v2-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid #f0ede8;
  overflow-x: auto;
  padding: 0 8px;
  background: #fff;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  position: relative;
}

/* 排序菜单打开时，取消overflow裁剪 */
.v2-tabs.tabs-menu-open {
  overflow: visible;
}

.v2-tabs::-webkit-scrollbar {
  display: none;
}

/* 导航标签 */
.v2-tab {
  padding: 12px 12px;
  font-size: 14px;
  color: #999;
  white-space: nowrap;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 3px;
  -webkit-tap-highlight-color: transparent;
}

.v2-tab.active {
  color: #3d3d3d;
  font-weight: 600;
  border-bottom-color: #8B4513;
}

/* 推荐按钮（带排序下拉） */
.v2-tab-sort {
  padding-right: 8px;
}

.v2-tab-sort .v2-sort-arrow {
  transition: transform 0.2s;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
}

.v2-tab-sort .v2-sort-arrow svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.v2-tab-sort.active .v2-sort-arrow {
  transform: rotate(180deg);
}

/* 排序下拉菜单 */
.v2-sort-menu {
  position: absolute;
  top: 44px;
  left: 8px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  padding: 6px;
  z-index: 200;
  display: none;
  min-width: 130px;
}

.v2-sort-menu.show {
  display: block;
}

.v2-sort-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 13px;
  color: #333;
  cursor: pointer;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.v2-sort-item:active {
  background: #f5f0eb;
}

.v2-sort-item.active {
  color: #8B4513;
  font-weight: 600;
}

.v2-sort-check {
  display: none;
  align-items: center;
}

.v2-sort-check svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.v2-sort-item.active .v2-sort-check {
  display: inline-flex;
}

/* 平板及以上 */
@media (min-width: 768px) {
  .v2-tabs {
    padding: 0 24px;
  }

  .v2-tab {
    padding: 12px 12px;
    font-size: 14px;
  }

  .v2-sort-menu {
    top: 48px;
    left: 16px;
  }
}

/* ============================================================
   板块导航悬浮（JS控制）
   说明：因html/body设置了overflow-x:hidden导致CSS sticky失效，改用JS实现
   ============================================================ */

.v2-tabs.tabs-fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 90;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  overflow: visible;
}

.v2-tabs.tabs-fixed .v2-sort-menu {
  z-index: 91;
}

.v2-tabs.tabs-fixed .v2-tab {
  color: #555;
}

.v2-tabs.tabs-fixed .v2-tab.active {
  color: #6d360f;
  border-bottom-color: #6d360f;
}

/* 占位符，防止内容跳动 */
.v2-tabs-placeholder {
  height: 44px;
  display: none;
}

/* 电脑端不启用悬浮 */
@media (min-width: 768px) {
  .v2-tabs-placeholder {
    display: none !important;
  }
  .v2-tabs.tabs-fixed {
    position: static !important;
    box-shadow: none !important;
  }
}



