/**
 * 红海车域 - 买车列表页样式表
 *
 * 仅包含买车页专属样式（Hero搜索区、筛选栏、车辆卡片、分页、空状态）。
 * 通用样式（导航栏、底部、容器等）由 style.css 提供。
 *
 * 对应旧系统：D:\hhcyCar\oldCode\hhcy-car-mall\target\classes\templates\web\buy.html 中的 <style> 部分。
 * 旧系统内嵌的登录弹窗样式不再迁移（新系统使用独立登录页 /html/login.html）。
 */

/* ========== Hero 搜索区 ========== */
.buy-hero {
  background: linear-gradient(135deg, #1a3a5c 0%, #24549B 100%);
  padding: 40px 0 50px;
}
.buy-hero-title {
  font-size: 28px;
  color: #fff;
  font-weight: bold;
  margin-bottom: 8px;
}
.buy-hero-sub {
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  margin-bottom: 25px;
}
.buy-search-box {
  background: #fff;
  border-radius: 8px;
  padding: 20px 25px;
  display: flex;
  gap: 12px;
  align-items: center;
  max-width: 700px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}
.buy-search-box input {
  flex: 1;
  height: 44px;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 0 15px;
  font-size: 15px;
  outline: none;
  box-sizing: border-box;
}
.buy-search-box input:focus {
  border-color: #24549B;
  box-shadow: 0 0 0 3px rgba(36,84,155,0.1);
}
.buy-search-box button {
  height: 44px;
  padding: 0 28px;
  background: #24549B;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  color: #fff;
  cursor: pointer;
  transition: background .2s;
}
.buy-search-box button:hover {
  background: #1d4785;
}
.buy-search-hint {
  margin-top: 12px;
  font-size: 13px;
  color: rgba(255,255,255,0.6);
}
.buy-search-hint a {
  color: #fff;
  margin: 0 8px;
  opacity: 0.8;
  cursor: pointer;
  text-decoration: none;
}
.buy-search-hint a:hover {
  opacity: 1;
  text-decoration: underline;
}

/* ========== 筛选栏 ========== */
.filter-wrap {
  background: #fff;
  border-radius: 8px;
  margin: 20px 0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.filter-row {
  display: flex;
  align-items: center;
  padding: 0 20px;
  min-height: 52px;
  border-bottom: 1px solid #f0f0f0;
}
.filter-row:last-child {
  border-bottom: none;
}
.filter-label {
  color: #999;
  font-size: 13px;
  width: 70px;
  flex-shrink: 0;
}
.filter-values {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.filter-val {
  padding: 5px 14px;
  font-size: 13px;
  color: #333;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}
.filter-val:hover {
  background: #f0f0f0;
  color: #333;
}
.filter-val.active {
  background: #24549B;
  color: #fff;
}
.filter-select {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 5px 10px;
  font-size: 13px;
  color: #333;
  background: #fff;
  min-width: 130px;
  outline: none;
}
.filter-select:focus {
  border-color: #24549B;
}
.filter-reset-btn {
  padding: 5px 14px;
  font-size: 13px;
  color: #FB331F;
  background: none;
  border: 1px solid #FB331F;
  border-radius: 4px;
  margin-left: 10px;
  cursor: pointer;
  transition: background .2s;
}
.filter-reset-btn:hover {
  background: #fff0f0;
}

/* ========== 结果统计 ========== */
.result-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
}
.result-count {
  font-size: 14px;
  color: #666;
}
.result-count strong {
  color: #FB331F;
  font-size: 18px;
}
.result-sort select {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 13px;
  color: #333;
  outline: none;
}

/* ========== 车辆列表 ========== */
.car-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.car-item {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  transition: box-shadow 0.2s, transform 0.15s;
}
.car-item:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}
.car-item-img {
  width: 240px;
  height: 180px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  background: #f5f5f5;
  cursor: pointer;
}
.car-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.car-item-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.badge-featured {
  background: #FB331F;
  color: #fff;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 3px;
  font-weight: bold;
}
.badge-sold {
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 3px;
  font-weight: bold;
}
.badge-new {
  background: rgba(36,84,155,0.9);
  color: #fff;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 3px;
}
.car-item-body {
  flex: 1;
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.car-item-top {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}
.car-brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.car-brand-logo img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}
.car-item-info {
  flex: 1;
}
.car-item-name {
  font-size: 17px;
  font-weight: bold;
  color: #1a1a1a;
  margin-bottom: 6px;
  line-height: 1.3;
  text-decoration: none;
  display: block;
}
.car-item-name:hover {
  color: #24549B;
}
.car-item-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.car-tag-item {
  font-size: 12px;
  color: #666;
  background: #f5f5f5;
  padding: 3px 10px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.car-tag-item i {
  font-size: 11px;
  color: #999;
}
.car-item-city {
  font-size: 13px;
  color: #999;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 12px;
}
.car-item-city i {
  color: #24549B;
}
.car-item-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}
.car-price-wrap {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.car-price-main {
  font-size: 26px;
  font-weight: bold;
  color: #FB331F;
}
.car-price-unit {
  font-size: 14px;
  color: #FB331F;
}
.car-price-guide {
  font-size: 13px;
  color: #999;
  text-decoration: line-through;
}
.car-price-meta {
  font-size: 13px;
  color: #666;
  margin-top: 6px;
}
.car-price-meta strong {
  color: #FB331F;
}
.car-item-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.btn-consult {
  background: #fff;
  color: #24549B;
  border: 1px solid #24549B;
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: background .2s;
}
.btn-consult:hover {
  background: #f0f5ff;
}

/* ========== 分页 ========== */
.page-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 35px 0;
}
.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  color: #333;
  font-size: 14px;
  margin: 0 3px;
  cursor: pointer;
  transition: all 0.15s;
}
.page-btn:hover {
  border-color: #24549B;
  color: #24549B;
}
.page-btn.active {
  background: #24549B;
  border-color: #24549B;
  color: #fff;
}
.page-btn.disabled {
  color: #ccc;
  cursor: not-allowed;
  pointer-events: none;
}

/* ========== 空状态 ========== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: #fff;
  border-radius: 10px;
}
.empty-state i {
  font-size: 60px;
  color: #ddd;
  margin-bottom: 15px;
}
.empty-state h3 {
  font-size: 18px;
  color: #333;
  margin-bottom: 8px;
}
.empty-state p {
  color: #999;
  font-size: 14px;
}
.empty-state p a {
  color: #24549B;
  text-decoration: none;
}
.empty-state p a:hover {
  text-decoration: underline;
}

/* ========== 加载中 ========== */
.loading-state {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}
.loading-state i {
  font-size: 32px;
  color: #24549B;
  margin-bottom: 10px;
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
  .car-item { flex-direction: column; }
  .car-item-img { width: 100%; height: 200px; }
  .filter-row { flex-wrap: wrap; }
  .buy-search-box { flex-direction: column; }
  .buy-search-box input { width: 100%; }
  .buy-search-box button { width: 100%; }
}
