/* =====================================================================
   검색 결과 + 브랜드 전체보기 팝업 — Figma 697:18825 / 697:21875
   ===================================================================== */
.srch > .container { display: block; padding-block: 24px 72px; }

/* ---- 카테고리 헤더 ---- */
.srch-cathead { margin-bottom: 0; }
.srch-title { font-size: var(--fs-title-md); font-weight: var(--fw-bold); line-height: var(--lh-heading); letter-spacing: var(--tracking); color: var(--neutral-20); padding: 24px 0; }
.srch-catbox {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  background: var(--neutral-100);            /* #FBFBFB */
  border-radius: var(--radius-md);
  padding: 16px 0;
}
.srch-catbtn {
  display: flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 12px 16px;
  font-size: var(--fs-base); font-weight: var(--fw-medium); line-height: var(--lh-body);
  color: var(--neutral-50); text-align: center; white-space: nowrap;
  transition: color .15s;
}
.srch-catbtn:hover { color: var(--orange-65); }
.srch-catbtn.is-active { color: var(--orange-65); font-weight: 600; }

/* ---- 본문 2단 ---- */
.srch-body { display: flex; gap: 30px; margin-top: 18px; align-items: flex-start; }
.srch-filter { flex: 0 0 270px; width: 270px; background: #fff; border: 1px solid var(--neutral-80); border-radius: var(--radius-md); padding: 24px; position: sticky; top: 20px; }
.srch-main { flex: 1 1 auto; min-width: 0; }

/* ---- 필터 헤더/구분선 ---- */
.srch-filter__head { display: flex; align-items: center; justify-content: space-between; }
.srch-filter__title { font-size: var(--fs-base); font-weight: var(--fw-bold); line-height: var(--lh-body); letter-spacing: var(--tracking); color: var(--neutral-20); }
.srch-filter__reset { font-size: var(--fs-sm); font-weight: var(--fw-medium); line-height: var(--lh-body); color: var(--neutral-50); }
.srch-filter__reset:hover { color: var(--orange-65); }
.srch-divider { border: 0; height: 1px; background: var(--neutral-80); margin: 24px 0; }

/* ---- 필터 그룹/체크리스트 ---- */
.srch-fgroup { display: flex; flex-direction: column; gap: 20px; }
.srch-fgroup__title { font-size: var(--fs-base); font-weight: var(--fw-bold); line-height: var(--lh-body); letter-spacing: var(--tracking); color: var(--neutral-20); }
.srch-checklist { display: flex; flex-direction: column; gap: 8px; }
.srch-check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.srch-check__box {
  flex: 0 0 24px; width: 24px; height: 24px; border-radius: 6px;
  border: 1.5px solid var(--neutral-70); background: #fff; position: relative; transition: .15s;
}
.srch-check.is-on .srch-check__box { background: var(--orange-65); border-color: var(--orange-65); }
.srch-check.is-on .srch-check__box::after {
  content: ""; position: absolute; left: 8px; top: 4px; width: 6px; height: 11px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.srch-check__label { flex: 1 1 auto; font-size: var(--fs-md); font-weight: var(--fw-medium); line-height: var(--lh-body); color: var(--neutral-20); }
.srch-check__count { font-size: var(--fs-md); font-weight: var(--fw-regular); line-height: var(--lh-body); color: var(--neutral-40); }
.srch-check.is-on .srch-check__label { color: var(--orange-65); }
.srch-bitem.is-on .srch-check__label { font-weight: 700; }

/* ---- 브랜드 정렬 토글 ---- */
.srch-brand__sort { display: flex; align-items: center; gap: 13px; }
.srch-bsort { min-height: 36px; padding: 0 4px; font-size: var(--fs-md); font-weight: var(--fw-medium); line-height: var(--lh-body); color: var(--neutral-20); background: none; border: 0; cursor: pointer; }
.srch-bsort.is-active { font-weight: 700; }
.srch-bsort__div { width: 1px; height: 18px; background: var(--neutral-80); }

/* ---- 초성 칩 ---- */
.srch-cho { display: flex; flex-wrap: wrap; gap: 8px; }
.srch-chip {
  min-height: 38px; padding: 9px 16px; border-radius: var(--radius-pill);
  background: var(--neutral-100); color: var(--neutral-20);
  font-size: 14px; font-weight: 400; line-height: 1.35; letter-spacing: 0;
  border: 0; cursor: pointer; transition: .15s; white-space: nowrap;
}
.srch-chip:hover { background: var(--neutral-90); }
.srch-chip.is-active { background: var(--orange-65); color: #fff; font-weight: 700; }

/* ---- 브랜드 리스트 ---- */
.srch-brandlist { display: flex; flex-direction: column; gap: 8px; }
.srch-bitem { cursor: pointer; }
.srch-brand__all { width: 100%; background: var(--neutral-95); border: 0; border-radius: var(--radius-xs); padding: 8px; font-size: var(--fs-sm); line-height: var(--lh-body); letter-spacing: var(--tracking); color: var(--neutral-20); cursor: pointer; }
.srch-brand__all:hover { background: var(--neutral-90); }
.srch-brand__empty { font-size: 14px; color: var(--neutral-50); padding: 4px 0; }

/* ---- 정렬바 ---- */
.srch-sortbar { display: flex; align-items: center; justify-content: space-between; height: 27px; margin-bottom: 32px; }
.srch-sorts { display: flex; align-items: center; gap: 12px; }
.srch-sorts__div { width: 1px; height: 12px; background: var(--neutral-80); }
.srch-sortlink { font-size: var(--fs-md); font-weight: var(--fw-medium); line-height: var(--lh-body); letter-spacing: var(--tracking); color: var(--neutral-40); }
.srch-sortlink:hover { color: var(--orange-65); }
.srch-sortlink.is-active { color: var(--orange-65); font-weight: 700; }
.srch-total { font-size: var(--fs-md); font-weight: var(--fw-medium); line-height: var(--lh-body); color: var(--neutral-20); }

/* ---- 그리드 ---- */
.srch-grid { grid-template-columns: repeat(3, 1fr); gap: 40px 24px; }
.srch-body--empty { display: block; margin-top: 8px; }
.srch-body--empty .srch-main { width: 100%; }
.srch-body--empty .srch-grid { display: block; }
.srch-empty {
  grid-column: 1 / -1;
  width: min(720px, 100%);
  margin: 0 auto;
  text-align: center;
  padding: 68px 40px;
  background: #fff;
  border: 1px solid var(--neutral-90);
  border-radius: var(--radius-md);
  box-shadow: 0 18px 44px rgba(33, 24, 15, .06);
}
.srch-empty__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 92, 36, .1);
}
.srch-empty__icon img { width: 24px; height: 24px; }
.srch-empty__eyebrow {
  margin-top: 18px;
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  line-height: var(--lh-body);
  color: var(--orange-65);
}
.srch-empty__title {
  margin-top: 6px;
  font-size: var(--fs-title-sm);
  font-weight: var(--fw-bold);
  line-height: var(--lh-heading);
  color: var(--neutral-20);
  word-break: keep-all;
}
.srch-empty__desc {
  max-width: 480px;
  margin: 12px auto 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--neutral-50);
  word-break: keep-all;
}
.srch-empty__actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}
.srch-empty__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 136px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--neutral-75);
  background: #fff;
  color: var(--neutral-20);
  font-size: var(--fs-base);
  font-weight: var(--fw-bold);
  line-height: 1;
}
.srch-empty__btn--primary {
  border-color: var(--orange-65);
  background: var(--orange-65);
  color: #fff;
}
.srch-empty__quick {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.srch-empty__quick a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 13px;
  border-radius: var(--radius-pill);
  background: var(--neutral-100);
  color: var(--neutral-45);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
}
.srch-empty__quick a:hover { color: var(--orange-65); background: rgba(255, 92, 36, .08); }

