/* Search page — premium layout */

.page-search {
  background: #f4f5f7;
}

.page-search .main.search-page {
  padding: 0 0 56px;
}

/* ── Hero / search bar ── */
.search-page__hero {
  background: linear-gradient(165deg, #141416 0%, #1e1e22 42%, #252528 100%);
  padding: 20px 0 32px;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
}

.search-page__hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 100%, rgba(234, 84, 85, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 90% 0%, rgba(254, 182, 146, 0.08) 0%, transparent 50%);
  pointer-events: none;
}

.search-page__hero .container {
  position: relative;
  z-index: 1;
}

.search-page__hero .catalog-breadcrumb {
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.45);
}

.search-page__hero .catalog-breadcrumb a {
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  transition: color 0.15s ease;
}

.search-page__hero .catalog-breadcrumb a:hover {
  color: #feb692;
}

.search-page__hero .catalog-breadcrumb span {
  color: rgba(255, 255, 255, 0.85);
}

.search-page__head {
  max-width: 720px;
}

.search-page__title {
  margin: 0 0 8px;
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #fff;
}

.search-page__lead {
  margin: 0 0 22px;
  font-size: 15px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.58);
}

.search-page__form {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 0;
  margin: 0;
  max-width: 640px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
  overflow: visible;
}

.search-page__field {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
  min-height: 52px;
  padding: 0 16px;
  background: transparent;
  border: none;
  border-radius: 14px 0 0 14px;
}

.search-page__icon {
  flex-shrink: 0;
  color: #8b939e;
}

.page-search .search-page__input,
.page-search .search-page__input.site-header__search-input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 52px;
  height: 100%;
  padding: 14px 0;
  border: none;
  background: transparent;
  font-size: 16px;
  line-height: 1.35;
  color: #1a1d21;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.search-page__input::placeholder {
  color: #a0a8b3;
}

.search-page__input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.search-page__submit {
  flex-shrink: 0;
  align-self: stretch;
  min-width: 112px;
  min-height: 52px;
  margin: 0;
  padding: 0 22px;
  border: none;
  border-radius: 0 14px 14px 0;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: none;
}

.search-page__dropdown {
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.18);
}

.search-page__chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
}

.search-page__chips-label {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
  margin-right: 4px;
}

.search-page__chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.search-page__chip:hover {
  color: #fff;
  background: rgba(234, 84, 85, 0.22);
  border-color: rgba(234, 84, 85, 0.35);
}

.search-page__chip.is-active {
  color: #fff;
  background: rgba(234, 84, 85, 0.32);
  border-color: rgba(234, 84, 85, 0.5);
  box-shadow: 0 0 0 1px rgba(234, 84, 85, 0.25);
}

/* ── Results area ── */
.search-page__results {
  min-width: 0;
}

.search-page__toolbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding: 14px 18px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
}

.search-page__toolbar.is-visible {
  display: flex;
}

.search-page__count {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #3d4450;
}

.search-page__count-query {
  color: var(--cv-red, #ea5455);
}

.search-page__catalog-link {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--cv-red, #ea5455);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 8px;
  background: rgba(234, 84, 85, 0.07);
  transition: background 0.15s ease;
}

.search-page__catalog-link:hover {
  background: rgba(234, 84, 85, 0.14);
  color: var(--cv-red, #ea5455);
}

.search-page .catalog-grid {
  gap: 22px;
}

/* ── Empty / no query state ── */
.search-empty {
  text-align: center;
  padding: 56px 24px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 20px;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.05);
}

.search-empty[hidden] {
  display: none !important;
}

.search-empty__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(234, 84, 85, 0.1) 0%, rgba(254, 182, 146, 0.12) 100%);
  color: var(--cv-red, #ea5455);
}

.search-empty__title {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #1a1d21;
}

.search-empty__text {
  margin: 0 0 24px;
  font-size: 15px;
  line-height: 1.5;
  color: #717f90;
  max-width: 36ch;
  margin-left: auto;
  margin-right: auto;
}

.search-empty__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.search-empty .button {
  min-width: 180px;
}

.search-empty__secondary {
  display: inline-flex;
  align-items: center;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  color: #4d4d4d;
  text-decoration: none;
  border: 1.5px solid #e3e6eb;
  border-radius: 8px;
  background: #fff;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.search-empty__secondary:hover {
  border-color: var(--cv-red, #ea5455);
  color: var(--cv-red, #ea5455);
}

/* ── Mobile ── */
@media (max-width: 639px) {
  .search-page__hero {
    padding: 16px 0 24px;
    margin-bottom: 20px;
  }

  .search-page__form {
    flex-direction: row;
    align-items: stretch;
    border-radius: 14px;
    overflow: hidden;
  }

  .search-page__field {
    flex: 1 1 auto;
    min-height: 48px;
    padding: 0 12px;
    border-bottom: none;
    border-radius: 14px 0 0 14px;
  }

  .page-search .search-page__input,
  .page-search .search-page__input.site-header__search-input {
    min-height: 48px;
    padding: 12px 0;
    font-size: 16px;
  }

  .search-page__submit {
    width: auto;
    min-width: 84px;
    min-height: 48px;
    padding: 0 16px;
    border-radius: 0 14px 14px 0;
    font-size: 14px;
  }

  .search-page__toolbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .search-page__catalog-link {
    width: 100%;
    text-align: center;
  }

  .search-empty {
    padding: 40px 20px;
  }

  .search-empty__actions {
    flex-direction: column;
    width: 100%;
  }

  .search-empty .button,
  .search-empty__secondary {
    width: 100%;
    justify-content: center;
  }
}
