/* 흰색 분류 — #hd_menu 검은줄(935px) 자리 + 상단 헤더 흰색 배경 */

body.custom-main-cat-mode #hd {
    background: #fff;
}

body.custom-main-cat-mode #tnb {
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
}

body.custom-main-cat-mode #tnb .inner {
    background: #fff;
}

body.custom-main-cat-mode #hd_define li a,
body.custom-main-cat-mode #hd_qnb li a {
    color: #666;
}

body.custom-main-cat-mode #hd_define li.active a {
    color: #3a8afd;
}

body.custom-main-cat-mode #hd_define li,
body.custom-main-cat-mode #hd_qnb li {
    border-right-color: #e0e0e0;
}

body.custom-main-cat-mode #hd_wrapper {
    background: #fff;
}

body.custom-main-cat-mode #hd_sch #sch_str {
    background: #f5f5f5;
    color: #333;
}

body.custom-main-cat-mode #hd_sch #sch_submit {
    background: #f5f5f5;
    color: #555;
}

body.custom-main-cat-mode .hd_login > li a {
    color: #333 !important;
}

body.custom-main-cat-mode .hd_login > li.login a {
    color: #3a8afd !important;
    border-color: #3a8afd;
}

body.custom-main-cat-mode .hd_login .btn_member_mn {
    color: #333 !important;
}

body.custom-main-cat-mode .hd_login .btn_member_mn i {
    color: #555 !important;
}

body.custom-main-cat-mode .hd_login .btn_member_mn_on {
    color: #000 !important;
    background: #fff !important;
    border: 1px solid #d0d0d0;
    border-bottom: 0;
}

body.custom-main-cat-mode .hd_login .member_mn {
    color: #333;
}

body.custom-main-cat-mode .hd_login #ol_after_private a {
    color: #444 !important;
}

body.custom-main-cat-mode .hd_login #ol_after_logout {
    color: #3a8afd !important;
}

body.custom-main-cat-mode .hd_login .fa-shopping-cart {
    color: #333 !important;
}

body.custom-main-cat-mode #hd_menu {
    overflow: visible;
    background: #fff;
    border-top: 1px solid #e8e8e8;
    border-bottom: 1px solid #e8e8e8;
}

#hd_menu {
    overflow: visible;
}

#hd_menu .hd_menu_cat_wrap {
    float: left;
    display: block;
    width: 935px;
    max-width: 935px;
    height: 50px;
    background: #fff;
    border-left: 1px solid #e8e8e8;
    border-right: 1px solid #e8e8e8;
    box-sizing: border-box;
    overflow: visible;
    position: relative;
    z-index: 100;
}

#hd_menu .hd_menu_cat_wrap #shop_main_gnb {
    margin: 0;
    height: 50px;
    background: #fff;
    border: 0;
}

#hd_menu .hd_menu_cat_wrap #gnb_1dul {
    margin: 0;
    padding: 0;
    list-style: none;
    height: 50px;
}

#hd_menu .hd_menu_cat_wrap .gnb_1dli {
    position: relative;
    word-wrap: break-word;
    height: 50px;
}

#hd_menu .hd_menu_cat_wrap .gnb_1da {
    display: block;
    padding: 0 8px;
    line-height: 50px;
    height: 50px;
    color: #010101;
    text-decoration: none;
    font-size: 1.05em;
    box-sizing: border-box;
}

#hd_menu .hd_menu_cat_wrap .gnb_1da i {
    display: none;
}

#hd_menu .hd_menu_cat_wrap .gnb_1dli_on .gnb_1da,
#hd_menu .hd_menu_cat_wrap .gnb_1dli_over .gnb_1da {
    background-color: #f5f5f5;
    color: #3a8afd;
    font-weight: bold;
}

#hd_menu .hd_menu_cat_wrap .gnb_2dul {
    display: none;
    z-index: 1100;
    position: absolute;
    border: 1px solid #e8e8e8;
    padding: 8px 0;
    background: #fff;
    list-style: none;
    margin: 0;
    min-width: 150px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

