/* ============================================================
   SEARCH RESULTS PAGE — search.css
   ============================================================ */


/* ── Search Hero ─────────────────────────────────────────── */
.search-hero {
  padding-top: calc(var(--header-h) + clamp(32px, 4vw, 52px));
  padding-bottom: clamp(28px, 3.5vw, 44px);
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  margin-bottom: clamp(28px, 3.5vw, 44px);
}

/* Big search bar */
.search-bar {
  position: relative;
  margin-bottom: clamp(22px, 2.8vw, 32px);
}

.search-bar__input {
  width: 100%;
  height: clamp(52px, 6vw, 64px);
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .1);
  color: var(--c-white);
  font-family: var(--font-body);
  font-size: clamp(15px, 1.6vw, 17px);
  padding: 0 clamp(48px, 6vw, 64px) 0 clamp(20px, 2.5vw, 28px);
  outline: none;
  transition: border-color .2s, background .2s;
}

.search-bar__input::placeholder { color: rgba(255, 255, 255, .28); }

.search-bar__input:focus {
  border-color: rgba(153, 238, 45, .4);
  background: rgba(255, 255, 255, .07);
}

.search-bar__btn {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: clamp(48px, 6vw, 64px);
  background: var(--c-green);
  border: none;
  color: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: filter .2s;
}

.search-bar__btn:hover {
  filter: brightness(1.08) drop-shadow(0 0 12px rgba(153, 238, 45, .4));
}

.search-bar__btn svg { width: 20px; height: 20px; }

/* Results meta row */
.search-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.search-meta__heading {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 34px);
  color: var(--c-white);
  line-height: 1.1;
}

.search-meta__heading em {
  color: var(--c-green);
  font-style: normal;
}

.search-meta__count {
  font-size: 13px;
  color: rgba(255, 255, 255, .35);
  white-space: nowrap;
}


/* ── Toolbar (sort) ──────────────────────────────────────── */
.search-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: clamp(20px, 2.5vw, 32px);
}

.search-toolbar__label {
  font-size: 13px;
  color: rgba(255, 255, 255, .38);
  white-space: nowrap;
}


/* ── Product grid (reuses .shop-grid from shop.css) ──────── */
.search-grid-wrap { margin-bottom: var(--section-gap); }

/* Override grid columns for search layout (no sidebar) */
.search-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}


/* ── Empty state ─────────────────────────────────────────── */
.search-empty {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 20px;
  margin-bottom: var(--section-gap);
}

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

.search-empty__icon {
  color: rgba(255, 255, 255, .1);
  margin-bottom: 24px;
}

.search-empty__title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 44px);
  color: var(--c-white);
  margin-bottom: 12px;
}

.search-empty__text {
  font-size: 15px;
  color: rgba(255, 255, 255, .4);
  margin-bottom: 28px;
  line-height: 1.55;
}


/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1100px) {
  .search-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .search-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .search-toolbar { justify-content: space-between; }
}

@media (max-width: 420px) {
  .search-grid { gap: 8px; }
}


/* ============================================================
   SEARCH OVERLAY — command palette (desktop) / full-screen (mobile)
   Front-page cyber style. Tokens: --cs-* (layout.css, global).
   ============================================================ */
