/* 店铺头通栏（猪八戒式）— 店铺相关页共用 */
/*
 * 稳定吸顶方案（避免闪烁）：
 * 1) 最上方灰条 .g-headertop 始终 fixed
 * 2) 店铺导航 sticky，贴在灰条下方
 * 3) logo/搜索随页面正常滚出/滚入，不再用 JS 显隐整块 header
 */

/*
 * 取消全站 header 吸顶。
 * 关键：header.is-scrolled 的 backdrop-filter 会把子元素的 position:fixed
 * 变成相对 header 定位，灰条会跟着 header 一起滚走并闪烁。
 */
body.svc-detail-page header:has(.wb-header),
body.svc-shopbar-page header:has(.wb-header),
body.svc-detail-page header:has(.wb-header).is-scrolled,
body.svc-shopbar-page header:has(.wb-header).is-scrolled {
  position: relative !important;
  top: auto !important;
  /* 必须高于店铺导航，否则灰条内二维码下拉会被挡（fixed 仍受 header 层叠上下文约束） */
  z-index: 1300;
  /* 给固定灰条留位 */
  padding-top: 35px;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  filter: none !important;
  transform: none !important;
  perspective: none !important;
  contain: none !important;
  will-change: auto !important;
  transition: none !important;
  overflow: visible !important;
}

