/* ==========================================================================
   HOME SEARCH SECTION & POPULAR TAGS (CITY MAINTAINANCE)
   ========================================================================== */

.cm-home-search-section {
  background: radial-gradient(120% 120% at 50% 0%, #EEF5FF 0%, #F8FAFC 90%);
  border-bottom: 1px solid var(--cm-border);
  padding: var(--cm-space-4) 0;
  position: relative;
}

@media (min-width: 768px) {
  .cm-home-search-section {
    padding: var(--cm-space-5) 0;
  }
}

.cm-home-search-card {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

/* Home Search Bar Input Container */
.cm-home-search-bar-wrap {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  background: #FFFFFF;
  border: 1.5px solid #CBD5E1;
  border-radius: var(--cm-radius-full);
  padding: 4px 6px 4px 16px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: all var(--cm-transition-fast);
}

@media (min-width: 768px) {
  .cm-home-search-bar-wrap {
    padding: 5px 8px 5px 20px;
    border-width: 2px;
  }
}

.cm-home-search-bar-wrap:focus-within {
  border-color: var(--cm-primary);
  box-shadow: 0 0 0 4px rgba(0, 86, 224, 0.12), 0 8px 24px rgba(0, 86, 224, 0.1);
  background: #FFFFFF;
}

.cm-home-search-icon {
  color: var(--cm-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .cm-home-search-icon {
    margin-right: 12px;
  }
}

.cm-home-search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  color: var(--cm-text-main);
  height: 40px;
  padding: 0;
  font-family: inherit;
  min-width: 0;
}

@media (min-width: 768px) {
  .cm-home-search-input {
    font-size: 15.5px;
    height: 46px;
  }
}

.cm-home-search-input::placeholder {
  color: var(--cm-text-muted);
  font-weight: 400;
}

.cm-home-search-clear {
  display: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--cm-bg-alt);
  border: none;
  color: var(--cm-text-muted);
  font-size: 12px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-right: 8px;
  flex-shrink: 0;
  transition: all var(--cm-transition-fast);
}

.cm-home-search-clear.visible {
  display: flex;
}

.cm-home-search-clear:hover {
  background: #E2E8F0;
  color: var(--cm-text-main);
}

.cm-home-search-submit-btn {
  height: 38px;
  padding: 0 16px;
  background: linear-gradient(135deg, var(--cm-primary) 0%, #0046BA 100%);
  color: #FFFFFF;
  border: none;
  border-radius: var(--cm-radius-full);
  font-size: 13.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 86, 224, 0.25);
  transition: all var(--cm-transition-fast);
}

@media (min-width: 768px) {
  .cm-home-search-submit-btn {
    height: 44px;
    padding: 0 22px;
    font-size: 14.5px;
  }
}

.cm-home-search-submit-btn:hover {
  background: linear-gradient(135deg, var(--cm-primary-hover) 0%, #003794 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 86, 224, 0.35);
}

.cm-home-search-submit-btn:active {
  transform: scale(0.97);
}

/* Home Search Dropdown (Autocomplete Results) */
.cm-home-search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #FFFFFF;
  border: 1px solid var(--cm-border);
  border-radius: var(--cm-radius-xl);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.14), 0 2px 8px rgba(0, 0, 0, 0.04);
  max-height: 360px;
  overflow-y: auto;
  z-index: 150;
  padding: 8px;
  animation: dropdownFade 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dropdownFade {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cm-home-search-dropdown-header {
  font-size: 11px;
  font-weight: 800;
  color: var(--cm-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 6px 10px 4px;
}

.cm-home-search-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: var(--cm-radius-md);
  cursor: pointer;
  transition: background var(--cm-transition-fast);
}

.cm-home-search-dropdown-item:hover {
  background: var(--cm-bg-alt);
}

.cm-home-search-dropdown-thumb {
  width: 44px;
  height: 44px;
  border-radius: var(--cm-radius-sm);
  object-fit: cover;
  background: #F1F5F9;
  border: 1px solid var(--cm-border);
  flex-shrink: 0;
}

.cm-home-search-dropdown-info {
  flex: 1;
  min-width: 0;
}

.cm-home-search-dropdown-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--cm-text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cm-home-search-dropdown-meta {
  font-size: 11.5px;
  color: var(--cm-text-muted);
  margin-top: 2px;
}

.cm-home-search-dropdown-price {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--cm-primary);
  flex-shrink: 0;
}

.cm-home-search-dropdown-footer {
  border-top: 1px solid var(--cm-border);
  margin-top: 6px;
  padding-top: 6px;
}

.cm-home-search-dropdown-see-all {
  width: 100%;
  padding: 8px 12px;
  background: var(--cm-primary-light);
  color: var(--cm-primary);
  border: 1px solid rgba(0, 86, 224, 0.2);
  border-radius: var(--cm-radius-md);
  font-size: 12.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all var(--cm-transition-fast);
  border: none;
}

.cm-home-search-dropdown-see-all:hover {
  background: var(--cm-primary);
  color: #FFFFFF;
}

.cm-home-search-dropdown-empty {
  padding: 18px 12px;
  text-align: center;
  font-size: 13px;
  color: var(--cm-text-muted);
}

/* Home Popular Tags / Chips */
.cm-home-search-tags {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
  justify-content: center;
}

@media (min-width: 768px) {
  .cm-home-search-tags {
    margin-top: 14px;
  }
}

.cm-home-tags-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--cm-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  display: inline-flex;
  align-items: center;
}

.cm-home-tags-list {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.cm-home-tag-chip {
  background: #FFFFFF;
  border: 1px solid var(--cm-border);
  border-radius: var(--cm-radius-full);
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--cm-text-secondary);
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  transition: all var(--cm-transition-fast);
  font-family: inherit;
}

.cm-home-tag-chip:hover {
  background: var(--cm-primary-light);
  color: var(--cm-primary);
  border-color: rgba(0, 86, 224, 0.35);
  transform: translateY(-1px);
}

/* Hero Action CTA Buttons — Strictly Side by Side on Mobile */
.cm-hero-cta-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 440px;
  margin: 14px auto 16px auto;
  padding: 0 4px;
}

@media (min-width: 640px) {
  .cm-hero-cta-row {
    gap: 12px;
    max-width: 500px;
  }
}

.cm-hero-cta-btn {
  flex: 1 1 50%;
  min-width: 0;
  height: 44px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-decoration: none;
  white-space: nowrap;
  transition: all var(--cm-transition-fast, 150ms ease);
}

@media (min-width: 480px) {
  .cm-hero-cta-btn {
    font-size: 14px;
    padding: 0 16px;
    height: 46px;
    gap: 6px;
  }
}

.cm-hero-cta-primary {
  background: var(--cm-primary, #0056E0);
  color: #FFFFFF !important;
  box-shadow: 0 3px 12px rgba(0, 86, 224, 0.28);
  border: 1.5px solid var(--cm-primary, #0056E0);
}

.cm-hero-cta-primary:hover {
  background: var(--cm-primary-hover, #0045B5);
  border-color: var(--cm-primary-hover, #0045B5);
  transform: translateY(-1px);
}

.cm-hero-cta-secondary {
  background: #FFFFFF;
  color: var(--cm-text-main, #0F172A) !important;
  border: 1.5px solid var(--cm-border, #CBD5E1);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

.cm-hero-cta-secondary:hover {
  border-color: var(--cm-primary, #0056E0);
  color: var(--cm-primary, #0056E0) !important;
  transform: translateY(-1px);
}

