/* ============================================================
   Страница глобального поиска
   (подключается ПОСЛЕ styles.css и catalog.css —
    переиспользует сетку товаров и сайдбар каталога)
   ============================================================ */

/* ---------- ХЕРО С ГЛОБАЛЬНОЙ СТРОКОЙ ПОИСКА ---------- */
.search-hero{
  background:var(--bg-soft);
  border-bottom:1px solid var(--line);
  padding:52px 0 46px;
}
.search-hero .container{ text-align:center; }
.sr-eyebrow{ margin-bottom:12px; }
.sr-h1{
  font-size:clamp(26px, 3.4vw, 38px);
  font-weight:800;
  letter-spacing:-.015em;
  line-height:1.12;
  max-width:760px;
  margin:0 auto;
  text-wrap:balance;
}

/* строка поиска ~80% контентной зоны */
.bigsearch{
  width:80%;
  max-width:840px;
  margin:26px auto 0;
  display:flex;
  gap:12px;
}
.bigsearch-field{ position:relative; flex:1 1 auto; min-width:0; }
.bigsearch-field input{
  width:100%;
  height:58px;
  border:1px solid var(--line);
  border-radius:11px;
  padding:0 50px 0 20px;
  font-size:16px;
  color:var(--ink);
  background:#fff;
  box-shadow:var(--shadow-sm);
  outline:0;
  transition:border-color .15s, box-shadow .15s;
}
.bigsearch-field input::placeholder{ color:var(--faint); }
.bigsearch-field input:focus{ border-color:var(--red); box-shadow:0 0 0 3px var(--red-soft); }

/* крестик очистки — появляется только при наличии текста */
.bigsearch-clear{
  position:absolute;
  right:12px; top:50%;
  transform:translateY(-50%) scale(.6);
  width:30px; height:30px; border-radius:50%;
  border:0; background:var(--bg-soft); color:var(--muted);
  display:grid; place-items:center;
  opacity:0; visibility:hidden;
  transition:opacity .15s, transform .15s, background .15s, color .15s;
}
.bigsearch-clear:hover{ background:var(--red-soft); color:var(--red); }
.bigsearch.has-text .bigsearch-clear{ opacity:1; visibility:visible; transform:translateY(-50%) scale(1); }

.bigsearch-btn{
  flex-shrink:0;
  height:58px;
  padding:0 38px;
  background:var(--red); color:var(--brand-cta-fg);
  border:0; border-radius:11px;
  font-family:var(--font-head); font-weight:700; font-size:16px;
  display:inline-flex; align-items:center; gap:10px;
  transition:background .15s, transform .08s;
}
.bigsearch-btn:hover{ background:var(--red-dark); }
.bigsearch-btn:active{ transform:translateY(1px); }

/* ---------- ЗАГОЛОВОК РЕЗУЛЬТАТОВ (H2) ---------- */
.cat-head h2.sr-results-title{
  font-size:28px; font-weight:800; letter-spacing:-.01em; line-height:1.18;
  max-width:760px; margin:0;
}
.cat-head h2.sr-results-title .q{ color:var(--red); }
.search-correction{ margin:8px 0 0; color:var(--muted); font-size:13px; }

.search-groups{
  display:flex; gap:8px; overflow-x:auto; padding:24px 0 4px; scrollbar-width:thin;
}
.search-group{
  flex:0 0 auto; border:1px solid var(--line); background:#fff; color:var(--ink);
  border-radius:999px; padding:9px 15px; font:600 13px var(--font-head); cursor:pointer;
}
.search-group span{ margin-left:7px; color:var(--faint); font-size:12px; }
.search-group:hover,.search-group.active{ border-color:var(--red); color:var(--red); background:var(--red-soft); }

.search-results{ min-width:0; }
.search-facets{ display:grid; gap:13px; }
.search-facet{ display:grid; gap:6px; color:var(--muted); font-size:12px; font-weight:600; }
.search-facet select{
  width:100%; min-height:40px; border:1px solid var(--line); border-radius:8px; background:#fff;
  color:var(--ink); padding:0 10px; outline:0;
}
.search-facet select:focus{ border-color:var(--red); }
.search-check{ display:flex; align-items:center; gap:8px; font-size:13px; cursor:pointer; }
.search-check input{ accent-color:var(--red); }
.search-facet-hint{ margin:0; color:var(--muted); font-size:13px; line-height:1.5; }
.search-card-specs{ display:flex; flex-wrap:wrap; gap:5px; min-height:24px; margin-top:8px; }
.search-card-specs span{ background:var(--bg-soft); color:var(--muted); border-radius:5px; padding:4px 6px; font-size:11px; }
.prod-price small{ color:var(--faint); font-size:10px; font-weight:500; }
.search-more{
  display:block; margin:24px auto 50px; min-width:220px; height:46px; border:1px solid var(--red);
  border-radius:9px; background:#fff; color:var(--red); font:700 14px var(--font-head); cursor:pointer;
}
.search-more:hover{ background:var(--red-soft); }
.search-more:disabled{ opacity:.6; cursor:wait; }

/* подпись сайдбара уточнения категории */
.sr-side-note{ font-size:12px; color:var(--faint); margin:0 4px 12px; line-height:1.5; }

/* ничего не найдено по запросу */
.sr-empty{ grid-column:1/-1; text-align:center; padding:64px 20px; }
.sr-empty .se-ico{
  width:64px; height:64px; border-radius:50%; margin:0 auto 18px;
  display:grid; place-items:center; background:var(--bg-soft); color:var(--faint);
}
.sr-empty h3{ font-size:20px; font-weight:800; margin-bottom:8px; }
.sr-empty p{ font-size:14.5px; color:var(--muted); margin:0 auto; max-width:440px; }
.sr-empty .se-tips{ margin-top:18px; display:flex; gap:8px; flex-wrap:wrap; justify-content:center; }
.sr-empty .se-tips button{
  background:#fff; border:1px solid var(--line); border-radius:999px; padding:8px 16px;
  font-size:13.5px; color:var(--ink); font-family:var(--font-head); font-weight:600; cursor:pointer;
  transition:border-color .15s, color .15s;
}
.sr-empty .se-tips button:hover{ border-color:var(--red); color:var(--red); }
.search-interpreted{ margin:16px auto 0; font-size:13px; color:var(--muted); }
.search-empty-actions{ display:flex; gap:10px; justify-content:center; flex-wrap:wrap; margin-top:18px; }
.search-empty-actions a,.search-empty-actions button{
  border:1px solid var(--red); border-radius:8px; padding:9px 15px; background:#fff; color:var(--red);
  font:600 13px var(--font-head); text-decoration:none; cursor:pointer;
}

/* ---------- АДАПТИВ ---------- */
@media (max-width:767px){
  .search-hero{ padding:38px 0 34px; }
  .bigsearch{ width:100%; flex-direction:column; gap:10px; }
  .bigsearch-btn{ width:100%; justify-content:center; }
  .cat-head h2.sr-results-title{ font-size:22px; }
  .search-groups{ margin-right:-16px; padding-right:16px; }
}
