/* BASIC css start */
/* ==================================================
   상품 분류 페이지 CSS 정리본
   - 헤더/로고
   - 베스트 상품 롤링 표시선
   - 베스트 상품 정보 및 가격
   - 대카테고리명/최신순 정렬
   - 소카테고리 스타일
   - 모바일 상품 분류 페이지에만 적용되는 규칙은 767px 이하
================================================== */

/* ==================================================
   1. 대카테고리명과 최신순 정렬
   화면 너비가 달라져도 같은 줄 유지
================================================== */
body:has(main.shopbrand) .SMS_Category_heading {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    position: relative !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 48px !important;
    margin: 30px 0 0 !important;
    padding: 0 12px !important;
    background: #fff !important;
    border: 0 !important;
    box-sizing: border-box !important;
    overflow: visible !important;
}

/* 대카테고리명 */
body:has(main.shopbrand) .SMS_Category_heading .SMS_Category_parent_title {
    display: block !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    color: #222 !important;
    font-family: Georgia, serif !important;
    font-size: 18px !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
    box-sizing: border-box !important;
}

/* 정렬 메뉴 영역 */
body:has(main.shopbrand) .SMS_Category_heading .SMS_Category_sort {
    display: flex !important;
    flex: 0 0 auto !important;
    align-items: center !important;
    justify-content: flex-end !important;
    position: static !important;
    width: auto !important;
    min-width: 0 !important;
    margin: 0 0 0 12px !important;
    padding: 0 !important;
    background: transparent !important;
    box-sizing: border-box !important;
}

/* 최신순 선택창 및 화살표: 중복 정의 없이 한 곳에서 관리 */
body:has(main.shopbrand) .SMS_Category_heading .SMS_Category_sort select {
    display: block !important;
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 76px !important;
    max-width: 125px !important;
    height: 32px !important;
    margin: 0 !important;
    padding: 0 24px 0 5px !important;
    color: #555 !important;
    font-size: 12px !important;
    text-align: center !important;
    background-color: #fff !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23555' stroke-width='1.2'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 8px center !important;
    background-size: 10px 6px !important;
    border: 1px solid #d8d8d8 !important;
    border-radius: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    box-sizing: border-box !important;
}


