/**
 * @file
 * 产品搜索页面样式
 */

/* 搜索结果容器 */
.search-results-container {
  padding: 20px 16px 100px;
  padding-top: 20px;
}

.search-results-max-width {
  max-width: 1200px;
  margin: 0 auto;
}

/* 搜索头部 */
.search-header {
  background: white;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.search-input-wrapper {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.search-input {
  flex: 1;
  min-width: 0;
  padding: 11px 14px;
  border: 1.5px solid rgba(0, 0, 0, 0.15);
  border-radius: 10px;
  font-size: 15px;
  outline: none;
  transition: all 0.2s ease;
  font-family: inherit;
}

.search-input:focus {
  border-color: #0066CC;
}

.search-submit-btn {
  padding: 11px 18px;
  background: #0066CC;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
  font-family: inherit;
}

.search-submit-btn:hover {
  background: #0052A3;
}

.search-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  color: #6E6E73;
}

.search-keyword {
  font-weight: 600;
  color: #1D1D1F;
}

/* 过滤标签 */
.filter-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  overflow-x: auto;
}

.filter-tab {
  padding: 8px 16px;
  background: white;
  border: 2px solid rgba(0, 0, 0, 0.08);
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  color: #6E6E73;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.filter-tab:hover {
  border-color: #0066CC;
  color: #0066CC;
}

.filter-tab.active {
  background: #0066CC;
  border-color: #0066CC;
  color: white;
}

/* 搜索结果网格 */
.search-results-grid,
.product-grid-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.product-card-wrapper {
  width: 100%;
}

/* 产品卡片 */
.product-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.2s ease;
  text-decoration: none;
  color: inherit;
  display: block;
}

.product-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.product-image {
  width: 100%;
  aspect-ratio: 1;
  background: #F5F5F7;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-image svg {
  width: 48px;
  height: 48px;
  color: #ccc;
}

.product-info {
  padding: 12px;
}

.product-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
  height: 40px;
  color: #1D1D1F;
}

.product-price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
}

.price-group {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.product-price {
  font-size: 18px;
  font-weight: 700;
  color: #E53935; /* 红色折扣价格 */
}

.product-price .price-suffix {
  font-size: 12px;
  font-weight: 400;
  margin-left: 2px;
  color: #E53935; /* 红色 */
}

.product-original-price {
  font-size: 12px;
  color: #999;
  text-decoration: line-through;
}

.product-sales {
  font-size: 12px;
  color: #6E6E73;
}

/* 无结果样式 */
.no-results {
  text-align: center;
  padding: 60px 20px;
  background: white;
  border-radius: 12px;
}

.no-results-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  color: #ccc;
}

.no-results-text {
  font-size: 16px;
  color: #6E6E73;
  margin-bottom: 8px;
}

.no-results-hint {
  font-size: 14px;
  color: #999;
}

/* 响应式设计 */
@media (min-width: 768px) {
  .search-results-container {
    padding: 20px 0 100px;
  }

  .search-results-grid,
  .product-grid-container {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

@media (min-width: 1024px) {
  .search-results-grid,
  .product-grid-container {
    grid-template-columns: repeat(5, 1fr);
  }
}
