/* 레이아웃 CSS */
.rows_gnb_wrap {border-top:1px solid rgba(255,255,255,0.2); padding-top: 10px; margin-top: 20px;}
.row_gnbs {position: relative;}
.row_gnbs .cbp-hrmenu > ul, .cbp-hrmenu .cbp-hrsub-inner {padding-left: 0px; padding-right: 0px;}
.row_gnbs .cbp-hrmenu > ul > li {padding-left: 0px; padding-right: 30px;}
.row_gnbs .cbp-hrmenu > ul > li.gnb_ca1_item {padding-right: 24px;}
.row_gnbs .cbp-hrmenu > ul > li.gnb_typelist_item {padding-right: 24px !important;}
.row_gnbs .cbp-hrmenu > ul > li.gnb_all_menu {padding-right: 22px !important; padding-left: 16px;}
.row_gnbs .cbp-hrmenu > ul {float:none !important; line-height: 100%;}
#cbp-hrmenu.pc > ul {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

/* 1차 분야 메뉴 — 활성만 넓은 pill (네이비 톤) */
#cbp-hrmenu.pc > ul > li.gnb_ca1_item > a.gnb_ca1_link {
    display: inline-block;
    float: none !important;
    padding: 7px 28px;
    border-radius: 100px;
    line-height: 1.4;
    background: transparent;
    box-shadow: inset 0 0 0 1px transparent;
    transition: background-color 0.22s ease, box-shadow 0.22s ease;
    vertical-align: middle;
}
#cbp-hrmenu.pc > ul > li.gnb_ca1_active > a.gnb_ca1_active_link {
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(170, 32, 255, 0.35);
}

/* 베스트·새로나온책 — 아이콘+텍스트, 테두리 없음 */
#cbp-hrmenu.pc > ul > li.gnb_typelist_first {
    margin-left: auto;
}
#cbp-hrmenu.pc > ul > li.gnb_typelist_item > a.gnb_typelist_link {
    display: inline-flex !important;
    float: none !important;
    align-items: center;
    gap: 5px;
    padding: 0;
    line-height: 1.4;
    background: transparent;
    box-shadow: none;
    white-space: nowrap;
}
#cbp-hrmenu.pc > ul > li.gnb_typelist_item .gnb_typelist_ico_wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    color: inherit;
}
#cbp-hrmenu.pc > ul > li.gnb_typelist_item .gnb_typelist_ico {
    display: block;
    width: 16px;
    height: 16px;
}
#cbp-hrmenu.pc > ul > li.gnb_typelist_item.cbp-hropen > a.gnb_typelist_link {
    color: #000 !important;
}
#cbp-hrmenu.pc > ul > li.gnb_typelist_item > a.gnb_typelist_link:hover,
#cbp-hrmenu.pc > ul > li.gnb_typelist_item.cbp-hropen > a.gnb_typelist_link.gnb_typelist_active,
#cbp-hrmenu.pc > ul > li.gnb_typelist_item > a.gnb_typelist_link.gnb_typelist_active {
    color: #AA20FF !important;
}
#cbp-hrmenu.pc > ul > li.gnb_all_menu {
    float: none;
    margin-left: auto;
    flex-shrink: 0;
    background-position: right center;
}
#cbp-hrmenu.pc > ul > li.gnb_all_menu > a {
    display: inline-block;
    float: none !important;
    padding-right: 2px;
    white-space: nowrap;
}
#cbp-hrmenu.pc > ul > li.gnb_typelist_first + li.gnb_all_menu,
#cbp-hrmenu.pc > ul > li.gnb_typelist_item + li.gnb_all_menu {
    margin-left: 0;
}
.gnb_wrap .row_gnbs nav {float:none;}
.row_gnbs .cbp-hrmenu .cbp-hrsub {top:40px;}

/* 고정 헤더·inner에서 overflow:hidden이면 자동완성 패널이 잘림 */
#header {
    overflow: visible !important;
}
#header .gnb_wrap,
#header .gnb_wrap .inner,
#header .search_top_wrap,
#header .search_top_wrap_inner {
    overflow: visible !important;
}

