/*
 * @package BaikuSidebar
 * @author 百酷智慧餐饮
 * @version 1.0
 * @link https://www.2c3.cn
 * @description 左侧分类菜单主题，适配百酷智慧餐饮内容中心，配色与官网统一。
 */

/* ========== 重置与基础 ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: #333;
  background: #F3F5F7;
  min-height: 100vh;
}
a { color: #1a73e8; text-decoration: none; transition: color .2s; }
a:hover { color: #1557b0; }
img { max-width: 100%; height: auto; border-radius: 6px; }
ul, ol { list-style: none; }
h1, h2, h3, h4, h5, h6 { color: #1a1a2e; font-weight: 600; line-height: 1.4; }

/* ========== 顶部导航（与官网完全一致） ========== */
#header.header {
  position: sticky;
  top: 0;
  padding: 0;
  width: 100%;
  height: 80px;
  background: #ffffff;
  border-bottom: 1px solid #e2e2e2;
  box-shadow: 0px 8px 20px rgba(26, 58, 129, 0.1);
  z-index: 200;
}
#header .header-inner {
  display: flex;
  width: 1200px;
  height: inherit;
  justify-content: space-between;
  align-items: center;
  margin: 0 auto;
  padding: 0;
}
#header .es-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
#header .es-logo a {
  display: flex;
  align-items: center;
}
#header .es-logo img {
  height: 44px;
  width: auto;
  border-radius: 0;
}
#header .header-nav {
  display: flex;
  height: inherit;
  margin: 0;
  padding: 0;
  list-style: none;
}
#header .nav-item {
  display: flex;
  align-items: center;
}
#header .nav-linktag {
  color: #272E3B;
  font-size: 16px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  height: 100%;
  margin: 0 24px;
  position: relative;
  border-bottom: 4px solid transparent;
  text-decoration: none;
  padding: 0;
  background: none;
  white-space: nowrap;
}
#header .nav-item:hover .nav-linktag {
  color: #5369F8;
}
#header .nav-linktag.active {
  color: #5369F8;
  border-bottom: 4px solid #5369F8;
}
#header .nav-btn {
  width: 120px;
  height: 44px;
  border-radius: 4px;
  background: #5369F8;
  color: #fff;
  font-size: 16px;
  line-height: 44px;
  padding: 0;
  font-weight: 600;
  text-align: center;
  display: inline-block;
  border: none !important;
  margin: 0;
  justify-content: center;
}
#header .nav-btn:hover {
  background: #5369F8;
  color: #fff;
  opacity: 0.9;
}
#header #nav-btn {
  margin-left: 24px;
}

/* ========== 整体布局：左侧栏 + 主内容 ========== */
.layout { display: flex; min-height: calc(100vh - 80px); }

