@charset "utf-8";

/* ========================================
   헤더 스타일
   ======================================== */

/* ========================================
   1. 팝업레이어 (그누보드 기본)
   ======================================== */
#hd_pop {
    z-index: 1000;
    position: relative;
    margin: 0 auto;
    height: 0;
}

#hd_pop h2 {
    position: absolute;
    font-size: 0;
    line-height: 0;
    overflow: hidden;
}

.hd_pops {
    position: absolute;
    border: 1px solid var(--color-border);
    background: var(--color-white);
}

.hd_pops img {
    max-width: 100%;
}

.hd_pops_footer {
    background: #000;
    color: var(--color-white);
    text-align: left;
    position: relative;
}

.hd_pops_footer:after {
    display: block;
    visibility: hidden;
    clear: both;
    content: "";
}

.hd_pops_footer button {
    padding: 10px;
    color: var(--color-white);
}

.hd_pops_footer .hd_pops_reject {
    background: #000;
    text-align: left;
}

.hd_pops_footer .hd_pops_close {
    background: var(--color-text);
    position: absolute;
    top: 0;
    right: 0;
}

/* ========================================
   2. 그누보드 기본 레이아웃 (shop.head.php 등에서 사용)
   ======================================== */
#hd_wrapper {
    position: relative;
    margin: 0 auto;
    height: 140px;
    zoom: 1;
}

#hd_wrapper:after {
    display: block;
    visibility: hidden;
    clear: both;
    content: "";
}

#hd_login_msg {
    position: absolute;
    top: 0;
    left: 0;
    font-size: 0;
    line-height: 0;
    overflow: hidden;
}

/* ========================================
   3. 접근성 (스킨에서 사용)
   ======================================== */
.msg_sound_only,
.sound_only {
    display: inline-block !important;
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 0;
    line-height: 0;
    border: 0 !important;
    overflow: hidden !important;
}

/* ========================================
   4. 헤더 기본
   ======================================== */
.header {
    position: relative;
    background: var(--color-white);
}

/* ========================================
   5. 첫 번째 줄: 로고 + 유틸리티
   ======================================== */
   .header__top {
    padding: 32px 0;
   }

.header__top .container {
    display: flex;
    justify-content: space-between;
    
}

#logo {
    margin: 0;
    flex-shrink: 0;
}

#logo img {
    height: 45px;
    width: auto;
}

.header__top-utils {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header__top-utils #utility {
    display: flex;
    align-items: center;
}

/* Language 선택기 */
.language-selector {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.language-select {
    padding: 6px 12px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-size: 0.875rem;
    background: var(--color-white);
    color: var(--color-text);
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.language-select:hover {
    border-color: var(--color-primary);
}

.language-select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 27, 72, 0.1);
}

/* ========================================
   6. 두 번째 줄: GNB 메뉴
   ======================================== */
   .header__gnb {
    background: var(--color-primary);
}

.header__gnb-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

#gnb,
.header__gnb-nav {
    flex: 1;
    position: static;
    display: flex;
}

#depth1_ul {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    gap: 40px;
}

.depth1_li {
    position: relative;
    z-index: 1; /* base z-index; hover will elevate */
}

.depth1_a {
    font-size: 1rem;
    font-weight: 400;
    color: var(--color-text);
    padding: var(--padding-3, 16px) 0;
    display: block;
    transition: all 0.3s;
    position: relative;
    color:#fff;
}

.depth1_a:hover {
}

.depth1_a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--color-primary);
    transition: width 0.3s ease;
}

.depth1_a:hover::after,
.depth1_li.active .depth1_a::after {
    width: 100%;
}

/* GNB 우측 유틸리티 버튼 */
.header__gnb-utils {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-left: 24px;
    color:#fff;
}

.header__gnb-utils ul {
    display: flex;
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.header__gnb-utils li a {
    font-size: 1.125rem;
    color: var(--color-white);
}
/* ========================================
   7. 서브메뉴 (2depth)
   ======================================== */
.depth2_ul {
    position: absolute;
    top: 100%;
    left: -20px; /* left-align the submenu with the parent depth1 */
    min-width: 220px;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 0 0 8px 8px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    transition: max-height 1s ease-out, visibility 1s ease-out;
    z-index: 1000;
    transform: none;
    transform-origin: top; 
}

.depth1_li::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 15px;
    background: transparent;
    z-index: 999;
}

.depth1_li .depth2_ul {
    pointer-events: none; /* prevent pointer crossing into hidden submenus */
}

.depth1_li_over .depth2_ul {
    max-height: 500px;
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto; /* enable interactions only for hovered submenu */
    z-index: 1100; /* ensure hovered submenu sits above others */
}

