/* LIVART Header Styles */
#livart_header {
    border-bottom: 1px solid #e0e0e0;
    background: #fff;
}

#livart_header .lh_inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 90px;
    padding: 0 20px;
}

/* Logo */
#livart_header .logo {
    margin: 0;
    padding: 0;
    flex-shrink: 0;
}
#livart_header .logo a {
    display: block;
}
#livart_header .logo img {
    height: 40px;
    width: auto;
    object-fit: contain;
}
#livart_header .logo .logo_main {
    display: none;
}

/* Main Navigation */
#livart_header .lh_gnb {
    flex-grow: 1;
    margin-left: 20px;
}
#livart_header .lh_gnb ul {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 10px;
}
#livart_header .lh_gnb li a {
    text-decoration: none;
    font-size: 12px;
    color: #333;
    font-weight: 500;
}
#livart_header .lh_gnb li a:hover {
    color: #000;
}

/* Active Menu Item (홈) */
#livart_header .lh_gnb li.active a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #222;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 15px;
}
/* Close button hidden by default (will show in mobile overlay) */
#livart_header .lh_gnb_close {
    display: none;
}
#livart_header .lh_gnb li.active a:hover {
    color: #fff;
}

/* Right Utility Section */
#livart_header .lh_util {
    display: flex;
    align-items: center;
    gap: 30px;
}

/* Search Bar */
#livart_header .lh_search form {
    display: flex;
    align-items: center;
    background: #f4f4f4;
    border-radius: 20px;
    padding: 5px 15px;
    width: 120px;
    height: 40px;
    box-sizing: border-box;
}
#livart_header .lh_search input {
    border: none;
    background: transparent;
    outline: none;
    flex-grow: 1;
    font-size: 14px;
    width: 100%;
}
#livart_header .lh_search button {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 16px;
    color: #333;
    padding: 0;
}

/* Icons Matrix */
#livart_header .lh_icons {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 15px;
}
#livart_header .lh_icons li a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #333;
    font-size: 11px;
    gap: 5px;
}
#livart_header .lh_icons li a i {
    font-size: 20px;
    color: #333;
}
#livart_header .lh_icons li a:hover i,
#livart_header .lh_icons li a:hover span {
    color: #000;
}

/* Burger Button Style (Default Hidden) */
#livart_header .lh_burger {
    display: none;
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #333;
    padding: 10px;
}

/* Hide original theme mobile header completely */
#mobile_hd {
    display: none !important;
}

/* PC 메인페이지 투명 헤더일 때 로고 교체 */
@media screen and (min-width: 1201px) {
    #livart_header.main-header .logo_main {
        display: block;
    }
    #livart_header.main-header .logo_default {
        display: none;
    }
}

/* Mobile responsive adjustments */
@media screen and (max-width: 1200px) {
    #livart_header .lh_inner {
        height: auto;
        display: flex;
        flex-direction: column; /* 세로로 나열 */
        padding: 0;
    }
    
    /* 로고 영역 (아이콘 위 혹은 아래 선택 가능, 현재는 아이콘 위 배치) */
    #livart_header .logo {
        padding: 15px 0;
        text-align: center;
        border-bottom: 1px solid #eee;
        order: 1; 
    }

    /* 아이콘 메뉴 영역 */
    #livart_header .lh_util {
        width: 100%;
        display: block;
        margin: 0;
        order: 2; /* 두 번째 위치 */
    }

    #livart_header .lh_icons {
        display: flex;
        justify-content: center;
        gap: 25px;
        padding: 12px 0;
        border-bottom: 1px solid #eee;
    }
    
    #livart_header .lh_icons li a span {
        display: none; /* 아이콘만 표시 */
    }

    #livart_header .lh_icons li a i {
        font-size: 22px;
        color: #111;
    }

    /* GNB 그리드 영역 */
    #livart_header .lh_gnb {
        position: static;
        width: 100%;
        height: auto;
        background: #fff;
        opacity: 1;
        pointer-events: auto;
        transform: none;
        display: block !important;
        margin: 0;
        order: 3; /* 세 번째 위치 */
    }

    #livart_header .lh_gnb ul {
        display: grid;
        grid-template-columns: repeat(4, 1fr); /* 정확히 4열 */
        width: 100%;
        gap: 0;
        border-top: none;
    }

    #livart_header .lh_gnb ul li {
        border-right: 1px solid #eee;
        border-bottom: 1px solid #eee;
        box-sizing: border-box;
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 55px;
    }

    #livart_header .lh_gnb ul li:nth-child(4n) {
        border-right: none; /* 각 행의 마지막 아이템 보더 제거 */
    }

    #livart_header .lh_gnb ul li a {
        display: block;
        width: 100%;
        padding: 15px 2px;
        font-size: 13px;
        color: #333;
        font-weight: 400;
        text-align: center;
        line-height: 1.2;
    }

    /* 버거 및 닫기 버튼 숨김 */
    #livart_header .lh_burger,
    #livart_header .lh_gnb_close {
        display: none !important;
    }

    /* 메인페이지 예외 처리 해제 */
    #livart_header.main-header {
        position: relative !important;
        background: #fff !important;
        border-bottom: none !important;
    }
    #livart_header.main-header .logo img {
        filter: none !important;
    }
    #livart_header.main-header .lh_icons li a i,
    #livart_header.main-header .lh_gnb ul li a {
        color: #333 !important;
    }
    
    #livart_header .lh_search form {
        display: none;
    }
}

    #livart_header .lh_icons li a span {
    }
    
    /* 모바일에서 아코디언 화살표 숨기기 */
    #livart_header .btn_side_toggle {
        display: none !important;
    }
}