/* ========== 左侧侧边栏 ========== */
.sidebar {
  width: 260px;
  min-width: 260px;
  background: #fff;
  border-right: 1px solid #e8e8e8;
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 80px;
  height: calc(100vh - 80px);
  overflow-y: auto;
  z-index: 50;
}
.sidebar-brand {
  padding: 28px 24px 20px;
  border-bottom: 1px solid #f0f0f0;
}
.sidebar-brand .site-title {
  font-size: 20px;
  font-weight: 700;
  color: #1a1a2e;
  display: block;
  margin-bottom: 4px;
}
.sidebar-brand .site-title:hover { color: #1a73e8; }
.sidebar-brand .site-desc {
  font-size: 12px;
  color: #999;
  line-height: 1.5;
}
.sidebar-search {
  padding: 16px 20px;
  border-bottom: 1px solid #f0f0f0;
}
.sidebar-search form { position: relative; }
.sidebar-search input[type="text"] {
  width: 100%;
  padding: 9px 36px 9px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  outline: none;
  transition: border-color .2s;
  background: #fafafa;
}
.sidebar-search input[type="text"]:focus {
  border-color: #1a73e8;
  background: #fff;
}
.sidebar-search button {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: #999;
  font-size: 16px;
}
.sidebar-search button:hover { color: #1a73e8; }

/* 分类菜单 */
.sidebar-nav { flex: 1; padding: 12px 0; }
.sidebar-nav .nav-label {
  padding: 8px 24px;
  font-size: 11px;
  font-weight: 600;
  color: #bbb;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.sidebar-nav li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  font-size: 14px;
  color: #555;
  border-left: 3px solid transparent;
  transition: all .2s;
}
.sidebar-nav li a:hover {
  background: #f5f7fa;
  color: #1a73e8;
  border-left-color: #1a73e8;
}
.sidebar-nav li.current a,
.sidebar-nav li a.active {
  background: #e8f0fe;
  color: #1a73e8;
  border-left-color: #1a73e8;
  font-weight: 500;
}
.sidebar-nav .cat-count {
  font-size: 11px;
  background: #f0f0f0;
  color: #999;
  padding: 1px 7px;
  border-radius: 10px;
}
.sidebar-nav li.current .cat-count,
.sidebar-nav li a.active .cat-count {
  background: #1a73e8;
  color: #fff;
}

/* 侧边栏底部 */
.sidebar-footer {
  padding: 16px 24px;
  border-top: 1px solid #f0f0f0;
  font-size: 12px;
  color: #bbb;
}
.sidebar-footer a { color: #999; }
.sidebar-footer a:hover { color: #1a73e8; }
.sidebar-footer .back-home {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: #666;
}

/* ========== 主内容区 ========== */
.main {
  flex: 1;
  min-width: 0;
  padding: 32px 40px 40px;
  max-width: calc(100% - 260px);
  margin-left: 260px;
}
.main-inner { max-width: 860px; margin: 0 auto; }

/* 面包屑 */
.breadcrumb {
  font-size: 13px;
  color: #999;
  margin-bottom: 20px;
}
.breadcrumb a { color: #666; }
.breadcrumb a:hover { color: #1a73e8; }
.breadcrumb .sep { margin: 0 6px; color: #ddd; }

/* 页面标题 */
.page-header { margin-bottom: 28px; }
.page-header h1 {
  font-size: 26px;
  margin-bottom: 6px;
}
.page-header p {
  font-size: 14px;
  color: #888;
}

/* ========== 文章列表卡片 ========== */
.post-list { display: flex; flex-direction: column; gap: 20px; }
.post-card {
  background: #fff;
  border-radius: 10px;
  padding: 24px 28px;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
  transition: box-shadow .2s, transform .2s;
}
.post-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
  transform: translateY(-2px);
}
.post-card .post-cat {
  display: inline-block;
  padding: 3px 10px;
  background: #e8f0fe;
  color: #1a73e8;
  font-size: 12px;
  border-radius: 4px;
  margin-bottom: 10px;
}
.post-card h2 {
  font-size: 19px;
  margin-bottom: 8px;
}
.post-card h2 a { color: #1a1a2e; }
.post-card h2 a:hover { color: #1a73e8; }
.post-card .post-meta {
  font-size: 12px;
  color: #aaa;
  margin-bottom: 10px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.post-card .post-meta span { display: inline-flex; align-items: center; gap: 4px; }
.post-card .post-excerpt {
  font-size: 14px;
  color: #666;
  line-height: 1.8;
}
.post-card .read-more {
  display: inline-block;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 500;
}

/* ========== 文章详情页 ========== */
.post-detail {
  background: #fff;
  border-radius: 10px;
  padding: 36px 44px;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.post-detail .post-cat {
  display: inline-block;
  padding: 4px 12px;
  background: #e8f0fe;
  color: #1a73e8;
  font-size: 12px;
  border-radius: 4px;
  margin-bottom: 14px;
}
.post-detail h1 {
  font-size: 28px;
  margin-bottom: 14px;
  line-height: 1.4;
}
.post-detail .post-meta {
  font-size: 13px;
  color: #999;
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.post-detail .post-summary {
  background: #f0f7ff;
  border-left: 4px solid #1a73e8;
  padding: 14px 20px;
  margin-bottom: 24px;
  border-radius: 0 6px 6px 0;
  font-size: 14px;
  color: #444;
  line-height: 1.7;
}
.post-detail .post-summary strong {
  color: #1a73e8;
}
.post-detail .post-content {
  font-size: 15px;
  line-height: 1.9;
  color: #333;
}
.post-detail .post-content h2 {
  font-size: 21px;
  margin: 32px 0 14px;
  padding-left: 12px;
  border-left: 4px solid #1a73e8;
}
.post-detail .post-content h3 {
  font-size: 17px;
  margin: 24px 0 10px;
}
.post-detail .post-content p { margin-bottom: 16px; }
.post-detail .post-content ul,
.post-detail .post-content ol {
  margin: 0 0 16px;
  padding-left: 24px;
}
.post-detail .post-content ul li { list-style: disc; margin-bottom: 6px; }
.post-detail .post-content ol li { list-style: decimal; margin-bottom: 6px; }
.post-detail .post-content blockquote {
  margin: 20px 0;
  padding: 14px 20px;
  background: #f8f9fb;
  border-left: 4px solid #1a73e8;
  color: #555;
  font-size: 14px;
  border-radius: 0 6px 6px 0;
}
.post-detail .post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
}
.post-detail .post-content th,
.post-detail .post-content td {
  border: 1px solid #e0e0e0;
  padding: 10px 14px;
  text-align: left;
}
.post-detail .post-content th {
  background: #f5f7fa;
  font-weight: 600;
  color: #1a1a2e;
}
.post-detail .post-content code {
  background: #f5f7fa;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  color: #d63384;
}
.post-detail .post-content pre {
  background: #1e1e1e;
  color: #d4d4d4;
  padding: 16px 20px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 16px 0;
  font-size: 13px;
}
.post-detail .post-content pre code {
  background: none;
  padding: 0;
  color: inherit;
}
.post-detail .post-content img { margin: 16px 0; }
.post-detail .post-tags {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid #f0f0f0;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.post-detail .post-tags a {
  padding: 4px 12px;
  background: #f5f7fa;
  color: #666;
  border-radius: 4px;
  font-size: 12px;
}
.post-detail .post-tags a:hover {
  background: #e8f0fe;
  color: #1a73e8;
}

/* 文章底部 CTA */
.post-cta {
  margin-top: 32px;
  padding: 24px 28px;
  background: linear-gradient(135deg, #f5f7fa 0%, #e8f0fe 100%);
  border-radius: 10px;
  text-align: center;
}
.post-cta h3 { font-size: 18px; margin-bottom: 6px; }
.post-cta p { font-size: 14px; color: #666; margin-bottom: 14px; }
.post-cta .btn {
  display: inline-block;
  padding: 10px 28px;
  background: #1a73e8;
  color: #fff;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
}
.post-cta .btn:hover { background: #1557b0; color: #fff; }

/* 相关文章 */
.related-posts { margin-top: 32px; }
.related-posts h3 {
  font-size: 17px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f0f0f0;
}
.related-posts ul { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.related-posts li a {
  display: block;
  padding: 12px 16px;
  background: #fafafa;
  border-radius: 6px;
  font-size: 13px;
  color: #555;
  line-height: 1.5;
  transition: all .2s;
}
.related-posts li a:hover {
  background: #e8f0fe;
  color: #1a73e8;
}

/* ========== 分页 ========== */
.page-navigator {
  margin-top: 32px;
  display: flex;
  justify-content: center;
  gap: 6px;
  list-style: none;
  padding: 0;
}
.page-navigator a,
.page-navigator span {
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  background: #fff;
  color: #666;
  border: 1px solid #e8e8e8;
  transition: all .2s;
}
.page-navigator a:hover {
  background: #1a73e8;
  color: #fff;
  border-color: #1a73e8;
}
.page-navigator .current {
  background: #1a73e8;
  color: #fff;
  border-color: #1a73e8;
  font-weight: 500;
}

/* ========== 页面（独立页面） ========== */
.page-content {
  background: #fff;
  border-radius: 10px;
  padding: 36px 44px;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}

/* 分类描述 */
.category-desc {
  margin-top: 12px;
  padding: 12px 16px;
  background: #f8f9fb;
  border-radius: 6px;
  font-size: 14px;
  color: #666;
  line-height: 1.6;
}

/* 首页介绍 */
.home-intro {
  background: #fff;
  border-radius: 10px;
  padding: 24px 28px;
  margin-bottom: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.home-intro h1 {
  font-size: 20px;
  margin-bottom: 10px;
  color: #1a1a2e;
}
.home-intro p {
  font-size: 14px;
  color: #555;
  line-height: 1.8;
}
.home-intro strong {
  color: #1a73e8;
  font-weight: 600;
}

/* 自动内链样式 */
.post-content .internal-link {
  color: #1a73e8;
  text-decoration: none;
  border-bottom: 1px dashed #1a73e8;
  transition: all .2s;
}
.post-content .internal-link:hover {
  color: #1557b0;
  border-bottom-style: solid;
  background: #f0f7ff;
}

/* 更多常见问题模块 */
.faq-more {
  margin-top: 24px;
}
.faq-more h3 {
  font-size: 18px;
  margin-bottom: 14px;
  color: #1a1a2e;
  padding-left: 10px;
  border-left: 4px solid #1a73e8;
}
.faq-more ul {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
}
.faq-more li {
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
}
.faq-more li:last-child { border-bottom: none; }
.faq-more a {
  color: #555;
  font-size: 14px;
  text-decoration: none;
  transition: color .2s;
  display: block;
  padding-left: 16px;
  position: relative;
}
.faq-more a:before {
  content: '?';
  position: absolute;
  left: 0;
  top: 0;
  width: 14px;
  height: 14px;
  line-height: 14px;
  text-align: center;
  background: #e8f0fe;
  color: #1a73e8;
  border-radius: 50%;
  font-size: 10px;
  font-weight: bold;
  margin-top: 3px;
}
.faq-more a:hover {
  color: #1a73e8;
}
.page-content h1 {
  font-size: 26px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f0f0f0;
}

/* ========== 归档页 ========== */
.archive-list { display: flex; flex-direction: column; gap: 16px; }
.archive-item {
  background: #fff;
  border-radius: 8px;
  padding: 18px 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.archive-item .archive-title {
  font-size: 15px;
  color: #333;
  flex: 1;
}
.archive-item .archive-title:hover { color: #1a73e8; }
.archive-item .archive-date {
  font-size: 12px;
  color: #aaa;
  white-space: nowrap;
}

/* ========== 搜索结果 ========== */
.search-result-info {
  font-size: 14px;
  color: #888;
  margin-bottom: 20px;
}

/* ========== 底部版权 ========== */
.site-footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #e8e8e8;
  text-align: center;
  font-size: 12px;
  color: #bbb;
}
.site-footer a { color: #999; }
.site-footer a:hover { color: #1a73e8; }

/* ========== 移动端菜单按钮 ========== */
.mobile-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  background: #272E3B;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 18px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
  line-height: 1;
}
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 90;
}

/* ========== 响应式 ========== */
@media (max-width: 900px) {
  #header.header { height: 60px; padding: 0; }
  #header .header-inner { width: 100%; padding: 0 16px; }
  #header .header-nav { display: none; }
  #header .es-logo img { height: 32px; }
  .mobile-menu-btn { display: flex; align-items: center; justify-content: center; }
  .sidebar {
    position: fixed;
    left: -280px;
    top: 60px;
    height: calc(100vh - 60px);
    z-index: 95;
    transition: left .3s ease;
    box-shadow: 2px 0 12px rgba(0,0,0,.1);
  }
  .sidebar.open { left: 0; }
  .sidebar-overlay.show { display: block; }
  .main {
    max-width: 100%;
    padding: 24px 16px 32px;
    margin-left: 0;
    width: 100%;
  }
  .post-detail, .page-content { padding: 24px 20px; }
  .post-card { padding: 18px 20px; }
  .related-posts ul { grid-template-columns: 1fr; }
  .archive-item { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* ========== 404 页面 ========== */
.error-page {
  text-align: center;
  padding: 60px 20px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.error-code {
  font-size: 80px;
  font-weight: 700;
  color: #1a73e8;
  line-height: 1;
  margin-bottom: 16px;
}
.error-page h1 {
  font-size: 24px;
  margin-bottom: 12px;
  color: #1a1a2e;
}
.error-page > p {
  font-size: 15px;
  color: #666;
  margin-bottom: 28px;
}
.error-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}
.error-actions .btn {
  display: inline-block;
  padding: 10px 24px;
  background: #1a73e8;
  color: #fff;
  border-radius: 6px;
  font-size: 14px;
  text-decoration: none;
  transition: all .2s;
}
.error-actions .btn:hover {
  background: #1557b0;
}
.error-actions .btn-outline {
  background: #fff;
  color: #1a73e8;
  border: 1px solid #1a73e8;
}
.error-actions .btn-outline:hover {
  background: #f0f7ff;
}
.error-search {
  margin-bottom: 36px;
}
.error-search p {
  font-size: 14px;
  color: #888;
  margin-bottom: 12px;
}
.error-search form {
  display: flex;
  max-width: 400px;
  margin: 0 auto;
  gap: 8px;
}
.error-search input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
}
.error-search button {
  padding: 10px 20px;
  background: #1a73e8;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
}
.error-hot {
  text-align: left;
  max-width: 500px;
  margin: 0 auto;
}
.error-hot h3 {
  font-size: 16px;
  margin-bottom: 12px;
  color: #1a1a2e;
}
.error-hot ul {
  list-style: none;
  padding: 0;
}
.error-hot li {
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
}
.error-hot li:last-child { border-bottom: none; }
.error-hot a {
  color: #555;
  font-size: 14px;
  text-decoration: none;
}
.error-hot a:hover { color: #1a73e8; }
