/* ============================================================================
   /css/rental-20261123.css — 루트 가전 렌탈 '목록'과 '상세' 전용 (2026-11-23)
   ----------------------------------------------------------------------------
   · 싣는 곳: products.php(렌탈·가전 목록) · includes/rental_detail.php(상세)
   · 이 파일 밖의 공용 CSS(shop.css·theme-hq.css·header-base.css 등)는 건드리지
     않는다. 색·글꼴·여백은 루트 토큰(--sf-*)을 그대로 쓴다.
   · 구성: 1) 목록 페이지 헤더 버튼·필터 패널(v4 방식)
           2) 상세 페이지 상단(썸네일·약정 선택·가격)과 아래 섹션
   ============================================================================ */

/* ================================================================ 1. 목록 */
/* 상단 제목 줄 + 오른쪽 전화 상담·상담 신청 (v4 배치) */
.rt-headline { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px 24px; flex-wrap: wrap; }
.rt-headline h1 { margin: 10px 0 0; }
.rt-head__act { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-bottom: 2px; }
.rt-head__act .sf-btn { height: 46px; padding: 0 20px; border-radius: 12px; font-size: 14px; font-weight: 700; gap: 7px; }
.rt-head__act .sf-btn svg { width: 17px; height: 17px; flex: 0 0 auto; }

/* ── 대분류 가로 메뉴 (2026-11-24)
   구분 탭(전체/렌탈/가전)을 없애고 그 자리에 7대분류를 한 줄로 놓는다.
   스마트 추천은 이 줄의 한 항목(동작)으로 들어간다.
   · 색은 브랜드 1색 + 무채색만 쓴다. 선택은 '진한 테두리 + 옅은 브랜드 배경'.
   · 1440: 한 줄, 390: 가로 스크롤로 한 줄 유지(줄바꿈 없음). */
