/* PC 헤더 — 데스크톱 브라우저에서 600px 액자 위에 얹는다. 치수는 레거시 Vue layouts/homePc.vue·web-v2 PcHeaderBar 와 같다 */
/* 헤더 높이 60px — 아래 액자 오프셋(#layerAll 등)과 함께 바꿔야 한다 */

.pc_header {
  position: sticky;
  top: 0;
  z-index: 9002; /* 액자 안 레이어(9001) 위, 모달(#Modal 9990) 아래 */
  background: #fff;
  font-family: Pretendard, 'SD Gothic Neo', 'Apple SD Gothic Neo', NotoSansKR, sans-serif;
}
.pc_header * {
  font-family: inherit;
  box-sizing: border-box;
}
.pc_header__inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  max-width: 1280px;
  height: 60px;
  margin: 0 auto;
  padding: 0; /* v2 PcHeaderBar 처럼 좌우 여백 없이 1280 프레임 끝에 붙는다 */
  border-bottom: 1px solid #eee; /* 밑줄도 프레임 폭 안에서만 (box-sizing 으로 60px 유지) */
}
.pc_header__logo {
  display: block;
  flex: none;
  width: 98px;
  height: 24px;
  background: url('https://static-ux.mustit.co.kr/img/m/m_bi/bi24_logo.svg') no-repeat center;
  background-size: contain;
}
.pc_header__logo .blind {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.pc_header__tabs {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 15px;
  min-width: 0;
  margin-left: 6px; /* 공통 gap 12 + 6 = 로고와의 간격 18 */
  padding: 4px 8px 4px 0; /* NEW 점(top -2 / right -7)이 잘리지 않게 */
  font-size: 16px;
  color: #111;
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}
.pc_header__tabs::-webkit-scrollbar {
  display: none;
}
.pc_header__tab {
  flex: none;
}
/* 색은 API(selected.textColor)가 정한다 — 강조(핫딜 등)도 어드민에서 바뀐다 */
.pc_header__tab_link {
  position: relative;
  color: #111;
  font-size: 16px; /* m_reset.css 가 a·li 에 13px 을 직접 줘 ul 의 16px 가 상속되지 않는다 */
  text-decoration: none;
}
.pc_header__tab_link:hover {
  opacity: 0.6;
}
.pc_header__tab_new {
  position: absolute;
  top: -2px;
  right: -7px;
  width: 4px;
  height: 4px;
  border-radius: 100%;
  background: #d00000;
}
.pc_header__utils {
  display: flex;
  align-items: center;
  flex: none;
  gap: 14px;
  margin-left: auto;
}
.pc_header__util_icon {
  position: relative;
  display: flex;
  flex: none;
  padding: 0;
  border: 0;
  background: none;
  color: #111;
  cursor: pointer;
}
.pc_header__util_icon svg {
  width: 24px;
  height: 24px;
}
.pc_header__util_icon:hover {
  opacity: 0.6;
}
/* 장바구니 수 — v2·PHP 모바일 헤더 배지와 같은 18px 검은 원(아이콘 기준 위치도 같다), 99+ 만 옆으로 늘어난다 */
.pc_header__basket_count {
  position: absolute;
  top: 4px;
  right: -5px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 3px;
  border-radius: 9px;
  background: #111;
  color: #fff;
  font-size: 10px;
  white-space: nowrap;
}

/* 카테고리 드로어 — 좌측 슬라이드 (폭·그림자는 v2 PcCategoryDrawer 와 같다) */
.pc_drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 9100;
  font-family: Pretendard, 'SD Gothic Neo', 'Apple SD Gothic Neo', NotoSansKR, sans-serif;
}
.pc_drawer * {
  box-sizing: border-box;
}
.pc_drawer[hidden] {
  display: none;
}
.pc_drawer__dim {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.4);
}
.pc_drawer__panel {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  width: 500px;
  height: 100%;
  overflow: hidden; /* 스크롤은 안쪽 레일·패널이 각각 */
  background: #fff;
  box-shadow: 12px 0 32px rgba(0, 0, 0, 0.18);
  transform: translateX(-40px);
  opacity: 0;
  transition: transform 0.25s ease-in-out, opacity 0.25s ease-in-out;
}
.pc_drawer.is-open .pc_drawer__panel {
  transform: none;
  opacity: 1;
}
.pc_drawer__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.pc_drawer__close {
  position: absolute; /* .pc_drawer(fixed) 기준 — 패널 스크롤·transform 과 무관 */
  top: 12px;
  left: 512px; /* 패널 폭 500 + 12 */
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 100%;
  background: #fff;
  color: #111;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.25s ease-in-out;
}
.pc_drawer.is-open .pc_drawer__close {
  opacity: 1;
}
.pc_drawer__close svg {
  width: 20px;
  height: 20px;
}
.pc_drawer__state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 100%;
  padding: 40px 20px;
  color: #767676;
  font-size: 14px;
  text-align: center;
}
.pc_drawer__state p {
  margin: 0;
}
.pc_drawer__retry {
  padding: 8px 16px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  color: #222;
  font-size: 13px;
  cursor: pointer;
}