:root {
  --sov-red:   var(--cs-red, #F5222D);
  --sov-orange: var(--cs-orange, #FF6B00);
  --sov-card:  var(--cs-bg-card, #0D1018);
  --sov-bg0:   var(--cs-bg-0, #080A0E);
  --sov-txt:   var(--cs-txt, #F0F2F8);
  --sov-txt2:  var(--cs-txt2, #8B8F9A);
  --sov-txt3:  var(--cs-txt3, #4A4E5A);
  --sov-bdr:   var(--cs-bdr, rgba(255, 255, 255, 0.07));
  --sov-bdr2:  var(--cs-bdr2, rgba(255, 255, 255, 0.13));
}

body.search-ov-lock { overflow: hidden; }

/* ══════════════════════════════════════════════════════════════════════
   KB — SEARCH OVERLAY REDESIGN 2026-07-01 — "rounded glass spotlight".
   Replaces the old angular command-palette look. HTML/JS/selectors unchanged
   (open/close still driven by [hidden] + .is-open). Roll back: /tmp/search.css.bak_redesign
   ══════════════════════════════════════════════════════════════════════ */
.search-ov {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(64px, 12vh, 150px) 20px 24px;
  opacity: 0;
  transition: opacity .28s ease;
  --sov-red: #F5222D;
  --sov-orange: #FF6B00;
  --sov-txt: #F0F2F8;
  --sov-txt2: #8B8F9A;
  --sov-txt3: #565b68;
  --sov-bdr: rgba(255,255,255,.07);
  --sov-bdr2: rgba(255,255,255,.12);
}
.search-ov[hidden] { display: none; }
.search-ov.is-open { opacity: 1; }

/* backdrop — deep blur, no grain */
.search-ov__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3,4,7,.84);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  cursor: pointer;
}

/* panel — rounded glass card */
.search-ov__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 600px;
  max-height: calc(100vh - clamp(88px, 16vh, 180px));
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #171A22 0%, #0C0E13 100%);
  border: 1px solid var(--sov-bdr2);
  border-radius: 20px;
  box-shadow: 0 40px 110px rgba(0,0,0,.7), 0 0 70px rgba(245,34,45,.10), inset 0 1px 0 rgba(255,255,255,.05);
  overflow: hidden;
  transform: translateY(10px) scale(.97);
  opacity: 0;
  transition: transform .34s cubic-bezier(.16,1,.3,1), opacity .28s ease;
}
.search-ov.is-open .search-ov__panel { transform: none; opacity: 1; }

/* soft top glow (no hard accent line) */
.search-ov__glow {
  position: absolute;
  top: -150px; left: 50%;
  transform: translateX(-50%);
  width: 560px; height: 300px;
  background: radial-gradient(ellipse at top, rgba(245,34,45,.20) 0%, rgba(255,107,0,.05) 42%, transparent 72%);
  pointer-events: none;
  z-index: 0;
}

/* ── search field (floating, rounded, glows on focus) ── */
.search-ov__bar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 20px 6px;
  padding: 7px 7px 7px 18px;
  background: rgba(255,255,255,.045);
  border: 1px solid var(--sov-bdr2);
  border-radius: 14px;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.search-ov__bar:focus-within {
  border-color: rgba(245,34,45,.55);
  box-shadow: 0 0 0 4px rgba(245,34,45,.12);
  background: rgba(255,255,255,.06);
}
.search-ov__bar-icon { display: flex; flex-shrink: 0; color: var(--sov-red); }
.search-ov__bar-icon svg { width: 20px; height: 20px; }

.search-ov__input {
  flex: 1; min-width: 0;
  height: 46px;
  background: transparent; border: none; outline: none;
  color: var(--sov-txt);
  font-family: 'Barlow Condensed','Rajdhani',sans-serif;
  font-size: 23px; font-weight: 600; letter-spacing: .01em;
}
.search-ov__input::placeholder { color: var(--sov-txt3); font-weight: 500; }
.search-ov__input::-webkit-search-cancel-button { -webkit-appearance: none; }

/* submit — clean rounded red pill */
.search-ov__submit {
  display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0;
  height: 44px; padding: 0 20px;
  background: linear-gradient(135deg, var(--sov-red), var(--sov-orange));
  border: none; border-radius: 11px;
  color: #fff;
  font-family: 'Rajdhani',sans-serif; font-weight: 700; font-size: 13px;
  letter-spacing: .12em; text-transform: uppercase; cursor: pointer;
  box-shadow: 0 6px 20px rgba(245,34,45,.30);
  transition: box-shadow .25s ease, transform .15s ease, filter .2s ease;
}
.search-ov__submit svg { width: 15px; height: 15px; }
.search-ov__submit:hover { box-shadow: 0 10px 30px rgba(245,34,45,.5); transform: translateY(-1px); filter: brightness(1.05); }

/* close — rounded ghost */
.search-ov__close {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 44px; height: 44px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--sov-bdr2);
  border-radius: 11px;
  color: var(--sov-txt2); cursor: pointer;
  transition: border-color .2s, color .2s, background .2s;
}
.search-ov__close svg { width: 18px; height: 18px; }
.search-ov__close:hover { border-color: rgba(245,34,45,.5); color: var(--sov-red); background: rgba(245,34,45,.10); }

/* ── body / results ── */
.search-ov__body {
  position: relative; z-index: 1;
  flex: 1; min-height: 0; overflow-y: auto;
  padding: 12px 20px 22px;
  scrollbar-width: thin; scrollbar-color: rgba(245,34,45,.4) transparent;
}
.search-ov__body::-webkit-scrollbar { width: 8px; }
.search-ov__body::-webkit-scrollbar-thumb { background: rgba(245,34,45,.35); border-radius: 8px; }
.search-ov__body::-webkit-scrollbar-track { background: transparent; }

.search-ov__status {
  font-family: 'Manrope',sans-serif; font-size: 13px;
  color: var(--sov-txt2); margin: 4px 2px 16px; min-height: 18px;
}
.search-ov__status a { color: var(--sov-red); text-decoration: none; font-weight: 600; }
.search-ov__hint { color: var(--sov-txt3); }
.search-ov__count {
  font-family: 'Barlow Condensed',sans-serif; font-size: 15px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; color: var(--sov-txt);
}
.search-ov__empty strong { color: var(--sov-txt); }
.search-ov__loading { display: inline-flex; align-items: center; gap: 9px; color: var(--sov-txt2); }
.search-ov__spinner {
  width: 14px; height: 14px;
  border: 2px solid rgba(245,34,45,.25); border-top-color: var(--sov-red);
  border-radius: 50%; animation: sovSpin .7s linear infinite;
}
@keyframes sovSpin { to { transform: rotate(360deg); } }

/* results grid — reuses site .prod-card */
.search-ov__results.search-grid { grid-template-columns: repeat(4, 1fr); gap: 14px; }
.search-ov__results.is-loading { opacity: .5; pointer-events: none; }
.search-ov__results:empty { display: none; }
.search-ov__results .prod-card { min-width: 0; }
.search-ov__results .prod-img { height: 140px; }
.search-ov__results .prod-body { padding: 10px 12px 14px; }
.search-ov__results .prod-skin-name { font-size: 14px; }
.search-ov__results .prod-weapon-type { font-size: 11px; }
.search-ov__results .prod-price { font-size: 16px; }
.search-ov__results .btn-prod-buy { font-size: 10px; padding: 7px 11px; }

/* view all — rounded */
.search-ov__foot {
  margin-top: 20px; padding-top: 18px;
  border-top: 1px solid var(--sov-bdr);
  display: flex; justify-content: center;
}
.search-ov__foot[hidden] { display: none; }
.search-ov__viewall {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 12px 26px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--sov-bdr2);
  border-radius: 11px;
  color: var(--sov-txt2);
  font-family: 'Rajdhani',sans-serif; font-weight: 700; font-size: 13px;
  letter-spacing: .12em; text-transform: uppercase; text-decoration: none;
  transition: border-color .25s, color .25s, background .25s, gap .25s;
}
.search-ov__viewall svg { width: 15px; height: 15px; }
.search-ov__viewall:hover { border-color: rgba(245,34,45,.5); color: var(--sov-red); background: rgba(245,34,45,.08); gap: 13px; }

/* keyboard hint chips */
.search-ov__kbd {
  position: relative; z-index: 1;
  display: flex; gap: 20px;
  padding: 12px 20px;
  border-top: 1px solid var(--sov-bdr);
  background: rgba(0,0,0,.28);
  font-family: 'Manrope',sans-serif; font-size: 11px; color: var(--sov-txt3);
}
.search-ov__kbd kbd {
  display: inline-block; padding: 3px 8px; margin-right: 5px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--sov-bdr2);
  border-radius: 5px;
  font-family: 'Manrope',sans-serif; font-size: 10px; color: var(--sov-txt2);
}

/* ── responsive ── */
@media (max-width: 880px) {
  .search-ov__results.search-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 680px) {
  .search-ov { padding: 0; align-items: stretch; }
  .search-ov__panel { max-width: 100%; max-height: 100%; height: 100%; border: none; border-radius: 0; transform: translateY(16px); }
  .search-ov.is-open .search-ov__panel { transform: none; }
  .search-ov__bar { margin: 12px 12px 4px; padding-top: max(9px, env(safe-area-inset-top)); }
  .search-ov__input { font-size: 20px; height: 42px; }
  .search-ov__submit { padding: 0 14px; width: 46px; justify-content: center; }
  .search-ov__submit-text { display: none; }
  .search-ov__close { width: 46px; height: 46px; }
  .search-ov__results.search-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .search-ov__kbd { display: none; }
}
@media (max-width: 380px) {
  .search-ov__results.search-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
}
