/* ==========================================================================
   category.css — 카테고리 화면
   ========================================================================== */

.cat-tabs { position: sticky; top: 60px; background: var(--voda-bg); z-index: 5; }

.cat-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px 14px;
  border-bottom: 1px solid var(--voda-line);
}
.cat-filter__btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--voda-line);
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--voda-ink);
}
.cat-filter__divider {
  width: 1px; height: 12px;
  background: var(--voda-line);
}
.cat-filter__sort {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 12px;
  color: var(--voda-ink);
  font-weight: 500;
}
.cat-filter__count {
  margin-left: auto;
  font-size: 11px;
  color: var(--voda-ink-muted);
}

.cat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 12px;
  padding: 16px 20px 40px;
}
.cat-empty {
  padding: 60px 20px;
  color: var(--voda-ink-muted);
  text-align: center;
  font-size: 13px;
}

/* 필터 바텀시트 */
.filter-section { margin-bottom: 20px; }
.filter-section__label {
  font-size: 12px;
  font-weight: 700;
  color: var(--voda-ink);
  margin-bottom: 10px;
}
.filter-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.filter-chip {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--voda-line);
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  color: var(--voda-ink);
  transition: all 0.15s;
}
.filter-chip.is-active {
  background: var(--voda-ink);
  color: #fff;
  border-color: var(--voda-ink);
}
.filter-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.filter-actions .voda-btn--outline { flex: 0 0 auto; }



/* =========================================================
   카테고리 필터 바텀시트
   하단 메뉴바에 가려지지 않도록 수정
   ========================================================= */

#filterSheet {
    position: fixed;
    inset: 0;
    z-index: 10000;
}

/* 배경 */
#filterSheet .voda-sheet__backdrop {
    position: absolute;
    inset: 0;
}

/* 필터 패널 */
#filterSheet .voda-sheet__panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;

    width: 100%;
    max-height: calc(100dvh - 16px);

    display: flex;
    flex-direction: column;

    overflow: hidden;
    box-sizing: border-box;

    /* 하단 메뉴바 높이만큼 공간 확보 */
    padding-bottom: calc(
        90px + env(safe-area-inset-bottom)
    );

    background: #fff;
    border-radius: 24px 24px 0 0;
}

/* 필터 제목과 항목 영역이 넘칠 경우 스크롤 */
#filterSheet .voda-sheet__title,
#filterSheet .filter-section {
    flex-shrink: 0;
}

#filterSheet .filter-section {
    padding-left: 24px;
    padding-right: 24px;
}

/* 검색 버튼 영역을 패널 하단에 유지 */
#filterSheet .filter-actions {
    position: sticky;
    bottom: 0;
    z-index: 2;

    display: flex;
    gap: 10px;

    flex-shrink: 0;
    padding: 16px 24px 8px;

    background: #fff;
}

/* 초기화 버튼 */
#filterSheet #filterReset {
    flex: 0 0 auto;
}

/* 적용하기 버튼 */
#filterSheet #filterApply {
    flex: 1;
    min-width: 0;
}

/* 필터 항목이 많은 작은 화면 대응 */
@media (max-height: 650px) {
    #filterSheet .voda-sheet__panel {
        max-height: 95dvh;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    #filterSheet .filter-actions {
        position: sticky;
        bottom: 0;
    }
}