/* When hovered, bring the parent li to top so submenu does not get overlapped */
.depth1_li_over {
    z-index: 1101;
}

.depth2_ul_box {
    padding: var(--padding-1, 8px) 0;
}

.depth2_li {
    list-style: none;
}

.depth2_a {
    display: block;
    padding: var(--padding-2, 12px) var(--padding-5, 24px);
    color: var(--color-text-secondary);
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s;
    position: relative;
}

.depth2_a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 70%;
    background: var(--color-primary);
    transition: width 0.3s ease;
    border-radius: 0 3px 3px 0;
}

.depth2_a:hover {
    background: var(--color-gray-50);
    color: var(--color-primary);
}

/* ========================================
   8. 유틸리티 메뉴 리스트
   ======================================== */
.utility-list {
    display: flex;
    gap: 16px;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.utility-list li {
    list-style: none;
    margin: 0;
}

.utility-list a {
    font-size: 0.875rem;
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.utility-list a:hover {
    color: var(--color-primary);
}

/* ========================================
   9. 버튼 스타일
   ======================================== */
.hamburger-btn {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: var(--color-primary);
    border: none;
    border-radius: 50%;
    color: var(--color-white);
    font-size: 1.25rem;
    cursor: pointer;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.hamburger-btn:hover {
    background: var(--color-primary-mid);
}

/* ========================================
   10. PC 모달 메뉴
   ======================================== */
.menu-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 9998;
    overflow-y: auto;
}

.menu-modal__content {
    max-width: calc(var(--layout-content-width) + (var(--layout-gutter-desktop) * 2));
    margin: 50px auto;
    background: var(--color-white);
    border-radius: 10px;
    padding: 40px;
    position: relative;
}

.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    font-size: 1.875rem;
    cursor: pointer;
    color: var(--color-text-secondary);
}

.modal-close-btn:hover {
    color: var(--color-text);
}

.modal-nav__section {
    margin-bottom: 30px;
}

.modal-nav__section h3 {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--color-text);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--color-primary);
}

.modal-nav__section ul {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.modal-nav__section li {
    list-style: none;
}

.modal-nav__section a {
    color: var(--color-text-secondary);
    font-size: 0.9375rem;
    transition: color 0.3s;
}

.modal-nav__section a:hover {
    color: var(--color-primary);
}

/* ========================================
   11. 모바일 사이드 메뉴
   ======================================== */
.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
}

.mobile-menu::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(8, 14, 40, 0.55);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu__panel {
    position: absolute;
    top: 0;
    right: 0;
    width: min(92vw, 420px);
    max-width: 420px;
    height: 100%;
    background: var(--color-white);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: none;
}

.mobile-menu--active {
    pointer-events: auto;
}

.mobile-menu--active::before {
    opacity: 1;
}

.mobile-menu--active .mobile-menu__panel {
    transform: translateX(0);
    box-shadow: -12px 0 32px rgba(11, 16, 44, 0.18);
}

.mobile-menu__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 24px 26px 18px;
    border-bottom: 1px solid var(--color-border);
}

.mobile-menu__brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.mobile-menu__brand img {
    height: 46px;
    width: auto;
}

.mobile-menu__close {
    background: var(--color-primary);
    border: none;
    color: var(--color-white);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    transition: background 0.2s ease, transform 0.3s ease;
}

.mobile-menu__close:hover {
    background: var(--color-primary-mid);
    transform: scale(1.05);
}

.mobile-menu__utility {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 18px 26px 20px;
    border-bottom: 1px solid var(--color-border);
}

.mobile-menu__utility-link {
    flex: 1 1 140px;
    text-align: center;
    padding: 12px 16px;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 600;
    border: 1px solid var(--color-border);
    color: var(--color-primary);
    background: var(--color-gray-50);
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.mobile-menu__utility-link:hover {
    background: var(--color-border);
    border-color: var(--color-border);
}

.mobile-menu__utility-link--primary {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-white);
}

.mobile-menu__utility-link--primary:hover {
    background: var(--color-primary-mid);
    border-color: var(--color-primary-mid);
}

.mobile-nav {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 12px 0 32px;
}

.mobile-nav__item {
    border-bottom: 1px solid var(--color-gray-50);
}

.mobile-nav__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 18px 26px;
    color: var(--color-text);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    position: relative;
    border-left: 4px solid transparent;
    border-radius: 12px;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.mobile-nav__link::after {
    content: '\f107';
    font-family: 'FontAwesome';
    font-size: 0.875rem;
    line-height: 1;
    display: inline-block;
    color: var(--color-text-secondary);
    transition: transform 0.3s ease, color 0.3s ease;
}

