@charset "utf-8";

/* ============================================================
 * search.css
 *
 * 검색 결과 페이지 전용 스타일.
 * 상품 카드/리스트/페이저는 inc-plps.css 를 로드하므로 여기선 없음.
 *
 * [포함]
 *   .c-search-mini        헤더의 현재 검색어 미니 바
 *   .c-search-cats        관련 카테고리 섹션 (풀 경로 표시)
 *   .c-search-state       빈/없음 상태 (검색어 없음, 결과 없음)
 * ============================================================ */


/* ======================================================
   헤더의 현재 검색어 미니 바 (탭하면 오버레이 재오픈)
   ====================================================== */
.c-search-mini {
  flex: 1;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  margin: 0 4px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #f9f9f9;
  font: inherit;
  text-align: left;
  color: #333;
}
.c-search-mini:active { background: #f2f2f2; }

.c-search-mini__ico {
  color: #999;
  font-size: 20px;
  flex-shrink: 0;
}

.c-search-mini__q {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  color: #111;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.c-search-mini__q.is-placeholder {
  color: #999;
  font-weight: 400;
}


/* ======================================================
   관련 카테고리 섹션 (상단, 풀 경로 표시)
   ====================================================== */
.c-search-cats {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px var(--space-3) 12px;
  background: #fff;
  border-bottom: 8px solid #f4f4f4;
}

.c-search-cats__head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
}
.c-search-cats__title {
  font-size: 14px;
  font-weight: 700;
  color: #111;
  letter-spacing: -0.2px;
}
.c-search-cats__count {
  font-size: 12px;
  color: var(--sub);
  font-weight: 500;
}

.c-search-cats__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.c-search-cat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 4px;
  color: #333;
  border-radius: 8px;
  transition: background 0.15s;
}
.c-search-cat:active { background: rgba(0,0,0,.04); }

/* 풀 경로 렌더링: "교회주보 > 규격별 > 예배순서지" */
.c-search-cat__path {
  flex: 1;
  min-width: 0;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 6px;
  font-size: 13px;
  letter-spacing: -0.2px;
  line-height: 1.4;
}
.c-search-cat__name {
  color: var(--sub);
  font-weight: 500;
}
.c-search-cat__name.is-last {
  color: #111;
  font-weight: 600;
}
.c-search-cat__sep {
  color: #ccc;
  font-size: 12px;
  font-weight: 400;
}

.c-search-cat__arr {
  font-size: 20px;
  color: #ccc;
  flex-shrink: 0;
}


/* ======================================================
   빈 / 없음 상태
   ====================================================== */
.c-search-state {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 80px var(--space-3) 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.c-search-state__ico {
  font-size: 56px;
  color: #ccc;
  margin-bottom: 8px;
}

.c-search-state__msg {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  line-height: 1.45;
  margin: 0;
  word-break: keep-all;
}
.c-search-state__msg strong {
  color: var(--accent);
  font-weight: 700;
}

.c-search-state__sub {
  font-size: 13px;
  color: var(--sub);
  margin: 0;
}

.c-search-state__btn {
  margin-top: 12px;
  padding: 10px 20px;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 10px;
  background: #fff;
  font-size: 14px;
  font-weight: 600;
  color: #111;
}
.c-search-state__btn:active { background: rgba(0,0,0,.04); }

/* ======================================================
   검색 항목 선택 칩
   ====================================================== */
.c-search-scope {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 10px var(--space-3);
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.c-search-scope::-webkit-scrollbar { display: none; }

.c-search-scope__chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #555;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.2px;
}
.c-search-scope__chip.is-active {
  border-color: #111;
  background: #111;
  color: #fff;
}
.c-search-scope__chip:active { transform: translateY(1px); }

.c-search-state__scopes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}
.c-search-state__scopes a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #333;
  font-size: 13px;
  font-weight: 700;
}

/* 관련 카테고리: 5개 이후 더보기/접기 */
.c-search-cats__more {
  margin-top: 2px;
}

.c-search-cats__toggle {
  list-style: none;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 4px;
  border-top: 1px solid var(--line);
  color: #555;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}
.c-search-cats__toggle::-webkit-details-marker { display: none; }
.c-search-cats__toggle:active { background: rgba(0,0,0,.03); }

.c-search-cats__toggle-less { display: none; }
.c-search-cats__toggle-ico {
  font-size: 18px;
  transition: transform .2s ease;
}

.c-search-cats__more[open] {
  display: flex;
  flex-direction: column;
}
.c-search-cats__more[open] .c-search-cats__list--extra {
  order: 1;
}
.c-search-cats__more[open] .c-search-cats__toggle {
  order: 2;
  margin-top: 2px;
}
.c-search-cats__more[open] .c-search-cats__toggle-more { display: none !important; }
.c-search-cats__more[open] .c-search-cats__toggle-less { display: inline !important; }
.c-search-cats__more[open] .c-search-cats__toggle-ico { transform: rotate(180deg); }

.c-search-cats__list--extra {
  margin-top: 2px;
}
