body.pages-category-category {
  overflow: hidden;
}

body.pages-category-category uni-page-body {
  padding-bottom: 0 !important;
}

body.pages-category-category .category-container[data-v-64370f3f] {
  background: #f1f1f1;
  height: 100vh;
  height: 100dvh;
}

.category-container[data-v-64370f3f] .online-container {
  box-sizing: border-box;
  padding: 8px 12px 10px;
  background: transparent;
}

.category-container[data-v-64370f3f] .view-toggle {
  position: relative;
  box-sizing: border-box;
  flex: 0 0 42px;
  height: 42px;
  margin: 0 0 12px;
  padding: 4px;
  gap: 4px;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid #fff;
  background: rgba(255, 255, 255, .75);
}

.category-container[data-v-64370f3f] .view-toggle-slider {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc((100% - 12px) / 2);
  border-radius: 6px;
  background: #000;
  pointer-events: none;
  transition: transform .28s cubic-bezier(.22, .68, .25, 1);
}

.category-container[data-v-64370f3f] .view-toggle.ranking-selected .view-toggle-slider {
  transform: translateX(calc(100% + 4px));
}

.category-container[data-v-64370f3f] .toggle-btn {
  position: relative;
  z-index: 1;
  height: 32px;
  min-width: 0;
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
  color: #858585;
  font-size: 14px;
  transition: color .2s ease;
}

.category-container[data-v-64370f3f] .toggle-btn.active {
  background: transparent;
  color: #fff;
}

.category-container[data-v-64370f3f] .primary-category-section {
  box-sizing: border-box;
  display: flex;
  flex: 0 0 126px;
  align-items: flex-start;
  height: 126px;
  margin-bottom: 10px;
  padding: 18px 0 10px;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff8e6 0%, #fbfaf7 68%, #f1f1f1 100%);
  box-shadow: none;
}

.category-container[data-v-64370f3f] .primary-category-scroll {
  width: 100%;
}

.category-container[data-v-64370f3f] .primary-category-list {
  align-items: flex-start;
  padding: 0 12px;
}

.category-container[data-v-64370f3f] .primary-category-item {
  box-sizing: border-box;
  min-width: 72px;
  margin-right: 12px;
  padding: 4px 0;
}

.category-container[data-v-64370f3f] .primary-icon-wrap {
  box-sizing: border-box;
  width: 54px;
  height: 54px;
  margin-bottom: 4px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 14px;
  background: #ededed;
}

.category-container[data-v-64370f3f] .primary-category-item.active .primary-icon-wrap {
  border-color: #171717;
}

.category-container[data-v-64370f3f] .primary-icon {
  border-radius: 11px;
}

.category-container[data-v-64370f3f] .primary-name {
  max-width: 76px;
  color: #737373;
  font-size: 14px;
}

.category-container[data-v-64370f3f] .primary-category-item.active .primary-name {
  color: #171717;
  font-weight: 700;
}

.category-container[data-v-64370f3f] .category-main {
  width: calc(100% + 24px);
  margin: 0 -12px;
  gap: 0;
  border-top: 1px solid #f0f0f0;
}

