/* Hide native search input clear button — theme has its own close */
#search-field::-webkit-search-cancel-button {
  -webkit-appearance: none;
  display: none;
}

/* ─── Instant Search Results (horizontal cards) ─── */

.ss-results {
  display: none;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  background: var(--color-bg, #fff);
  border-top: 1px solid var(--color-border, #e5e5e5);
  padding: 0.75rem 0 0.75rem;
  position: relative;
  z-index: 100;
}

.ss-results::-webkit-scrollbar {
  display: none;
}

.ss-results__track {
  display: flex;
  gap: 1rem;
  padding: 0 0.25rem;
  width: max-content;
}

.ss-item {
  display: flex;
  flex-direction: column;
  width: 155px;
  flex-shrink: 0;
  text-decoration: none;
  color: inherit;
}

.ss-item:hover .ss-item__img {
  opacity: 0.85;
}

.ss-item__img {
  width: 155px;
  height: 207px; /* 3:4 */
  object-fit: cover;
  border-radius: 2px;
  background: var(--color-bg-subtle, #f5f5f5);
  transition: opacity 0.15s;
}

.ss-item__placeholder {
  width: 155px;
  height: 207px;
  border-radius: 2px;
  background: var(--color-bg-subtle, #f5f5f5);
}

.ss-item__title {
  font-size: 0.75rem;
  line-height: 1.3;
  margin-top: 0.375rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.ss-item__price {
  display: none;
}

.ss-empty {
  padding: 1.5rem 1rem;
  text-align: center;
  font-size: 0.875rem;
  opacity: 0.6;
  width: 100%;
}

/* Mobile: smaller cards */
@media (max-width: 640px) {
  .ss-item {
    width: 110px;
  }

  .ss-item__img,
  .ss-item__placeholder {
    width: 110px;
    height: 147px;
  }
}

/* ─── Similar Products (Recommendations) ─── */

.ss-similar-products {
  margin: 2rem 0;
}

.ss-similar-products h2 {
  margin-bottom: 1rem;
}

.ss-similar-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

@media (max-width: 768px) {
  .ss-similar-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.ss-similar-item {
  text-decoration: none;
  color: inherit;
  display: block;
}

.ss-similar-item:hover .ss-similar-img {
  opacity: 0.85;
}

.ss-similar-img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 2px;
  transition: opacity 0.2s;
}

.ss-similar-title {
  font-size: 0.8125rem;
  line-height: 1.3;
  margin-top: 0.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ss-similar-price {
  font-size: 0.8125rem;
  margin-top: 0.25rem;
  opacity: 0.7;
}
