/* 七澄 / 77 SELECT stage 24：公共分类三级悬停导航、宽屏自适应与浅色商品页。 */
:root {
  --qqsc-v24-deep: #2d6d72;
  --qqsc-v24-teal: #56c7b6;
  --qqsc-v24-soft: #e9f8f5;
  --qqsc-v24-bg: #f8fcfb;
  --qqsc-v24-line: #d6ebe7;
  --qqsc-v24-orange: #f28a45;
  --qqsc-v24-ink: #28474d;
  --qqsc-v24-muted: #71858a;
}

/* Public product/category pages should use the viewport instead of a legacy 1200px cap. */
.goodsSearch,
.goods-detail {
  background: var(--qqsc-v24-bg) !important;
}

.goodsSearch .categoryMain {
  background: #fff !important;
  border-bottom-color: var(--qqsc-v24-line) !important;
  box-shadow: 0 2px 10px rgba(45, 109, 114, .05) !important;
}

.goodsSearch .categoryMain .categoryCount,
.goodsSearch .wrapper_1200,
.goods-detail .wrapper_1200 {
  box-sizing: border-box !important;
  max-width: 1440px !important;
  min-width: 0 !important;
  width: calc(100% - 40px) !important;
}

.goodsSearch .categoryMain .categoryBtn {
  background: var(--qqsc-v24-teal) !important;
  color: #fff !important;
}

.goodsSearch .categoryMain .item-link,
.goodsSearch .categoryMain .item-link.font-color,
.goodsSearch .categoryMain .item-link:hover {
  color: var(--qqsc-v24-deep) !important;
}

.goodsSearch .categoryMain .item-link.font-color,
.goodsSearch .categoryMain .item-link:hover {
  background: var(--qqsc-v24-soft) !important;
}

.goodsSearch .wrapper_1200 > .list {
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)) !important;
  gap: 16px !important;
}

.goodsSearch .wrapper_1200 > .list .item,
.goodsSearch .wrapper_1200 > .list .item:first-child {
  border-color: var(--qqsc-v24-line) !important;
  border-radius: 10px !important;
  box-shadow: 0 2px 8px rgba(45, 109, 114, .035) !important;
}

.goodsSearch .wrapper_1200 > .list .item:hover {
  border-color: #a7ddd4 !important;
  box-shadow: 0 12px 24px rgba(45, 109, 114, .10) !important;
}

.goodsSearch .price,
.goodsSearch .price *,
.goodsSearch [class*='price'],
.goodsSearch [class*='price'] *,
.goodsSearch .color-red,
.goodsSearch .font-color {
  color: var(--qqsc-v24-orange) !important;
}

body .price,
body .price *,
body .item .price,
body .item .price *,
body .color-red {
  color: var(--qqsc-v24-orange) !important;
}

.goodsSearch .categoryMain .font-color,
.goodsSearch .categoryMain .color-red,
.goodsSearch .filter .font-color,
.goodsSearch .filter .color-red {
  color: var(--qqsc-v24-deep) !important;
}

.goodsSearch .wrapper_1200 > .list .item .price .font-color,
.goodsSearch .wrapper_1200 > .list .item .font-color,
.goodsSearch .color-red,
.goodsSearch .font-color {
  color: var(--qqsc-v24-orange) !important;
}

.goodsSearch .goodsSearch-filter,
.goodsSearch .filter,
.goodsSearch .list-filter {
  color: var(--qqsc-v24-ink) !important;
}

/* Three-level hover menu: level 1 -> level 2 -> level 3, without forced clicks. */
.qqsc-category-mega-menu {
  background: #fff !important;
  border: 1px solid var(--qqsc-v24-line) !important;
  border-top: 3px solid var(--qqsc-v24-teal) !important;
  border-radius: 0 0 8px 8px !important;
  box-shadow: 0 16px 34px rgba(45, 109, 114, .16) !important;
  box-sizing: border-box !important;
  display: none !important;
  max-height: min(640px, calc(100vh - 120px)) !important;
  overflow: visible !important;
  padding: 8px !important;
  position: fixed !important;
  width: min(900px, calc(100vw - 24px)) !important;
  z-index: 10000 !important;
}

.qqsc-category-mega-menu[data-open='true'] {
  display: block !important;
}

.qqsc-category-mega-menu__title {
  border-bottom: 1px solid #edf6f4 !important;
  color: var(--qqsc-v24-deep) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  padding: 5px 10px 8px !important;
}