.category-container[data-v-64370f3f] .secondary-category-sidebar {
  box-sizing: border-box;
  width: 80px;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.category-container[data-v-64370f3f] .secondary-category-item {
  box-sizing: border-box;
  min-height: 38px;
  margin: 6px;
  justify-content: center;
  padding: 8px 4px;
  border-radius: 5px;
  background: transparent;
  color: #575757;
  font-size: 14px;
  line-height: 20px;
  text-align: center;
  transition: background-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.category-container[data-v-64370f3f] .secondary-category-item.active {
  background: #171717;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 3px 8px #00000024;
}

.category-container[data-v-64370f3f] .secondary-indicator {
  display: none;
}

.category-container[data-v-64370f3f] .goods-list-container {
  position: relative;
  box-sizing: border-box;
  border-radius: 0;
  padding: 6px 10px 120px;
  background: #f8f8f8;
  box-shadow: none;
}

.category-container[data-v-64370f3f] .goods-list-area {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 10px;
  max-width: 640px;
  padding: 4px 0 16px;
}

.category-container[data-v-64370f3f] .goods-list-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(0, 0, 0, .09), 0 1px 3px rgba(0, 0, 0, .04);
  cursor: pointer;
}

.category-container[data-v-64370f3f] .goods-list-item:active {
  background: #fff;
}

.category-container[data-v-64370f3f] .goods-list-item .goods-icon-wrap {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  margin: 0;
  border-radius: 0;
  background: #f1f1f1;
}

.category-container[data-v-64370f3f] .goods-list-item .goods-icon {
  position: absolute;
  inset: 0;
  display: block;
  width: 100% !important;
  height: 100% !important;
  border-radius: 0;
}

.category-container[data-v-64370f3f] .goods-info {
  box-sizing: border-box;
  flex: 1;
  gap: 3px;
  width: 100%;
  margin: 0;
  padding: 8px;
}

.category-container[data-v-64370f3f] .goods-list-item .goods-name {
  display: -webkit-box;
  min-height: 0;
  max-height: 40px;
  margin: 0;
  color: #252525;
  font-size: 14px;
  font-weight: 700;
  line-height: 20px;
  letter-spacing: 0;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.category-container[data-v-64370f3f] .goods-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  min-height: 32px;
  margin-top: auto;
}

.category-container[data-v-64370f3f] .goods-price {
  min-width: 0;
  color: #ff4147;
  font-size: 16px;
  font-weight: 700;
  line-height: 20px;
  letter-spacing: 0;
  overflow-wrap: normal;
  white-space: nowrap;
}

.category-container[data-v-64370f3f] .goods-order-btn {
  display: flex;
  flex: 0 0 32px;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #ff742b;
  color: #fff;
  box-shadow: none;
  line-height: 1;
  cursor: pointer;
}

.category-container[data-v-64370f3f] .goods-order-btn::after {
  border: 0;
}

.category-container[data-v-64370f3f] .goods-order-btn:active {
  background: #ed6420;
}

.category-container[data-v-64370f3f] .goods-order-btn:focus-visible {
  outline: 2px solid #252525;
  outline-offset: 2px;
}

.category-container[data-v-64370f3f] .goods-list-container::before,
.category-container[data-v-64370f3f] .goods-list-container::after {
  content: none;
}

.category-container[data-v-64370f3f] .goods-sort-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 8px;
  box-sizing: border-box;
  width: 100%;
  height: 34px;
  margin-bottom: 6px;
  padding: 0 10px;
  border-radius: 6px;
  background: #f7f7f7;
  color: #181818;
  font-size: 14px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.category-container[data-v-64370f3f] .goods-sort-bar:focus-within {
  outline: 2px solid #c4f000;
  outline-offset: -2px;
}

.category-container[data-v-64370f3f] .goods-sort-bar > span {
  pointer-events: none;
}

.category-container[data-v-64370f3f] .goods-sort-label {
  color: #858585;
}

.category-container[data-v-64370f3f] .goods-sort-value {
  font-weight: 600;
}

.category-container[data-v-64370f3f] .goods-sort-arrow {
  display: flex;
  align-items: center;
  margin-left: auto;
  color: #929292;
}

.category-container[data-v-64370f3f] .goods-list-container .empty-state {
  display: none;
}

.category-container[data-v-64370f3f] .ranking-area {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 2px 2px calc(110px + env(safe-area-inset-bottom, 0px));
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.category-container[data-v-64370f3f] .ranking-list {
  gap: 20px;
}

.category-container[data-v-64370f3f] .ranking-item {
  box-sizing: border-box;
  min-height: 90px;
  padding: 14px;
  border: 1px solid #fff;
  border-radius: 14px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 3px 12px rgba(0, 0, 0, .03);
}

.category-container[data-v-64370f3f] .ranking-left {
  margin-right: 14px;
}

.category-container[data-v-64370f3f] .ranking-icon {
  display: block;
  box-sizing: border-box;
  width: 56px;
  height: 56px;
  border: 2px solid #ffb80a;
  border-radius: 12px;
  overflow: hidden;
  background: #f0f0f0;
}

.category-container[data-v-64370f3f] .ranking-center {
  margin-right: 14px;
}

.category-container[data-v-64370f3f] .ranking-name {
  display: block;
  margin-bottom: 7px;
  color: #080808;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  white-space: normal;
  overflow-wrap: anywhere;
}

.category-container[data-v-64370f3f] .ranking-bar-wrap {
  flex: none;
  height: 9px;
  border-radius: 5px;
  background: #e8e8e8;
}

.category-container[data-v-64370f3f] .ranking-bar {
  border-radius: 5px;
  background: #ffb10b;
}

.category-container[data-v-64370f3f] .ranking-right {
  width: 72px;
  gap: 5px;
}

.category-container[data-v-64370f3f] .ranking-btn-order,
.category-container[data-v-64370f3f] .ranking-btn-review {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 27px;
  padding: 0 5px;
  border: 1px solid transparent;
  border-radius: 5px;
  font-size: 13px;
  line-height: 1;
  font-weight: 600;
}

.category-container[data-v-64370f3f] .ranking-btn-order {
  color: #fff;
  background: #000;
}

.category-container[data-v-64370f3f] .ranking-btn-review {
  color: #737373;
  border-color: #d8d8d8;
  background: #ededed;
}

@media (prefers-reduced-motion: reduce) {
  .category-container[data-v-64370f3f] .view-toggle-slider {
    transition-duration: .14s;
  }

  .category-container[data-v-64370f3f] .toggle-btn {
    transition: none;
  }

  .category-container[data-v-64370f3f] .secondary-category-item {
    transition: none;
  }

  .category-container[data-v-64370f3f] .ranking-item {
    animation: none;
    opacity: 1;
  }
}

@media (max-width: 360px) {
  .category-container[data-v-64370f3f] .secondary-category-sidebar {
    width: 72px;
  }

  .category-container[data-v-64370f3f] .primary-category-item {
    min-width: 68px;
  }
}

/* 分类页固定两列；首页仍可使用后台的商品列数设置。 */
.category-container[data-v-64370f3f] .goods-list-area {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px 8px;
}

/* 分类卡片商品简介 */
.category-container[data-v-64370f3f] .goods-description {
  display: -webkit-box;
  min-height: 0;
  max-height: 36px;
  margin: 0;
  color: #8a8f98;
  font-size: 12px;
  line-height: 17px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

/* 与首页相同的排序浮层，独立于商品滚动区，避免被裁切。 */
.category-container[data-v-64370f3f] .goods-sort-bar {
  border: 0;
  margin-left: 0;
  margin-right: 0;
  text-align: left;
  font-family: inherit;
  line-height: 1;
}
.category-container[data-v-64370f3f] .goods-sort-bar::after { border: 0; }
.category-container[data-v-64370f3f] .goods-sort-arrow { transition: transform 160ms ease; }
.category-container[data-v-64370f3f] .goods-sort-bar.sort-open .goods-sort-arrow { transform: rotate(180deg); }
.category-sort-layer { position: fixed; inset: 0; z-index: 1100; }
.category-sort-backdrop {
  position: fixed;
  inset: 0;
  z-index: 21;
  background: transparent;
}

.category-sort-popover {
  position: fixed;
  top: 160px;
  right: 16px;
  z-index: 22;
  box-sizing: border-box;
  width: 310px;
  max-width: calc(100vw - 32px);
  padding: 12px;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 3px 16px rgba(0, 0, 0, .16);
  color: #777;
  font-size: 13px;
  outline: none;
  animation: category-sort-enter 160ms ease-out;
}

.category-sort-popover::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 11px;
  width: 12px;
  height: 12px;
  transform: rotate(45deg);
  background: #fff;
}

.category-sort-title {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 18px;
  font-weight: 600;
}

.category-sort-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
}

.category-sort-popover button {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 0;
  height: 36px;
  margin: 0;
  padding: 0 2px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: #f7f8fa;
  color: #777;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  cursor: pointer;
}

.category-sort-popover button.selected,
.category-sort-popover .category-sort-confirm {
  border-color: #efb800;
  background: #ffc400;
  color: #fff;
}

.category-sort-popover button:active {
  filter: brightness(.96);
}

.category-sort-popover button:focus-visible,
.category-container .goods-sort-bar:focus-visible {
  outline: 2px solid #b58a00;
  outline-offset: 2px;
}

.category-sort-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #f0f0f0;
}

.category-sort-actions button {
  height: 38px;
}

.category-sort-actions .category-sort-reset {
  border-color: #e5e5e5;
}

@keyframes category-sort-enter {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .category-sort-popover {
    animation: none;
  }
}

