/* 列表页专用样式 - 移动端优先 */

/* ===== 搜索框样式 ===== */
.search-bar {
  background: var(--white);
  padding: 0.75rem 0;
  border-bottom: 1px solid #e9ecef;
}

.search-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 0.5rem;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--light-bg);
  border: 1px solid #e9ecef;
  border-radius: 50px;
  padding: 0.5rem 1rem;
  transition: all 0.3s;
}

.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 196, 154, 0.1);
}

.search-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

.search-box input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 0.9rem;
  outline: none;
  color: var(--text);
}

.search-box input::placeholder {
  color: #adb5bd;
}

.clear-btn {
  width: 20px;
  height: 20px;
  border: none;
  background: #adb5bd;
  color: white;
  border-radius: 50%;
  font-size: 0.7rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.3s;
}

.clear-btn:hover {
  background: #6c757d;
}

/* ===== 链接样式优化 ===== */
a {
  text-decoration: none;
  color: inherit;
}

.tour-card-link {
  display: block;
  color: inherit;
  transition: transform 0.2s ease;
}

.tour-card-link:hover {
  transform: translateY(-2px);
}

.tour-card-link:active {
  transform: scale(0.98);
}

/* ===== 筛选栏移动端优化 ===== */
.filter-bar {
  background: var(--white);
  padding: 0.6rem 0;
  border-bottom: 1px solid #e9ecef;
  position: sticky;
  top: 60px;
  z-index: 100;
  overflow-x: hidden;
}

.filter-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.filter-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  width: 100%;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
  min-width: 0;
  width: 100%;
}

/* 筛选标签名称 - 固定宽度（四个字等宽） */
.filter-label {
  min-width: 52px;
  width: 52px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  background: var(--light-bg);
  padding: 0.4rem 0;
  border-radius: 6px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 32px;
}

/* 筛选按钮容器 */
.filter-buttons,
.filter-scroll {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}

.filter-scroll {
  overflow-x: auto;
  flex-wrap: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.filter-scroll::-webkit-scrollbar {
  display: none;
}

.filter-group label {
  font-weight: 500;
  color: var(--text-gray);
  font-size: 0.75rem;
  white-space: nowrap;
  flex-shrink: 0;
  width: 38px;
  text-align: right;
  padding-right: 0.2rem;
}

/* 筛选按钮横向滚动容器 */
.filter-scroll {
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 0.15rem;
  flex: 1;
  min-width: 0;
  margin-right: -0.5rem;
  padding-right: 0.5rem;
  /* 隐藏滚动条但保持滚动功能 */
  mask-image: linear-gradient(to right, black 90%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, black 90%, transparent 100%);
}

/* 提示可以横向滚动 */
.filter-scroll::after {
  content: '';
  flex: 0 0 20px;
}

.filter-scroll::-webkit-scrollbar {
  display: none;
}

.filter-btn {
  padding: 0.3rem 0.6rem;
  border: 1px solid #dee2e6;
  background: var(--white);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.3s;
  font-size: 0.7rem;
  white-space: nowrap;
  flex-shrink: 0;
  color: var(--text-dark);
  line-height: 1.4;
  -webkit-tap-highlight-color: transparent;
}

/* 移动端优化触摸 */
@media (hover: none) and (pointer: coarse) {
  .filter-btn {
    padding: 0.4rem 0.7rem;
    min-height: 32px;
  }
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

/* ===== 分页样式 ===== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  padding: 0 0.5rem;
}

.page-btn {
  padding: 0.5rem 0.75rem;
  border: 1px solid #dee2e6;
  background: var(--white);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.3s;
  font-size: 0.85rem;
  color: var(--text-dark);
  text-decoration: none;
  min-width: 36px;
  text-align: center;
}

.page-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

.page-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
  font-weight: 600;
}

.page-btn.disabled {
  background: #f8f9fa;
  border-color: #e9ecef;
  color: #adb5bd;
  cursor: not-allowed;
}

/* ===== 页脚链接样式 ===== */
.footer a {
  color: var(--white);
  text-decoration: none;
  transition: color 0.3s;
}

.footer a:hover {
  color: var(--primary);
}

/* ===== 平板适配 ===== */
@media (min-width: 640px) {
  .filter-bar {
    padding: 0.75rem 0;
  }
  
  .filter-container {
    padding: 0 1rem;
    gap: 0.6rem;
  }
  
  .filter-group {
    gap: 0.5rem;
  }
  
  .filter-group label {
    font-size: 0.85rem;
    width: auto;
    text-align: left;
    padding-right: 0;
  }
  
  .filter-btn {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
  }
  
  .filter-scroll {
    gap: 0.4rem;
    margin-right: 0;
    padding-right: 0;
  }
  
  .pagination {
    gap: 0.5rem;
  }
  
  .page-btn {
    padding: 0.6rem 1rem;
    min-width: 44px;
  }
}

/* ===== 桌面端适配 ===== */
@media (min-width: 1024px) {
  .filter-container {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
  }
  
  .filter-group {
    flex-wrap: nowrap;
  }
  
  .pagination {
    margin-top: 3rem;
  }
}

/* ===== 搜索结果提示 ===== */
.search-hint {
  text-align: center;
  padding: 2rem;
  color: var(--text-gray);
}

.search-hint p {
  margin-bottom: 1rem;
}

/* ===== 空状态 ===== */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-gray);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.empty-state h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}
