/* ==========================================================================
   qrezshop 레이아웃 테마 — 코스트코 코리아 스타일 (costco)
   --------------------------------------------------------------------------
   참조 디자인: https://www.costco.co.kr/ (2026-11 기준)
   - CSS 오버레이 방식: qrezshop.css 뒤에 로드되어 기존 DOM을 덮어씁니다.
   - 디자인 토큰
       --co-blue   : #005dab (코스트코 블루 — 카테고리바/검색/버튼/링크)
       --co-blue-d : #004c8a (hover)
       --co-red    : #e31837 (할인/포인트 강조)
       --co-gray   : #efefef (상단 유틸바/표 헤더 배경)
       --co-line   : #e3e3e3 (카드/보더 라인)
       --co-text   : #1f1f1f
       --co-muted  : #5f5f5f
   - 코스트코 특성: 사각 모서리(radius 0), 얇은 회색 보더, 파란색 포인트.

   ■ 헤더 배치 (요구사항)
     PC  : [햄버거(전체카테고리)] [돋보기(검색토글)] [쇼핑몰로고]
           [서브메뉴: 인기추천/특가상품/뷰티이지/이벤트/상품보기] [장바구니]
     모바일: [햄버거(서브메뉴 → 하단 리스트 시트)] [쇼핑몰로고] [장바구니]
           + 검색바 하단 상시 노출, 서브메뉴는 하단 시트에서 제공

   - 최근본상품/관심상품/좌우 홍보배너 등 큐알이지 고유 기능은 그대로 유지.
   - 저작권 주의: 코스트코 로고/이미지/상표/폰트 파일은 사용하지 않습니다.
   ========================================================================== */

body.theme-costco {
  background: #ffffff;
  color: var(--co-text, #1f1f1f);
  font-family: 'Pretendard', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Malgun Gothic', 'Apple SD Gothic Neo', sans-serif;
  letter-spacing: -0.2px;
  overflow-x: hidden;
}

body.theme-costco {
  --co-blue: var(--point_color, #005dab);
  --co-blue-d: #004c8a;
  /* 기본 큐알이지 스타일(#af2943→var(--brand-main))이 사용하는 브랜드 액센트를
     코스트코 블루로 재정의 — 탭/단계표시/버튼 등에서 붉은색이 남지 않도록 한다. */
  --brand-main: #005dab;
  --brand-sub: #354153;
  --co-red: #e31837; /* 할인/강조 레드는 고정(브랜드 치환과 분리) */
  --co-navy: #354153;
  --co-gray: #efefef;
  --co-line: #e3e3e3;
  --co-line-d: #cacaca;
  --co-text: #1f1f1f;
  --co-muted: #5f5f5f;
  --co-sub: #888888;
}

/* ==========================================================================
   1. 페이지 폭 (PC 1240 / 모바일 100%)
   ========================================================================== */
body.theme-costco #wrap {
  max-width: 1240px;
  margin: 0 auto;
  border-left: 0 !important;
  border-right: 0 !important;
  overflow: visible; /* 풀와이드 유틸바용 (스와이퍼는 자체 overflow 처리) */
}
body.theme-costco #container,
body.theme-costco #contents {
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
}
@media (max-width: 768px) {
  body.theme-costco #wrap { max-width: 100%; }
  body.theme-costco #container,
  body.theme-costco #contents { max-width: 100%; padding-left: 0; padding-right: 0; }
}

/* ==========================================================================
   2. 상단 공지/이벤트 스트립 → 코스트코 유틸바 톤(밝은 회색)
   ========================================================================== */
body.theme-costco .sys-notice-banner {
  background: var(--co-gray) !important;
  color: var(--co-text) !important;
  border-bottom: 1px solid #e6e6e6;
}
body.theme-costco .sys-notice-marquee,
body.theme-costco .sys-notice-marquee * {
  color: var(--co-muted) !important;
  font-weight: 500;
  font-size: 12px;
}
body.theme-costco .topBanner.swiper-container {
  height: 44px !important;
  background: linear-gradient(to right, var(--co-blue), var(--co-blue-d)) !important;
  border-bottom: 1px solid #e6e6e6;
}
/* 세로 스와이퍼 이동 중 슬라이드가 위로 빠지며 흰색이 비치는 문제 방지:
   슬라이드/컨테이너 모두 동일 그라데이션으로 채워 틈이 보이지 않게 함 */
body.theme-costco .topBanner .swiper-wrapper {
  background: linear-gradient(to right, var(--co-blue), var(--co-blue-d)) !important;
}
body.theme-costco .topBanner ul li {
  height: 44px !important;
}
body.theme-costco .topBanner ul li.color01,
body.theme-costco .topBanner ul li.color02,
body.theme-costco .topBanner .swiper-slide {
  background: linear-gradient(to right, var(--co-blue), var(--co-blue-d)) !important;
}
body.theme-costco .topBanner ul li a {
  font-size: 12px !important;
  line-height: 44px !important;
  font-weight: 600;
  letter-spacing: -0.2px;
  color: #ffffff !important;
}

/* 탑배너 위 햄버거/돋보기 오버레이 (theme.js가 body.costco-banner-mode 부여)
   - 햄버거/돋보기를 배너 왼쪽에 올리고 흰색 아이콘으로 표시
   - 헤더 한 줄은 [로고][서브메뉴][장바구니]로 재구성 */
body.costco-banner-mode .topBanner {
  position: relative;
  z-index: 400; /* 딤드(300)보다 위 → 좌측 드로어가 딤드에 가리지 않도록 컨텍스트 상향 */
}
/* 드로어가 배너(400) 안에 있으므로, 딤드는 그보다 낮은 단계로 내려야 드로어가 위에 보임 */
body.theme-costco.costco-banner-mode #dimmedSlider {
  z-index: 350 !important;
}
body.costco-banner-mode .topBanner .side {
  position: absolute;
  top: 0;
  left: 6px;
  height: 44px;
  display: flex;
  align-items: center;
  gap: 2px;
  z-index: 30;
}
body.costco-banner-mode .topBanner .side .btnCate,
body.costco-banner-mode .topBanner .side .btnSearchToggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  margin: 0;
  background: transparent;
  border: 0;
  color: #ffffff;
  cursor: pointer;
}
body.costco-banner-mode .topBanner .side .btnCate i,
body.costco-banner-mode .topBanner .side .btnSearchToggle i {
  color: #ffffff !important;
  font-size: 28px;
}
/* 서브햄버거(서브메뉴 시트)와 쇼핑카트도 탑배너 오른쪽에 오버레이(흰색) */
body.costco-banner-mode .topBanner .costco-right-group {
  position: absolute;
  top: 0;
  right: 6px;
  height: 44px;
  display: flex;
  align-items: center;
  z-index: 30;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}