/* 最顶部导航条始终固定在视口 */
body.svc-detail-page header:has(.wb-header) .g-headertop,
body.svc-shopbar-page header:has(.wb-header) .g-headertop,
body.svc-detail-page header:has(.wb-header).is-scrolled .g-headertop,
body.svc-shopbar-page header:has(.wb-header).is-scrolled .g-headertop {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 1300 !important;
  width: 100%;
  margin: 0;
  display: block !important;
  background: #f5f5f5 !important;
  border-bottom: 1px solid #eee !important;
  overflow: visible !important;
  transform: none !important;
  filter: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* 灰条下拉（APP/公众号/小程序二维码）盖过店铺导航 */
body.svc-detail-page .g-headertop .wb-sticky-links,
body.svc-shopbar-page .g-headertop .wb-sticky-links,
body.svc-detail-page .g-headertop .wb-sticky-item,
body.svc-shopbar-page .g-headertop .wb-sticky-item {
  position: relative;
  z-index: 2;
  overflow: visible;
}
body.svc-detail-page .g-headertop .wb-sticky-panel,
body.svc-shopbar-page .g-headertop .wb-sticky-panel {
  z-index: 1400 !important;
}

/* 滚动后：灰条内出现「找服务」等（沿用全站 .is-scrolled .wb-sticky-links） */
body.svc-detail-page header:has(.wb-header).is-scrolled .wb-sticky-links,
body.svc-shopbar-page header:has(.wb-header).is-scrolled .wb-sticky-links {
  display: inline-block !important;
}

/* 已有 svc-shopbar 时关掉 Fiverr 二次吸顶条，避免双条抢位闪烁 */
body.svc-shopbar-page .sf-stick,
body.svc-detail-page .sf-stick {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* 店铺导航：吸顶在灰条下方（低于 header 层叠，避免挡住二维码下拉） */
body.svc-detail-page > nav,
body.svc-shopbar-page > nav,
nav:has(.svc-shopbar) {
  margin: 0;
  padding: 0;
  background: #fff;
  position: sticky;
  top: 35px;
  z-index: 1200;
}

body.svc-shopbar-page {
  background-color: #f4f4f4 !important;
  background-image: none !important;
}
body.svc-shopbar-page > section {
  background: transparent !important;
  padding-top: 16px;
}

.svc-shopbar {
  width: 100%;
  margin: 0;
  background: #fff;
  border-top: 1px solid #eee;
  transition: box-shadow 0.2s ease;
}
.svc-shopbar.is-sticky {
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.12);
  border-top-color: transparent;
}

.svc-shopbar-inner {
  width: 100%;
  max-width: 1350px;
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
}
.svc-shopbar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  min-height: 40px;
}
.svc-shopbar-id {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  min-width: 0;
}
.svc-shopbar-name {
  font-size: 18px;
  font-weight: 700;
  color: #222;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}
.svc-shopbar-name:hover {
  color: #ff6900;
}
.svc-shopbar-badges {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}
.svc-shopbar-badges .firm-attestation,
.svc-shopbar-badges .cd-card-attestation,
.svc-shopbar-badges .bank-attestation,
.svc-shopbar-badges .alipay-attestation {
  display: inline-block;
  width: 18px;
  height: 18px;
  vertical-align: middle;
  margin: 0;
  background-size: contain;
}
.svc-shop-vip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 18px;
  padding: 0 6px;
  border-radius: 2px;
  font-size: 12px;
  line-height: 1;
  color: #5a3d00;
  background: linear-gradient(90deg, #f6c343, #e6a700);
  white-space: nowrap;
}
.svc-shopbar-score {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #e84a4a;
  font-size: 13px;
  white-space: nowrap;
}
.svc-shopbar-score .fa {
  font-size: 13px;
}
.svc-shopbar-score em {
  margin-left: 4px;
  color: #666;
  font-style: normal;
  font-weight: 400;
}
.svc-shopbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  flex: 0 0 auto;
}
.svc-shopbar-act {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #555;
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
  line-height: 1.4;
}
.svc-shopbar-act:hover {
  color: #ff6900;
}
.svc-shopbar-act .fa {
  font-size: 14px;
}
.svc-shopbar-act.is-done {
  color: #999;
  cursor: default;
}
.svc-shopbar-deal {
  font-size: 13px;
  color: #666;
  white-space: nowrap;
}
.svc-shopbar-deal em {
  margin: 0 2px;
  color: #ff6900;
  font-style: normal;
  font-weight: 700;
  font-size: 15px;
}
.svc-shopbar.is-sticky .svc-shopbar-deal {
  display: none;
}
.svc-shopnav {
  width: 100%;
  height: 44px;
  background: #4a4a4a;
}
.svc-shopnav-inner {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  width: 100%;
  max-width: 1350px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
}
.svc-shopnav-links {
  display: flex;
  align-items: stretch;
  min-width: 0;
  height: 100%;
}
.svc-shopnav-links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 96px;
  padding: 0 22px;
  color: #fff;
  font-size: 14px;
  line-height: 44px;
  text-decoration: none;
  white-space: nowrap;
}
.svc-shopnav-links a + a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 1px;
  height: 14px;
  margin-top: -7px;
  background: rgba(255, 255, 255, 0.28);
}
.svc-shopnav-links a:hover,
.svc-shopnav-links a.is-active {
  color: #ffb380;
  background: transparent;
}
.svc-shopnav-links a .fa {
  font-size: 12px;
  margin-left: 2px;
  opacity: 0.9;
}
.svc-shopnav-hire {
  display: inline-flex;
  align-items: center;
  align-self: center;
  gap: 6px;
  height: 32px;
  padding: 0 16px;
  margin-left: 16px;
  border-radius: 3px;
  background: #ffd100;
  color: #222;
  font-size: 14px;
  font-weight: 700;
  line-height: 32px;
  text-decoration: none;
  white-space: nowrap;
  flex: 0 0 auto;
}
.svc-shopnav-hire:hover {
  color: #222;
  background: #ffc400;
}
.svc-shopnav-hire .fa {
  color: #e84a4a;
  font-size: 13px;
}
.svc-shopbar.is-sticky .svc-shopbar-top {
  padding: 10px 0;
}
.svc-shopbar.is-sticky .svc-shopbar-name {
  font-size: 16px;
  max-width: 240px;
}

@media (max-width: 1199px) {
  .svc-shopbar-inner,
  .svc-shopnav-inner {
    padding: 0 16px;
  }
  .svc-shopbar-name {
    max-width: 180px;
  }
  .svc-shopnav-links a {
    min-width: 0;
    padding: 0 14px;
  }
  .svc-shopbar-deal {
    display: none;
  }
}

@media (max-width: 575px) {
  .svc-shopbar-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 0;
  }
  .svc-shopbar-name {
    max-width: 100%;
    font-size: 16px;
  }
  .svc-shopbar-actions {
    width: 100%;
    justify-content: flex-start;
    gap: 12px;
    flex-wrap: wrap;
  }
  .svc-shopnav {
    height: auto;
  }
  .svc-shopnav-inner {
    flex-wrap: wrap;
    height: auto;
    padding-bottom: 8px;
  }
  .svc-shopnav-links {
    flex-wrap: wrap;
    width: 100%;
  }
  .svc-shopnav-links a {
    min-width: 0;
    flex: 1 1 33%;
    padding: 0 8px;
    font-size: 13px;
    line-height: 40px;
  }
  .svc-shopnav-links a + a::before {
    display: none;
  }
  .svc-shopnav-hire {
    margin: 4px 0 4px auto;
  }
}