/* ==================================================
   2. 모바일 전용 설정
================================================== */
@media screen {

    /* 헤더 바깥 영역 */
    body:has(main.shopbrand) #SMS_fixed_warp {
        position: relative !important;
        display: block !important;
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        background: #fff !important;
        box-shadow: none !important;
        border: 0 !important;
    }

    /* 헤더 내부 정렬 영역 */
    body:has(main.shopbrand) #SMS_fixed_warp .SMS_fixed_inner {
        position: relative !important;
        display: block !important;
        width: 100% !important;
        height: 70px !important;
        min-height: 70px !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
        box-sizing: border-box !important;
    }

    /* 햄버거 메뉴 */
    body:has(main.shopbrand) #SMS_fixed_warp #menu {
        display: block !important;
        position: absolute !important;
        top: 50% !important;
        left: 15px !important;
        right: auto !important;
        width: 24px !important;
        height: 24px !important;
        transform: translateY(-50%) !important;
        background: url('/design/leelin/onedesign2/images/leelin_top_icon_w_menu3_black.png') center / auto 20px no-repeat !important;
    }

    /* 중앙 로고 */
    body:has(main.shopbrand) #SMS_fixed_warp .leelin-main-logo {
        display: block !important;
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        right: auto !important;
        transform: translate(-50%, -50%) !important;
        z-index: 200 !important;
        width: 120px !important;
        max-width: 40% !important;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        line-height: 0 !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    body:has(main.shopbrand) #SMS_fixed_warp .leelin-main-logo img {
        content: url('/design/leelin/smartskin_re5/logommm.png') !important;
        display: block !important;
        width: 100% !important;
        max-width: 120px !important;
        max-height: 32px !important;
        height: auto !important;
        object-fit: contain !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    /* 헤더 검색 아이콘 */
    body:has(main.shopbrand) #SMS_fixed_warp .search_fixed_btn {
        display: block !important;
        position: absolute !important;
        top: 50% !important;
        right: 48px !important;
        left: auto !important;
        width: 28px !important;
        height: 28px !important;
        transform: translateY(-50%) !important;
        background: url('/design/leelin/onedesign2/images/leelin_top_icon_w_search2_black.png') center / auto 25px no-repeat !important;
    }

    /* 헤더 장바구니 아이콘 */
    body:has(main.shopbrand) #SMS_fixed_warp .cart_fixed_btn {
        display: block !important;
        position: absolute !important;
        top: 50% !important;
        right: 12px !important;
        left: auto !important;
        width: 25px !important;
        height: 28px !important;
        transform: translateY(-50%) !important;
        background: url('/design/leelin/onedesign2/images/leelin_top_icon_cart_black.png') center / auto 25px no-repeat !important;
    }

    /* 뒤로가기 및 카테고리 경로 제거 */
    body:has(main.shopbrand) main.shopbrand > .page_location {
        display: none !important;
    }

    /* 베스트 상품 영역: 배경 및 상단 간격 */
    body:has(main.shopbrand) .SMS_CategoryBest_header {
        margin-top: 0 !important;
        padding: 18px 0 12px !important;
        background: #F9F9F9; !important;
    }

    /* 베스트 상품 영역의 회색 배경 여백
       아래쪽 padding을 늘려 롤링 선 다음 회색 공간을 더 확보 */
    body:has(main.shopbrand) .SMS_CategoryBest_wrap {
        padding: 20px 0 30px !important;
        background: #f7f7f7 !important;
    }

    /* 베스트 상품 롤링 표시선: 전체 회색은 얇게, 현재 위치만 두껍게 */
    body:has(main.shopbrand) .SMS_CategoryBest .swiper-pagination {
        position: relative !important;
        display: flex !important;
        align-items: center !important;
        left: auto !important;
        bottom: auto !important;
        width: calc(100% - 18px) !important;
        height: 3px !important;
        margin: 24px auto 0 !important;
        padding: 0 !important;
        background: transparent !important;
        border-radius: 0 !important;
        overflow: visible !important;
    }

    /* 전체 길이의 얇은 회색 선 */
    body:has(main.shopbrand) .SMS_CategoryBest .swiper-pagination::before {
        content: "" !important;
        display: block !important;
        position: absolute !important;
        top: 50% !important;
        left: 0 !important;
        right: 0 !important;
        height: 1px !important;
        transform: translateY(-50%) !important;
        background: #bdbdbd !important;
        z-index: 0 !important;
    }

    /* 비활성 위치 표시 */
    body:has(main.shopbrand) .SMS_CategoryBest .swiper-pagination-bullet {
        position: relative !important;
        z-index: 1 !important;
        display: block !important;
        flex: 1 1 0 !important;
        width: auto !important;
        height: 1px !important;
        margin: 0 !important;
        padding: 0 !important;
        background: transparent !important;
        border: 0 !important;
        border-radius: 0 !important;
        opacity: 1 !important;
    }

    /* 현재 위치만 두꺼운 검은 선 */
    body:has(main.shopbrand) .SMS_CategoryBest .swiper-pagination-bullet-active {
        height: 3px !important;
        background: #444 !important;
        opacity: 1 !important;
    }

    /* 소카테고리 메뉴: 글자만 표시, 칸/테두리 제거 */
    body:has(main.shopbrand) .SMS_Category_list,
    body:has(main.shopbrand) .SMS_Category_list .CateInBody,
    body:has(main.shopbrand) .SMS_Category_list .CateInBody ul {
        background: transparent !important;
        border-top: 0 !important;
        border-right: 0 !important;
        border-bottom: 0 !important;
        border-left: 0 !important;
        box-shadow: none !important;
        background-image: none !important;
    }

    body:has(main.shopbrand) .SMS_Category_list {
        margin: 0 !important;
        padding: 0 0 10px !important;
        background: #fff !important;
    }

    body:has(main.shopbrand) .SMS_Category_list .CateInBody ul {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        gap: 0 16px !important;
        margin: 0 !important;
        padding: 0 12px !important;
    }

    body:has(main.shopbrand) .SMS_Category_list .CateInBody li {
        display: inline-block !important;
        width: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        background: transparent !important;
    }

    body:has(main.shopbrand) .SMS_Category_list .CateInBody li a {
        display: inline-block !important;
        margin: 0 !important;
        padding: 5px 0 !important;
        border: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        color: #777 !important;
        font-size: 12px !important;
        text-decoration: none !important;
    }

    body:has(main.shopbrand) .SMS_Category_list .CateInBody li span {
        display: none !important;
    }

    /* 기존 상품 정렬/보기 도구 영역 제거
       정렬 메뉴는 대카테고리 제목 옆에 배치 */
    body:has(main.shopbrand) #SMS_list_array {
        display: none !important;
        height: 0 !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
    }

    /* 상품 썸네일 위쪽 추가 여백 제거 */
    body:has(main.shopbrand) .SMS_Product_display {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    /* 대카테고리명 아래 여백을 늘려 위아래 간격 균형 조정 */
    body:has(main.shopbrand) .SMS_Category_heading {
        padding: 0 12px 15px !important;
    }

    /* BEST 원형 배지: 썸네일 왼쪽 위에 유지 */
    body:has(main.shopbrand) .SMS_CategoryBest .swiper-slide {
        position: relative !important;
    }

    body:has(main.shopbrand) .SMS_CategoryBest .swiper-slide > .best_text.b_num {
        display: block !important;
        position: absolute !important;
        top: 8px !important;
        left: 8px !important;
        z-index: 20 !important;
        margin: 0 !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: none !important;
    }

/* 상품명 아래 상세문구와 아이콘 표시 */
body:has(main.shopbrand) .SMS_CategoryBest .swiper-slide .subname,
body:has(main.shopbrand) .SMS_CategoryBest .swiper-slide .icons {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

/* 베스트 상품 리뷰 수 표시 */
body:has(main.shopbrand) .SMS_CategoryBest .swiper-slide .crema-product-reviews-count {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin-top: 2px !important;
    color: #999 !important;
    font-size: 11px !important;
    line-height: 1.4 !important;
    text-align: left !important;
}



    /* BEST/HIT 문구는 숨기되 원형 배지(.best_text.b_num)는 위 규칙으로 유지 */
    body:has(main.shopbrand) .SMS_CategoryBest .swiper-slide .best_text {
        display: none !important;
    }

    body:has(main.shopbrand) .SMS_CategoryBest .swiper-slide > .best_text.b_num {
        display: block !important;
    }

    /* 할인 전 가격들을 한 줄에 표시 */
    body:has(main.shopbrand) .SMS_CategoryBest br {
        display: none !important;
    }

    body:has(main.shopbrand) .SMS_CategoryBest .priceStrike {
        display: inline-block !important;
        width: auto !important;
        margin: 0 5px 3px 0 !important;
        vertical-align: baseline !important;
    }

    /* 최종 가격: 왼쪽 정렬, 검은색 */
    body:has(main.shopbrand) .SMS_CategoryBest .swiper-slide .price,
    body:has(main.shopbrand) .SMS_CategoryBest .swiper-slide .prd-price {
        display: block !important;
        width: 100% !important;
        clear: both !important;
        margin: 0 !important;
        text-align: left !important;
        font-size: 11pt !important;
        font-weight: 600 !important;
        color: #000 !important;
        box-sizing: border-box !important;
    }

    /* 할인율: 최종 가격과 같은 크기, 빨간색 */
    body:has(main.shopbrand) .SMS_CategoryBest .swiper-slide .discount-rate {
        margin-left: 5px !important;
        font-size: 11pt !important;
        font-weight: 600 !important;
        color: #CA5C40 !important;
    }
}




/* 모바일 상품 분류 페이지 - 카테고리 폰트 수정 */
@media screen {

    /* 대카테고리: 기존 왼쪽 위치 유지, 폰트만 변경 */
    body:has(main.shopbrand) .SMS_Category_heading .SMS_Category_parent_title {
        font-family: Arial, Helvetica, sans-serif !important;
        font-size: 16px !important;
        font-weight: 700 !important;
        text-align: left !important;
    }

    /* 소카테고리 폰트 */
    body:has(main.shopbrand) .SMS_Category_list .CateInBody li a {
        font-family: Arial, Helvetica, sans-serif !important;
        font-size: 12px !important;
        font-weight: 400 !important;
    }
}



/* 모바일 상품 분류 페이지 - 대카테고리와 소카테고리 간격 축소 */
@media screen {

    /* 대카테고리 영역 아래 여백 축소 */
    body:has(main.shopbrand) .SMS_Category_heading {
        padding-bottom: 0 !important;
        min-height: 38px !important;
    }

    /* 대카테고리명 위아래 여백 축소 */
    body:has(main.shopbrand) .SMS_Category_heading .SMS_Category_parent_title {
        padding-top: 4px !important;
        padding-bottom: 4px !important;
        line-height: 1.3 !important;
    }

    /* 소카테고리 영역 위쪽 여백 축소 */
    body:has(main.shopbrand) .SMS_Category_list {
        padding-top: 0 !important;
        padding-bottom: 6px !important;
    }

    /* 소카테고리 글자 주변 여백 축소 */
    body:has(main.shopbrand) .SMS_Category_list .CateInBody li a {
        padding-top: 3px !important;
        padding-bottom: 3px !important;
    }
}



/* 모바일 상품 분류 페이지 - 선택된 소카테고리 강조 */
@media screen {

    /* 기본 소카테고리 */
    body:has(main.shopbrand) .SMS_Category_list .CateInBody li a {
        font-weight: 400 !important;
    }

    /* 현재 선택된 소카테고리 */
    body:has(main.shopbrand) .SMS_Category_list .CateInBody li a.sel {
        font-weight: 700 !important;
        color: #222 !important;
    }
}







/* 검색창이 열려도 상품 목록 스크롤 허용 */
html.leelin-search-active:has(main.shopbrand),
body.leelin-search-active:has(main.shopbrand) {
    overflow-x: hidden !important;
    overflow-y: auto !important;
}






/* BASIC css end */