/* 좌측 드로어(햄버거 클릭)가 열리면 우측 아이콘도 함께 가려지도록 */
html.expand body.theme-costco.costco-banner-mode .topBanner .costco-right-group {
  visibility: hidden;
  opacity: 0;
}
body.theme-costco.costco-banner-mode .topBanner .costco-mini-cate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  margin: 0;
  background: transparent;
  border: 0;
  color: #ffffff;
  cursor: pointer;
}
body.theme-costco.costco-banner-mode .topBanner .costco-mini-cate i {
  color: #ffffff !important;
  font-size: 28px;
}
body.theme-costco.costco-banner-mode .topBanner .right_icon {
  display: flex;
  align-items: center;
}
body.theme-costco.costco-banner-mode .topBanner .right_icon .cartWrap a {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 44px;
  color: #ffffff;
  text-decoration: none;
  position: relative;
}
body.theme-costco.costco-banner-mode .topBanner .right_icon .cartWrap i {
  color: #ffffff !important;
  font-size: 28px;
}
body.theme-costco.costco-banner-mode .topBanner .right_icon .costco-cart-label {
  display: none;
}
body.theme-costco.costco-banner-mode .topBanner .cartWrap .count {
  top: 3px !important;
  right: 2px !important;
  left: auto !important;
  min-width: 18px !important;
  width: 18px !important;
  height: 18px !important;
  line-height: 16px !important;
  padding: 0 !important;
  background: #ffffff !important;
  color: var(--co-blue) !important;
  border: 1px solid var(--co-blue) !important;
  border-radius: 50% !important; /* 장바구니 카운트는 동그라미 */
  font-size: 10px !important;
}
@media (min-width: 769px) {
  /* 헤더 프리미엄 홍보배너: 로고 우측부터 서브메뉴 전까지 절대영역으로 채움 */
  body.theme-costco #header .topArea02 .header-premium-banner {
    grid-area: headbanner;
    height: 40px;
    min-width: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    position: relative;
  }
  body.costco-banner-mode #header .topArea02 {
    grid-template-columns: auto minmax(0, 1fr) auto !important;
    grid-template-areas: "logo headbanner submenu" !important;
  }
  /* 로고가 -30px 이동한 만큼 배너도 당겨서 로고 바로 옆에 붙임 */
  body.costco-banner-mode #header .topArea02 .header-premium-banner {
    margin-left: -30px;
  }
  /* 로고를 위 햄버거 버튼(x=6)과 세로로 맞춤 (inner 여백 20px + topArea02 마진 16px 보정) */
  body.theme-costco.costco-banner-mode #header .xans-layout-logotop {
    transform: translateX(-30px) !important;
  }
}
@media (max-width: 768px) {
  /* 모바일: 로고 오른쪽부터 오른쪽 끝까지 절대영역으로 채움 */
  body.theme-costco #header .topArea02 .header-premium-banner {
    grid-area: headbanner;
    height: 40px;
    min-width: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
  }
}
@media (max-width: 768px) {
  body.costco-banner-mode #header .topArea02 {
    grid-template-columns: auto minmax(0, 1fr) !important;
    grid-template-areas: "logo headbanner" !important;
  }
  /* 로고를 위 햄버거 버튼(x=6)과 세로로 맞춤 (topArea02 좌측 패딩 6px과 일치) */
  body.costco-banner-mode #header .xans-layout-logotop {
    margin: 0 !important;
  }
}

/* ==========================================================================
   3. 상단 유틸바 (theme.js가 #header 맨 위에 주입, PC 전용)
   ========================================================================== */
body.theme-costco .costco-util-bar {
  background: var(--co-gray);
  border-bottom: 1px solid #e6e6e6;
}
body.theme-costco .costco-util-inner {
  max-width: 1240px;
  height: 36px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
body.theme-costco .costco-util-inner a {
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  font-size: 12px;
  color: var(--co-muted);
  text-decoration: none;
  border-right: 1px solid #d5d5d5;
  line-height: 14px;
}
body.theme-costco .costco-util-inner a:last-child { border-right: 0; padding-right: 0; }
body.theme-costco .costco-util-inner a:hover { color: var(--co-blue); text-decoration: underline; }
body.theme-costco .costco-util-inner a.costco-util-strong { color: var(--co-blue); font-weight: 700; }
@media (max-width: 768px) {
  body.theme-costco .costco-util-bar { display: none; }
}

/* ==========================================================================
   4. 헤더 공통
   ========================================================================== */
body.theme-costco #header {
  background: #ffffff;
  border-bottom: 1px solid var(--co-line);
}
body.theme-costco #header .inner { max-width: 1240px; }

/* 기존 가로 카테고리 바(#menuFix)는 헤더 한 줄 안의 서브메뉴로 이동 → 원본 숨김 */
body.theme-costco #menuFix { display: none !important; }

/* 검색폼 공통 (PC 토글 패널 / 모바일 상시 노출) */
body.theme-costco #searchWrapLayer { background: #ffffff; }
body.theme-costco #searchWrapLayer .searchWrapper { max-width: none; }
body.theme-costco #searchWrapLayer .searchForm {
  display: flex;
  align-items: stretch;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--co-blue);
  background: #ffffff;
}
body.theme-costco #searchWrapLayer .searchForm input[type="text"] {
  flex: 1 1 auto;
  width: auto;
  height: 42px;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 14px !important;
  font-size: 15px;
  color: var(--co-text);
  background: #ffffff;
  box-sizing: border-box;
}
body.theme-costco #searchWrapLayer .searchForm input[type="text"]:focus {
  border: 0 !important;
  box-shadow: none !important;
  outline: none;
}
body.theme-costco #searchWrapLayer .searchForm button {
  flex: 0 0 auto;
  position: static !important;
  top: auto !important;
  right: auto !important;
  transform: none !important;
  width: 56px;
  height: 42px;
  margin: 0 !important;
  padding: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--co-blue);
  color: #ffffff;
  font-size: 21px;
  border: 0;
  border-radius: 0;
  cursor: pointer;
}
body.theme-costco #searchWrapLayer .searchForm button:hover { background: var(--co-blue-d); }

