/* 与首页同一内容宽度（含顶栏、底栏） */
.page-service-list .container,
.page-expert-list .container {
  max-width: 1520px;
}

/* 与首页热门服务商 / 推荐达人一致：宽屏 4 列，一页 12 条即 4×3 */
.service-list-page .service-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 1200px) {
  .service-list-page .service-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* 列表页：筛选弹层（桌面端仍内联展示） */

.filter-bar__trigger {
  display: none;
}

.filter-sheet__backdrop,
.filter-sheet__header,
.filter-sheet__footer {
  display: none;
}

.filter-sheet__panel {
  display: block;
}

.filter-sheet__footer .btn-filter {
  flex: 1;
}

.filter-scope-link {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #64748b;
}

.filter-scope-link a {
  color: #2563eb;
  text-decoration: none;
}

.filter-scope-link a:hover {
  text-decoration: underline;
}

.btn-filter-reset {
  flex: 1;
  height: 44px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  color: #64748b;
  font-size: 15px;
  cursor: pointer;
}

@media (min-width: 769px) {
  .filter-sheet {
    display: block;
  }
}

@media (max-width: 768px) {
  .service-list-page {
    padding: 16px 0 32px;
  }

  .service-list-page .container {
    padding: 0 12px;
  }

  .filter-bar {
    padding: 0;
    margin-bottom: 12px;
    background: transparent;
    box-shadow: none;
  }

  .filter-bar__trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    height: 42px;
    border: 1px solid #dbeafe;
    border-radius: 10px;
    background: #fff;
    color: #2563eb;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.08);
  }

  .filter-bar__trigger .layui-icon {
    font-size: 18px;
    line-height: 1;
  }

  .filter-sheet {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: none;
  }

  .filter-sheet.is-open {
    display: block;
  }

  .filter-sheet__backdrop {
    display: block;
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
  }

  .filter-sheet__panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: min(85vh, 640px);
    overflow-y: auto;
    background: #fff;
    border-radius: 16px 16px 0 0;
    padding: 0 16px 16px;
    box-shadow: 0 -8px 32px rgba(15, 23, 42, 0.12);
  }

  .filter-sheet__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 16px 0 12px;
    background: #fff;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 4px;
  }

  .filter-sheet__title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
  }

  .filter-sheet__close {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: #f1f5f9;
    color: #64748b;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
  }

  .filter-row {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding-top: 12px;
  }

  .filter-group {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .filter-group select,
  .filter-group input {
    width: 100%;
  }

  .filter-group--region .filter-region-cascade {
    flex-direction: column;
    gap: 10px;
  }

  .filter-group--region select {
    min-width: 0;
    width: 100%;
  }

  .btn-filter--inline {
    display: none;
  }

  .filter-sheet__footer {
    display: flex;
    gap: 12px;
    padding-top: 8px;
    position: sticky;
    bottom: 0;
    background: #fff;
  }

  .filter-sheet__footer .btn-filter {
    height: 44px;
    border-radius: 8px;
    font-size: 15px;
  }

  body.filter-sheet-open {
    overflow: hidden;
  }

  .sort-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 14px;
    background: #fff;
    border-radius: 10px;
    padding: 10px 10px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  }

  .sort-options {
    display: flex;
    gap: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    border-bottom: 1px solid #eef2f7;
  }

  .sort-options::-webkit-scrollbar {
    display: none;
  }

  .sort-options button {
    flex: 0 0 auto;
    padding: 10px 14px;
    border-radius: 0;
    font-size: 13px;
    color: #64748b;
    background: transparent;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    white-space: nowrap;
  }

  .sort-options button.active,
  .sort-options button:hover {
    background: transparent;
    color: #2563eb;
    border-bottom-color: #2563eb;
  }

  .results-count {
    display: block;
    width: 100%;
    padding: 0 4px 10px;
    font-size: 12px;
    color: #94a3b8;
    text-align: center;
    line-height: 1.4;
  }

  .results-count[hidden] {
    display: none !important;
  }
}