.rt-catband {
  margin-top: 26px;
  border-top: 1px solid var(--sf-line);
  border-bottom: 1px solid var(--sf-line);
  background: #fff;
}
.rt-catnav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 13px 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.rt-catnav::-webkit-scrollbar { display: none; }
.rt-catnav__item {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 42px;
  padding: 0 16px;
  border: 1px solid var(--sf-line);
  border-radius: 999px;
  background: #fff;
  color: var(--sf-ink-2);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -.01em;
  white-space: nowrap;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
.rt-catnav__item:hover { border-color: var(--sf-muted); color: var(--sf-ink); }
.rt-catnav__item:focus-visible { outline: 2px solid var(--sf-brand); outline-offset: 2px; }
.rt-catnav__item.is-active {
  border-color: var(--sf-ink);
  background: var(--sf-brand-soft);
  color: var(--sf-ink);
  font-weight: 700;
}
.rt-catnav__n {
  font-size: 12px;
  font-weight: 500;
  color: var(--sf-muted);
  font-variant-numeric: tabular-nums;
}
.rt-catnav__item.is-active .rt-catnav__n { color: var(--sf-brand); font-weight: 700; }
/* 스마트 추천 — 대분류가 아닌 '동작'이라 무채색 면 + ✦ 한 점만 브랜드색.
   (옅은 브랜드 배경은 '선택' 표시에만 쓰므로 헷갈리지 않게 한다) */
.rt-catnav__smart {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 42px;
  padding: 0 15px;
  border: 1px solid var(--sf-line);
  border-radius: 999px;
  background: var(--sf-bg-soft);
  color: var(--sf-ink-2);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -.01em;
  white-space: nowrap;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
.rt-catnav__smart:hover { border-color: var(--sf-brand); background: #fff; color: var(--sf-ink); }
.rt-catnav__smart:focus-visible { outline: 2px solid var(--sf-brand); outline-offset: 2px; }
.rt-catnav__spark { color: var(--sf-brand); font-size: 13px; line-height: 1; }
.rt-catnav__sep { flex: 0 0 1px; width: 1px; height: 22px; margin: 0 8px; background: var(--sf-line); }

/* ── 필터 카드 (2026-11-24)
   품목 → 정수기 유형 → 브랜드 → 가격대를 세로로 한 층위씩, 전체 폭으로.
   라벨은 왼쪽 고정, 칩은 오른쪽으로 흐르며 줄바꿈한다. 여백으로 구분하고 선은 헤어라인만. */
.sf-filterbar.rt-filterbar {
  position: static;
  margin-top: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  backdrop-filter: none;
}
.sf-filterbar.rt-filterbar .sf-filterbar-in {
  padding: 0 22px;
  gap: 0;
  border: 1px solid var(--sf-line);
  border-radius: 20px;
  background: #fff;
}
.rt-filters { display: block; }
.rt-frow {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  column-gap: 20px;
  align-items: start;
  padding: 16px 0;
  border-top: 1px solid var(--sf-line-soft);
}
.rt-frow:first-child { border-top: 0; }
.rt-flabel {
  padding-top: 9px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .01em;
  color: var(--sf-muted);
}
.rt-fchips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.rt-fchips .sf-chip {
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--sf-line);
  background: #fff;
  color: var(--sf-ink-2);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -.01em;
}
.rt-fchips .sf-chip:hover { border-color: var(--sf-ink-2); background: #fff; color: var(--sf-ink); }
.rt-fchips .sf-chip:focus-visible { outline: 2px solid var(--sf-brand); outline-offset: 2px; }
.rt-fchips .sf-chip.is-active {
  border-color: var(--sf-ink);
  background: var(--sf-brand-soft);
  color: var(--sf-ink);
  font-weight: 700;
}
.rt-fchips .sf-chip .rt-n {
  margin-left: 7px;
  font-size: 12px;
  font-weight: 500;
  color: var(--sf-muted);
  font-variant-numeric: tabular-nums;
}
.rt-fchips .sf-chip.is-active .rt-n { color: var(--sf-brand); font-weight: 700; }
.rt-fchips .sf-chip.is-empty { border-style: dashed; color: #98a2b0; }
.rt-fchips .sf-chip.is-empty.is-active { border-style: solid; color: var(--sf-ink); }
.rt-fchips .sf-chip.is-etc { border-style: dashed; color: var(--sf-body); }
/* 값이 없는 구간(월 렌탈료 0원) — 누를 수 없는 칩. 숨기지 않고 0건임을 그대로 보여준다. */
.rt-fchips .sf-chip.is-off {
  border-color: var(--sf-line);
  background: var(--sf-bg-soft);
  color: #a5aeb9;
  cursor: default;
}
.rt-fchips .sf-chip.is-off .rt-n { color: #a5aeb9; }
.rt-fsep {
  align-self: center;
  flex: 0 0 1px;
  width: 1px;
  height: 20px;
  background: var(--sf-line);
  margin: 0 2px;
}
.rt-fnote {
  flex: 1 0 100%;
  margin: 2px 0 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--sf-muted);
}

.rt-fbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-top: 0; padding-top: 16px; border-top: 1px solid var(--sf-line-soft);
}
.rt-count { margin: 0; font-size: 13px; font-weight: 600; color: var(--sf-body); }
.rt-count strong { font-size: 15px; font-weight: 800; letter-spacing: -.02em; color: var(--sf-ink); }
.rt-count em { font-style: normal; color: var(--sf-muted); font-weight: 600; }
.rt-tools { display: flex; align-items: center; gap: 12px; }
.rt-sort { display: flex; align-items: center; gap: 6px; }
.rt-sort label { font-size: 12px; font-weight: 700; color: var(--sf-muted); }
.rt-sort select {
  height: 34px; padding: 0 30px 0 12px; border: 1px solid var(--sf-line); border-radius: 10px;
  background: #fff; font-family: inherit; font-size: 12.5px; font-weight: 700; color: var(--sf-ink-2);
  outline: none; cursor: pointer;
}
.rt-sort select:hover { border-color: var(--sf-ink); }
.rt-reset { font-size: 12.5px; font-weight: 700; color: var(--sf-muted); border-bottom: 1px solid var(--sf-line); padding-bottom: 1px; }
.rt-reset:hover { color: var(--sf-ink); border-color: var(--sf-ink); }

@media (max-width: 860px) {
  .rt-headline { align-items: flex-start; gap: 12px; }
  .rt-head__act { width: 100%; padding-bottom: 0; }
  .rt-head__act .sf-btn { flex: 1 1 0; justify-content: center; height: 44px; }
  .rt-catband { margin-top: 20px; }
  .rt-catnav { padding: 11px 0; gap: 6px; }
  .rt-catnav__item, .rt-catnav__smart { height: 40px; padding: 0 14px; font-size: 13.5px; }
  .rt-catnav__sep { margin: 0 4px; }
  .sf-filterbar:has(.rt-filters) { margin-top: 14px; }
  .sf-filterbar:has(.rt-filters) .sf-filterbar-in { padding: 2px 16px 14px; border-radius: 16px; }
  .rt-frow { grid-template-columns: minmax(0, 1fr); row-gap: 10px; padding: 15px 0; }
  .rt-flabel { padding-top: 0; font-size: 12.5px; }
  .rt-fchips { gap: 7px; }
  .rt-fchips .sf-chip { height: 34px; padding: 0 12px; font-size: 13.5px; }
  .rt-fchips .sf-chip .rt-n, .rt-catnav__n { font-size: 11.5px; }
  .rt-fbar { align-items: flex-start; }
  .rt-tools { width: 100%; justify-content: space-between; }
  .rt-sort { flex: 1 1 auto; }
  .rt-sort select { flex: 1 1 auto; }
}

/* ================================================================ 2. 상세 */
/* 본문 폭 1320 기준 — 헤더(루트 공용 헤더, 상자 1320)와 같은 폭에 맞춘다. */
.sf-wrap.rt-wide { max-width: 1320px; }

.rt-top { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: start; margin-top: 4px; }

/* 왼쪽: 큰 사진 + 썸네일 */
.rt-media { position: relative; }
.rt-media__main {
  position: relative; aspect-ratio: 1 / 1; display: grid; place-items: center; overflow: hidden;
  border: 1px solid var(--sf-line); border-radius: 22px;
  background: linear-gradient(180deg, #fafbfc, #f3f5f8);
}
.rt-media__main img { width: 100%; height: 100%; object-fit: contain; padding: 28px; mix-blend-mode: multiply; }
/* 세로로 긴 상세 통이미지(detail/)를 큰 창에 올렸을 때 — 막대기처럼 줄지 않고 상단부터 꽉 채운다 */
.rt-media__main img[src*="/detail/"] {
  position: absolute; inset: 0; width: 100%; height: 100%; padding: 0;
  object-fit: cover; object-position: top center;
}
.rt-thumbs { display: flex; gap: 10px; margin: 12px 0 0; padding: 0; list-style: none; }
.rt-thumb {
  width: 84px; height: 84px; padding: 5px; display: grid; place-items: center;
  border: 1px solid var(--sf-line); border-radius: 14px; background: #fff;
  overflow: hidden;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.rt-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top center; mix-blend-mode: multiply; }
/* 썸네일이 1~2개뿐이면 조금 크게 — 휑해 보이지 않게 (3개 이상은 84px 유지) */
.rt-thumbs:not(:has(> li:nth-child(3))) .rt-thumb { width: 104px; height: 104px; padding: 6px; border-radius: 16px; }
.rt-thumb:hover { border-color: var(--sf-muted); }
.rt-thumb.is-active { border-color: var(--sf-ink); box-shadow: 0 0 0 2px rgba(11, 18, 32, .06); }
.rt-thumb:focus-visible { outline: 2px solid var(--sf-ink); outline-offset: 2px; }

/* 오른쪽: v4 방식 약정 선택 + 가격 */
.rt-planpick { display: flex; flex-wrap: wrap; gap: 6px; }
.rt-planpick__opt {
  display: flex; flex-direction: column; gap: 1px; padding: 7px 12px 8px;
  border: 1px solid var(--sf-line); border-radius: 11px; background: #fff; text-align: left; line-height: 1.35;
  transition: border-color .15s ease, background-color .15s ease;
}
.rt-planpick__m { font-size: 12.5px; font-weight: 800; letter-spacing: -.02em; color: var(--sf-ink-2); }
.rt-planpick__om { font-size: 11px; font-weight: 600; color: var(--sf-muted); }
.rt-planpick__opt:hover { border-color: var(--sf-ink); }
.rt-planpick__opt.is-active { border-color: var(--sf-ink); background: var(--sf-ink); }
.rt-planpick__opt.is-active .rt-planpick__m { color: #fff; }
.rt-planpick__opt.is-active .rt-planpick__om { color: rgba(255, 255, 255, .72); }

.rt-price__label { margin: 0; font-size: 12.5px; font-weight: 700; line-height: 1.5; color: var(--sf-muted); }
.rt-price__cond { margin: 0; font-size: 12px; line-height: 1.6; color: var(--sf-muted); }
.rt-price__sub { margin: 0; font-size: 12.5px; line-height: 1.6; color: var(--sf-body); }
.rt-price__sub strong { font-weight: 800; color: var(--sf-ink); }

.rt-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rt-chips span {
  display: inline-flex; align-items: center; height: 27px; padding: 0 11px;
  border: 1px solid var(--sf-line); border-radius: 999px; background: #fff;
  font-size: 11.5px; font-weight: 700; color: var(--sf-body);
}
.rt-notes { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 3px; }
.rt-notes li { position: relative; padding-left: 9px; font-size: 12px; line-height: 1.6; color: var(--sf-muted); }
.rt-notes li::before {
  content: ""; position: absolute; left: 0; top: 8px; width: 3px; height: 3px; border-radius: 50%; background: #b7bdc6;
}

/* 아래 섹션 */
.rt-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; margin-top: 46px; }
.rt-body > * { min-width: 0; }
.rt-body .sf-panel > h2 { display: flex; align-items: center; gap: 8px; }
.rt-note { margin: 12px 0 0; font-size: 12px; line-height: 1.7; color: var(--sf-muted); }
.rt-lead { margin: 0 0 12px; font-size: 13.5px; line-height: 1.75; color: var(--sf-body); }
.rt-list { margin: 0; padding-left: 16px; font-size: 13px; line-height: 1.85; color: var(--sf-body); }

/* 약정 표 (v4 구조: 의무 사용 기간 · 소유권 이전 기간 · 월 렌탈료 · 설치비) */
.rt-planbox { width: 100%; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.rt-plan { min-width: 0; }
.rt-plan { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.rt-plan caption {
  caption-side: top; text-align: left; padding: 0 0 10px;
  font-size: 12.5px; font-weight: 600; line-height: 1.6; color: var(--sf-muted);
}
.rt-plan thead th {
  padding: 9px 12px; background: var(--sf-bg-soft); border-bottom: 1px solid var(--sf-line);
  font-size: 11.5px; font-weight: 800; letter-spacing: .02em; color: var(--sf-muted); text-align: left; white-space: nowrap;
}
.rt-plan thead th:first-child { border-top-left-radius: 10px; }
.rt-plan thead th:last-child { border-top-right-radius: 10px; }
.rt-plan tbody th {
  padding: 13px 12px; border-bottom: 1px solid var(--sf-line-soft);
  font-size: 13.5px; font-weight: 800; letter-spacing: -.02em; color: var(--sf-ink); text-align: left; white-space: nowrap;
}
.rt-plan tbody td { padding: 13px 12px; border-bottom: 1px solid var(--sf-line-soft); font-weight: 600; color: var(--sf-ink-2); white-space: nowrap; }
.rt-plan tbody td strong { font-size: 15px; font-weight: 800; letter-spacing: -.02em; color: var(--sf-ink); }
.rt-plan tbody tr:last-child th, .rt-plan tbody tr:last-child td { border-bottom: 0; }
.rt-plan tbody tr.is-rep { background: #fbfcfe; }
.rt-plan__badge {
  display: inline-flex; align-items: center; margin-left: 6px; padding: 1px 7px 2px; border-radius: 999px;
  background: var(--sf-ink); color: #fff; font-size: 10.5px; font-weight: 800; vertical-align: 1px;
}

/* 배송·설치·관리 안내 */
.rt-guide { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.rt-guide__item { padding: 16px 18px; border: 1px solid var(--sf-line); border-radius: 14px; background: var(--sf-bg-soft); }
.rt-guide__item h3 { margin: 0 0 6px; font-size: 14px; font-weight: 800; letter-spacing: -.02em; color: var(--sf-ink); }
.rt-guide__item p { margin: 0; font-size: 13px; line-height: 1.75; color: var(--sf-body); }

/* 상세 설명 이미지 — 본문 폭 1200 기준 가운데 정렬 */
.rt-detailimg { display: flex; flex-direction: column; align-items: center; gap: 0; background: #fff; }
.rt-detailimg img { display: block; width: 100%; max-width: 1320px; height: auto; margin: 0 auto; }
.rt-detailimg__note { margin: 14px 0 0; text-align: center; font-size: 12px; line-height: 1.7; color: var(--sf-muted); }
.rt-detailsec > h2 { margin: 0 0 16px; font-size: 18px; font-weight: 800; letter-spacing: -.03em; color: var(--sf-ink); }

@media (max-width: 1080px) {
  .rt-top { gap: 30px; }
}
@media (max-width: 960px) {
  .rt-top { grid-template-columns: 1fr; gap: 24px; }
  .rt-media__main { aspect-ratio: 1 / 1; }
  .rt-guide { grid-template-columns: 1fr; }
  .rt-body { margin-top: 32px; gap: 14px; }
  .rt-plan thead th, .rt-plan tbody th, .rt-plan tbody td { padding: 11px 9px; }
}
@media (max-width: 480px) {
  .rt-thumb { width: 66px; height: 66px; padding: 4px; border-radius: 11px; }
  .rt-thumbs:not(:has(> li:nth-child(3))) .rt-thumb { width: 80px; height: 80px; padding: 4px; border-radius: 13px; }
  .rt-media__main img { padding: 18px; }
  .rt-plan { font-size: 12.5px; }
  .rt-plan tbody td strong { font-size: 13.5px; }
}

/* ================================================================ 3. 목록 필터 접힘 · AJAX (2026-11-25)
   기본은 [상세 필터 ▾] 접힘 — 모바일 첫 화면에 상품 카드가 바로 보이게 한다.
   화면 위에서 두 줄로 끝낸다: ① 대분류 밴드(✦ 스마트 추천 + 7대분류)
                              ② 툴바([상세 필터] + 적용 조건 뱃지 + 상품 수 + 정렬)
   세부 필터(품목·정수기 유형·브랜드·관리 방식·가격대)는 툴바를 눌렀을 때만 펼친다.
   필터 조작은 js/rental-list-20261125.js 가 fetch 로 받아 새로고침·스크롤 이동 없이 바꾼다. */
.rt-live { display: block; overflow-anchor: none; }
.rt-live.is-loading .sf-grid,
.rt-live.is-loading .sf-pager { opacity: .45; transition: opacity .15s ease; }

.rt-toolbar { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 10px 0; }

.rt-toggle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 13px;
  border: 1px solid var(--sf-line);
  border-radius: 999px;
  background: #fff;
  color: var(--sf-ink-2);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -.01em;
  white-space: nowrap;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
.rt-toggle:hover { border-color: var(--sf-ink-2); color: var(--sf-ink); }
.rt-toggle:focus-visible { outline: 2px solid var(--sf-brand); outline-offset: 2px; }
.rt-toggle[aria-expanded="true"] { border-color: var(--sf-ink); background: var(--sf-brand-soft); color: var(--sf-ink); }
.rt-toggle__caret { font-size: 10px; line-height: 1; transition: transform .18s ease; }
.rt-toggle[aria-expanded="true"] .rt-toggle__caret { transform: rotate(180deg); }

/* 적용된 조건 뱃지 — 넘치면 줄바꿈 대신 가로 스크롤(툴바 높이를 유지) */
.rt-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}
.rt-badges::-webkit-scrollbar { display: none; }
/* 뱃지가 더 있다는 것만 오른쪽 끝을 살짝 흐리게 알린다 */
.rt-badges:has(.rt-badge) {
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 18px), transparent 100%);
  mask-image: linear-gradient(to right, #000 calc(100% - 18px), transparent 100%);
}
.rt-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 9px 0 12px;
  border: 1px solid var(--sf-ink);
  border-radius: 999px;
  background: var(--sf-brand-soft);
  color: var(--sf-ink);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: -.01em;
  white-space: nowrap;
  transition: background-color .15s ease;
}
.rt-badge:hover { background: #fff; }
.rt-badge:focus-visible { outline: 2px solid var(--sf-brand); outline-offset: 2px; }
.rt-badge span { font-size: 13px; line-height: 1; color: var(--sf-muted); }

.rt-toolbar .rt-count { margin: 0; white-space: nowrap; }
.rt-toolbar .rt-tools { margin-left: auto; flex: 0 0 auto; width: auto; gap: 10px; }
/* 기존 모바일 규칙(.rt-sort{flex:1 1 auto})이 정렬을 늘려 툴바를 밀어내므로 고정한다 */
.rt-toolbar .rt-sort, .rt-toolbar .rt-sort select { flex: 0 0 auto; }

/* 세부 필터 패널 */
.rt-panelfoot { display: none; }
.rt-panel { border-top: 1px solid var(--sf-line-soft); }
.rt-panel[hidden] { display: none; }
.rt-panel .rt-frow { padding: 14px 0; }
.rt-panel .rt-frow > .rt-fnote { grid-column: 1 / -1; margin: 6px 0 0 116px; }

@media (max-width: 860px) {
  .rt-toolbar { gap: 6px; padding: 8px 0; }
  .rt-toggle { height: 33px; padding: 0 10px; gap: 4px; font-size: 12px; }
  .rt-badge { height: 26px; padding: 0 5px 0 9px; font-size: 11.5px; gap: 3px; }
  .rt-badge span { font-size: 12px; }
  .rt-toolbar .rt-count { font-size: 11.5px; }
  .rt-toolbar .rt-count strong { font-size: 13px; }
  .rt-toolbar .rt-tools { gap: 8px; }
  .rt-toolbar .rt-sort { gap: 0; }
  .rt-toolbar .rt-sort__l { display: none; }
  .rt-toolbar .rt-sort select { width: 78px; height: 32px; padding: 0 16px 0 7px; font-size: 11px; }
  /* 좁은 화면에서는 툴바의 조건 뱃지 자리를 비우기 위해 초기화는 패널 안으로 내린다 */
  .rt-toolbar .rt-reset { display: none; }
  /* 뱃지가 넘칠 때 잘린 뱃지와 상품 수가 붙어 보이지 않게 헤어라인으로 나눈다 */
  .rt-toolbar .rt-count { margin-left: 2px; padding-left: 9px; border-left: 1px solid var(--sf-line); }
  .rt-toolbar .rt-badges { padding-right: 2px; }
  .rt-panelfoot { display: flex; justify-content: flex-end; padding: 11px 0 1px; border-top: 1px solid var(--sf-line-soft); }
  .rt-panelfoot .rt-reset { font-size: 12px; }
  .rt-toolbar .rt-sort, .rt-toolbar .rt-sort select { flex: 0 0 auto; }
  .rt-toolbar .rt-tools { width: auto; justify-content: flex-end; }
  .rt-toolbar .rt-count__l { display: none; }

  /* 세부 필터: 라벨은 왼쪽 고정, 칩은 한 줄 가로 스크롤 — 세로 길이를 최소로 */
  .rt-panel .rt-frow { grid-template-columns: 64px minmax(0, 1fr); column-gap: 8px; row-gap: 0; align-items: center; padding: 9px 0; }
  .rt-panel .rt-flabel { padding-top: 0; font-size: 11px; line-height: 1.25; letter-spacing: 0; word-break: keep-all; }
  .rt-panel .rt-fchips {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 6px;
    padding-bottom: 2px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
  }
  .rt-panel .rt-fchips::-webkit-scrollbar { display: none; }
  .rt-panel .rt-fchips .sf-chip { flex: 0 0 auto; height: 32px; padding: 0 11px; font-size: 12.5px; white-space: nowrap; }
  .rt-panel .rt-fchips .sf-chip .rt-n { margin-left: 5px; font-size: 11px; }
  .rt-panel .rt-fsep { display: none; }
  .rt-panel .rt-frow > .rt-fnote { margin-left: 0; font-size: 11.5px; line-height: 1.5; }
}

/* ================================================================ 4. 목록 필터 리뉴얼 (2026-11-25)
   ① 스마트 추천을 대분류 줄에서 빼내 툴바 맨 앞의 전용 포인트 버튼으로 분리(✦ 내 조건 추천받기)
   ② [조건 골라보기] + 인기 조건 칩 1줄(월 3만원 이하·방문 관리·자가 관리·LG전자·삼성전자·코웨이)
   ③ PC(>1024px): 상품 그리드 왼쪽 고정 사이드바(약 236px) — 브랜드를 다 펼쳐도 목록이 밀리지 않는다
   ④ 모바일(≤1024px): [조건 골라보기] → 아래에서 올라오는 바텀시트(하단 N개 상품 보기·초기화) */

/* ── 4-1. 툴바 두 줄 */
.rt-toolbar--lead { padding: 12px 0 10px; gap: 8px; }
.rt-toolbar--meta { padding: 9px 0 11px; border-top: 1px solid var(--sf-line-soft); }

.rt-smart {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  padding: 0 17px;
  border: 0;
  border-radius: 999px;
  background: var(--sf-brand);
  color: #fff;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: -.01em;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(37, 99, 235, .22);
  transition: background-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.rt-smart:hover { background: var(--sf-brand-dark); box-shadow: 0 8px 20px rgba(37, 99, 235, .28); }
.rt-smart:active { transform: translateY(1px); }
.rt-smart:focus-visible { outline: 2px solid var(--sf-brand); outline-offset: 3px; }
.rt-smart__spark { font-size: 13px; line-height: 1; opacity: .95; }

/* 인기 조건 칩 — 한 줄 고정, 좁으면 가로 스크롤(줄바꿈 없음) */
.rt-quick {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}
.rt-quick::-webkit-scrollbar { display: none; }
.rt-qchip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 13px;
  border: 1px solid var(--sf-line);
  border-radius: 999px;
  background: #fff;
  color: var(--sf-ink-2);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: -.01em;
  white-space: nowrap;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
.rt-qchip:hover { border-color: var(--sf-brand); background: var(--sf-brand-soft); color: var(--sf-brand); }
.rt-qchip:focus-visible { outline: 2px solid var(--sf-brand); outline-offset: 2px; }
.rt-qchip.is-active { border-color: var(--sf-ink); background: var(--sf-ink); color: #fff; }

/* ── 4-2. PC 좌측 사이드 필터 */
.rt-layout {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  align-items: start;
  gap: 26px;
  margin-top: 22px;
}
.rt-main { min-width: 0; }
.rt-main .sf-result-line { margin: 0 0 16px; }

.rt-side {
  position: sticky;
  top: calc(var(--sf-head-h) + 12px);
  max-height: calc(100vh - var(--sf-head-h) - 26px);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--sf-line);
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
}
.rt-side__head { display: none; }
.rt-side__body { overflow-y: auto; padding: 2px 16px 10px; }
.rt-side__foot { display: none; }
.rt-side .rt-frow {
  display: block;
  padding: 14px 0;
  border-top: 1px solid var(--sf-line-soft);
}
.rt-side .rt-frow:first-child { border-top: 0; padding-top: 16px; }
.rt-side .rt-flabel {
  display: block;
  padding: 0;
  margin: 0 0 9px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;
  color: var(--sf-muted);
}
.rt-side .rt-fchips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.rt-side .rt-fchips .sf-chip { height: 32px; padding: 0 11px; font-size: 12.5px; }
.rt-side .rt-fchips .sf-chip .rt-n { margin-left: 5px; font-size: 11px; }
.rt-side .rt-fnote { display: block; margin: 8px 0 0; font-size: 11.5px; line-height: 1.55; }
.rt-side .rt-fsep { display: none; }
.rt-side .sf-chip.is-off { pointer-events: none; }

/* 브랜드 더보기 — 6개만 보이고, 펼쳐도 사이드바 안에서만 늘어난다 */
.rt-fchips--brand .rt-brand-extra { display: none; }
.rt-fchips--brand.is-open .rt-brand-extra { display: inline-flex; }
.rt-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 9px;
  padding: 0;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  color: var(--sf-brand);
}
.rt-more:hover { color: var(--sf-brand-dark); }
.rt-more:focus-visible { outline: 2px solid var(--sf-brand); outline-offset: 2px; border-radius: 4px; }
.rt-more__n { color: var(--sf-muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.rt-more__caret { font-size: 9px; line-height: 1; transition: transform .18s ease; }

/* 바텀시트 배경(모바일 전용) */
.rt-sheetbg { display: none; }

/* ── 4-3. 모바일: 바텀시트 + 툴바 재배치 */
@media (max-width: 1024px) {
  .sf-filterbar.rt-filterbar { margin-top: 14px; }
  .sf-filterbar.rt-filterbar .sf-filterbar-in { padding: 0 14px; border-radius: 16px; }

  .rt-toolbar--lead { flex-wrap: wrap; gap: 6px; padding: 10px 0 8px; }
  .rt-smart { flex: 1 1 auto; justify-content: center; height: 38px; padding: 0 12px; font-size: 13px; gap: 5px; }
  .rt-toggle { flex: 0 0 auto; height: 38px; padding: 0 13px; font-size: 12.5px; }
  .rt-quick { order: 3; flex: 1 0 100%; padding: 1px 0 2px; }
  .rt-qchip { height: 32px; padding: 0 11px; font-size: 12px; }

  .rt-toolbar--meta { flex-wrap: nowrap; gap: 6px; padding: 8px 0 10px; }
  .rt-toolbar--meta .rt-badges { flex: 1 1 auto; }
  .rt-toolbar--meta .rt-tools { flex: 0 0 auto; }

  .rt-layout { display: block; margin-top: 14px; }
  .rt-main .sf-result-line { margin: 0 0 12px; }

  .rt-side {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    z-index: 1300;
    max-height: min(86vh, 760px);
    margin: 0;
    border: 0;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -18px 44px rgba(11, 18, 32, .22);
    transform: translateY(102%);
    visibility: hidden;
    transition: transform .26s cubic-bezier(.22, .8, .3, 1), visibility 0s linear .26s;
  }
  .rt-side.is-open {
    transform: translateY(0);
    visibility: visible;
    transition: transform .26s cubic-bezier(.22, .8, .3, 1), visibility 0s;
  }
  .rt-side__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px 10px;
    border-bottom: 1px solid var(--sf-line-soft);
  }
  .rt-side__head strong { font-size: 15px; font-weight: 800; letter-spacing: -.02em; color: var(--sf-ink); }
  .rt-side__x {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 999px;
    background: var(--sf-bg-soft);
    color: var(--sf-body);
    font-size: 14px;
    line-height: 1;
  }
  .rt-side__body { flex: 1 1 auto; padding: 0 18px 8px; -webkit-overflow-scrolling: touch; }
  .rt-side .rt-frow { padding: 13px 0; }
  .rt-side .rt-flabel { font-size: 12px; }
  .rt-side .rt-fchips .sf-chip { height: 34px; padding: 0 12px; font-size: 13px; }
  .rt-side__foot {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--sf-line);
    background: #fff;
  }
  .rt-side__reset { flex: 0 0 auto; font-size: 13px; }
  .rt-apply {
    flex: 1 1 auto;
    height: 48px;
    border: 0;
    border-radius: 14px;
    background: var(--sf-ink);
    color: #fff;
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 800;
    letter-spacing: -.02em;
  }
  .rt-apply:active { opacity: .92; }
  .rt-sheetbg {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1250;
    background: rgba(11, 18, 32, .44);
  }
  .rt-sheetbg[hidden] { display: none; }
  body.rt-sheet-open { overflow: hidden; }
}

@media (min-width: 1025px) {
  .rt-toggle, .rt-side__head, .rt-side__foot, .rt-apply, .rt-sheetbg { display: none !important; }
}

/* ================================================================ 4. 모바일 좌우 흔들림 수정 (2026-11-28)
   증상: 390px 화면에서 상세 페이지가 가로로 35~96px 넘쳐(scrollWidth > innerWidth)
         좌우로 흔들리고, 브라우저가 화면을 축소(shrink-to-fit)해 글자가 작아졌다.
   원인: ① .rt-top 이 ≤960px 에서 1열 grid 가 되는데 grid 자식(.rt-media/.sf-detail-info)의
            기본 min-width:auto 가 '이미지 고유 폭(약 409px)'으로 잡혀 줄지 않았다.
         ② .rt-media__main img 가 width:100% 라 부모가 넓어지면 같이 넓어져 스스로 줄지 못했다.
   수정: grid 자식 min-width:0 + 이미지 max-width:100% + html/body 가로 clip(안전망).
        sticky 헤더·드로어가 깨지지 않도록 hidden 이 아니라 clip 을 쓴다(clip 은 스크롤 컨테이너를 만들지 않는다). */
html { overflow-x: clip; }
body.sf-page { overflow-x: clip; }
.rt-top { min-width: 0; }
.rt-top > * { min-width: 0; max-width: 100%; }
.rt-media, .rt-media__main { min-width: 0; max-width: 100%; }
.rt-media__main img { max-width: 100%; }
.rt-thumbs { flex-wrap: wrap; }
@media (max-width: 960px) {
  .rt-top { grid-template-columns: minmax(0, 1fr); }
}

/* 상담 신청 + 셀프 바로가입 2버튼 (2026-11-28) */
.rt-actions2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rt-actions2 .sf-btn { height: 52px; border-radius: 13px; font-size: 15px; font-weight: 800; }
.rt-actions2 .sf-btn-dark { box-shadow: 0 10px 22px rgba(15, 23, 42, .16); }
@media (max-width: 420px) {
  .rt-actions2 .sf-btn { font-size: 14px; padding: 0 8px; }
}
.rt-actions2.is-single { grid-template-columns: 1fr; }

/* ── 2026-12-02: 상세 이미지 폭 되돌림 + 갤러리 전 장수 + 크게 보기 팝업 ──────────
   · 12-01에 넣었던 '원본 폭 고정'(TEMP 상세이미지) 블록은 제거했다.
     상세 이미지는 다시 컨테이너 폭(1320)까지 width:100% 로 대칭 확장한다.
   · height:auto 만 쓰므로 원본 비율은 절대 깨지지 않는다(가로/세로 어느 쪽도 늘리지 않음). */
.rt-detailimg img,
.rt-htmldetail img,
.sf-detail-gallery img { width: 100%; max-width: 100%; height: auto; }
.rt-htmldetail img + img { margin-top: 0; }

/* 갤러리 썸네일 — 장수 제한 없이 한 줄 가로 스크롤(많아도 레이아웃을 밀지 않는다) */
.rt-thumbs {
  flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden;
  padding-bottom: 6px; margin-bottom: -6px;
  scrollbar-width: thin; -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}
.rt-thumbs > li { flex: 0 0 auto; }
.rt-thumbs::-webkit-scrollbar { height: 6px; }
.rt-thumbs::-webkit-scrollbar-thumb { background: #d7dbe2; border-radius: 999px; }
.rt-thumbs::-webkit-scrollbar-track { background: transparent; }

/* 메인 큰 이미지 클릭 → 전체화면 팝업 */
.rt-media__main img[data-zoom] { cursor: zoom-in; }
.rt-glb { position: fixed; inset: 0; z-index: 5000; display: none; background: rgba(8, 10, 14, .94); }
.rt-glb.is-open { display: block; }
.rt-glb__stage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 58px 70px; }
.rt-glb__img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; background: #fff; border-radius: 6px; box-shadow: 0 24px 60px rgba(0, 0, 0, .5); }
.rt-glb__nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 52px; height: 52px; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .28); border-radius: 50%; background: rgba(17, 24, 39, .62); color: #fff; font-size: 30px; line-height: 1; cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, .35); transition: background-color .15s ease; }
.rt-glb__nav:hover { background: rgba(17, 24, 39, .82); }
.rt-glb__nav--prev { left: 14px; }
.rt-glb__nav--next { right: 14px; }
.rt-glb__bar { position: absolute; top: 12px; right: 14px; z-index: 2; display: flex; align-items: center; gap: 10px; }
.rt-glb__count { color: #e5e7eb; font-size: 13px; font-weight: 700; letter-spacing: .02em; }
.rt-glb__close { width: 42px; height: 42px; border: 1px solid rgba(255, 255, 255, .28); border-radius: 50%; background: rgba(17, 24, 39, .62); color: #fff; font-size: 18px; cursor: pointer; }
.rt-glb__close:hover { background: rgba(17, 24, 39, .82); }
body.rt-glb-lock { overflow: hidden; }
@media (max-width: 640px) {
  .rt-thumb { width: 72px; height: 72px; padding: 4px; border-radius: 11px; }
  .rt-thumbs:not(:has(> li:nth-child(3))) .rt-thumb { width: 88px; height: 88px; }
  .rt-glb__stage { padding: 54px 8px 62px; }
  .rt-glb__nav { width: 42px; height: 42px; font-size: 24px; }
  .rt-glb__nav--prev { left: 6px; }
  .rt-glb__nav--next { right: 6px; }
}