/* 헤더 한 줄 서브메뉴 (theme.js가 #menuFix 항목을 이동시켜 구성) */
body.theme-costco .costco-submenu { min-width: 0; }
body.theme-costco .costco-submenu ul {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
body.theme-costco .costco-submenu ul::-webkit-scrollbar { display: none; }
body.theme-costco .costco-submenu li { flex-shrink: 0; }
body.theme-costco .costco-submenu li a {
  display: inline-block;
  padding: 8px 0 6px;
  font-size: 15px;
  font-weight: 700;
  color: var(--co-text);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
body.theme-costco .costco-submenu li a:hover,
body.theme-costco .costco-submenu li.on a {
  color: var(--co-blue);
  border-bottom-color: var(--co-blue);
}

/* 장바구니 라벨 */
body.theme-costco .costco-cart-label { font-weight: 700; }

/* ==========================================================================
   5. 헤더 — PC (769px 이상)
      [햄버거][돋보기][로고][서브메뉴][장바구니]
   ========================================================================== */
@media (min-width: 769px) {
  /* 상단 유틸바를 뷰포트 전체 폭으로 확장 */
  body.theme-costco .costco-util-bar {
    width: 100vw;
    margin-left: calc(50% - 50vw);
  }

  body.theme-costco #header .inner { padding: 0; }

  body.theme-costco #header .topArea02 {
    height: 76px;
    margin: 0 16px !important;
    padding: 0 !important;
    display: grid !important;
    grid-template-columns: auto auto minmax(0, 1fr) auto auto;
    grid-template-areas: "side logo headbanner submenu cart";
    align-items: center;
    column-gap: 18px;
    position: relative;
    z-index: 10;
  }

  /* 좌측: 햄버거(전체카테고리 드로어) + 돋보기(검색 토글) */
  body.theme-costco #header .topArea02 .side {
    grid-area: side;
    display: flex;
    align-items: center;
    gap: 4px;
    position: relative;
    z-index: 200; /* 드로어(#aside 포함)가 우측 버튼/플로팅 버튼보다 위에 그려지도록 */
  }
  body.theme-costco #header .topArea02 .side .btnCate,
  body.theme-costco #header .topArea02 .side .btnSearchToggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 0;
    border-radius: 0;
    color: var(--co-text);
    cursor: pointer;
  }
  body.theme-costco #header .topArea02 .side .btnCate i,
  body.theme-costco #header .topArea02 .side .btnSearchToggle i { font-size: 26px; }
  body.theme-costco #header .topArea02 .side .btnCate:hover,
  body.theme-costco #header .topArea02 .side .btnSearchToggle:hover { color: var(--co-blue); }

  /* 로고 */
  body.theme-costco #header .xans-layout-logotop {
    grid-area: logo;
    position: static !important;
    transform: none !important;
    justify-self: start;
    display: block;
  }
  body.theme-costco #header .xans-layout-logotop a { display: inline-block; }
  body.theme-costco #header .xans-layout-logotop img {
    max-width: 190px;
    max-height: 44px;
    width: auto;
    height: auto;
    display: block;
  }
  body.theme-costco #header .xans-layout-logotop .costco-logo-text {
    font-size: 24px;
    font-weight: 800;
    color: var(--co-blue);
    letter-spacing: -0.5px;
  }

  /* 서브메뉴: 로고 오른쪽, 가운데 정렬 */
  body.theme-costco .costco-submenu {
    grid-area: submenu;
    justify-self: center;
    width: 100%;
  }
  body.theme-costco .costco-submenu ul { justify-content: center; }

  /* 장바구니 */
  body.theme-costco #header .topArea02 .costco-right-group {
    grid-area: cart;
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 2px;
    position: relative;
    z-index: 11;
  }
  body.theme-costco #header .topArea02 .right_icon {
    position: relative;
    z-index: 11;
  }
  body.theme-costco .costco-mini-cate { display: none !important; }
  body.theme-costco #header .topArea02 .right_icon .cartWrap a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--co-text);
    text-decoration: none;
  }
  body.theme-costco #header .topArea02 .right_icon .cartWrap i {
    font-size: 27px;
    color: var(--co-text);
  }
  body.theme-costco #header .topArea02 .right_icon .costco-cart-label { font-size: 14px; }
  body.theme-costco #header .cartWrap .count {
    top: -7px !important;
    right: auto !important;
    left: 19px !important;
    min-width: 18px !important;
    width: 18px !important;
    height: 18px !important;
    line-height: 16px !important;
    padding: 0 !important;
    background: #ffffff !important;
    color: #0060a9 !important;
    border: 1px solid #0060a9;
    border-radius: 50% !important;
    font-size: 11px !important;
    font-weight: 700 !important;
  }

  /* 검색: 돋보기 클릭 시 헤더 아래 중앙에 뜨는 토글 패널 (div 블록 가운데 정렬) */
  body.theme-costco #searchWrapLayer {
    position: absolute;
    top: calc(100% - 1px);
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: 640px;
    max-width: calc(100% - 32px);
    padding: 14px 16px 18px;
    background: #ffffff;
    border: 1px solid var(--co-line);
    border-top: 0;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.09);
    z-index: 50;
  }
  body.theme-costco #searchWrapLayer .searchWrapper {
    max-width: none;
    margin: 0;
  }

  /* 당겨서 보기 손잡이/닫기 버튼은 사용하지 않음 */
  body.theme-costco #pullMenuHandle,
  body.theme-costco #closeHeaderBtn { display: none !important; }
}

/* ==========================================================================
   6. 헤더 — 모바일 (768px 이하)
      [햄버거(원래 왼쪽메뉴)] [돋보기] [로고] — 왼쪽 정렬 ... [작은햄버거][장바구니]
   ========================================================================== */
@media (max-width: 768px) {
  body.theme-costco #header .inner { max-width: 100%; }

  body.theme-costco #header .topArea02 {
    height: 56px;
    margin: 0 !important;
    padding: 0 6px !important;
    display: grid !important;
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    grid-template-areas: "side logo headbanner right";
    align-items: center;
    gap: 0;
  }

  /* 좌측 그룹: [햄버거(원래 왼쪽 카테고리 드로어)] [돋보기(검색 토글)] [로고] */
  body.theme-costco #header .topArea02 .side {
    grid-area: side;
    display: flex;
    align-items: center;
    gap: 2px;
    justify-self: start;
    position: relative;
    top: auto; /* 기본 .side{top:34%}로 인한 세로 밀림 방지 */
    z-index: 200; /* 드로어(#aside 포함)가 우측 버튼/플로팅 버튼보다 위에 그려지도록 */
  }
  body.theme-costco #header .topArea02 .side .btnCate,
  body.theme-costco #header .topArea02 .side .btnSearchToggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 0;
    color: var(--co-text);
    cursor: pointer;
    padding: 0;
  }
  body.theme-costco #header .topArea02 .side .btnCate i { font-size: 26px; }
  body.theme-costco #header .topArea02 .side .btnSearchToggle i { font-size: 24px; }

  /* 로고: 돋보기 바로 오른쪽, 왼쪽 정렬 (아이콘과 같은 라인에 세로 정렬) */
  body.theme-costco #header .xans-layout-logotop {
    grid-area: logo;
    position: static !important;
    transform: none !important;
    justify-self: start;
    align-self: center;
    display: block;
    margin: 0 0 0 6px;
    line-height: 1;
  }
  body.theme-costco #header .xans-layout-logotop a { display: inline-block; }
  body.theme-costco #header .xans-layout-logotop img {
    max-width: 150px;
    max-height: 32px;
    width: auto;
    height: auto;
    display: block;
  }
  body.theme-costco #header .xans-layout-logotop .costco-logo-text {
    font-size: 19px;
    font-weight: 800;
    color: var(--co-blue);
    letter-spacing: -0.5px;
  }

  /* 서브메뉴는 하단 시트에서 제공 → 헤더 한 줄에서는 숨김 */
  body.theme-costco .costco-submenu { display: none !important; }

  /* 우측: [작은햄버거(서브메뉴 시트)] [장바구니] */
  body.theme-costco #header .topArea02 .costco-right-group {
    grid-area: right;
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 2px;
    position: relative;
    z-index: 11;
  }
  body.theme-costco .costco-mini-cate {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 0;
    color: var(--co-text);
    cursor: pointer;
    padding: 0;
  }
  body.theme-costco .costco-mini-cate i { font-size: 22px; }
  body.theme-costco #header .topArea02 .right_icon { display: flex; }
  body.theme-costco #header .topArea02 .right_icon .cartWrap a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    width: 48px;
    color: var(--co-text);
    text-decoration: none;
  }
  body.theme-costco #header .topArea02 .right_icon .cartWrap i { font-size: 22px; }
  body.theme-costco #header .topArea02 .right_icon .costco-cart-label { font-size: 10px; font-weight: 500; }
  body.theme-costco #header .cartWrap .count {
    top: -3px !important;
    right: 2px !important;
    left: auto !important;
    min-width: 17px !important;
    width: 17px !important;
    height: 17px !important;
    line-height: 15px !important;
    padding: 0 !important;
    background: #ffffff !important;
    color: #0060a9 !important;
    border: 1px solid #0060a9;
    border-radius: 50% !important;
    font-size: 10px !important;
    font-weight: 700 !important;
  }

  /* 검색: 돋보기 클릭 시 헤더 아래 전체 폭 토글 패널 */
  body.theme-costco #searchWrapLayer {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 10px 12px 12px;
    background: #ffffff;
    border-bottom: 1px solid var(--co-line);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    z-index: 50;
  }
  body.theme-costco #searchWrapLayer .searchForm input[type="text"] { height: 38px; font-size: 14px; }
  body.theme-costco #searchWrapLayer .searchForm button { width: 46px; height: 38px; font-size: 19px; }

  body.theme-costco #pullMenuHandle,
  body.theme-costco #closeHeaderBtn { display: none !important; }
  /* 빈 상태에서도 21px 공간을 차지하는 페이지별 추가 컨텐츠 영역 숨김 */
  body.theme-costco #headerExtraContent { display: none !important; }
}

