/* ========================================
   전체 카테고리 - 가비아 전용
======================================== */

/* 기본 영역 */
#main_allcate .section {
    position: relative;
    width: 100%;
    display: block;
}

/* 체크박스 숨김 */
#main_allcate .section > input[type="checkbox"] {
    position: absolute;
    left: -9999px;
}


/* ========================================
   전체카테고리 열기 버튼
======================================== */

#main_allcate .section > .modal-btn + label {
    position: relative;
    display: block;

    width: 40px;
    height: 40px;

    border: none;
    border-radius: 4px;

    cursor: pointer;
    background: transparent;

    transition: all 200ms linear;
}


/* ========================================
   모달 전체 배경
======================================== */

#main_allcate .modal {
    position: fixed;

    display: flex;
    flex-wrap: wrap;
    justify-content: center;

    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

    margin: 0 auto;

    overflow-x: hidden;

    background: rgba(0, 0, 0, 0.4);

    z-index: 100;

    pointer-events: none;
    opacity: 0;

    transition: opacity 250ms 300ms ease;
}


/* 체크되면 모달 열림 */
#main_allcate .modal-btn:checked ~ .modal {
    pointer-events: auto;
    opacity: 1;

    transition: all 250ms ease-in-out;
}


/* ========================================
   흰색 카테고리 창
======================================== */

#main_allcate .modal-wrap {
    position: relative;
    display: block;

    width: min(1500px, calc(100% - 50px));
    height: 80%;

    margin: 20px auto;

    border-radius: 20px;

    overflow-y: auto;
    overflow-x: hidden;

    padding-bottom: 20px;

    background: #fff;

    align-self: center;

    box-shadow: 0 12px 25px 0 rgba(199,175,189,.25);

    opacity: 0;
    transform: scale(0.6);

    transition:
        opacity 300ms 300ms ease,
        transform 300ms 300ms ease;
}


/* 열렸을 때 창 확대 */
#main_allcate .modal-btn:checked ~ .modal .modal-wrap {
    opacity: 1;
    transform: scale(1);

    transition:
        opacity 250ms 50ms ease,
        transform 250ms 50ms ease;
}


/* ========================================
   전체 카테고리 상단 회색바
======================================== */

#main_allcate .modal-wrap > .fixed-title {
    width: 100%;
    height: 80px;

    background: #f5f5f5;

    position: sticky;
    top: 0;

    display: flex;
    align-items: center;

    box-sizing: border-box;

    padding: 0 25px 0 40px;

    z-index: 20;
}


/* 전체 카테고리 제목 */
#main_allcate .modal-wrap > .fixed-title > h1 {
    margin: 0;

    letter-spacing: -2px;

    font-family: 'Noto Sans KR', sans-serif;
    font-size: 21px;
    font-weight: 500;

    color: #333;
}


/* ========================================
   닫기 X 버튼
======================================== */

#main_allcate .modal-close-btn {
    position: absolute;

    right: 25px;
    top: 50%;

    transform: translateY(-50%);

    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    box-sizing: border-box;

    background: #fff;

    border: 1px solid #ddd;
    border-radius: 6px;

    font-family: Arial, sans-serif;
    font-size: 25px;
    font-weight: 400;
    line-height: 1;

    color: #333;

    cursor: pointer;

    box-shadow: 0 1px 3px rgba(0,0,0,0.08);

    transition: all 0.2s ease;

    z-index: 30;
}


/* X버튼 마우스 올렸을 때 */
#main_allcate .modal-close-btn:hover {
    background: #333;
    border-color: #333;
    color: #fff;
}


/* ========================================
   카테고리 전체 내용
======================================== */

#main_allcate .modal-wrap > .allcate {
    display: block;

    margin-top: 10px;

    background: #fff;

    overflow: hidden;
}


/* 개별 카테고리 */
#main_allcate .modal-wrap > .allcate > .category {
    width: 245px;
    height: 620px;

    background: #fff;

    float: left;
    display: inline-block;

    box-sizing: border-box;
}


/* ========================================
   카테고리 상단 박스
======================================== */

#main_allcate .cate-box {
    width: 200px;
    height: 70px;

    background: #f8f8f8;

    border-radius: 5px;

    margin-left: 25px;

    box-sizing: border-box;
}


/* 카테고리 이미지 */
#main_allcate .cate-box > img {
    width: 50px;

    margin-top: 10px;
    margin-left: 10px;

    text-align: left;

    float: left;
}


/* 카테고리 이름 */
#main_allcate .cate-box > li {
    list-style: none;

    font-family: 'Noto Sans KR', sans-serif;

    font-size: 16px;
    font-weight: 600;

    text-align: center;

    margin-top: 27px;
    margin-left: 10px;

    float: left;
}


/* 카테고리 링크 */
#main_allcate .cate-box a {
    color: #222;
    text-decoration: none;
}


/* ========================================
   하위 카테고리
======================================== */

#main_allcate .cate-list {
    padding: 20px 0;
}


#main_allcate .cate-list ul {
    margin: 0;
    padding: 0;
}


#main_allcate .cate-list ul > li {
    list-style: none;

    font-family: 'Noto Sans KR', sans-serif;

    font-size: 15px;
    font-weight: 500;

    height: 20px;

    padding: 5px 0;

    margin-left: 35px;
}


#main_allcate .cate-list ul > li > a {
    color: #333;
    text-decoration: none;
}


#main_allcate .cate-list ul > li > a:hover {
    color: #000;
    text-decoration: underline;
}


/* ========================================
   스크롤바
======================================== */

#main_allcate .modal-wrap::-webkit-scrollbar {
    width: 8px;
}


#main_allcate .modal-wrap::-webkit-scrollbar-thumb {
    background: #999;
    border-radius: 10px;
}


#main_allcate .modal-wrap::-webkit-scrollbar-track {
    background: transparent;
}


/* ========================================
   화면이 작아졌을 때
======================================== */

@media screen and (max-width: 1550px) {

    #main_allcate .modal-wrap {
        width: calc(100% - 50px);
    }

}