/* BASIC css start */
/* ============================================================
   모바일 강제 리셋
   공통.css의 body{min-width:1450px}는 PC 전용 규칙인데
   모바일 스킨에도 로드되어 전체 페이지가 축소된 PC뷰로 렌더링되는
   문제를 차단합니다. (필터 버튼/정렬 배치가 깨지고, 시트 안
   옵션 pill이 줄바꿈 없이 화면 밖으로 잘리는 원인이 전부 이것 하나입니다)
============================================================ */
html, body {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
}

/* 현재 분류명 */
.now_cate_tit { position: relative; font-size: 24px; color: #121212; font-weight: 600; padding: 40px 20px 24px; } 


/* 카테고리 */
.class-list { position: relative; padding: 0 20px 72px; display: flex; justify-content: flex-start; flex-wrap: wrap; align-items: center; gap: 8px 7%; } 
.class-list dd a { font-size: 14px; font-weight: 400; color: #656565; } 
.class-list dd a.sel { font-weight:600; color:#121212; } 
body .swiper_wrap .swiper-pagination { top:auto; bottom:0; left:50%; width:160px; height:1px; margin-left:-80px; background:#e6e6e6; } 
body .swiper_wrap .swiper-pagination { top:auto; bottom:40px; left:50%; width:160px; height:2px; margin-left:-80px; background:#e6e6e6; border-radius:1px; } 
body .swiper_wrap .swiper-pagination-progressbar-fill { background:#121212; border-radius: 1px; } 

/* 베스트 아이템 */
.cont_tit {font-size: 20px;font-weight: 500;color: #121212;padding: 0 0 16px;} 
.goodsList .swiper-container {padding: 0 0 22px 0;} 

/* 상품 리스트 */
#MS_product {position: relative;padding: 0 20px;} 
.swiper_wrap{padding: 0 20px;margin-bottom: 26px;overflow: hidden;}
.goodsList{position: relative;}


/* ============================================================
   필터 - 인라인 상시노출 패널
   컬러 토큰: 텍스트/포인트 #121212, 보더 #ededed
============================================================ */
#csFilterRoot.list_array {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    margin: 0 0 4px !important;
    padding: 0 20px !important;
}
#csFilterRoot .filter-panel { order: 1; flex: 0 0 100%; width: 100%; }
#csFilterRoot .list_arrayLeft {
    order: 2;
    font-size: 13px;
    color: #6b6b6b;
}
#csFilterRoot .list_arrayLeft b { color:#121212; font-weight:700; }
#csFilterRoot .list_arrayRight {
    order: 3;
    margin-left: auto;
}
#csFilterRoot .list_arrayRight select {
    border: none !important;
    background-color: transparent !important;
    padding: 0 16px 0 0 !important;
    font-size: 12px !important;
    color: #767676 !important;
    font-weight: 600 !important;
    width: auto !important;
    height: auto !important;
}

/* ---------- 필터 패널 카드 ---------- */
.filter-panel {
    border: 1px solid #ededed;
    border-radius: 20px;
    padding: 22px 20px 18px;
    box-sizing: border-box;
    background: #fff;
}
.filter-panel-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
}
.filter-panel-head .fp-ico {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
}
.filter-panel-head .fp-ico svg { display: block; width: 100%; height: 100%; }
.filter-panel-head strong {
    font-size: 15px;
    font-weight: 700;
    color: #121212;
}

/* ---------- 필터 그룹 행 (라벨 + 가로스크롤 옵션) ---------- */
.filter-panel-body { width: 100%; }
.filter-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid #f6f6f6;
}
.filter-row:first-child { border-top: none; padding-top: 0; }
.filter-row-label {
    flex: 0 0 54px;
    padding-top: 7px;
    font-size: 13px;
    font-weight: 700;
    color: #121212;
}
.filter-row-options {
    flex: 1;
    min-width: 0;
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.filter-row-options::-webkit-scrollbar { display: none; }

/* 필터 더보기(4번째 그룹부터 접기, 기본 3개 노출) */
.filter-panel-body .filter-row:nth-child(n+4) { display: none; }
.filter-panel-body.expanded .filter-row:nth-child(n+4) { display: flex; }
.filter-more-btn {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 3px;
    width: 100%;
    margin-top: 4px;
    padding: 10px 0 2px;
    background: none;
    border: none;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    font-size: 12.5px;
    font-weight: 600;
    color: #9c9184;
}
.filter-more-btn.show { display: flex; }
.filter-more-btn .arrow { font-size: 13px; transition: transform .2s ease; }
.filter-more-btn.expanded .arrow { transform: rotate(90deg); }

/* 체크박스형(chk-box) → pill 토글, 가로 스크롤 한 줄 */
.filter-row-options.chk-box {
    gap: 6px;
}
.filter-row-options.chk-box input[type="checkbox"],
.filter-row-options.chk-box input[type="radio"] { display:none; }
.filter-row-options.chk-box label {
    display: inline-flex;
    align-items: center;
    flex: none;
    padding: 7px 12px;
    border: 1px solid #ededed;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 400;
    color: #121212;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.filter-row-options.chk-box input:checked + label {
    background: #121212;
    border-color: #121212;
    color: #fff;
}

/* 컬러 스와치형(chk-color-code) */
.filter-row-options.chk-color-code {
    gap: 14px;
    align-items: flex-start;
}
.filter-row-options.chk-color-code input[type="checkbox"],
.filter-row-options.chk-color-code input[type="radio"] { display:none; }
.filter-row-options.chk-color-code label {
    display: block;
    flex: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid #ededed;
    box-shadow: 0 0 0 2px #fff;
    cursor: pointer;
}
.filter-row-options.chk-color-code input:checked + label {
    outline: 1.6px solid #121212;
    outline-offset: 2px;
}
.filter-row-options.chk-color-code p {
    margin-top: -4px;
    font-size: 10.5px;
    color: #a3a3a3;
    text-align: center;
}

/* ---------- 패널 하단 버튼 ---------- */
.filter-panel-foot {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f4f4f4;
}
.filter-panel-foot .btn-reset {
    flex: 0 0 88px;
    padding: 13px 0;
    border: 1px solid #ededed;
    border-radius: 20px;
    background: #fff;
    font-size: 13px;
    font-weight: 700;
    color: #121212;
}
.filter-panel-foot .btn-reset:only-child { flex: 1; }
.filter-panel-foot .btn-search {
    flex: 1;
    padding: 13px 0;
    border: none;
    border-radius: 20px;
    background: #121212;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
}
.filter-panel-foot .btn-search .btn-search-count { margin-left: 4px; opacity:.75; font-weight:600; }
.filter-panel-foot button span { visibility: visible; }

/* 옵션 줄 우측 스크롤 힌트 - mask-image로 처리해 스크롤해도 항상 우측 끝에 고정 */
.filter-row-options {
    -webkit-mask-image: linear-gradient(to right, #000 92%, transparent 100%);
    mask-image: linear-gradient(to right, #000 92%, transparent 100%);
}

/* ---------- 선택된 필터 칩 ---------- */
.select-filter-wrap {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 0 20px;
    margin: 6px 0 18px;
}
.select-filter-wrap.show { display: flex; }
.select-filter-wrap .select-filter {
    display: flex;
    gap: 8px;
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.select-filter-wrap .select-filter::-webkit-scrollbar { display: none; }
.select-filter-wrap .select-filter li {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: none;
    padding: 8px 8px 8px 14px;
    border: 1px solid #121212;
    border-radius: 20px;
    background: #121212;
    color: #fff;
    font-size: 12px;
    white-space: nowrap;
}
.select-filter-wrap .select-filter li .color-code {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.4);
}
.select-filter-wrap .select-filter li .btn-del {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(255,255,255,.18);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.select-filter-wrap .select-filter li .btn-del:before,
.select-filter-wrap .select-filter li .btn-del:after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 7px; height: 1.3px;
    background: #fff;
}
.select-filter-wrap .select-filter li .btn-del:before { transform: translate(-50%,-50%) rotate(45deg); }
.select-filter-wrap .select-filter li .btn-del:after { transform: translate(-50%,-50%) rotate(-45deg); }

.select-filter-wrap .chip-reset-btn {
    flex: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid #ededed;
    background: #fff;
    position: relative;
    padding: 0;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}
.select-filter-wrap .chip-reset-btn svg {
    width: 15px;
    height: 15px;
    display: block;
}

/* ============================================================
   베스트 아이템 카드 통일 (스와이퍼 + 그리드 리스트 공통 적용)
   상품명/설명 길이가 제각각이라 카드마다 줄바꿈 수가 달라지고
   가격줄 시작 위치가 들쭉날쭉해 보이던 문제 해결
============================================================ */
.goodsList ul li .textWrap {
    display: flex;
    flex-direction: column;
}

/* 상품명 - 2줄 고정, 넘치면 말줄임 */
.goodsList ul li .textWrap .goodsName {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 40px;
}

/* 서브 설명 - 2줄 고정, 넘치면 말줄임 */
.goodsList ul li .textWrap .goodsSubName {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 32px;
    margin-top: 2px;
}

/* 가격줄 - 할인율/판매가/소비자가 베이스라인 정렬 통일 */
.goodsList ul li .textWrap .goodsPrice {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    column-gap: 4px;
    min-height: 20px;
}
.goodsList ul li .textWrap .goodsPrice .discountPer { order: 1; }
.goodsList ul li .textWrap .goodsPrice .price { order: 2; }
.goodsList ul li .textWrap .goodsPrice .c_price { order: 3; }
.goodsList ul li .textWrap .listSoldout {
    display: flex;
    align-items: center;
    min-height: 20px;
}

/* 리뷰 개수(스냅리뷰 스크립트가 goodsPrice 뒤에 자동 삽입하는 요소)
   삽입되는 class명이 매번 같다는 보장이 없어, "goodsPrice 바로 다음 형제"
   라는 구조적 위치를 기준으로 스타일을 고정   class명 몰라도 항상 적용됨 */
.goodsList ul li .textWrap .goodsPrice ~ * {
    margin-top: 6px !important;
    font-size: 11px !important;
    color: #b3b3b3 !important;
    font-weight: 400 !important;
    line-height: 1.3 !important;
}

/* ============================================================
   베스트 아이템 순위 배지 (BEST1 / BEST2 / BEST3)
   메이크샵 공식 INDEX 태그(<!--/idx/-->)로 순번 출력 → JS 불필요
============================================================ */
.swiper_wrap .imgWrap { position: relative; }
.swiper_wrap .imgWrap .rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 3;
    padding: 5px 11px;
    border-radius: 20px;
    background: #121212;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .3px;
    line-height: 1.3;
}
/* 순위별 컬러 구분 (PC 톤과 동일) */
.swiper_wrap .swiper-slide:nth-child(1) .rank-badge { background: #d4667e; }
.swiper_wrap .swiper-slide:nth-child(2) .rank-badge { background: #121212; }
.swiper_wrap .swiper-slide:nth-child(3) .rank-badge { background: #c9a876; color:#121212; }

/* BEST 배지는 1~3위까지만 노출, 4번째부터는 숨김 */
.swiper_wrap .swiper-slide:nth-child(n+4) .rank-badge { display: none; }

/* 위시 하트가 배지와 겹치지 않도록 z-index 정리 */
.goodsList ul li .wishIcon { z-index: 3; }
.goodsList ul li .imgWrap .soldout_txt { z-index: 2; }

/* ============================================================
   베스트 스와이퍼 - BEST 배지 위치만 조정 (하트는 원래 스타일 유지, 위치만 살짝 이동)
============================================================ */
.swiper_wrap .imgWrap .rank-badge {
    top: 8px;
    left: 8px;
    padding: 4px 9px;
    font-size: 10px;
}
.swiper_wrap .wishIcon {
    top: 6px;
    right: 6px;
}


/* ============================================================
   필터 탭 즉시 노출되는 로딩 오버레이
   실제 필터링은 서버 재조회(페이지 이동)라 시간 자체는 줄일 수 없지만,
   탭 즉시 반응을 보여줘서 체감 지연을 최소화
============================================================ */
.filter-loading {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(255,255,255,.72);
    align-items: center;
    justify-content: center;
}
.filter-loading.show { display: flex; }
.filter-loading .spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #ededed;
    border-top-color: #121212;
    border-radius: 50%;
    animation: filterSpin .7s linear infinite;
}
@keyframes filterSpin {
    to { transform: rotate(360deg); }
}

/* ============================================================
   분류명(무지) + 하위 카테고리 목록 숨김
   숨긴 만큼 상단 카테고리 탭과 베스트 아이템 사이 여백 확보
============================================================ */
.now_cate_tit,
.class-list {
    display: none !important;
}
main.shopbrand {
    padding-top: 24px;
}
/* BASIC css end */