/* ==========================================================================
   7. 모바일 서브메뉴 하단 리스트 시트 (theme.js 주입)
   ========================================================================== */
body.theme-costco .costco-menu-mask {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 980;
  pointer-events: none;
}
body.theme-costco .costco-menu-mask.on { display: block; pointer-events: auto; }
body.theme-costco .costco-menu-sheet {
  position: fixed;
  top: 56px; /* openSheet()에서 실제 헤더 높이로 보정됨 */
  left: 0;
  right: 0;
  bottom: auto;
  transform: translateY(-110%);
  width: 100%;
  max-width: none;
  background: #ffffff;
  z-index: 990;
  transition: transform 0.25s ease;
  border-bottom: 1px solid var(--co-line);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.12);
  pointer-events: none;
  visibility: hidden; /* 닫혀 있을 때 화면 밖으로 이동해도 흰색으로 덮지 않도록 */
  transition: transform 0.25s ease, visibility 0s linear 0.25s;
}
body.theme-costco .costco-menu-sheet.on {
  transform: translateY(0);
  pointer-events: auto;
  visibility: visible;
  transition: transform 0.25s ease;
}
html.costco-sheet-open body { overflow: hidden; }

body.theme-costco .costco-menu-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--co-line);
  font-size: 15px;
  font-weight: 800;
  color: var(--co-text);
}
body.theme-costco .costco-menu-sheet-close {
  background: transparent;
  border: 0;
  font-size: 24px;
  line-height: 1;
  color: var(--co-text);
  cursor: pointer;
  padding: 2px 4px;
}
body.theme-costco .costco-menu-user {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--co-line);
  background: var(--co-gray);
}
body.theme-costco .costco-menu-user a {
  display: inline-block;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--co-text);
  background: #ffffff;
  border: 1px solid var(--co-line-d);
  text-decoration: none;
}
body.theme-costco .costco-menu-user a:hover {
  border-color: var(--co-blue);
  color: var(--co-blue);
}
body.theme-costco .costco-menu-user a.costco-menu-user-strong {
  background: var(--co-blue);
  border-color: var(--co-blue);
  color: #ffffff;
}
body.theme-costco .costco-menu-user a.costco-menu-user-strong:hover {
  background: var(--co-blue-d);
  border-color: var(--co-blue-d);
  color: #ffffff;
}
body.theme-costco .costco-menu-all {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 15px 16px;
  font-size: 15px;
  font-weight: 800;
  color: var(--co-blue);
  border-bottom: 1px solid var(--co-line);
  text-decoration: none;
}
body.theme-costco .costco-menu-all:hover { background: #f6f9fc; }
body.theme-costco .costco-menu-all i { font-size: 20px; }
body.theme-costco .costco-menu-links {
  padding: 4px 16px 18px;
  max-height: 46vh;
  overflow-y: auto;
}
body.theme-costco .costco-menu-links a {
  display: block;
  padding: 14px 2px;
  font-size: 15px;
  font-weight: 600;
  color: var(--co-text);
  border-bottom: 1px solid #f0f0f0;
  text-decoration: none;
}
body.theme-costco .costco-menu-links a:hover { color: var(--co-blue); }
body.theme-costco .costco-menu-links a.on { color: var(--co-blue); }

/* 카테고리 리스트의 view 링크/즐겨찾기 버튼(기능 없음) 숨김
   (드로어 + 상품보기 드롭다운 + 모바일 시트 공통) */
body.theme-costco .categoryList li a.view,
body.theme-costco .categoryList li button.icoBookmark {
  display: none !important;
}

/* 모바일 시트 안 "상품보기" 카테고리 리스트 섹션 */
body.theme-costco .costco-sheet-cate {
  border-bottom: 1px solid var(--co-line);
  background: #fafafa;
  padding: 6px 16px 14px;
  max-height: 38vh;
  overflow-y: auto;
}
body.theme-costco .costco-sheet-cate ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
body.theme-costco .costco-sheet-cate li a {
  display: block;
  padding: 11px 2px;
  font-size: 14px;
  color: var(--co-text);
  border-bottom: 1px solid #ececec;
  text-decoration: none;
}
body.theme-costco .costco-sheet-cate li a:hover { color: var(--co-blue); }

/* PC: 서브메뉴 "상품보기" → 콤보박스식 카테고리 드롭다운 (헤더 아래 중앙) */
@media (min-width: 769px) {
  body.theme-costco .costco-cate-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 860px;
    max-width: calc(100% - 32px);
    max-height: 70vh;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid var(--co-line);
    border-top: 0;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.12);
    display: none;
    z-index: 60;
  }
  body.theme-costco .costco-cate-dropdown.on { display: block; }
  body.theme-costco .costco-cate-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--co-gray);
    border-bottom: 1px solid var(--co-line);
    font-size: 14px;
    font-weight: 800;
    color: var(--co-text);
  }
  body.theme-costco .costco-cate-close {
    background: transparent;
    border: 0;
    font-size: 20px;
    line-height: 1;
    color: var(--co-text);
    cursor: pointer;
    padding: 2px 4px;
  }
  body.theme-costco .costco-cate-body ul {
    list-style: none;
    margin: 0;
    padding: 4px 0;
  }
  body.theme-costco .costco-cate-body li a {
    display: block;
    padding: 11px 18px;
    font-size: 14px;
    color: var(--co-text);
    border-bottom: 1px solid #f2f2f2;
    text-decoration: none;
  }
  body.theme-costco .costco-cate-body li a:hover {
    color: var(--co-blue);
    background: #f6f9fc;
  }
  body.theme-costco .costco-cate-body li a.cate {
    font-weight: 700;
  }
}
@media (max-width: 768px) {
  body.theme-costco .costco-cate-dropdown { display: none !important; }
}

/* ==========================================================================
   8. 햄버거 드로어 (PC "전체 카테고리" / 모바일 시트의 "전체 카테고리" 공용)
   ========================================================================== */
body.theme-costco #aside.slidingMenu {
  background: #ffffff;
  z-index: 1000 !important;
  width: 340px;
  max-width: 88vw;
}
body.theme-costco #dimmedSlider { z-index: 900 !important; }
body.theme-costco #aside .top_section {
  background: var(--co-blue);
  border-bottom: 0;
}
body.theme-costco #aside .top_section a,
body.theme-costco #aside .top_section p,
body.theme-costco #aside .top_section span { color: #ffffff !important; }
body.theme-costco #aside .top_section .member a { font-weight: 700; }
body.theme-costco #aside .btnClose { color: #ffffff; top: 14px; }
body.theme-costco #aside .btnClose i { color: #ffffff; }
body.theme-costco #aside .xans-myshop-main { border-bottom: 1px solid var(--co-line); }
body.theme-costco #aside .xans-myshop-main i { color: var(--co-blue); }
body.theme-costco #aside .xans-myshop-main a:hover { color: var(--co-blue); }
body.theme-costco #aside .categoryCont .categoryList li { border-bottom: 1px solid var(--co-line); }
body.theme-costco #aside .categoryCont .categoryList li a.cate {
  font-weight: 700;
  color: var(--co-text) !important;
}
body.theme-costco #aside .categoryCont .categoryList li.selected > a.cate { color: var(--co-blue) !important; }
body.theme-costco #aside .categoryCont h2.selected {
  color: var(--co-blue) !important;
  font-weight: 800;
}
body.theme-costco #aside .side_cs .tel { color: var(--co-blue) !important; }

