/*!
Theme Name: pechoinTheme
Theme URI: https://www.pechoin.com/
Author: Endfish
Author URI: https://www.tianbianyu.com
Description: pechoinTheme主题
Version: 1.0.6
*/
/* style.less */
:root {
  --primary-color: #000;
  --text-color: #333;
  --background-color: #fff;
  --header-height: 1.3rem;
  /* 80px + 50px = 130px */
}
/* 加载字体 */
@font-face {
  font-family: 'Source Han Sans CN';
  src: url('assets/fonts/SourceHanSansCN-Normal.woff2') format('woff2'), url('assets/fonts/SourceHanSansCN-Normal.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Futura';
  src: url('assets/fonts/Futura.woff2') format('woff2'), url('assets/fonts/Futura.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
/* 基础 rem 设定 */
html {
  /*
   * 核心响应式代码
   * 使用 calc() 和 vw (viewport width) 单位
   * 100vw 是视口宽度。除以 19.2，是为了在 1920px 宽度时，计算结果为 100px。
   * 计算公式: 100 * (当前视口宽度 / 1920)
   * 简化后即为: 100vw / 19.2
   */
  font-size: calc(100vw / 19.2);
  /* 移动端适配：当视口宽度小于768px时，不再无限缩小，可以设置一个固定的基准值或另一套计算方案 */
}
@media (max-width: 768px) {
  html {
    /* 在移动端，我们可能不希望字体和元素变得过小，可以切换为更稳定的rem方案或直接使用px */
    font-size: calc(100vw / 3.75);
  }
}
/* 基础样式重置 */
body {
  font-family: "Futura", "Source Han Sans CN", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text-color);
  background-color: var(--background-color);
  /* 设置基础字体大小，这里我们使用clamp()来确保最小字体不小于12px */
  /* clamp(最小值, 理想值, 最大值) */
  /* 0.12rem 在1920px下就是12px，但随着视口缩小，它会变得更小。*/
  /* 所以我们用 clamp() 锁定最小像素值。*/
  font-size: 14px;
  /* 假设正文基础字体是14px */
  margin: 0rem;
  padding: 0rem;
}
ul,
li {
  list-style: none;
  margin: 0rem;
  padding: 0rem;
}
a {
  text-decoration: none;
  transition: all 0.3s ease-in-out, opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}
input,
textarea,
select,
button,
.btn {
  transition: all 0.3s ease-in-out, opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
  outline: none;
}
.page-fixed-nav {
  position: fixed;
  top: var(--wp-admin--admin-bar--height, 0rem);
  width: 100%;
  z-index: 11;
  line-height: 45px;
  background-color: #333333;
  color: #FFF;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  /* 平滑过渡效果 */
  transition: all 0.3s ease-in-out, opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}
@media (max-width: 768px) {
  .page-fixed-nav {
    display: none;
  }
}
.page-fixed-nav .left-logo {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-left: 15px;
}
.page-fixed-nav .left-logo img {
  width: auto;
  height: 15px;
}
.page-fixed-nav .nav {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.page-fixed-nav .nav li {
  margin: 0rem 0.2rem;
}
.page-fixed-nav .nav li a {
  position: relative;
  color: #FFF;
  text-decoration: none;
  font-size: 14px;
  opacity: 0.7;
}
.page-fixed-nav .nav li a::after {
  content: '';
  position: absolute;
  left: 0rem;
  bottom: -0.04rem;
  width: 100%;
  height: 0.02rem;
  transform: scaleX(0);
  transform-origin: left center;
  /* 关键：从左边开始缩放 */
  background-color: #FFF;
  transition: all 0.3s ease-in-out, opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
  will-change: transform;
}
.page-fixed-nav .nav li a:hover {
  opacity: 1;
}
.page-fixed-nav .nav li a:hover::after {
  transform: scaleX(1);
}
.page-fixed-nav .right-search {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1;
  padding-right: 15px;
  font-size: 16px;
}
.page-fixed-nav .right-search i {
  cursor: pointer;
}
body.admin-bar .page-fixed-nav {
  /* top值自动等于管理员工具栏的高度 */
  top: var(--wp-admin--admin-bar--height);
}
/* 当 home-fixed-nav 拥有 is-visible 类时的激活状态 */
.page-fixed-nav.is-visible {
  /* 激活状态：回到原位、不透明、可见 */
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}
.page-header {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 56px;
  padding: 0 30px;
  box-sizing: border-box;
  background-color: #FFF;
}
@media (max-width: 768px) {
  .page-header {
    display: none;
  }
}
.page-header .left-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}
.page-header .left-logo img {
  width: auto;
  height: 20px;
}
.page-header .center-nav {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.page-header .center-nav li {
  margin: 0rem 0.18rem;
}
.page-header .center-nav li a {
  color: #A4A4A4;
  font-size: 14px;
}
.page-header .center-nav li a:hover {
  color: #000;
}
.page-header .center-nav .current_page_item a {
  color: #000;
}
.page-header .right-btns {
  display: flex;
  align-items: center;
  padding-left: 0.2rem;
}
.page-header .right-btns .language-selector {
  display: flex;
  align-items: center;
  margin-right: 0.2rem;
}
.page-header .right-btns .language-selector a {
  position: relative;
  color: #A4A4A4;
  font-size: 14px;
  margin: 0px 10px;
}
.page-header .right-btns .language-selector a::before {
  content: '';
  position: absolute;
  top: 4px;
  right: -11px;
  width: 2px;
  height: 9px;
  background-color: #A4A4A4;
}
.page-header .right-btns .language-selector a:last-child::before {
  display: none;
}
.page-header .right-btns .language-selector a:hover {
  color: #000;
}
.page-header .right-btns .search {
  font-size: 16px;
  color: #A4A4A4;
  cursor: pointer;
}
.page-header .right-btns .search:hover {
  color: #000;
}
.mobile-page-header {
  display: none;
}
@media (max-width: 768px) {
  .mobile-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 56px;
    padding: 10px;
    box-sizing: border-box;
    background-color: #FFF;
  }
  .mobile-page-header .left-logo {
    display: flex;
    align-items: center;
  }
  .mobile-page-header .left-logo img {
    width: auto;
    height: 20px;
  }
  .mobile-page-header .mobile-menu-toggle {
    display: block;
    background: none;
    border: none;
    color: #000;
    font-size: 24px;
    cursor: pointer;
  }
}
.mobile-menu-panel {
  display: none;
}
@media (max-width: 768px) {
  .mobile-menu-panel {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    height: 100vh;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 80px 20px 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: right 0.4s ease-in-out;
    z-index: 100;
  }
  .mobile-menu-panel .nav {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    width: 100%;
    text-align: center;
    flex: 1;
  }
  .mobile-menu-panel .nav li {
    margin: 15px 0;
  }
  .mobile-menu-panel .nav li a {
    position: relative;
    color: #333;
    text-decoration: none;
    font-size: 18px;
    opacity: 1;
  }
  .mobile-menu-panel .nav li a::after {
    content: '';
    position: absolute;
    left: 0px;
    bottom: -4px;
    width: 100%;
    height: 2px;
    transform: scaleX(0);
    transform-origin: left center;
    /* 关键：从左边开始缩放 */
    background-color: #FFF;
    transition: all 0.3s ease-in-out, opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
    will-change: transform;
    background-color: #333;
  }
  .mobile-menu-panel .nav li a:hover {
    opacity: 1;
  }
  .mobile-menu-panel .nav li a:hover::after {
    transform: scaleX(1);
  }
  .mobile-menu-panel .language-selector {
    display: flex;
    align-items: center;
  }
  .mobile-menu-panel .language-selector a {
    position: relative;
    color: #555;
    text-decoration: none;
    font-size: 16px;
    opacity: 0.7;
    margin: 0px 10px;
  }
  .mobile-menu-panel .language-selector a::after {
    content: '';
    position: absolute;
    left: 0px;
    bottom: -4px;
    width: 100%;
    height: 2px;
    transform: scaleX(0);
    transform-origin: left center;
    /* 关键：从左边开始缩放 */
    background-color: #FFF;
    transition: all 0.3s ease-in-out, opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
    will-change: transform;
  }
  .mobile-menu-panel .language-selector a::before {
    content: '';
    position: absolute;
    top: 4px;
    right: -11px;
    width: 2px;
    height: 9px;
    background-color: #555;
  }
  .mobile-menu-panel .language-selector a:hover {
    opacity: 1;
  }
  .mobile-menu-panel .language-selector a:hover::after {
    transform: scaleX(1);
  }
  .mobile-menu-panel .language-selector a:last-child::before {
    display: none;
  }
  .mobile-menu-panel .search {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    height: 30px;
    padding: 2px 10px;
    font-size: 16px;
    transition: all 0.3s ease-in-out, opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
    width: 90%;
    margin-top: 20px;
    border: 1px solid #ccc;
    color: #333;
  }
  .mobile-menu-panel .search .input {
    margin-left: 4px;
    width: 100%;
    color: #333;
    border: none;
    background-color: rgba(255, 255, 255, 0);
    box-sizing: border-box;
    transition: all 0.3s ease-in-out, opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
  }
  .mobile-menu-panel .search:hover {
    width: 90%;
  }
  .mobile-menu-panel.is-open {
    right: 0;
  }
}
.page-foot {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  width: 100%;
  padding: 0.46rem 1.2rem 0.3rem;
  box-sizing: border-box;
  margin-bottom: 30px;
}
@media (max-width: 768px) {
  .page-foot {
    display: none;
  }
}
.page-foot .foot {
  color: #000;
  margin-right: 1.8rem;
}
.page-foot .foot .title {
  font-size: 16px;
  line-height: 24px;
  margin-bottom: 17px;
}
.page-foot .foot li {
  line-height: 18px;
  margin-bottom: 8px;
}
.page-foot .foot li a {
  font-size: 14px;
  color: #000;
}
.page-foot .foot li a:hover {
  color: #333;
}
.page-foot-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0px 32px 25px;
  box-sizing: border-box;
}
.page-foot-bar .language-selector {
  display: flex;
  align-items: center;
  margin-right: 0.2rem;
}
.page-foot-bar .language-selector a {
  position: relative;
  color: #A4A4A4;
  font-size: 14px;
  margin: 0px 10px;
}
.page-foot-bar .language-selector a::before {
  content: '';
  position: absolute;
  top: 4px;
  right: -11px;
  width: 2px;
  height: 9px;
  background-color: #A4A4A4;
}
.page-foot-bar .language-selector a:last-child::before {
  display: none;
}
.page-foot-bar .language-selector a:hover {
  color: #000;
}
.page-foot-bar .right-logo {
  font-size: 12px;
  color: #000;
}
.page-foot-bar .right-logo .text {
  color: #A4A4A4;
}
.product-nav {
  width: 100%;
  height: 50px;
  padding: 0 30px;
  box-sizing: border-box;
  background-color: #FFF;
  display: flex;
  align-items: center;
}
.product-nav li {
  margin: 0rem 0.18rem;
}
.product-nav li a {
  color: #A4A4A4;
  font-size: 14px;
}
.product-nav li a:hover {
  color: #000;
}
.product-nav li:first-child {
  margin-left: 0rem;
}
.product-nav .current_page_item a {
  color: #000;
}
