/* 51DIY 导航栏字体 — 与 dke.top 同款 Open Sans（自托管）
 * v7.47 头像 <a> 改 <span>，保留 CSS :hover 下拉菜单
 * dke.top 导航菜单项 = Open Sans Regular 400；CTA 按钮 = Open Sans Bold 700
 */
@font-face {
  font-family: 'Open Sans';
  src: url('opensans-regular.woff2') format('woff2'),
       url('opensans-regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Open Sans';
  src: url('opensans-semibold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Open Sans';
  src: url('opensans-bold.woff2') format('woff2'),
       url('opensans-bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* 桌面导航菜单项（Zibll 主题 navbar） */
.navbar-nav > li > a,
.navbar-nav > li > a .menu-item-title {
  font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 400;
}

/* 移动端抽屉导航 */
.mobile-navbar .menu-item > a,
.mobile-navbar .menu-item > a .menu-item-title {
  font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 400;
}

/* 页头右上角头像：统一替换为自定义 SVG 头像（游客用户图标 / 登录后头像） */
.navbar-top .navbar-right .splitters > li:first-child > a > svg,
.navbar-top .navbar-right .splitters > li:first-child > span > svg,
.navbar-top .navbar-right .splitters > li:first-child > a .avatar-img,
.navbar-top .navbar-right .splitters > li:first-child > span .avatar-img {
  display: none !important;
}

.navbar-top .navbar-right .splitters > li:first-child > a::before,
.navbar-top .navbar-right .splitters > li:first-child > span::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 22px;
  vertical-align: middle;
  background: url("https://51diy.cc/wp-content/uploads/2026/11/avatar-51diy-3.svg") center / contain no-repeat;
}

/* 头像按钮与购物车/铃铛统一为 36px 高度、22px 图标居中 */
.navbar-top .navbar-right .splitters > li:first-child > a,
.navbar-top .navbar-right .splitters > li:first-child > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
}

/* 导航栏右侧：两组按钮由一个定位容器（.nav-right-group，由 mu-plugin JS 生成）
   承载，图标间距固定，任何窗口宽度下都不变（含 ≤991px） */
.navbar-top .navbar-collapse > .nav-right-group,
.navbar-top .navbar-header > .nav-right-group {
  float: right !important;
  position: relative;
  width: 66px;
  height: 36px;
  margin-right: 5px;
}

/* 两个按钮改为绝对定位，锚定容器右边缘，间距固定为 22px，不受任何流式/浮动影响 */
.navbar-top .nav-right-group > .navbar-form {
  float: none !important;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  margin: 0 !important;
  padding: 0 !important;
}

/* 购物车固定在最右 */
.navbar-top .nav-right-group > .navbar-form.flex.ac {
  right: 0;
}

/* 头像固定在购物车左侧 44px（图标中心间距 44px） */
.navbar-top .nav-right-group > .navbar-form:has(.splitters) {
  right: 44px;
}

.navbar-top .nav-right-group > .navbar-form > ul {
  display: flex;
  align-items: center;
  margin: 0;
}

/* 购物车与头像：去掉按钮内部留白（padding / 额外 margin / 固定 36px 宽度），让两个图标贴紧 */
.navbar-top .navbar-right .nav-radius-icon,
.navbar-top .navbar-right .nav-radius-icon > a,
.navbar-top .navbar-right .nav-radius-icon .cart-icon.nav-cart,
.navbar-top .navbar-right .splitters > li,
.navbar-top .navbar-right .splitters > li:first-child > a,
.navbar-top .navbar-right .splitters > li:first-child > span {
  margin: 0 !important;
  padding: 0 !important;
}

.navbar-top .navbar-right .nav-radius-icon .cart-icon.nav-cart {
  width: 22px !important;
  height: 36px !important;
}

.navbar-top .navbar-right .splitters > li:first-child > a,
.navbar-top .navbar-right .splitters > li:first-child > span {
  width: 22px !important;
  min-width: 22px !important;
  height: 36px !important;
}

/* ≤767px：隐藏顶部搜索图标与夜间模式（月牙）图标，改为显示头像 + 购物车 */
@media (max-width: 767px) {
  .navbar-top .navbar-header a.navbar-toggle,
  .navbar-top .navbar-header a.toggle-theme {
    display: none !important;
  }

  .navbar-top .navbar-header > .nav-right-group {
    z-index: 3;
  }

  /* 图标组内带出的搜索按钮（原本随折叠菜单隐藏）一并去掉 */
  .navbar-top .nav-right-group .nav-search-btn,
  .navbar-top .nav-right-group .splitters > li.relative {
    display: none !important;
  }

  /* 左侧抽屉里的用户卡片整块去掉（用户信息 + 快捷按钮） */
  .mobile-navbar .sub-user-box {
    display: none !important;
  }
}

/* 全站移除夜间模式（月牙）按钮：页头、移动端抽屉、其它页面的入口一并去掉 */
.toggle-theme {
  display: none !important;
}

/* 右上角购物车图标：替换为自定义 SVG 图标（该按钮仅登录用户显示） */
.nav-radius-icon .cart-icon.nav-cart > svg {
  display: none !important;
}

.nav-radius-icon .cart-icon.nav-cart {
  background-image: url("https://51diy.cc/wp-content/uploads/2026/11/cart-51diy.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 22px 22px;
}

/* 购物车 / 铃铛：去掉圆形底色，只留图标（保留原 36px 点击区域与间距） */
.navbar-top .navbar-right .cart-icon.nav-cart,
.navbar-top .navbar-right .msg-icon,
.navbar-top .navbar-right .cart-icon.nav-cart:hover,
.navbar-top .navbar-right .msg-icon:hover,
.navbar-top .navbar-right .msg-news-icon {
  background-color: transparent !important;
  box-shadow: none !important;
}

/* 铃铛（消息通知）不再显示在右上角导航栏 */
.navbar-top .navbar-right .msg-news-icon {
  display: none !important;
}

/* 右上角铃铛（消息通知）图标：替换为自定义 SVG（FontAwesome 铃铛，仅登录用户显示） */
.msg-news-icon .msg-icon .fa-bell-o {
  display: none !important;
}

.msg-news-icon .msg-icon {
  background-image: url("https://51diy.cc/wp-content/uploads/2026/11/bell-51diy-2.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 22px 22px;
}

/* 桌面导航菜单项：应用 dke.top 导航字体规格（16px 常规体 400，内边距 10px） */
@media (min-width: 768px) {
  /* 页头导航栏内容宽度限制在 1200px（主题默认 1380px） */
  .container-header {
    max-width: 1200px !important;
  }

  .navbar-nav > li > a,
  .navbar-nav > li > a .menu-item-title {
    padding-left: 10px !important;
    padding-right: 10px !important;
    font-size: 16px !important;
    font-weight: 400 !important;
  }

  /* 激活/悬停指示线与文字等宽（左右缩进 = 上方内边距 10px） */
  .navbar-nav > li::before {
    left: 10px !important;
    right: 10px !important;
    width: auto !important;
  }

  /* 隐藏页头右上角的搜索图标（仅桌面版，移动端搜索按钮不受影响） */
  .navbar-form a.main-search-btn.nav-search-btn {
    display: none !important;
  }

  /* 隐藏页头右上角的夜间模式（月牙）切换图标（仅隐藏图标本身，保留容器：购物车与消息图标在同一容器内） */
  .navbar-form a.toggle-theme {
    display: none !important;
  }

  /* 购物车图标 + 消息通知图标：显示在导航栏右侧（用户图标右侧、整行最右端） */
  .navbar-form.navbar-right.flex.ac {
    display: flex !important;
    align-items: center;
  }

  /* 购物车已移入导航栏，隐藏右侧悬浮的购物车按钮（仅桌面端，移动端仍保留悬浮购物车） */
  .float-right .float-btn-shop-cart {
    display: none !important;
  }

  /* 移除用户图标右侧残留的搜索按钮与分隔线 */
  ul.list-inline.splitters > li.relative:has(> a.main-search-btn) {
    display: none !important;
  }

  /* Logo 保持原始比例（主题固定高度 36px，宽度自适应） */
  .navbar-logo img {
    width: auto !important;
    height: 36px !important;
  }
}

/* 私信窗口右上角的「⋯」操作菜单：隐藏 */
.private-window-header .dropdown.pull-right {
  display: none !important;
}

/* 收货地址弹窗：去掉地址标签整块（标题 + Home/Work/School/Custom 按钮） */
.address-form .address-tags {
  display: none !important;
}

/* 商品详情页：去掉评价（桌面端 tab + 评论区面板、移动端「商品评价」抽屉卡片及抽屉本体） */
.tab-nav-theme > li:has(> a[href*="tab=comment"]),
#product_single-tab-comment,
[data-drawer-selector=".comment-drawer"],
.comment-drawer {
  display: none !important;
}

/* 商品详情页：隐藏冗余的分类标签栏（保留排序/搜索等功能，全端生效） */
.shop-cat-filter .shop-cat-filter-tab {
  display: none !important;
}

/* 面包屑全局分隔符：右箭头 ›，正常字重，清晰不粗 */
.breadcrumb > li + li:before {
  content: "›";
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  font-weight: normal;
  color: #888;
  padding: 0 6px;
  opacity: 1 !important;
}

/* 分类页面包屑覆盖（保持一致） */
.shop-term-header .breadcrumb > li + li:before {
  content: "›";
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  font-weight: normal;
  color: #888;
  padding: 0 6px;
  opacity: 1 !important;
}

/* 分类页排序栏："Sort" 后加冒号 */
.shop-term-header .shop-cat-filter-orderby > span.opacity5::after {
  content: ":";
}

/* 分类页排序栏：保留 "Sort" + 当前排序、Hot、Sales，隐藏 Bookmark/Rating/Price */
.shop-term-header .shop-cat-filter-orderby > a[href*="orderby=favorite_count"],
.shop-term-header .shop-cat-filter-orderby > a[href*="orderby=score"],
.shop-term-header .shop-cat-filter-orderby > a[href*="orderby=zibpay_price"] {
  display: none !important;
}

/* 分类页排序栏右侧的搜索图标：上方已有内嵌搜索框，隐藏重复入口 */
.shop-term-header .more-btns .main-search-btn {
  display: none !important;
}

/* 分类页搜索框（导航栏下方）：与搜索结果页搜索框同款（红边胶囊 + 白底 + 右侧放大镜） */
.shop-cat-inline-search {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.8);
  border: 2px solid #dd3333;
  border-radius: 100px;
  padding: 10px 15px 10px 4px;
  margin: 0;
  position: relative;
}

.shop-cat-inline-search input[name="s"] {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  outline: none;
  font-size: 14px;
  color: inherit;
  padding-left: 16px;
  padding-top: 0;
  padding-bottom: 0;
}

.shop-cat-inline-search .shop-cat-search-btn {
  flex: none;
  display: flex;
  align-items: center;
  border: none;
  background: transparent;
  color: #555;
  opacity: 0.7;
  padding: 0 4px;
  cursor: pointer;
}

.shop-cat-inline-search .shop-cat-search-btn .icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* 搜索结果页：搜索框与首页搜索框同款样式（蓝色胶囊 + 半透明白底 + 右侧放大镜） */
.page-search-box .search-form {
  padding: 0 !important;
}

/* 搜索结果页：取消主题 600px 宽度限制，通栏显示（仅搜索结果页，不影响导航搜索弹层） */
body.search .page-search-box {
  max-width: 100% !important;
}

.page-search-box .search-form .line-form {
  width: 100% !important;
  display: flex;
  align-items: center;
  border: 2px solid #dd3333 !important;
  border-radius: 100px !important;
  background: rgba(255, 255, 255, 0.8) !important;
  padding-top: 10px !important;
  padding-bottom: 10px !important;
  overflow: hidden;
}

.page-search-box .search-form .line-form .line-form-line {
  display: none !important;
}

.page-search-box .search-form .search-input-text {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: center;
  position: relative;
}

.page-search-box .search-form .line-form-input {
  flex: 1;
  min-width: 0;
  width: auto !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding-left: 20px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.page-search-box .search-form .abs-right {
  position: absolute !important;
  right: 15px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  margin: 0 !important;
  display: flex;
  align-items: center;
}

/* 占位文字行为与首页一致：垂直居中原位不动，有值时隐藏 */
.page-search-box .search-form .scale-placeholder,
.page-search-box .search-form .line-form-input:focus ~ .scale-placeholder {
  top: 50% !important;
  bottom: auto !important;
  transform: translateY(-50%) !important;
  transition: none !important;
  font-size: inherit !important;
  color: inherit !important;
  opacity: 0.5 !important;
  padding-left: 20px !important;
}

.page-search-box .scale-placeholder.is-focus {
  opacity: 0 !important;
  visibility: hidden !important;
}

/* 用户下拉面板：隐藏统计徽章行（文章/评论/收藏计数） */
.sub-user-box .author-tag {
  display: none !important;
}

/* 用户中心：隐藏封面 "..." 下拉按钮 */
.author-header .page-cover .cover-btns {
  display: none !important;
}

/* 用户中心：隐藏 评论/收藏/粉丝 统计卡片 */
.zib-widget:has(> .user-statistics-item) {
  display: none !important;
}

/* 右侧悬浮按钮：新增 WhatsApp / Email（vapekr 风格品牌色，与原有 40x40 按钮同规格） */
/* 右上角头像图标：定制人物轮廓 SVG 的描边渲染（防止主题 fill 规则填充形状） */
svg.user-icon-custom {
  fill: none !important;
  stroke: currentColor;
  stroke-linecap: round;
}

/* 右侧悬浮按钮：新增 WhatsApp / Email（vapekr 风格品牌色，与原有 40x40 按钮同规格） */
.float-right .float-btn-whatsapp {
  background-color: #25d366 !important;
  color: #fff !important;
  opacity: 1 !important;
}

.float-right .float-btn-whatsapp:hover {
  background-color: #1fb857 !important;
}

.float-right .float-btn-email {
  background-color: #dd3333 !important;
  color: #fff !important;
  opacity: 1 !important;
}

.float-right .float-btn-email:hover {
  background-color: #b82828 !important;
}

.float-btn-whatsapp svg,
.float-btn-email svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* 邮箱弹窗（点击邮箱按钮弹出） */
.ef-modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
}

.ef-modal-mask.show,
.ef-modal-mask.ef-open {
  display: flex !important;
}

.ef-modal-card {
  background: #fff;
  border-radius: 10px;
  width: 320px;
  max-width: 90vw;
  padding: 20px;
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

.ef-modal-close {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 22px;
  color: #999;
  cursor: pointer;
  line-height: 1;
}

.ef-modal-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 14px;
  text-align: center;
}

.ef-email-box {
  display: flex;
  align-items: center;
  background: #f5f6f7;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px 12px;
}

.ef-email-text {
  flex: 1;
  font-size: 14px;
  color: #333;
  word-break: break-all;
  user-select: all;
}

.ef-copy-btn {
  flex: none;
  border: none;
  border-radius: 6px;
  background: #dd3333;
  color: #fff;
  font-size: 13px;
  padding: 6px 12px;
  cursor: pointer;
  margin-left: 8px;
}

.ef-mailto-link {
  display: block;
  text-align: center;
  margin-top: 12px;
  font-size: 13px;
  color: #dd3333;
  text-decoration: none;
}

/* 搜索结果页：隐藏 文章/用户/Product 类型标签（保留排序行） */
.search-tab-header > div:not(.search-tab-filter) {
  display: none !important;
}

/* <992px：隐藏 My Story / Contact Us（横向菜单按 ID，移动端抽屉按 JS 标记的类名） */
@media (max-width: 991.98px) {
  .navbar-nav > li.menu-item-29,
  .navbar-nav > li.menu-item-30,
  .mobile-navbar .nav-item-hide-sm {
    display: none !important;
  }
}

/* 去掉导航栏 "..." 折叠菜单按钮 */
.navbar-form.show-nav-but {
  display: none !important;
}

/* 768-991px：强制横向菜单显示（Home/3D Model/Parts/Contact Us），替代被移除的 "..." 按钮
   （覆盖主题的绝对定位下拉折叠样式，恢复文档流内联显示） */
@media (min-width: 768px) and (max-width: 991.98px) {
  .nav.navbar-nav {
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
  }

  /* 此区间 Contact Us 恢复显示（仅 My Story 继续隐藏） */
  .navbar-nav > li.menu-item-30 {
    display: block !important;
  }
}

/* 首页搜索框：占位文字聚焦时保持原位（不动）、字号/颜色/透明度全部不变，输入内容后隐藏
   （主题机制：input:focus~ 会设置 translateY/11px/var(--focus-color)/0.9，.is-focus 类=有值） */
.header-slider-search .scale-placeholder,
.header-slider-search .line-form-input:focus ~ .scale-placeholder {
  transform: none !important;
  transition: none !important;
  font-size: inherit !important;
  color: inherit !important;
  opacity: 0.5 !important;
}

.header-slider-search .scale-placeholder.is-focus {
  opacity: 0 !important;
  visibility: hidden !important;
}

/* 导航栏内容宽度：≥1300px 大屏下容器上限从 1200px 扩展到 1300px（仅导航栏，不影响页面主体） */
@media (min-width: 1300px) {
  .header .container-fluid.container-header {
    max-width: 1300px !important;
  }
}

/* 首页商品轮播：翻页箭头对齐商品图片中心（而非整个卡片中心） */
.widget-content .swiper-button-next,
.widget-content .swiper-button-prev {
  transform: translateY(-36.5px) !important;
}

/* 用户中心右侧收藏列表：只显示商品主图，隐藏标题、价格及空白描述区域 */
#user-tab-favorite .ajax-item .item-body {
  display: none !important;
}
