.cls-live-search,
.elementor-widget-container:has(.cls-live-search-input) {
  position: relative;
}

.cls-results {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  max-height: 360px;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 999;
  margin-top: 6px;
  font-family: "VazirMatn", sans-serif;
}

.cls-results.cls-open {
  display: block;
}

.cls-result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  text-decoration: none;
  color: inherit;
  font-family: "VazirMatn", sans-serif;
}

.cls-result-item:hover {
  background: #f7f7f7;
}

.cls-result-item img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.cls-result-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.cls-result-title {
  font-size: 14px;
  font-family: "VazirMatn", sans-serif;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cls-result-price {
  font-size: 12px;
  color: #888;
  font-family: "VazirMatn", sans-serif;
}

.cls-no-result,
.cls-loading {
  padding: 12px;
  text-align: center;
  font-size: 13px;
  color: #999;
  font-family: "VazirMatn", sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.cls-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid #ddd;
  border-top-color: #888;
  border-radius: 50%;
  display: inline-block;
  animation: cls-spin 0.6s linear infinite;
}

@keyframes cls-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 480px) {
  .cls-results {
    position: fixed;
    top: auto;
    right: 12px;
    left: 12px;
    width: auto;
    max-height: 50vh;
    margin-top: 4px;
  }

  .cls-result-title {
    font-size: 13px;
  }

  .cls-result-price {
    font-size: 11px;
  }
}

@media (min-width: 481px) and (max-width: 768px) {
  .cls-results {
    max-height: 45vh;
  }
}