.search_top_wrap {float:left; position: relative; width: 280px;}
.search_top_wrap input {border:0px; background-color: #fff; border-radius: 60px; height:40px; width: 100%; color:#000;}
.search_top_wrap input::placeholder{font-family:'font-R',sans-serif; color:#999;}
.search_top_wrap button {position: absolute; top:11px; right:15px;}
.search_top_wrap input:focus {border:0px !important;}
.search_top_wrap_inner {position: relative;}

/* 게시판 fixed 버튼 위치조정 */
.rb_bbs_wrap .btns_gr_wrap {top:185px !important;}

.co_header0 .rows_gnb_wrap {border-top:1px solid rgba(0,0,0,0.05);}
.co_header0 .search_top_wrap input {background-color: rgba(0,0,0,0.05);}
.ser_display_none .search_top_wrap_inner {display: none;}

.cbp-hrmenu .cbp-hrsub-inner > div {min-width: 140px;}
.cbp-hrmenu .cbp-hrsub {margin-left: -30px;}
#cbp-hrmenu .cbp-hrsub .cbp-hrsub-inner > div > ul > li{position: relative; min-height:32.2px;}
#cbp-hrmenu .cbp-hropen .cbp-hrsub {padding-left: 30px; padding-right: 30px; padding-top: 20px; padding-bottom: 20px;}
.cbp-hrmenu .cbp-hrsub-inner > div i {position: absolute; top:-5px; right:-5px; opacity: 0.5; transition: transform 220ms ease, opacity 220ms ease;}
#cbp-hrmenu .cbp-hrsub .cbp-hrsub-inner > div > ul > li:hover i {opacity: 0;}
.cbp-hrmenu .cbp-hrsub-inner > div a {padding-right: 20px;}

#cbp-hrmenu.pc .cbp-hrsub-3{
    display: grid;
    grid-auto-flow: column;
    grid-template-rows: repeat(10, auto);
    grid-auto-columns: minmax(120px, max-content);
    column-gap: 20px;
    row-gap: 0;
    align-items: start;
    box-sizing: border-box;
    max-width: min(100vw - 48px, 1200px);
    width: max-content;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    position: absolute;
    left: 90%;
    top: -10px;

    background-color: #fff;
    min-width: 120px;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.05);

    transform: translate3d(0, 6px, 0);
    transition: transform 220ms ease, opacity 220ms ease;
    z-index: 9
}

#cbp-hrmenu.pc .cbp-hrsub-3 dd {
    margin: 0;
}

#cbp-hrmenu .cbp-hrsub > .cbp-hrsub-inner ul > li:hover > .cbp-hrsub-3{
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate3d(0, 0, 0);
}

#cbp-hrmenu .cbp-hrsub > .cbp-hrsub-inner ul > li:hover > .cbp-hrsub-3 a {padding-top: 4px; padding-bottom: 4px; font-family: 'font-R'; font-size: 13px; padding-right: 0px;}
#cbp-hrmenu .cbp-hrsub > .cbp-hrsub-inner ul > li:hover {position: relative;}

.gnb_all_menu .cbp-hrsub .cbp-hrsub-inner > div > ul > li {min-height: auto !important;}

/* 2차 메뉴: 분류가 많을 때 세로 10행 단위로 채운 뒤 가로로 다음 열 (전체분류 패널 제외) */
#cbp-hrmenu.pc > ul > li.gnb_typelist_first + li.gnb_all_menu,
#cbp-hrmenu.pc > ul > li.gnb_typelist_item + li.gnb_all_menu {
    margin-left: 0;
}
#cbp-hrmenu.pc > ul > li:not(.gnb_all_menu):not(.gnb_typelist_item) .cbp-hrsub {
    max-width: min(100vw - 48px, 1200px);
}
#cbp-hrmenu.pc > ul > li:not(.gnb_all_menu):not(.gnb_typelist_item) .cbp-hrsub-inner > div {
    float: none;
    width: 100%;
    min-width: 0;
}
#cbp-hrmenu.pc > ul > li:not(.gnb_all_menu):not(.gnb_typelist_item) .cbp-hrsub-inner > div > ul {
    display: grid;
    grid-auto-flow: column;
    grid-template-rows: repeat(10, auto);
    grid-auto-columns: minmax(140px, max-content);
    column-gap: 28px;
    row-gap: 0;
    float: none;
    width: max-content;
    max-width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}

@media all and (max-width:1024px) {
    .rows_gnb_wrap {display: none;}
    .search_top_wrap {width: 30%;}
    .gnb_wrap .snb_wrap .qm_wrap a {width: auto; padding-left: 0px; margin-left: 20px;}
    .gnb_wrap .tog_wrap {margin-right: 20px;}

    /* 1.0.1 { */
    .mobile_cb {clear: both;}
    .search_top_wrap {display: block; float:none !important; width: 100%; margin-top: 10px;}
    .gnb_wrap .snb_wrap .my_btn_wrap {display: block;margin-left: 20px;}
    .gnb_wrap .snb_wrap .my_btn_wrap .btn_round.arr_bg {display: none;}
    .gnb_wrap .snb_wrap .my_btn_wrap .btn_round {padding-left: 15px; padding-right: 15px; height:35px;}
    .gnb_wrap .snb_wrap .qm_wrap a span {left: 10px;}
    /* } */

    /* 1.1.1 { */
    .gnb_wrap .inner {padding-left: 0px !important; padding-right: 0px !important;}
    /* } */

}
