
/* =========================================================
   CarpetCare.pro
   styles-search.css
   Reusable search / Algolia UI
   ========================================================= */

/* =========================================================
   01. Search section shell
   ========================================================= */

.ccp-local-search-section {
  position: relative;
  overflow: visible;
  background:
    radial-gradient(circle at top left, rgba(201, 150, 62, 0.10) 0%, transparent 32%),
    radial-gradient(circle at bottom right, rgba(13, 39, 66, 0.08) 0%, transparent 38%),
    linear-gradient(180deg, #fdfbf7 0%, #f7f4ee 100%);
  padding-top: 5rem !important;
  padding-bottom: 5rem !important;
}

.ccp-search-heading {
  color: var(--ccp-navy);
  font-weight: 800;
  letter-spacing: -0.035em;
  font-size: clamp(2rem, 4vw, 3.25rem);
  margin-bottom: 1rem;
}

.ccp-search-intro {
  color: var(--ccp-muted);
  max-width: 660px;
  margin: 0 auto 2rem;
  font-size: 1.1rem;
  line-height: 1.7;
}

.ccp-search-helper {
  color: var(--ccp-muted);
  margin: 1.5rem 0 1rem;
  font-weight: 600;
}

/* =========================================================
   02. Search card / wrapper
   ========================================================= */

.ccp-search-wrap {
  position: relative;
  z-index: 2;
  background: rgba(235, 216, 132, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(13, 39, 66, 0.10);
  border-radius: 1.5rem;
  box-shadow:
    0 20px 60px rgba(13, 39, 66, 0.10),
    0 8px 24px rgba(13, 39, 66, 0.06);
  padding: 6.75rem;
}

.ccp-search-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      rgba(235,216,132,.35),
      rgba(235,216,132,.35)
    ),
    url('../_images/map-bg.jpg') center center / cover no-repeat;
  opacity: 0.25;
  z-index: -1;
  pointer-events: none;
}

.ccp-search-container {
  position: relative;
}

.ccp-search-hits {
  margin-top: 1rem;
  text-align: left;
}

/* =========================================================
   03. Search input
   ========================================================= */

.ccp-search-input {
  color: var(--ccp-navy) !important;
  font-weight: 800;
  border-radius: 999px;
  border: 1px solid rgba(13, 39, 66, 0.18);
  padding: 0.95rem 1.25rem;
  text-align: center;
}

.ccp-search-input::placeholder {
  color: rgba(13, 39, 66, 0.55);
}

.ccp-algolia-logo {
  max-width: 125px;
  margin-top: 0.75rem;
  opacity: 0.75;
}

.algolia_logo {
  width: 60px;
  float: right;
  margin-top: 10px;
}

/* =========================================================
   04. Algolia magnifier / built-in widget tweaks
   ========================================================= */

.ais-search-box--magnifier {
  top: 18px;
  left: 7px;
}

.ais-search-box--loading-indicator-wrapper svg,
.ais-search-box--magnifier svg {
  vertical-align: middle;
  height: 24px;
  width: 24px;
}

/* =========================================================
   05. Dropdown results shell
   ========================================================= */

#hits {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%);
  width: min(360px, 100%);
  min-width: 220px;
  z-index: 9999;
  display: none;

  background: #fff;
  border: 1px solid rgba(13, 39, 66, 0.12);
  border-radius: 18px;

  box-shadow:
    0 20px 60px rgba(13, 39, 66, 0.14),
    0 4px 18px rgba(13, 39, 66, 0.08);

  overflow: hidden;
}

/* =========================================================
   06. Search result rows
   ========================================================= */

.hit {
  display: flex;
  align-items: center;
  transition: background-color 0.18s ease;
}

.hit:hover {
  background: #f7f9fc;
}

.hit-content {
  width: 100%;
  flex-grow: 1;
  padding: 10px 0;
  overflow: hidden;
}

.hit-content a {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  text-decoration: none;
  border-bottom: 1px solid rgba(13, 39, 66, 0.06);
}

.hit-location,
.hit-content h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ccp-navy);
  line-height: 1.3;
}

img.location {
  width: 120px;
  min-width: 120px;
  border-radius: 10px;
  padding-left: 0;
  height: auto;
}

/* =========================================================
   07. Responsive
   ========================================================= */

@media (max-width: 1199.98px) {
  .ccp-search-wrap {
    padding: 3rem 1.25rem;
  }

  .ccp-search-input {
    width: 100%;
    max-width: 100%;
    font-size: 1.15rem;
    padding: 0.9rem 1.1rem;
    text-align: center;
  }

  .ccp-search-input::placeholder {
    font-size: 1.15rem;
  }

  .ccp-search-container .ais-search-box {
    width: 100% !important;
    max-width: 100% !important;
  }
}

@media (max-width: 575.98px) {
  #hits {
    width: calc(100vw - 32px);
    min-width: unset;
  }

  .hit-content a {
    padding: 0.9rem 1rem;
    gap: 0.75rem;
  }

  img.location {
    width: 88px;
    min-width: 88px;
  }

  .hit-location,
  .hit-content h3 {
    font-size: 1rem;
  }
}