/* ==========================================================================
   9. 메인 슬라이더 / 섹션 타이틀
   ========================================================================== */
body.theme-costco .mainSlide { background: #ffffff; }
body.theme-costco .mainSlide .swiper-slide img {
  width: 100%;
  object-fit: cover;
}
@media (min-width: 769px) {
  body.theme-costco .mainSlide {
    max-width: 1240px;
    margin: 0 auto;
    border-radius: 0;
    overflow: hidden;
  }
  body.theme-costco .mainSlide .swiper-slide img { height: 340px; }
  body.theme-costco .mainSlide .options .page_option .swiper-button-prev-main,
  body.theme-costco .mainSlide .options .page_option .swiper-button-next-main {
    background: rgba(53, 65, 83, 0.65);
    border-radius: 0;
    width: 42px;
    height: 42px;
  }
}
@media (max-width: 768px) {
  body.theme-costco .mainSlide .swiper-slide img { height: auto; }
}

body.theme-costco .main_title {
  margin: 36px 0 12px !important;
  padding: 0 4px 8px !important;
  border-bottom: 2px solid var(--co-line);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
body.theme-costco .main_title h2 {
  font-size: 22px !important;
  font-weight: 800 !important;
  color: var(--co-text) !important;
  border-left: 0 !important;
  padding-left: 0 !important;
}
body.theme-costco .main_title h2 .sub {
  font-size: 12px !important;
  color: var(--co-muted) !important;
  font-weight: 400;
  margin-left: 8px;
}
body.theme-costco .main_title .more_btn {
  color: var(--co-blue) !important;
  border: 0 !important;
  background: transparent !important;
  font-weight: 700;
  font-size: 13px;
  padding: 2px 0;
}
body.theme-costco .main_title .more_btn:hover {
  background: transparent !important;
  color: var(--co-blue-d) !important;
  text-decoration: underline;
}
body.theme-costco .main_title .more_btn:after { content: " ›"; }
@media (max-width: 768px) {
  body.theme-costco .main_title h2 { font-size: 18px !important; }
}

/* ==========================================================================
   10. 카테고리 아이콘 배너 (큐알이지 기능 유지, 코스트코식 심플 스타일)
   ========================================================================== */
body.theme-costco .cateBanner { margin-top: 14px; }
/* 카테고리 4x3 스크롤 높이: 2번째 줄이 반쯤 보이도록 확대 (아이콘 62px 기준) */
body.theme-costco .cateBanner.cate-scroll-on .icon_area.grid4 {
  max-height: 140px;
}
@media (min-width: 769px) {
  body.theme-costco .cateBanner .icon_area.grid4 {
    display: flex !important;
    flex-wrap: wrap;
    padding: 0 !important;
  }
  body.theme-costco .cateBanner .icon_area.grid4 .icon {
    width: 16.666% !important;
    padding: 6px;
  }
  body.theme-costco .cateBanner .icon_bg { max-width: 84px; }
}
@media (max-width: 768px) {
  body.theme-costco .cateBanner .icon_area.grid4 .icon { width: 25% !important; padding: 4px; }
  body.theme-costco .cateBanner .icon_bg { max-width: 62px; }
}
body.theme-costco .cateBanner .icon_area li a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}
body.theme-costco .cateBanner .icon_bg {
  background: #ffffff !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  transition: none;
}
body.theme-costco .cateBanner .icon_area li:hover .icon_bg {
  box-shadow: none !important;
  transform: none !important;
}
body.theme-costco .cateBanner .icon_txt {
  font-size: 13px;
  font-weight: 600;
  color: var(--co-text);
}
body.theme-costco .cateBanner .icon_area li:hover .icon_txt { color: var(--co-blue); }

/* ==========================================================================
   11. 상품 카드 (메인/신상품/베스트 공통) — 코스트코식 사각 카드
   ========================================================================== */
body.theme-costco .prdList .swiper-slide,
body.theme-costco .prdList.grid2 > *,
body.theme-costco .prdList.grid2 li {
  background: #ffffff;
  border: 1px solid var(--co-line);
  border-radius: 0;
  overflow: hidden;
  transition: border-color 0.2s;
}
body.theme-costco .prdList .swiper-slide:hover,
body.theme-costco .prdList.grid2 > *:hover,
body.theme-costco .prdList.grid2 li:hover {
  border-color: var(--co-blue);
  box-shadow: none;
}
body.theme-costco .prdList .prdImg img,
body.theme-costco .prdList .img_area img { object-fit: contain; }
body.theme-costco .prdList .description,
body.theme-costco .prdList .txt { padding: 10px 12px 14px; }
body.theme-costco .prdList .name a,
body.theme-costco .prdList .name {
  font-size: 13px;
  font-weight: 600;
  color: var(--co-text) !important;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 37px;
  text-decoration: none;
}
body.theme-costco .prdList .name a:hover { color: var(--co-blue) !important; text-decoration: underline; }
body.theme-costco .prdList .promotion,
body.theme-costco .prdList .description .price,
body.theme-costco .prdList .txt .price {
  color: var(--co-text) !important;
  font-size: 16px;
  font-weight: 800;
}
body.theme-costco .prdList .basket,
body.theme-costco .prdList .btn {
  background: var(--co-blue);
  color: #ffffff;
  border-radius: 0;
  font-weight: 700;
}
body.theme-costco .prdList .basket:hover,
body.theme-costco .prdList .btn:hover { background: var(--co-blue-d); }

@media (min-width: 769px) {
  body.theme-costco .prdList.grid2 {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 14px !important;
  }
  body.theme-costco .prdList.grid2 > li {
    width: auto !important;
    max-width: none !important;
  }
}
@media (min-width: 769px) {
  body.theme-costco .prdSlide .swiper-slide { width: calc(20% - 11.2px) !important; }
}
@media (max-width: 768px) {
  body.theme-costco .prdSlide .swiper-slide { width: calc(50% - 7px) !important; }
}
@media (min-width: 769px) {
  body.theme-costco .reviewSlide .swiper-slide { width: calc(25% - 12px) !important; }
}

/* ==========================================================================
   12. 상품 리스트 페이지
   ========================================================================== */
body.theme-costco .category-container {
  background: #ffffff;
  border-bottom: 1px solid var(--co-line);
}
body.theme-costco .nav-category { gap: 2px !important; }
body.theme-costco .nav-category a,
body.theme-costco .nav-category button {
  border-radius: 0 !important;
  font-weight: 700;
  font-size: 14px;
  color: var(--co-text);
  padding: 11px 14px;
  border-bottom: 3px solid transparent;
  background: transparent !important;
}
body.theme-costco .nav-category .on,
body.theme-costco .nav-category a:hover {
  background: transparent !important;
  color: var(--co-blue) !important;
  border-bottom-color: var(--co-blue);
}
body.theme-costco .scroll-btn-left,
body.theme-costco .scroll-btn-right {
  background: #ffffff !important;
  border: 1px solid var(--co-line) !important;
  color: var(--co-text) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

@media (min-width: 1024px) {
  body.theme-costco .product-list-container {
    grid-template-columns: repeat(4, 1fr) !important;
    grid-gap: 16px !important;
  }
}
body.theme-costco .product-list-container .product-item-box {
  background: #ffffff;
  border: 1px solid var(--co-line);
  border-radius: 0;
  overflow: hidden;
  transition: border-color 0.2s;
}
body.theme-costco .product-list-container .product-item-box:hover {
  border-color: var(--co-blue);
  box-shadow: none;
}
body.theme-costco .product-list-container .product-img img {
  aspect-ratio: 1 / 1;
  object-fit: contain;
  display: block;
}
body.theme-costco .product-item-action-box .action-btn {
  background: rgba(255, 255, 255, 0.95) !important;
  color: var(--co-text) !important;
  border: 1px solid var(--co-line) !important;
  border-radius: 0 !important;
  box-shadow: none;
}
body.theme-costco .product-item-action-box .action-btn:hover {
  background: var(--co-blue) !important;
  color: #ffffff !important;
  border-color: var(--co-blue) !important;
}
body.theme-costco .product-content { padding: 12px; }
body.theme-costco .product-content .pro-rating a,
body.theme-costco .product-content .pro-rating strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--co-blue) !important;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 37px;
  text-decoration: none;
}
body.theme-costco .product-content .pro-rating a:hover { text-decoration: underline; }
body.theme-costco .product-content .pro-price b {
  color: var(--co-text) !important;
  font-size: 16px !important;
  font-weight: 800 !important;
}
body.theme-costco .discount-badge {
  background: var(--co-red) !important;
  color: #ffffff !important;
  border-radius: 0;
  font-weight: 800;
}
body.theme-costco .old-price-custom {
  color: var(--co-sub) !important;
  text-decoration: line-through;
}