#hd_menu .hd_menu_cat_wrap .gnb_1dli_over .gnb_2dul,
#hd_menu .hd_menu_cat_wrap .gnb_1dli_on .gnb_2dul {
    display: block;
}

#hd_menu .hd_menu_cat_wrap .gnb_2da {
    display: block;
    padding: 5px 12px;
    line-height: 20px;
    font-size: 1.083em;
    color: #555;
    text-decoration: none;
}

#hd_menu .hd_menu_cat_wrap .gnb_2da:hover,
#hd_menu .hd_menu_cat_wrap .gnb_2da:focus {
    color: #3a8afd;
}

/* 가로형: 9칸 그리드, 2차 분류 아래로 */
#hd_menu .hd_menu_cat_wrap--h .gnb_1dul_row {
    display: grid;
    grid-template-columns: repeat(var(--cat-cols, 9), minmax(0, 1fr));
    height: 50px;
}

#hd_menu .hd_menu_cat_wrap--h .gnb_1dli {
    border-right: 1px solid #e8e8e8;
    min-width: 0;
}

/* 마지막 칸: 항목 선 제거(겹침 방지), 박스 닫는 선은 .hd_menu_cat_wrap border-right만 */
#hd_menu .hd_menu_cat_wrap--h .gnb_1dli:last-child {
    border-right: 0;
}

#hd_menu .hd_menu_cat_wrap--h .gnb_1da {
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#hd_menu .hd_menu_cat_wrap--h .gnb_1dli_over .gnb_2dul,
#hd_menu .hd_menu_cat_wrap--h .gnb_1dli_on .gnb_2dul {
    top: 100%;
    left: 0;
    width: 100%;
}

/* 세로형(관리자): 같은 줄, 2차 분류 오른쪽으로 */
#hd_menu .hd_menu_cat_wrap--v .gnb_1dul_row {
    display: grid;
    grid-template-columns: repeat(var(--cat-cols, 9), minmax(0, 1fr));
    height: 50px;
}

#hd_menu .hd_menu_cat_wrap--v .gnb_1dli {
    border-right: 1px solid #e8e8e8;
    min-width: 0;
}

#hd_menu .hd_menu_cat_wrap--v .gnb_1dli:last-child {
    border-right: 0;
}

#hd_menu .hd_menu_cat_wrap--v .gnb_1da {
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#hd_menu .hd_menu_cat_wrap--v .gnb_1dli_over .gnb_2dul,
#hd_menu .hd_menu_cat_wrap--v .gnb_1dli_on .gnb_2dul {
    top: 0;
    left: 100%;
    width: 200px;
}

#hd_shop_white {
    display: none !important;
}

.custom-main-cat-empty {
    padding: 0 20px;
    line-height: 50px;
    color: #666;
}

body.custom-main-cat-mode #aside #gnb,
body.custom-main-cat-mode .shop-content > #idx_hit,
body.custom-main-cat-mode .hd_menu li a[href*="type="] {
    display: none !important;
}

body.custom-main-cat-mode.is_index #wrapper.shop-main #aside {
    display: none !important;
}

body.custom-main-cat-mode.is_index #wrapper.shop-main .shop-content.is_index {
    margin-left: 0;
    width: 100%;
    max-width: none;
}

@media (max-width: 1240px) {
    #hd_menu .hd_menu_cat_wrap {
        width: calc(100% - 265px);
        max-width: none;
    }
}

@media (max-width: 768px) {
    #hd_menu .hd_menu_cat_wrap--h .gnb_1dul_row,
    #hd_menu .hd_menu_cat_wrap--v .gnb_1dul_row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    #hd_menu .hd_menu_cat_wrap .gnb_1da {
        font-size: 0.92em;
        padding: 0 4px;
    }
}
