/* 首页按图找货缩略图检索区（原生，无依赖，file:// 可用） */
.qf { background: #ffffff; padding: 72px 0; }
.qf .container { max-width: 1280px; margin: 0 auto; padding: 0 32px; }
.qf-title { font-size: 32px; font-weight: 700; line-height: 1.2; color: #1c1c1e; margin: 0 0 10px; }
.qf-sub { font-size: 15px; line-height: 1.6; color: #6b7280; margin: 0 0 28px; }
.qf-bar { display: flex; flex-direction: column; gap: 16px; margin: 0 0 28px; }
.qf-input {
  width: 100%; max-width: 480px; height: 44px; padding: 0 16px;
  font-size: 15px; line-height: 1.2; color: #1c1c1e; background: #ffffff;
  border: 1px solid #d1d5db; border-radius: 8px; outline: none;
  box-sizing: border-box;
}
.qf-input:focus { border-color: #1c1c1e; }
.qf-input::placeholder { color: #9ca3af; }
.qf-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.qf-chip {
  height: 32px; padding: 0 16px; font-size: 13px; font-weight: 500; line-height: 1;
  color: #1c1c1e; background: #ffffff; border: 1px solid #d1d5db; border-radius: 999px;
  cursor: pointer; transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.qf-chip:hover { border-color: #1c1c1e; }
.qf-chip.is-active { background: #1c1c1e; color: #ffffff; border-color: #1c1c1e; }
.qf-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; min-height: 160px; }
.qf-tile {
  position: relative; display: block; aspect-ratio: 1 / 1; overflow: hidden;
  background: #f5f5f7; border-radius: 2px; text-decoration: none;
}
.qf-tile.is-hidden { display: none; }
.qf-tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.2s ease; }
.qf-tile:hover img { transform: scale(1.03); }
.qf-cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 7px 10px;
  font-size: 12px; font-weight: 500; line-height: 1.2; color: #ffffff; text-align: center;
  background: rgba(28, 28, 30, 0.72);
}
.qf-empty { margin: 20px 0 0; font-size: 15px; color: #6b7280; }

/* 点击缩略图后的目标高亮 */
.qf-target,
.products .product-grid > .product-card.qf-target,
.products .product-grid > .product-detail-card.qf-target {
  outline: 2px solid #1c1c1e;
  outline-offset: -2px;
  background-color: #f9fafb;
}

@media (max-width: 1024px) {
  .qf-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 640px) {
  .qf { padding: 48px 0; }
  .qf .container { padding: 0 20px; }
  .qf-grid { grid-template-columns: repeat(3, 1fr); }
  .qf-title { font-size: 26px; }
}