/* 드로어 카테고리 — web-v2 app/m/categories CategoriesView 포팅 (categoriesView.module.scss 의 값 그대로) */
.pc_cat {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  background: #fff;
}
.pc_cat a {
  color: inherit;
  text-decoration: none;
}
.pc_cat img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* 서비스 숏컷 — 68px 박스 밀착 */
.pc_cat__shortcuts {
  display: flex;
  flex: none;
  padding: 16px 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.pc_cat__shortcuts::-webkit-scrollbar {
  display: none;
}
.pc_cat__shortcut {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 68px;
  text-align: center;
}
.pc_cat__shortcut.is-new::after {
  content: '';
  position: absolute;
  top: 0;
  right: 4px;
  width: 4px;
  height: 4px;
  border-radius: 100%;
  background-color: #d00000;
}
.pc_cat__shortcut_icon {
  position: relative;
  display: block;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  overflow: hidden;
}
.pc_cat__shortcut_name {
  display: block;
  max-width: 100%;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.33;
  color: #222;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
/* 퀵메뉴(북마크) */
.pc_cat__bookmarks {
  display: flex;
  flex: none;
  gap: 8px;
  padding: 0 16px 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.pc_cat__bookmarks::-webkit-scrollbar {
  display: none;
}
.pc_cat__bookmark {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  padding: 3px 11px 3px 3px;
  border: 1px solid #e6e6e6;
  border-radius: 18px;
}
.pc_cat__bookmark_icon {
  position: relative;
  display: block;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 100%;
  overflow: hidden;
}
.pc_cat__bookmark_name {
  position: relative;
  display: block;
  max-width: 109px;
  margin-left: 8px;
  padding-right: 18px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.33;
  color: #222;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.pc_cat__bookmark_name::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 0;
  margin-top: -5px;
  width: 10px;
  height: 10px;
  background: url('https://static-ux.mustit.co.kr/img/m/m_icon/icon-arrow-right-category.svg') center / contain no-repeat;
}
/* 본문 2단 (좌측 레일 + 우측 패널) */
.pc_cat__body {
  position: relative;
  display: flex;
  flex: 1;
  min-height: 0;
  margin-top: 12px;
}
.pc_cat__rail {
  flex-shrink: 0;
  width: 120px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #fff;
  scrollbar-width: none;
}
.pc_cat__rail::-webkit-scrollbar {
  display: none;
}
.pc_cat__rail_track {
  position: relative;
  display: flex;
  flex-direction: column;
  padding-bottom: 60px;
}
.pc_cat__rail_item {
  position: relative;
  flex-shrink: 0;
  z-index: 2;
  width: 120px;
  height: 48px;
  padding: 16px;
  border: 0;
  background: none;
  font-size: 14px;
  font-weight: 400;
  color: #888;
  text-align: left;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  cursor: pointer;
}
.pc_cat__rail_item.is-active {
  font-weight: 700;
  color: #222;
}
.pc_cat__indicator {
  position: absolute;
  left: 0;
  z-index: 1;
  width: 120px;
  height: 48px;
  background-color: #f5f5f5;
  transition: top 0.4s;
}
.pc_cat__pane {
  position: relative;
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 20px; /* v2 drawer-pc 와 같은 우측 여백 — 콘텐츠 폭 380 - 20 = 360 */
  padding-bottom: 150px;
  background: #f5f5f5;
}
.pc_cat__section {
  display: flex;
  flex-direction: column;
}
.pc_cat__section:last-child {
  padding-bottom: 40px;
}
.pc_cat__title {
  margin: 0;
  padding-top: 32px;
  padding-left: 16px;
  font-size: 13px;
  line-height: 1.38;
}
/* 기획전 배너가 없으면 첫 섹션 제목만 20px */
.pc_cat__title.is-first {
  padding-top: 20px;
}
.pc_cat__see_all {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.38;
  color: #222;
}
.pc_cat__see_all::after {
  content: '';
  display: block;
  margin-left: 2px;
  width: 12px;
  height: 12px;
  background: url('https://static-ux.mustit.co.kr/img/m/m_icon/icon-arrow-right-category-title.svg') center / contain no-repeat;
}
.pc_cat__see_all.is-disabled {
  pointer-events: none;
}
.pc_cat__see_all.is-disabled::after {
  display: none;
}
.pc_cat__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 6px;
  margin-top: 16px;
  padding: 0 12px;
}
.pc_cat__item {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: calc((100% - 12px) / 3);
  overflow: hidden;
}
.pc_cat__thumb {
  display: block;
  width: 100%;
  padding: 0 8px;
}
.pc_cat__thumb_box {
  position: relative;
  display: block;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
}
.pc_cat__name {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.33;
  color: #222;
  text-align: center;
}
/* 첫 섹션 상단 대형 배너 */
.pc_cat__plans {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 8px;
  padding: 20px 16px 0;
}
.pc_cat__plan {
  display: block;
  width: calc((100% - 8px) / 2);
}
.pc_cat__plan_img {
  position: relative;
  display: block;
  width: 100%;
  height: 0;
  padding-bottom: 64%;
  overflow: hidden;
  border-radius: 6px;
}
.pc_cat__plan_img img {
  position: absolute;
  top: 0;
  left: 0;
}
.pc_cat__plan_img::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background: rgba(0, 0, 0, 0.03);
}
.pc_cat__plan_name {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.33;
  color: #222;
  text-align: center;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* 맨 위로 — web-v2 ToTopFloating 과 같은 위치: 런처가 보이는 1401px 이상에선 런처 중심 위(프레임 오른쪽 640 + 30 + 20 + 24 = 714), 그 아래 폭에선 우 40·하 63 */
.pc_top {
  position: fixed;
  right: 40px;
  bottom: 63px;
  z-index: 9003;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-in-out;
}
.pc_top.is-on {
  opacity: 1;
  pointer-events: auto;
}
.pc_top img {
  display: block;
  width: 48px;
  height: 48px;
}
@media screen and (min-width: 1401px) {
  .pc_top {
    right: calc(50% - 714px);
    bottom: 102px;
  }
}

/* 액자 보정 — 헤더가 있을 때만(body.pc-header-on). 무신사식: 헤더와 같은 1280 프레임 안만 회색, 바깥은 흰색, 컬럼 세로 테두리 없음 */
body.pc-header-on {
  background: #fff;
}
body.pc-header-on #viewport_container {
  max-width: 1280px;
  margin: 0 auto;
  background: #f5f5f5;
}
/* 1280 안에서 600px 본문을 가운데에 — 원래 minmax(430/302) 최소폭은 1280 에 안 들어간다 */
body.pc-header-on #viewport_container.desktop {
  grid-template-columns: 1fr 600px 1fr;
  column-gap: 0;
}
body.pc-header-on #viewport_container #viewport_center {
  grid-column: 2; /* 1400px 이하에서 좌우 섹션이 display:none 이라 자동 배치가 1열로 밀린다 — 항상 가운데 열 */
  border-left: 0;
  border-right: 0;
}
/* 모바일 서브 헤더·바텀 네비·레거시 탑 버튼은 PC 헤더가 대신한다 */
body.pc-header-on #viewport_container #viewport_center .sub_header,
body.pc-header-on .sub_bottom,
body.pc-header-on .local-top-button {
  display: none !important;
}
/* _viewport.scss 의 top:0 sticky 요소들을 헤더 높이만큼 내린다 */
body.pc-header-on #viewport_container #viewport_center #layerAll.is_open,
body.pc-header-on #viewport_container #viewport_center #layerAll.full {
  top: 60px;
  height: calc(100vh - 60px) !important;
}
body.pc-header-on #viewport_container #viewport_left,
body.pc-header-on #viewport_container #viewport_right {
  height: calc(100vh - 60px);
}
body.pc-header-on #viewport_container #viewport_right {
  top: 60px;
}
/* 채팅 상담 런처 — web-v2 RightCta 와 같은 자리(1280 프레임 오른쪽 바깥 +30, 아래 60)·같은 40px 원, 호버하면 왼쪽으로 늘어나 라벨. 1400px 이하에선 #viewport_right 와 함께 숨는다 */
body.pc-header-on .seller_chat_btn {
  position: fixed;
  left: calc(50% + 670px);
  right: auto;
  bottom: 60px;
  z-index: 9003;
  width: auto;
  margin: 0;
}
body.pc-header-on .seller_chat_btn .chat {
  width: 40px;
  height: 40px;
  padding: 0 0 0 40px;
  border: 0;
  border-radius: 20px;
  background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111111' stroke-width='1.4' stroke-linejoin='round'><path d='M12 4.5c-4.7 0-8 3-8 6.6 0 2.1 1.1 3.9 2.9 5.1L6 19.5l3.9-1.7c.7.1 1.4.2 2.1.2 4.7 0 8-3 8-6.6s-3.3-6.9-8-6.9z'/></svg>") no-repeat 9px center !important;
  background-size: 22px 22px !important; /* _cta.scss 의 cover !important 를 덮는다 */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
  color: #111;
  font-size: 13px;
  font-weight: 500;
  line-height: 40px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
  transition: width 0.25s ease, background-color 0.2s;
}
body.pc-header-on .seller_chat_btn .chat::after {
  content: '채팅 상담';
  display: inline-block;
  padding-right: 16px;
  opacity: 0;
  transition: opacity 0.2s ease;
}
body.pc-header-on .seller_chat_btn .chat:hover {
  width: 118px;
  background-color: #111 !important;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='1.4' stroke-linejoin='round'><path d='M12 4.5c-4.7 0-8 3-8 6.6 0 2.1 1.1 3.9 2.9 5.1L6 19.5l3.9-1.7c.7.1 1.4.2 2.1.2 4.7 0 8-3 8-6.6s-3.3-6.9-8-6.9z'/></svg>") !important;
  color: #fff;
}
body.pc-header-on .seller_chat_btn .chat:hover::after {
  opacity: 1;
}
/* 드로어가 열린 동안 본문 스크롤 잠금 */
body.pc-drawer-open {
  overflow: hidden;
}
