/* 상품 목록 상단 카테고리 배너 모듈 (catbanner.js) — 위: 아이콘형 배너 줄, 아래: 카테고리 탭 */
.cb { margin: 4px 0 20px; border-bottom: 1px solid var(--line); }
.cb[hidden] { display: none; }

/* 배너 줄: 양옆 화살표(PC에서 마우스를 올릴 때만) + 더 볼 배너가 있는 쪽 가장자리 흐림 */
.cb-wrap { position: relative; }
.cb-view { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; cursor: grab; padding: 18px 0 14px; }
.cb-view::-webkit-scrollbar { display: none; }
.cb-view.drag { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.cb-wrap.fade-r .cb-view { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); }
.cb-wrap.fade-l .cb-view { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 48px), transparent); }
.cb-wrap.fade-l.fade-r .cb-view { -webkit-mask-image: linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 48px), transparent); }
.cb-track { display: flex; gap: 0; list-style: none; margin: 0; padding: 0; }
.cb-track li { flex: 0 0 116px; min-width: 0; scroll-snap-align: start; text-align: center; }
.cb-track a { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 0 6px; }
.cb-img { width: 84px; height: 84px; border-radius: var(--r-img, 14px); background-size: cover; background-position: center; box-shadow: 0 2px 8px rgba(0,0,0,.10); transition: transform .3s; }
.cb-track a:hover .cb-img { transform: translateY(-3px); }
.cb-track a.on .cb-img { box-shadow: 0 6px 13px rgba(0,0,0,.50), 0 2px 5px rgba(0,0,0,.35); transform: translateY(-3px); }   /* 지금 목록에 적용된 배너: 테두리 대신 진한 그림자로 살짝 떠 보이게 */
.cb-track a.on .cb-name { font-weight: 700; }
.cb-img.ph { display: flex; align-items: center; justify-content: center; background: #eceae6; color: #8a8478; font-size: 24px; font-weight: 700; }   /* 직접 구성한 배너에 사진이 없을 때: 이름 첫 글자 */
.cb-name { max-width: 100%; font-size: 14px; line-height: 1.3; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.cb-arrow { position: absolute; top: 60px; transform: translateY(-50%); z-index: 2; display: flex; align-items: center; justify-content: center; width: 40px; height: 64px; padding: 0; border: 0; background: none; box-shadow: none; font-size: 0; color: var(--ink); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; filter: drop-shadow(0 0 4px rgba(255,255,255,.95)) drop-shadow(0 1px 4px rgba(0,0,0,.4)); }   /* 원형 배경 없이 꺾쇠만 — 흰 빛 번짐 + 그림자로 사진 위·흰 배경 위 모두에서 보임 (top: 사진 한가운데 높이) */
.cb-arrow::before { content: ''; display: block; width: 14px; height: 14px; border: solid currentColor; border-width: 3px 3px 0 0; border-radius: 1px; transform: rotate(45deg); }   /* › */
.cb-prev::before { transform: rotate(-135deg); }   /* ‹ */
.cb-arrow[hidden] { display: none; }
.cb-prev { left: 2px; } .cb-next { right: 2px; }
.cb-next:hover { transform: translateY(-50%) translateX(2px); } .cb-prev:hover { transform: translateY(-50%) translateX(-2px); }
@media (hover: hover) { .cb-wrap:hover .cb-arrow { opacity: 1; pointer-events: auto; } }   /* 마우스를 올릴 때만 (터치 화면에서는 아예 안 보임: 스와이프) */
@media (hover: none), (max-width: 700px) { .cb-arrow { display: none; } }   /* 터치 화면·모바일 폭에서는 화살표 없음 (스와이프 + 가장자리 흐림) */
/* ARROW-OUTSIDE: 페이지 양옆 여백이 충분한 넓은 화면(1300px 이상)에서는 화살표를 배너 줄 바깥으로. 배너 줄(.cb-view)은 그대로이고, 마우스가 배너에서 화살표로 옮겨가도 사라지지 않게 호버 영역(.cb-wrap)만 양옆으로 넓힘 (이 블록을 지우면 배너 위에 겹치는 방식으로 돌아감) */
@media (min-width: 1300px) {
  .cb-wrap { margin: 0 -56px; padding: 0 56px; }
  .cb-prev { left: 8px; } .cb-next { right: 8px; }
}

/* 카테고리 탭 (배너 아래) */
.cb-tabs { display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none; border-top: 1px solid var(--line); }
.cb-tabs::-webkit-scrollbar { display: none; }
.cb-tabs button { flex: none; position: relative; padding: 14px 2px; border: 0; background: none; font-size: 16px; color: var(--muted); white-space: nowrap; transition: color .2s; }
.cb-tabs button:hover { color: var(--ink); }
.cb-tabs button.on { color: var(--ink); font-weight: 700; }
.cb-tabs button.on::after { content: ''; position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: var(--ink); }

@media (max-width: 1000px) { .cb-track li { flex-basis: 100px; } }   /* 태블릿·줄어든 PC: 사진 84px + 간격 16px */
@media (max-width: 700px) {
  .cb-tabs { gap: 18px; }
  .cb-tabs button { font-size: 15px; padding: 12px 2px; }
  .cb-view { padding-top: 14px; }
  .cb-track li { flex-basis: 74px; }   /* 한 칸 74px = 사진 64px + 간격 10px (화면 비율이 아니라 고정 폭이라 폭 넓은 폰에서도 간격이 벌어지지 않음) */
  .cb-track a { padding: 0 2px; }
  .cb-img { width: 64px; height: 64px; }
  .cb-name { font-size: 12.5px; }
  /* 모바일: 배너가 6개 이상이면 위·아래 2줄로 놓고 옆으로 넘김 (한 줄에 4.5개씩, 한 칸 안의 두 배너는 같이 스냅) */
  .cb-track.two { display: grid; grid-template-rows: repeat(2, auto); grid-auto-flow: column; grid-auto-columns: 74px; row-gap: 16px; }
  .cb-track.two li { flex: none; }
}
@media (prefers-reduced-motion: reduce) { .cb-track a:hover .cb-img { transform: none; } }

/* TABS-DRAG: 탭 줄이 잘리는 화면 — 마우스로 끌어서 밀기, 「전체」는 왼쪽에 고정, 더 있는 쪽 가장자리는 흐리게. 모바일은 좌우로만 움직임 */
.cb-tabs { overflow-y: hidden; overscroll-behavior-x: contain; }
.cb-tabs.scrollable { cursor: grab; }
.cb-tabs.drag { cursor: grabbing; user-select: none; }
.cb-tabs button:first-child { position: sticky; left: 0; z-index: 2; background: #fff; box-shadow: 14px 0 0 0 #fff; }   /* 「전체」 고정: 다른 탭이 뒤로 밀려 들어가며 가려짐 */
.cb-tabs.fade-r { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); }
@media (max-width: 700px) {
  .cb-tabs { touch-action: pan-x; }   /* 탭 줄 위에서는 위아래 끌기가 먹지 않고 좌우로만 */
  .cb-view { overflow-y: hidden; }    /* 배너 줄도 안쪽 세로 스크롤은 없음 (화면 스크롤은 그대로) */
}