.qqsc-category-mega-menu__body {
  max-height: min(580px, calc(100vh - 175px)) !important;
  overflow: visible !important;
  padding: 6px 0 0 !important;
}

.qqsc-category-mega-group {
  position: relative !important;
  width: 218px !important;
}

.qqsc-category-mega-group__link,
.qqsc-category-mega-child__link,
.qqsc-category-mega-leaf {
  align-items: center !important;
  box-sizing: border-box !important;
  color: #45656b !important;
  display: flex !important;
  justify-content: space-between !important;
  min-height: 31px !important;
  padding: 0 10px !important;
  text-decoration: none !important;
}

.qqsc-category-mega-group__link {
  font-size: 13px !important;
  font-weight: 600 !important;
}

.qqsc-category-mega-child__link,
.qqsc-category-mega-leaf {
  font-size: 12px !important;
  font-weight: 400 !important;
}

.qqsc-category-mega-group__link::after,
.qqsc-category-mega-child__link::after {
  color: var(--qqsc-v24-orange) !important;
  content: '\2192' !important;
  font-size: 13px !important;
}

.qqsc-category-mega-group:hover > .qqsc-category-mega-group__link,
.qqsc-category-mega-group:focus-within > .qqsc-category-mega-group__link,
.qqsc-category-mega-child:hover > .qqsc-category-mega-child__link,
.qqsc-category-mega-child:focus-within > .qqsc-category-mega-child__link,
.qqsc-category-mega-leaf:hover,
.qqsc-category-mega-leaf:focus-visible {
  background: var(--qqsc-v24-soft) !important;
  color: var(--qqsc-v24-deep) !important;
  outline: none !important;
}

.qqsc-category-mega-detail {
  background: #fff !important;
  border: 1px solid var(--qqsc-v24-line) !important;
  border-radius: 0 8px 8px 0 !important;
  box-shadow: 10px 12px 28px rgba(45, 109, 114, .10) !important;
  display: none !important;
  gap: 8px !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  left: 218px !important;
  max-height: min(570px, calc(100vh - 170px)) !important;
  overflow-y: auto !important;
  padding: 10px !important;
  position: absolute !important;
  top: -7px !important;
  width: 640px !important;
}

.qqsc-category-mega-group:hover > .qqsc-category-mega-detail,
.qqsc-category-mega-group:focus-within > .qqsc-category-mega-detail {
  display: grid !important;
}

/* Give the first family an immediate preview; hovering another family switches the panel. */
.qqsc-category-mega-menu[data-open='true'] .qqsc-category-mega-group:first-child > .qqsc-category-mega-detail {
  display: grid !important;
}

.qqsc-category-mega-child {
  min-width: 0 !important;
  position: relative !important;
}

.qqsc-category-mega-leaves {
  border-top: 1px solid #eef6f4 !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 2px 8px !important;
  margin: 3px 10px 6px !important;
  padding-top: 4px !important;
}

.qqsc-category-mega-leaf {
  min-height: 27px !important;
  padding: 0 4px !important;
  white-space: nowrap !important;
}

.qqsc-category-mega-menu__error,
.qqsc-category-mega-menu__loading {
  color: var(--qqsc-v24-muted) !important;
  font-size: 12px !important;
  padding: 12px !important;
}

@media screen and (max-width: 900px) {
  .goodsSearch .categoryMain .categoryCount,
  .goodsSearch .wrapper_1200,
  .goods-detail .wrapper_1200 {
    width: calc(100% - 20px) !important;
  }

  .qqsc-category-mega-menu {
    width: calc(100vw - 20px) !important;
  }

  .qqsc-category-mega-detail {
    width: calc(100vw - 270px) !important;
  }
}

@media screen and (max-width: 680px) {
  .goodsSearch .wrapper_1200 > .list {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .qqsc-category-mega-menu {
    max-height: calc(100vh - 108px) !important;
    overflow-y: auto !important;
  }

  .qqsc-category-mega-detail {
    border: 0 !important;
    border-top: 1px solid var(--qqsc-v24-line) !important;
    box-shadow: none !important;
    display: none !important;
    left: 0 !important;
    position: relative !important;
    top: 0 !important;
    width: 100% !important;
  }

  .qqsc-category-mega-group:hover > .qqsc-category-mega-detail,
  .qqsc-category-mega-group:focus-within > .qqsc-category-mega-detail {
    display: grid !important;
  }
}
