/* Property search — matches design spec */
.upscale-property-search {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  max-width: 100%;
  margin-bottom: 60px;
}

.upscale-property-search .upscale-search-bar {
  background: #ffffff;
  border-radius: 16px;
  padding: 3px;
  padding-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.upscale-property-search .upscale-search-input-wrapper {
  position: relative;
  flex: 1;
  min-width: 280px;
}

.upscale-property-search .upscale-search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: 20px;
  z-index: 2;
}

.upscale-property-search input.upscale-search-input {
  width: 100%;
  border: 1px solid #1a2e4a80;
  border-radius: 13px;
  padding: 14px 1rem 14px 52px;
  font-size: 16px;
  outline: none;
  transition: all 0.3s ease;
}

.upscale-property-search input.upscale-search-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.upscale-property-search .upscale-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.upscale-property-search .upscale-filters select.upscale-filter-btn {
  width: 180px;
  padding: 14px 28px 14px 15px;
  border: 1px solid #1a2e4a80;
  border-radius: 13px;
  font-size: 15px;
  font-weight: 500;
  background-color: #ffffff;
  color: #374151;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: var(--upscale-filter-arrow, none);
  background-repeat: no-repeat;
  background-position: right 18px center;
  background-size: 12px;
}

.upscale-property-search .upscale-filters select.upscale-filter-btn:hover {
  background-color: #f9fafb;
  border-color: #d1d5db;
}

.upscale-property-search .upscale-filters select.upscale-filter-btn:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.upscale-property-search .upscale-active-filters {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.upscale-property-search .upscale-pill {
  background: #f1f5f900;
  border: 1px solid #1a2e4a80;
  color: #374151;
  padding: 3px 11px;
  border-radius: 9999px;
  font-size: 14.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.upscale-property-search .upscale-pill-close {
  cursor: pointer;
  color: #6b7280;
  font-size: 16px;
  font-weight: 700;
  background: none;
  border: none;
  padding: 0;
  line-height: 1;
}

.upscale-property-search .upscale-pill-close:hover {
  color: #ef4444;
}

.upscale-property-search .upscale-clear-all {
  margin-left: auto;
}

.upscale-property-search .upscale-clear-all.ups-btn--sm {
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .upscale-property-search .upscale-search-bar {
    padding: 8px;
  }

  .upscale-property-search .upscale-filters {
    width: 100%;
  }

  .upscale-property-search .upscale-filters select.upscale-filter-btn {
    width: 100%;
  }

  .upscale-property-search .upscale-search-input-wrapper {
    min-width: 100%;
  }

  .upscale-property-search .upscale-clear-all {
    margin-left: 0;
    width: auto;
    text-align: left;
  }
}

/* Property listing grid */
.ups-all-properties {
  width: 100%;
}

.upscale-property-listing.is-loading .upscale-property-listing__results {
  opacity: 0.55;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.ups-all-properties__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}

.ups-all-properties__item {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.ups-all-properties__item > .ups-card {
  flex: 1;
}

.upscale-property-listing__empty {
  grid-column: 1 / -1;
  padding: 40px 20px;
  text-align: center;
  color: #6b7280;
}

/* Property card */
.ups-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.ups-card__media-wrap {
  position: relative;
  height: 200px;
  max-height: 200px;
  overflow: hidden;
  flex-shrink: 0;
}

.ups-card__media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ups-card__media--placeholder {
  background: linear-gradient(135deg, #e5e7eb, #f3f4f6);
}

.ups-card__tag {
  position: absolute;
  top: 14px;
  left: 14px;
  background: #fff;
  border-radius: 999px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  height: 37px;
  min-height: 37px;
  max-height: 37px;
  width: auto;
  line-height: 1;
  box-sizing: border-box;
  z-index: 2;
}

.ups-card__tag i.f {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 0;
}

.ups-card__tag .ups-card__icon,
.ups-card__tag i.f img {
  width: 14px;
  height: 14px;
  object-fit: contain;
  display: block;
}

.ups-card__content {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.ups-card__price {
  margin: 0;
  font-size: 14px;
  color: #6b7280;
}

.ups-card__price span {
  color: #111827;
  font-weight: 700;
}

.ups-card__name {
  margin: 0;
  font-size: 20px;
  line-height: 26px;
  min-height: 52px;
}

.ups-card__name-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  line-height: 26px;
  max-height: 52px;
  word-break: break-word;
}

.ups-card__location {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #4b5563;
  font-size: 15px;
}

.ups-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: #374151;
  font-size: 14px;
}

.ups-card__meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ups-card__icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.ups-card__agent {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 8px;
}

.ups-card__agent img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.ups-card__agent h4 {
  margin: 0;
  font-size: 15px;
}

.ups-card__agent p {
  margin: 2px 0 0;
  font-size: 13px;
  color: #6b7280;
}

.ups-card__enquire {
  display: inline-block;
  margin-top: 8px;
  color: #1a2e4a;
  font-weight: 600;
  text-decoration: none;
}

.ups-card__enquire:hover {
  color: #2563eb;
}

@media (max-width: 1024px) {
  .ups-all-properties__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .ups-all-properties__grid {
    grid-template-columns: 1fr;
  }
}
