/* ============================================================
   项目列表页样式
   ============================================================ */

/* ---------- 页面标题栏 ---------- */
.page-title-bar {
  margin-top: 72px;
  padding: 28px 0 16px;
  background: var(--grad-soft);
}
.page-title-bar h1 {
  font-size: 26px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: 1px;
}

/* ---------- 一级 Tab 栏 ---------- */
.top-tabs-wrap {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 72px;
  z-index: 90;
}
.top-tabs {
  display: flex;
  gap: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.top-tab {
  display: inline-block;
  padding: 16px 28px;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
  position: relative;
  transition: color .25s;
  text-decoration: none;
}
.top-tab:hover {
  color: var(--primary);
}
.top-tab.active {
  color: var(--primary);
}
.top-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--primary);
}

/* loading / empty / error 通用 */
.tabs-loading,
.tabs-empty,
.tabs-error {
  padding: 16px 28px;
  font-size: 14px;
  color: var(--ink-3);
}
.tabs-error { color: #FF4D4F; }

.sub-loading,
.sub-empty,
.sub-error {
  padding: 16px 20px;
  font-size: 14px;
  color: var(--ink-3);
  text-align: center;
}
.sub-error { color: #FF4D4F; }

.list-loading,
.list-empty,
.list-error {
  grid-column: 1 / -1;
  padding: 60px 20px;
  text-align: center;
  font-size: 15px;
  color: var(--ink-3);
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.list-error { color: #FF4D4F; }

/* ---------- 分页 ---------- */
.pagination-wrap {
  flex: 0 0 100%;
  margin-top: 20px;
  display: flex;
  justify-content: center;
}
.pagination {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.pagination .page-item a,
.pagination .page-item span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 14px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 14px;
  text-decoration: none;
  transition: all .2s;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}
.pagination .page-item a:hover {
  color: var(--primary);
  border-color: var(--primary);
}
.pagination .page-item.active a {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 600;
}

/* 上一页 / 下一页按钮 —— 极简无边框 */
.pagination .page-prev a,
.pagination .page-next a {
  min-width: 96px;
  gap: 4px;
  font-weight: 500;
  box-shadow: none;
  background: transparent;
  border: none;
  padding: 0 8px;
  color: var(--primary);
}
.pagination .page-prev a:hover,
.pagination .page-next a:hover {
  border: none;
  color: var(--primary);
}
.pagination .page-prev.disabled a,
.pagination .page-next.disabled a {
  background: transparent;
  border: none;
  box-shadow: none;
  color: var(--ink-3);
}
.pagination .page-prev.disabled a:hover,
.pagination .page-next.disabled a:hover {
  background: transparent;
  border: none;
  color: var(--ink-3);
}
.pagination .page-prev .page-arrow,
.pagination .page-next .page-arrow {
  font-size: 16px;
  line-height: 1;
}
.pagination .page-prev .page-text,
.pagination .page-next .page-text {
  line-height: 1;
}

.pagination .page-item.disabled a,
.pagination .page-item.disabled span,
.pagination .page-item.disabled .page-ellipsis {
  color: var(--ink-3);
  cursor: default;
  pointer-events: none;
  background: #f5f6f8;
}
.pagination .page-item.disabled a:hover {
  color: var(--ink-3);
  border-color: var(--line);
}

.pagination .page-indicator {
  font-size: 14px;
  color: var(--ink-2);
  padding: 0 12px;
  user-select: none;
}

.pagination .page-ellipsis {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0 4px;
}

/* ---------- 主体布局 ---------- */
.project-main {
  padding: 24px 0 60px;
  background: var(--bg-soft);
  min-height: calc(100vh - 72px);
}
.project-main-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-start;
}

/* ---------- 左侧二级菜单 ---------- */
.project-sidebar {
  width: 160px;
  flex-shrink: 0;
  position: sticky;
  top: 140px;
}
.sub-menu {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.sub-item {
  display: block;
  padding: 16px 20px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  transition: all .25s;
  border-left: 3px solid transparent;
  user-select: none;
}
.sub-item:hover {
  background: var(--accent);
  color: var(--primary);
}
.sub-item.active {
  background: var(--accent);
  color: var(--primary);
  font-weight: 700;
  border-left-color: var(--primary);
}

/* ---------- 右侧项目卡片列表 ---------- */
.project-list {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

/* ---------- 项目卡片 ---------- */
.project-card {
  display: flex;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all .3s ease;
  text-decoration: none;
  color: inherit;
}
.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card-img {
  width: 140px;
  min-height: 160px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  background: var(--bg-soft);
}
.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}
.card-badge.hot {
  background: #FF4D4F;
}

.card-info {
  flex: 1;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  min-width: 0;
}

.card-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-price {
  font-size: 14px;
  color: var(--ink-3);
}
.card-price span {
  font-size: 20px;
  font-weight: 800;
  color: #FF4D4F;
}
.card-price .price-consult {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  background: rgba(24, 144, 255, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
}

.card-bookings {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-3);
}
.card-bookings svg {
  color: var(--primary);
  flex-shrink: 0;
}

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
  .project-main-inner {
    flex-direction: column;
  }
  .project-sidebar {
    width: 100%;
    position: static;
  }
  .sub-menu {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .sub-item {
    white-space: nowrap;
    border-left: none;
    border-bottom: 3px solid transparent;
    padding: 12px 18px;
  }
  .sub-item.active {
    border-left-color: transparent;
    border-bottom-color: var(--primary);
  }
  .project-list {
    grid-template-columns: 1fr;
  }
  .top-tab {
    padding: 14px 18px;
    font-size: 15px;
  }
  .pagination-wrap {
    margin-top: 16px;
    overflow-x: auto;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
  }
  .pagination .page-item a,
  .pagination .page-item span {
    min-width: 32px;
    height: 32px;
    font-size: 13px;
  }
}