/* ==========================================================================
   13. 상품 상세 페이지
   ========================================================================== */
body.theme-costco input[type="submit"],
body.theme-costco button.btnSubmit,
body.theme-costco .btn_area .btn {
  background: var(--co-blue);
  color: #ffffff;
  border: 1px solid var(--co-blue);
  border-radius: 0;
  font-weight: 700;
}
body.theme-costco input[type="submit"]:hover,
body.theme-costco button.btnSubmit:hover,
body.theme-costco .btn_area .btn:hover { background: var(--co-blue-d); border-color: var(--co-blue-d); }

@media (min-width: 769px) {
  body.theme-costco .productHeader {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 36px;
    align-items: start;
  }
  body.theme-costco .productHeader .product-photo-box {
    width: 100% !important;
    margin: 0 !important;
  }
  body.theme-costco .productHeader .product-info {
    width: 100% !important;
    padding: 8px 0 0;
  }
}
body.theme-costco .productHeader .product-photo-box {
  border: 1px solid var(--co-line);
  background: #ffffff;
}
body.theme-costco .nav-tabs .nav-link { color: var(--co-muted); border-radius: 0; }
body.theme-costco .nav-tabs .nav-link.active {
  color: var(--co-blue);
  font-weight: 700;
  border-bottom: 3px solid var(--co-blue);
}
/* 상세/장바구니/주문서 공통 단계 탭(.bakix-details-tab) — 붉은색 잔존 방지 */
body.theme-costco .bakix-details-tab .nav-link {
  color: var(--co-muted);
}
body.theme-costco .bakix-details-tab .nav-link.active,
body.theme-costco .bakix-details-tab .nav-link:hover {
  color: var(--co-blue) !important;
}
body.theme-costco .bakix-details-tab .nav-link.active {
  border-bottom-color: var(--co-blue) !important;
  font-weight: 700;
}
body.theme-costco .bakix-details-tab .nav-link .active-color {
  color: var(--co-blue) !important;
}
body.theme-costco .slim-qty-box,
body.theme-costco .slim-qty-box a,
body.theme-costco .slim-qty-box input {
  border-radius: 0 !important;
  border-color: var(--co-line-d);
}
body.theme-costco .theme-btn,
body.theme-costco .theme-btn-1 {
  background: var(--co-blue);
  color: #ffffff;
  border-radius: 0;
  font-weight: 700;
}

/* 상세페이지: 코스트코식 구매 박스 (theme.js가 .productTotal 아래에 주입)
   [쇼핑카트에 담기(파란 primary)] + [바로구매·원클릭 결제(흰색 secondary)] */