.mobile-nav__link:not(.mobile-nav__link--expandable)::after {
    display: none;
}

.mobile-nav__item.open .mobile-nav__link,
.mobile-nav__item--active > .mobile-nav__link,
.mobile-nav__link--active {
    color: var(--color-primary);
}

.mobile-nav__item.open .mobile-nav__link::after,
.mobile-nav__item--active > .mobile-nav__link::after {
    transform: rotate(180deg);
    color: var(--color-primary);
}

.mobile-nav__label {
    flex: 1 1 auto;
}

.mobile-nav__sub {
    max-height: 0;
    overflow: hidden;
    background: var(--color-gray-50);
    transition: max-height 0.35s ease;
}

.mobile-nav__sub--open {
    max-height: 999px;
}

.mobile-nav__sub li {
    list-style: none;
}

.mobile-nav__sub a {
    display: block;
    padding: 12px 26px 12px 52px;
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color 0.2s ease, background 0.2s ease, padding 0.2s ease;
}

.mobile-nav__sub a:hover {
    color: var(--color-primary);
    background: var(--color-white);
    padding-left: 58px;
}

.mobile-nav__sub a.is-active {
    color: var(--color-primary);
    background: var(--color-white);
    font-weight: 700;
}

body.mobile-menu-open {
    overflow: hidden;
    touch-action: none;
}

/* ========================================
   11-1. 검색 모달
   ======================================== */
.search-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.7);
}

.search-modal__content {
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    width: min(640px, 90%);
    background: var(--color-white);
    border-radius: 8px;
    padding: 24px 24px 20px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}

.search-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--color-text-secondary);
    cursor: pointer;
}

.search-modal__label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

.search-modal__field {
    display: flex;
    gap: 8px;
}

.search-modal__input {
    flex: 1 1 auto;
    padding: 10px 12px;
    border-radius: 4px;
    border: 1px solid var(--color-border);
    font-size: 0.9375rem;
}

.search-modal__submit {
    flex-shrink: 0;
    padding: 0 16px;
    border: none;
    border-radius: 4px;
    background: var(--color-primary);
    color: var(--color-white);
    font-size: 0.9375rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.search-modal__submit:hover {
    background: var(--color-primary-mid);
}

@media (max-width: 480px) {
    .search-modal__content {
        top: 15%;
        padding: 20px 16px 16px;
    }
}

/* ========================================
   12. 반응형 미디어쿼리
   ======================================== */
@media (max-width: 1024px) {

    #container_wr {
        padding-top: 0;
    }

    .header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        background: var(--color-white);
        border-bottom: 1px solid var(--color-border);
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        transition: box-shadow 0.3s ease;
    }

    .header--elevated {
        box-shadow: 0 8px 24px rgba(13, 18, 68, 0.12);
    }

    .hamburger-btn {
        display: flex;
    }

    /* 첫 번째 줄: 모바일에서는 로고만 표시 */
    .header__top {
        padding: 12px 0;
    }

    .header__top-utils {
        display: none; /* 모바일에서는 유틸리티 메뉴 숨김 (모바일 메뉴 내부로 이동) */
    }

    /* 두 번째 줄: 모바일에서는 GNB 숨김 */
    .header__gnb {
        display: none;
    }

    .language-selector {
        display: none;
    }

    .mobile-menu__header {
        padding: 20px;
    }

    .mobile-menu__brand img {
        height: 36px;
    }

    .mobile-menu__utility {
        padding: 14px 16px 16px;
    }

    .mobile-nav__link {
        padding: 16px 18px;
        font-size: 1rem;
    }

    .mobile-nav__sub a {
        padding: 12px 18px 12px 42px;
        font-size: 0.875rem;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 60px;
    }

    .header__top {
        padding: 10px 0;
    }

    #logo img {
        height: 38px;
    }

    .hamburger-btn {
        top: 15px;
        right: 15px;
        width: 36px;
        height: 36px;
        font-size: 1.125rem;
    }
}

@media (max-width: 360px) {
    :root {
        --header-height: 60px;
    }

    body {
        padding-top: var(--header-height, 60px);
    }

    .header__top {
        padding: 8px 0;
    }

    #logo img {
        height: 32px;
    }

    .hamburger-btn {
        top: 12px;
        right: 12px;
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    .mobile-menu__header {
        padding: 16px;
    }

    .mobile-menu__brand img {
        height: 32px;
    }

    .mobile-menu__utility {
        padding: 12px 14px 14px;
    }

    .mobile-nav__link {
        padding: 14px 16px;
        font-size: 0.9375rem;
    }

    .mobile-nav__sub a {
        padding: 10px 16px 10px 38px;
        font-size: 0.8125rem;
    }
}
