/* =============================================================================
   博客页面特有样式
============================================================================= */

/* 辅助颜色和标识 */
.text-secondary {
  color: #888;
  font-size: 14px;
  font-weight: 400;
}

.text-danger {
  color: #ef4444;
  font-weight: 700;
}

.text-primary {
  color: #1890ff;
  font-weight: 500;
}

.n-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  height: auto;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  color: #1890ff;
  background-color: #dff0fd;
  border: none;
}

.divider-vertical {
  display: inline-block;
  margin: 0 10px;
  height: 0.9em;
  width: 1px;
  vertical-align: middle;
  background-color: #e5e5e5;
}

/* 博客页面布局 */
.main-row {
  display: flex;
  gap: 20px;
  width: 100%;
}

.col-left {
  width: 320px;
  flex-shrink: 0;
}

.col-right {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

/* 联系客服样式 */
.contact-box h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 15px 0;
  color: #222;
  position: relative;
  padding-left: 20px;
}

.contact-box h3::before {
  content: '#';
  position: absolute;
  left: 0;
  color: #1890ff;
  font-weight: 700;
}

.contact-box p {
  line-height: 1.7;
  margin-top: 0;
  margin-bottom: 10px;
  color: #555;
  font-size: 15px;
}

.contact-box a {
  color: #1890ff;
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-box a:hover {
  color: #5b21b6;
}

/* 导航/商品列表 */
.nav-item {
  display: flex;
  align-items: center;
  padding: 16px 24px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid #f3f3f3;
  transition: background-color 0.3s ease;
}

.nav-item:last-child {
  border-bottom: none;
}

.nav-item:hover {
  background-color: #f8f9ff;
}

.nav-item .cover {
  margin-right: 15px;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #1890ff;
  /* background: #f8f9ff; */
  overflow: hidden;
}

.nav-item .cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nav-item .nav-cell__title {
  flex-grow: 1;
}

.nav-item .title-wrapper {
  font-size: 16px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #222;
}

.nav-item .van-cell__label {
  margin-top: 5px;
  font-size: 14px;
  color: #666;
  display: flex;
  flex-flow: wrap;
  align-items: center;
}

/* 热门商品样式覆盖 */
.hot-products .nav-item .cover {
  width: 50px;
  height: 50px;
  background: #f5f5f5;
  border-radius: 8px;
  overflow: hidden;
}

.hot-products .nav-item .cover img {
  object-fit: cover;
}

/* 右侧文章列表 */
.article-cell {
  display: flex;
  align-items: flex-start;
  padding: 24px;
  border-bottom: 1px solid #f3f3f3;
  text-decoration: none;
  color: inherit;
  transition: background-color 0.3s ease;
  min-width: 0;
  overflow: hidden;
}

.article-cell:last-child {
  border-bottom: none;
}

.article-cell:hover {
  background-color: #FBFBFB;
}

.article-cell__image {
  margin-right: 20px;
  width: 100px;
  height: 80px;
  border-radius: 8px;
  background-color: #f0f2f5;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.article-cell__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-cell__title {
  flex-grow: 1;
  min-width: 0;
  overflow: hidden;
}

.article-cell__title .title-text {
  font-size: 18px;
  font-weight: 600;
  display: block;
  margin-bottom: 8px;
  line-height: 1.4;
  color: #222;
}

.article-cell__title .desc {
  color: #666;
  line-height: 1.5;
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.article-cell__label {
  margin-top: 12px;
  font-size: 14px;
  color: #888;
  display: flex;
  align-items: center;
}

.article-cell__label svg {
  margin-right: 5px;
}

.article-cell__label .views {
  display: flex;
  align-items: center;
}

/* 视力图标 SVG 模拟 */
.icon-eye {
  width: 1em;
  height: 1em;
  fill: currentColor;
  vertical-align: -0.125em;
}

/* =============================================================================
   移动端专用样式
============================================================================= */
.mobile-layout {
  display: none;
}

.pc-layout {
  display: block;
}

/* 移动端公告 */
.mobile-notice {
  background: #fff;
  margin: 0;
  border-bottom: 1px solid #f0f0f0;
}

.mobile-notice-header {
  background: #fff;
  color: #333;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 600;
}

.mobile-notice-header::before {
  content: "#";
  font-size: 18px;
  color: #1890ff;
  font-weight: bold;
}

.mobile-notice-content {
  padding: 0 16px 16px;
  background: #fff;
}

.mobile-notice-content p {
  margin: 0 0 8px 0;
  font-size: 14px;
  line-height: 1.5;
  color: #333;
}

.mobile-notice-content p:last-child {
  margin-bottom: 0;
}

.mobile-notice-content strong {
  color: #333;
  font-weight: 600;
}

.mobile-notice-content a {
  color: #1890ff;
  text-decoration: none;
  font-weight: 500;
}

.mobile-notice-content a:hover {
  color: #40a9ff;
}

.mobile-notice-content .notice-time {
  font-size: 12px;
  color: #666;
  margin-top: 8px;
}

/* 移动端分类tab - Vant风格 */
.mobile-tabs {
  background: #fff;
  position: sticky;
  top: 92px;
  /* top-bar(28px) + header(64px) = 92px */
  z-index: 100;
  border-bottom: 1px solid #ebedf0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  /* Firefox */
}

.mobile-tabs::-webkit-scrollbar {
  display: none;
  /* Chrome, Safari, Edge */
}

.tab-container {
  display: flex;
  min-width: max-content;
}

.tab-item {
  flex: none;
  min-width: 90px;
  max-width: 140px;
  padding: 0 24px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 500;
  color: #646566;
  background: transparent;
  cursor: pointer;
  transition: color 0.3s ease;
  position: relative;
  white-space: nowrap;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.tab-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  background: #ee0a24;
  border-radius: 1.5px;
  opacity: 0;
  transition: all 0.3s ease;
}

.tab-item.active {
  color: #ee0a24;
  font-weight: 600;
}

.tab-item.active::after {
  opacity: 1;
  width: 30px;
}

/* Tab栏滑动指示器动画 */
.mobile-tabs {
  scroll-behavior: smooth;
}

/* 移动端文章列�?*/
.mobile-articles {
  background: #f7f7f7;
  min-height: calc(100vh - 200px);
}

.mobile-article-group {
  display: none;
  padding: 16px;
}

.mobile-article-group.active {
  display: block;
}

/* 移动端文章项 */
.mobile-article-item {
  background: #fff;
  border-radius: 6px;
  margin-bottom: 16px;
  padding: 16px;
  /* box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08); */
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: row-reverse;
  gap: 16px;
  overflow: hidden;
}

.mobile-article-item:hover {
  transform: translateY(-2px);
  /* box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12); */
}

.mobile-article-item:active {
  transform: translateY(0);
}

.mobile-article-item .article-image {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mobile-article-item .article-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mobile-article-item .article-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow: hidden;
}

.mobile-article-item h3 {
  font-size: 16px;
  font-weight: 600;
  color: #222;
  margin: 0 0 8px 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-clamp: 2;
  word-break: break-word;
  word-wrap: break-word;
}

.mobile-article-item p {
  font-size: 14px;
  color: #666;
  line-height: 1.5;
  margin: 0 0 8px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-article-item .article-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #888;
  min-width: 0;
  flex-shrink: 0;
}

.mobile-article-item .views {
  display: flex;
  align-items: center;
  gap: 4px;
}

.mobile-article-item .views i {
  font-size: 12px;
}

.mobile-article-item .date {
  font-size: 13px;
  color: #888888;
}

.mobile-article-item .divider {
  color: #d9d9d9;
  font-size: 13px;
  user-select: none;
}

/* =============================================================================
   博客页面响应式设置
============================================================================= */

/* 空状态样式 */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  text-align: center;
  border-radius: 12px;
  margin: 20px;
  min-height: 300px;
}

.empty-state i {
  font-size: 72px;
  color: #d0d0d0;
  margin-bottom: 20px;
  opacity: 0.8;
}

.empty-state p {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin: 0 0 10px 0;
}

.empty-state span {
  font-size: 15px;
  color: #999;
  margin: 0;
  max-width: 400px;
  line-height: 1.6;
}

@media (max-width: 768px) {

  /* 隐藏PC端布局，显示移动端布局 */
  .mobile-layout {
    display: block;
  }

  .pc-layout {
    display: none;
  }

  /* 移动端空状态优化 */
  .empty-state {
    padding: 40px 20px;
    margin: 16px;
  }

  .empty-state i {
    font-size: 48px;
  }

  .empty-state p {
    font-size: 15px;
  }

  .empty-state span {
    font-size: 13px;
  }
}

@media (min-width: 769px) and (max-width: 1240px) {
  .main-row {
    flex-direction: column;
    gap: 0;
  }

  .col-left {
    width: 100%;
  }

  .col-right {
    width: 100%;
  }
}

@media (max-width: 480px) {

  /* 小屏幕移动端微调 */
  .tab-item {
    min-width: 80px;
    max-width: 120px;
    padding: 0 18px;
    height: 40px;
    font-size: 13px;
  }

  .mobile-article-item {
    padding: 14px;
    gap: 12px;
  }

  .mobile-article-item .article-image {
    width: 70px;
    height: 70px;
  }

  .mobile-article-item h3 {
    font-size: 15px;
  }

  .mobile-article-item p {
    font-size: 13px;
  }
}