body.theme-costco .costco-buy-box {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
body.theme-costco .costco-buy-box button {
  width: 100%;
  height: 52px;
  margin: 0;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: -0.2px;
  border-radius: 0;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
body.theme-costco .costco-buy-box .costco-btn-cart {
  background: var(--co-blue);
  border: 1px solid var(--co-blue);
  color: #ffffff;
}
body.theme-costco .costco-buy-box .costco-btn-cart:hover { background: var(--co-blue-d); border-color: var(--co-blue-d); }
body.theme-costco .costco-buy-box .costco-btn-cart i { font-size: 20px; }
body.theme-costco .costco-buy-box .costco-btn-direct {
  background: #ffffff;
  border: 2px solid var(--co-blue);
  color: var(--co-blue);
  flex-direction: column;
  gap: 1px;
}
body.theme-costco .costco-buy-box .costco-btn-direct:hover { background: #f0f6fb; }
body.theme-costco .costco-buy-box .costco-btn-direct small {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.85;
}

/* 상세페이지 옵션/수량/합계: 코스트코식 사각 스타일 */
body.theme-costco .productDetail select.cboItemOption {
  width: 100%;
  max-width: 320px;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--co-line-d);
  border-radius: 0;
  background: #ffffff;
  font-size: 14px;
  color: var(--co-text);
  box-sizing: border-box;
}
body.theme-costco .productDetail .quantity2 {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--co-line-d);
  border-radius: 0;
  overflow: hidden;
}
body.theme-costco .productDetail .quantity2 .btn {
  width: 38px;
  height: 40px;
  background: var(--co-gray);
  color: var(--co-text);
  border: 0;
  border-radius: 0;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}
body.theme-costco .productDetail .quantity2 .btn:hover { background: #e2e2e2; }
body.theme-costco .productDetail .quantity2 .quantity {
  width: 56px;
  height: 40px;
  border: 0;
  border-left: 1px solid var(--co-line-d);
  border-right: 1px solid var(--co-line-d);
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--co-text);
  background: #ffffff;
}
body.theme-costco .productTotal {
  border: 1px solid var(--co-line);
  background: #f7f8fa;
  padding: 14px 16px;
  font-size: 15px;
  color: var(--co-text);
}
body.theme-costco .productTotal strong {
  color: var(--co-blue);
  font-size: 20px;
  font-weight: 800;
}

/* 기존 하단 스티키 구매바는 코스트코 템플릿에서 숨김(구매 박스로 대체) */
body.theme-costco #stickyOrderBar { display: none !important; }

@media (min-width: 769px) {
  body.theme-costco .floating-picks {
    display: grid !important;
    grid-template-columns: repeat(6, calc((100% - 50px) / 6));
    grid-template-rows: auto repeat(2, auto);
    grid-auto-flow: column !important;
    grid-auto-columns: calc((100% - 50px) / 6);
    gap: 10px;
    padding: 15px;
    max-height: none !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    align-content: start;
    scrollbar-width: thin;
    -ms-overflow-style: auto;
  }
  body.theme-costco .floating-picks::-webkit-scrollbar { display: block !important; height: 8px; }
  body.theme-costco .floating-picks::-webkit-scrollbar-thumb { background: #c8c8c8; border-radius: 0; }
  body.theme-costco .floating-picks .floating-title { grid-column: 1 / -1; grid-row: 1; width: auto !important; }
  body.theme-costco .floating-picks .floating-item { width: 100% !important; box-sizing: border-box; }
  body.theme-costco .related-scroll-container {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    white-space: nowrap !important;
    scrollbar-width: thin;
    -ms-overflow-style: auto;
  }
  body.theme-costco .related-scroll-container::-webkit-scrollbar { display: block !important; height: 8px; }
  body.theme-costco .related-scroll-container::-webkit-scrollbar-thumb { background: #c8c8c8; border-radius: 0; }
  body.theme-costco .related-scroll-container::-webkit-scrollbar-track { background: #f0f0f0; border-radius: 0; }
  body.theme-costco .related-grid {
    display: grid !important;
    grid-template-rows: repeat(2, auto) !important;
    grid-auto-flow: column !important;
    width: max-content !important;
  }
  body.theme-costco .related-item { width: 140px !important; }
}

@media (min-width: 769px) {
  body.theme-costco .c-scroll-wrap { position: relative; }
  body.theme-costco .c-scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 0;
    border: 1px solid rgba(0, 0, 0, 0.18);
    background: rgba(255, 255, 255, 0.9);
    color: var(--co-text);
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 6;
    padding: 0;
  }
  body.theme-costco .c-scroll-btn:hover { background: #ffffff; border-color: var(--co-blue); color: var(--co-blue); }
  body.theme-costco .c-scroll-btn.c-prev { left: 4px; }
  body.theme-costco .c-scroll-btn.c-next { right: 4px; }
  body.theme-costco .c-scroll-btn.hide { display: none; }
  body.theme-costco .related-products-wrap .c-scroll-btn { top: 58%; }
}
@media (max-width: 768px) {
  body.theme-costco .c-scroll-btn { display: none; }
}

/* ==========================================================================
   14. 장바구니 / 주문서 (코스트코식 사각 카드 + 파란 액션)
   ========================================================================== */
body.theme-costco .titleArea h2 {
  color: var(--co-text) !important;
  font-size: 26px;
  font-weight: 800;
}
body.theme-costco .cart-item-card {
  border: 1px solid var(--co-line) !important;
  border-radius: 0 !important;
  background-color: #ffffff !important;
  box-shadow: none !important;
}
body.theme-costco .cart-item-card .card-header {
  background-color: #ffffff !important;
  border-bottom: 1px solid var(--co-line) !important;
}
body.theme-costco .cart-item-card .item-info p {
  border: 1px solid var(--co-line) !important;
  border-radius: 0 !important;
  background-color: #ffffff !important;
}
body.theme-costco .cart-item-card .item-name { color: var(--co-text); }
body.theme-costco .cart-item-card .item-total strong { color: var(--co-text) !important; }
body.theme-costco .cart-item-card .item-unit-price b { color: var(--co-text) !important; }
body.theme-costco .amount-control {
  border: 1px solid var(--co-line-d) !important;
  border-radius: 0 !important;
}
body.theme-costco .amount-control a {
  background-color: var(--co-gray) !important;
  color: var(--co-text) !important;
}
body.theme-costco .amount-control a:hover { background-color: #e2e2e2 !important; }
body.theme-costco .table-list th {
  background-color: var(--co-gray) !important;
  color: var(--co-text) !important;
  font-weight: 700;
}
body.theme-costco .table-list th,
body.theme-costco .table-list td { border-bottom: 1px solid var(--co-line) !important; }
body.theme-costco .no-cart-items {
  border: 1px solid var(--co-line) !important;
  border-radius: 0 !important;
}

body.theme-costco .ec-base-table th {
  background: var(--co-gray);
  color: var(--co-text);
  border-color: var(--co-line);
}
body.theme-costco .ec-base-table td { border-color: var(--co-line); color: var(--co-text); }
body.theme-costco .ec-base-button .btnNormal,
body.theme-costco .btnNormal {
  background: #ffffff;
  color: var(--co-text);
  border: 1px solid var(--co-line-d);
  border-radius: 0;
}
body.theme-costco .ec-base-button .btnSubmit,
body.theme-costco .btnSubmit,
body.theme-costco .btnEm {
  background: var(--co-blue);
  color: #ffffff;
  border: 1px solid var(--co-blue);
  border-radius: 0;
}

body.theme-costco .btn-primary {
  background-color: var(--co-blue) !important;
  border: 1px solid var(--co-blue) !important;
  border-radius: 0 !important;
  color: #ffffff !important;
  font-weight: 700;
}
body.theme-costco .btn-primary:hover { background-color: var(--co-blue-d) !important; border-color: var(--co-blue-d) !important; }
body.theme-costco .btn-green {
  background-color: var(--co-blue) !important;
  border-color: var(--co-blue) !important;
  border-radius: 0 !important;
  color: #ffffff !important;
}
body.theme-costco .btn-green:hover { background-color: var(--co-blue-d) !important; }
body.theme-costco .btn-outline-dark {
  color: var(--co-text) !important;
  border-color: var(--co-line-d) !important;
  background: #ffffff !important;
  border-radius: 0 !important;
}
body.theme-costco .btn-outline-dark:hover { background: var(--co-gray) !important; color: var(--co-text) !important; }
body.theme-costco .btn-black {
  background: var(--co-text) !important;
  border-color: var(--co-text) !important;
  color: #ffffff !important;
  border-radius: 0 !important;
}
body.theme-costco .btn-default,
body.theme-costco .btn-style01 {
  background: #ffffff !important;
  color: var(--co-text) !important;
  border: 1px solid var(--co-line-d) !important;
  border-radius: 0 !important;
}
body.theme-costco .btn-style02 {
  background: var(--co-gray) !important;
  color: var(--co-text) !important;
  border-radius: 0 !important;
}

/* ==========================================================================
   15. 마이페이지
   ========================================================================== */
body.theme-costco .mypage .container,
body.theme-costco .container.wish-container,
body.theme-costco .contents > .container {
  background: #ffffff;
}
body.theme-costco .ec-base-tab .menu li a {
  color: var(--co-muted);
  border-bottom: 3px solid transparent;
}
body.theme-costco .ec-base-tab .menu li.selected a {
  color: var(--co-blue);
  font-weight: 800;
  border-bottom-color: var(--co-blue);
}
body.theme-costco .accordion-body { border-color: var(--co-line); }

/* ==========================================================================
   16. 결제 페이지 (nanopay) — 회색 배경 + 흰 사각 카드 + 파란 액션
   ========================================================================== */
body.theme-costco .payment-body {
  background: #f4f4f4;
  color: var(--co-text);
}
body.theme-costco .payment-box,
body.theme-costco .payment-header,
body.theme-costco .payment-row {
  background: #ffffff;
  border: 1px solid var(--co-line);
  border-radius: 0;
}
body.theme-costco .method-group {
  border: 1px solid var(--co-line-d);
  border-radius: 0;
}
body.theme-costco .method-group.active,
body.theme-costco .method-group:hover { border-color: var(--co-blue); }
body.theme-costco .payment-body .btn-primary {
  background: var(--co-blue) !important;
  border-radius: 0 !important;
}
body.theme-costco .payment-body .btn-secondary {
  background: #ffffff;
  color: var(--co-text);
  border: 1px solid var(--co-line-d);
  border-radius: 0;
}
body.theme-costco .payment-body .price { color: var(--co-text); font-weight: 800; }

/* ==========================================================================
   17. 푸터 — 코스트코식 밝은 회색 + 검정 타이틀 + 파란 포인트
   ========================================================================== */
body.theme-costco #footer {
  background: #e3e3e3 !important;
  color: var(--co-muted);
  margin-top: 60px;
  border-top: 1px solid var(--co-line);
}
body.theme-costco #footer .inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 34px 16px 90px;
}
body.theme-costco #footer .footer_tit {
  color: var(--co-text) !important;
  font-weight: 800;
  letter-spacing: 0;
  font-size: 15px;
  border-left: 3px solid var(--co-blue);
  padding-left: 8px;
  margin-bottom: 8px;
}
body.theme-costco #footer .footer01 h3 {
  color: var(--co-text) !important;
  font-size: 15px;
  font-weight: 700;
}
body.theme-costco #footer .footer01 .tel {
  color: var(--co-blue) !important;
  font-size: 22px;
  font-weight: 800;
}
body.theme-costco #footer .footer01 .time,
body.theme-costco #footer .footer02,
body.theme-costco #footer .footer_info,
body.theme-costco #footer .footer_info * {
  color: var(--co-muted) !important;
}
body.theme-costco #footer .footer_info h3 {
  color: var(--co-text) !important;
  font-size: 15px;
}
body.theme-costco #footer .utilMenu li a {
  color: var(--co-text) !important;
  font-weight: 500;
  font-size: 13px;
}
body.theme-costco #footer .utilMenu li a:hover { color: var(--co-blue) !important; }
body.theme-costco #footer .footer03 .copyright { color: var(--co-sub) !important; }
body.theme-costco #footer .footer_sns a { color: var(--co-text) !important; }
body.theme-costco #footer .footer_sns a:hover { color: var(--co-blue) !important; }
body.theme-costco #footer .ft_logo img { filter: none; opacity: 1; }