/* ---- 페이저 ---- */
.srch-pager { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 56px; }
.srch-pager__num, .srch-pager__arrow {
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  border-radius: 8px; font-size: 15px; font-weight: 500; color: var(--neutral-40); background: #fff;
}
.srch-pager__num:hover, .srch-pager__arrow:hover { background: var(--neutral-95); }
.srch-pager__num.is-active { background: var(--orange-65); color: #fff; }
.srch-pager__arrow img { width: 24px; height: 24px; }

/* =====================================================================
   브랜드 전체보기 팝업
   ===================================================================== */
.brand-modal { position: fixed; inset: 0; z-index: 1000; display: none; }
.brand-modal.is-open { display: block; }
.brand-modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.brand-modal__card {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(1000px, calc(100vw - 32px)); max-height: calc(100vh - 64px);
  background: #fff; border-radius: var(--radius-md); box-shadow: 0 8px 24px rgba(0,0,0,.18);
  display: flex; flex-direction: column;
}
.brand-modal__inner { padding: 24px; display: flex; flex-direction: column; gap: 36px; overflow: hidden; }
.brand-modal__head { display: flex; flex-direction: column; gap: 12px; padding-bottom: 20px; }
.brand-modal__title { font-size: var(--fs-title-sm); font-weight: var(--fw-bold); line-height: var(--lh-heading); letter-spacing: var(--tracking); color: var(--neutral-20); }
.brand-modal .srch-chip { font-size: var(--fs-md); padding: 10px 18px; line-height: var(--lh-body); letter-spacing: var(--tracking); }
.brand-modal__cho { display: flex; flex-wrap: wrap; gap: 12px; }
.brand-modal__list { display: flex; flex-direction: column; gap: 12px; overflow-y: auto; max-height: 372px; }
.bm-group { display: flex; flex-direction: column; gap: 8px; }
.bm-group__head { font-size: var(--fs-lg); font-weight: var(--fw-bold); line-height: var(--lh-body); color: var(--neutral-40); }
.bm-group__items { display: flex; flex-wrap: wrap; gap: 12px; }
.bm-brand { flex: 0 0 calc((100% - 84px) / 8); min-width: 0; text-align: left; background: none; border: 0; cursor: pointer;
  font-size: var(--fs-base); font-weight: var(--fw-regular); line-height: var(--lh-body); color: var(--neutral-40); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0; }
.bm-brand:hover { color: var(--neutral-20); }
.bm-brand.is-on { color: var(--orange-65); font-weight: 700; }
.brand-modal__btns { display: flex; gap: 36px; }
.bm-btn { flex: 1 1 0; min-width: 0; height: 52px; border-radius: var(--radius-md); border: 0; cursor: pointer; font-size: var(--fs-base); font-weight: var(--fw-bold); line-height: var(--lh-body); letter-spacing: var(--tracking); }
.bm-btn--ghost { background: var(--neutral-95); color: var(--neutral-50); }
.bm-btn--ghost:hover { background: var(--neutral-90); }
.bm-btn--primary { background: var(--orange-65); color: #fff; }
.bm-btn--primary:hover { background: var(--orange-60); }
.brand-modal__badge {
  position: absolute; left: 24px; bottom: -13px; min-width: 26px; height: 26px; padding: 0 8px;
  display: flex; align-items: center; justify-content: center;
  background: #ff3b30; color: #fff; border-radius: 150px; font-size: var(--fs-xs); font-weight: var(--fw-bold);
  font-family: "Noto Sans KR", var(--font-sans); letter-spacing: var(--tracking);
}

/* =====================================================================
   반응형
   ===================================================================== */
@media (max-width: 1024px) {
  .srch-catbox { grid-template-columns: repeat(4, 1fr); }
  .srch-title { font-size: var(--fs-title-sm); padding: 20px 0; }
  .bm-brand { flex-basis: calc((100% - 60px) / 6); }
}
@media (max-width: 768px) {
  .srch > .container { padding-block: 20px 64px; }
  .srch-body { flex-direction: column; gap: 24px; }
  .srch-filter { position: static; width: 100%; flex: none; }
  .srch-catbox { grid-template-columns: repeat(3, 1fr); }
  .srch-title { font-size: var(--fs-xl); }
  .srch-catbtn { font-size: 15px; min-height: 44px; padding: 10px 8px; }
  .srch-grid { grid-template-columns: repeat(2, 1fr); gap: 24px 14px; }
  .srch-empty { padding: 42px 22px; border-radius: 16px; }
  .srch-empty__title { font-size: 21px; }
  .srch-empty__actions { flex-direction: column; gap: 8px; margin-top: 24px; }
  .srch-empty__btn { width: 100%; }
  .srch-sortbar { height: auto; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
  .srch-sortlink, .srch-total { font-size: 15px; }
  .bm-brand { flex-basis: calc((100% - 24px) / 3); font-size: 16px; }
  .bm-group__head { font-size: 17px; }
  .brand-modal .srch-chip { font-size: 15px; padding: 9px 16px; }
  .brand-modal__btns { gap: 12px; }
}
@media (max-width: 420px) {
  .srch-catbox { grid-template-columns: repeat(2, 1fr); }
  .bm-brand { flex-basis: calc((100% - 12px) / 2); }
}
