.site-header{
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.header-placeholder{
  height: 78px;
}

.header-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  padding: 0 20px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.header-left{
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand{
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-logo{
  width: 42px;
  height: auto;
}

.brand-text{
  font-size: 24px;
  font-weight: 700;
  color: #163f35;
}

.lang-switch{
  display: flex;
  align-items: center;
  font-size: 15px;
  color: #1f2937;
  margin-left: 16px;
  gap: 8px;
}

.lang{
  font-weight: 600;
}

.lang.active{
  color: #163f35;
  font-weight: 700;
}

.main-nav{
  display: flex;
  align-items: center;
  gap: 22px;
  flex: 1;
  justify-content: center;
}

.main-nav a{
  color: #1f2937;
  font-size: 17px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
}

.main-nav a:hover{
  color: #163f35;
}

.main-nav a.active{
  color: #e67a2e;
  font-weight: 700;
}

.dropdown > a.active{
  color: #e67a2e !important;
  font-weight: 700;
}

.header-actions{
  display: flex;
  align-items: center;
  gap: 14px;
}

.login-link{
  font-size: 15px;
  font-weight: 600;
  color: #344054;
  text-decoration: none;
}

.login-link:hover{
  color: #163f35;
}

.menu-btn{
  display: none;
  font-size: 22px;
  line-height: 1;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

@media (max-width: 1100px){
  .main-nav{
    gap: 18px;
  }
}

@media (max-width: 900px){
  .header-inner{
    min-height: 62px;
  }

  .header-placeholder{
    height: 62px;
  }

  .brand-text{
    font-size: 22px;
  }

  .main-nav{
    display: none;
  }

  .menu-btn{
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .main-nav.mobile-open{
    display: flex !important;
    flex-direction: column;
    position: absolute;
    top: 64px;
    right: 12px;
    width: 260px;
    background: #ffffff;
    padding: 20px 18px;
    border-radius: 16px;
    border: 1px solid #eef2f6;
    box-shadow: 0 18px 40px rgba(0,0,0,0.12);
    z-index: 9999;
    gap: 18px;
    align-items: flex-start;
  }

  .main-nav.mobile-open a{
    display: block;
    width: 100%;
    font-size: 17px;
    line-height: 1.8;
    padding: 6px 4px;
    border-radius: 6px;
    transition: all 0.2s ease;
  }

  .main-nav.mobile-open a:hover{
    background: #f3f6f8;
  }
}

/* ===== 搜索栏统一样式 ===== */

.book-search-strip{
  background: transparent;
  padding: 10px 0 12px;
}

.search-bar{
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

.search-input-wrap{
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

.search-input-wrap input{
  display: block;
  width: 100%;
  height: 42px;
  line-height: 42px;
  padding: 0 40px 0 14px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
  color: #1f2937;
  font-size: 14px;
  outline: none;
}

.search-input-wrap input:focus{
  border-color: #b7c5d3;
  box-shadow: 0 0 0 3px rgba(31,77,59,0.08);
}

.search-icon{
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: #9ca3af;
  line-height: 1;
  pointer-events: none;
}

.search-cart-link{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 0 0 auto;
  height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  background: #eef2f6;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.search-cart-link:hover{
  background: #e5ebf1;
  color: #163f35;
}

.search-cart-link .cart-icon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.search-meta{
  display: none !important;
}

@media (max-width: 768px){
  .search-bar{
    gap: 8px;
  }

  .search-input-wrap input{
    height: 40px;
    line-height: 40px;
    padding: 0 36px 0 12px;
  }

  .search-cart-link{
    height: 40px;
    padding: 0 12px;
  }
}