/* ==========================================================================
   18. 큐알이지 고유 기능 유지 (관심상품/최근본상품/좌우 홍보배너/플로팅)
   ========================================================================== */
body.theme-costco #goBtn .scroll_btn .btn,
body.theme-costco #goBtn .wish_icon,
body.theme-costco #goBtn .recent_icon,
body.theme-costco #goBtn .kakao_icon,
body.theme-costco #goBtn .menu_icon {
  background: #ffffff;
  color: var(--co-blue);
  border: 1px solid var(--co-line-d);
}
body.theme-costco #goBtn .btn.up {
  background: var(--co-blue);
  color: #ffffff;
  border-color: var(--co-blue);
}

/* 우측 플로팅 메뉴(위로가기/관심상품/최근본상품/카카오/메뉴):
   화면을 아래로 스크롤하면 나타나고, 맨 위에서는 숨김
   (theme.js가 .costco-show 클래스로 표시/숨김을 직접 제어) */
body.theme-costco .fixed_btn {
  display: none;
  z-index: 90;
}
body.theme-costco .fixed_btn.costco-show {
  display: block !important;
  opacity: 1 !important;
}
@media (min-width: 769px) and (max-width: 1359px) {
  body.theme-costco .fixed_btn {
    left: auto !important;
    right: 12px !important;
    bottom: 100px;
    top: auto;
    transform: none !important;
  }
}
@media (max-width: 768px) {
  body.theme-costco .fixed_btn {
    left: auto !important;
    right: 8px !important;
    bottom: 140px;
    top: auto;
    transform: none !important;
  }
}

body.theme-costco .recent-layer .recent-header {
  background: var(--co-blue) !important;
  color: #ffffff !important;
  border-bottom: 1px solid var(--co-blue);
}
body.theme-costco .recent-layer .recent-header span,
body.theme-costco .recent-layer .recent-header .btn-close { color: #ffffff !important; }
body.theme-costco .recent-layer .btn-clear-recent {
  background: #ffffff;
  color: var(--co-blue);
  border: 1px solid var(--co-line-d);
  border-radius: 0;
  font-weight: 700;
}

@media (min-width: 1300px) and (max-width: 1499px) {
  body.theme-costco #left_wrap,
  body.theme-costco #right_wrap { display: none !important; }
}
@media (min-width: 1500px) {
  body.theme-costco #left_wrap {
    display: flex !important;
    left: auto !important;
    right: calc(50% + 620px + 10px) !important;
    transform: translate(0, -50%) !important;
    width: 320px;
    max-width: calc((100vw - 1240px) / 2 - 20px);
  }
  body.theme-costco #right_wrap {
    display: flex !important;
    right: auto !important;
    left: calc(50% + 620px + 10px) !important;
    transform: translate(0, -50%) !important;
    width: 320px;
    max-width: calc((100vw - 1240px) / 2 - 20px);
  }
  body.theme-costco #left_wrap img,
  body.theme-costco #right_wrap img { width: 100%; }
}

@media (min-width: 1360px) {
  body.theme-costco .fixed_btn {
    width: 50px;
    right: calc(50% - 620px + 8px);
    left: auto;
    bottom: 66px;
    top: auto;
    transform: none;
    z-index: 90;
  }
  body.theme-costco .fixed_btn .wish_icon,
  body.theme-costco .fixed_btn .recent_icon {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    width: 48px;
    height: 48px;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--co-line-d);
    box-shadow: none;
    margin: 0 auto;
  }
  body.theme-costco .fixed_btn .wish_icon i { color: var(--co-blue); }
  body.theme-costco .fixed_btn .recent_icon i { color: var(--co-blue); }
  body.theme-costco .fixed_btn .scroll_btn,
  body.theme-costco .fixed_btn .kakao_icon,
  body.theme-costco .fixed_btn .menu_icon {
    position: static;
    right: auto;
    bottom: auto;
  }
  body.theme-costco #pwa-fab-container {
    left: calc(50% - 620px + 16px) !important;
    bottom: 24px !important;
  }
}

/* ==========================================================================
   19. 팝업: 화면 중앙 배치 (바텀시트 → 중앙 팝업)
   ========================================================================== */
body.theme-costco .popupWrap {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  transform: translate(-50%, -50%) !important;
  width: calc(100% - 32px);
  max-width: 620px;
  margin: 0 !important;
  border-radius: 0 !important;
  animation: none !important;
  z-index: 980 !important;
  background: #ffffff !important;
  border: 1px solid #dfe3e8 !important;
  box-shadow: 0 12px 44px rgba(0, 0, 0, 0.3) !important;
}
body.theme-costco .popupWrap img { max-width: 100%; height: auto; }

/* ==========================================================================
   20. 공통 링크/아이콘 포인트
   ========================================================================== */
body.theme-costco .more_btn,
body.theme-costco a.more { color: var(--co-blue); }
body.theme-costco .ec-admin-icon.cart,
body.theme-costco .ec-admin-icon { background: var(--co-blue); color: #ffffff; }
body.theme-costco a { color: inherit; }
body.theme-costco .path a,
body.theme-costco .path span { color: var(--co-muted); }
