/* =============================================
   Site Header
   ============================================= */

#site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

#header-nav-wrap {
    background: #fff;
    border-bottom: 1px solid #e0d2be;
    position: relative;
}

.header-inner {
    display: flex;
    align-items: stretch;
    gap: 24px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px;
    height: 72px;
}

/* ── 로고 ──────────────────────────────────── */
.site-logo {
    flex-shrink: 0;
    margin: 0;
    display: flex;
    align-items: center;
}

.site-logo a {
    display: block;
    line-height: 1;
}

.site-logo img {
    display: block;
    height: 44px;
    width: auto;
}

/* ── 1-depth 네비 ─────────────────────────── */
.nav-depth1 {
    display: flex;
    align-items: stretch;
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
    justify-content: center;
}

.nav-depth1 > li {
    display: flex;
    align-items: stretch;
    position: static;
}

.nav-depth1 > li > a {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 14px;
    font-size: 14px;
    font-weight: 500;
    color: #3a3230;
    text-decoration: none;
    letter-spacing: -0.5px;
    white-space: nowrap;
    transition: color 0.2s;
}

.nav-depth1 > li > a:hover,
.nav-depth1 > li.is-active > a {
    color: #a87860;
}

/* 서브메뉴 화살표 */
.nav-depth1 > li.has-sub > a::after {
    content: '';
    display: inline-block;
    width: 5px;
    height: 5px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translateY(-1px);
    transition: transform 0.2s;
    flex-shrink: 0;
}

.nav-depth1 > li.has-sub.is-active > a::after {
    transform: rotate(-135deg) translateY(-1px);
}

/* ── 우측 영역 ────────────────────────────── */
.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* CTA 버튼 */
.header-cta {
    display: inline-flex;
    align-items: center;
    padding: 10px 22px;
    background: #a87860;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.4px;
    text-decoration: none;
    border-radius: 50px;
    white-space: nowrap;
    transition: background 0.2s;
}

.header-cta:hover {
    background: #8e6450;
}

/* 햄버거 버튼 */
#mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
}

.hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 24px;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: #3a3230;
    border-radius: 2px;
    transition: transform 0.25s, opacity 0.2s;
    transform-origin: center;
}

#mobile-menu-btn.is-open .hamburger span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

#mobile-menu-btn.is-open .hamburger span:nth-child(2) {
    opacity: 0;
}

#mobile-menu-btn.is-open .hamburger span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ── 2-depth 드롭다운 (데스크탑: 전체너비 절대위치) */
.nav-sub {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    border-top: 2px solid #a87860;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    z-index: 900;
}

.nav-depth1 > li.is-active > .nav-sub {
    display: block;
}

.nav-sub-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 28px 16px;
}

.nav-sub ul {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-sub li {
    width: 200px;
    height: 40px;
    line-height: 40px;
}

.nav-sub a {
    display: block;
    font-size: 14px;
    color: #333;
    text-decoration: none;
    padding-left: 4px;
    letter-spacing: -0.3px;
    transition: color 0.15s;
}

.nav-sub a:hover {
    color: #a87860;
}

/* ── 1025~1280px: 메뉴 폰트 소폭 축소 */
@media (max-width: 1280px) {
    .nav-depth1 > li > a {
        font-size: 13px;
        padding: 0 10px;
        letter-spacing: -0.5px;
    }
}

/* ── 모바일 (≤1024px): 햄버거 전환 */
@media (max-width: 1024px) {

    .header-inner {
        height: 60px;
        gap: 0;
        justify-content: space-between;
        align-items: center;
    }

    .site-logo img {
        height: 36px;
    }

    /* 네비 숨김 → 햄버거로 전환
       nav-depth1이 absolute로 떠서 li 내부 nav-sub가 함께 움직임 */
    .nav-depth1 {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        background: #fff;
        border-top: 1px solid #ede5e0;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
        z-index: 800;
        max-height: calc(100vh - 60px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .nav-depth1.is-open {
        display: flex;
    }

    .nav-depth1 > li {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        border-bottom: 1px solid #ece0d0;
    }

    .nav-depth1 > li > a {
        line-height: 1;
        padding: 16px 20px;
        font-size: 14px;
        letter-spacing: -0.3px;
        color: #3a3230;
    }

    /* 모바일: 화살표 세로 방향으로 전환 */
    .nav-depth1 > li.has-sub > a::after {
        transform: rotate(45deg) translateY(-1px);
    }

    .nav-depth1 > li.has-sub.is-active > a::after {
        transform: rotate(-135deg) translateY(1px);
    }

    /* 서브메뉴: absolute 해제 → 인라인 아코디언 */
    .nav-sub {
        position: static;
        top: auto;
        left: auto;
        width: 100%;
        background: #f4ece0;
        border-top: none;
        box-shadow: none;
        z-index: auto;
    }

    .nav-sub-inner {
        max-width: none;
        margin: 0;
        padding: 6px 0;
    }

    .nav-sub ul {
        flex-direction: column;
    }

    .nav-sub li {
        width: 100%;
        height: auto;
        line-height: 1;
    }

    .nav-sub a {
        padding: 11px 32px;
        font-size: 13px;
        color: #555;
    }

    /* CTA 텍스트 줄임 */
    .header-cta {
        font-size: 12px;
        padding: 8px 14px;
    }

    #mobile-menu-btn {
        display: inline-flex;
    }
}

@media (max-width: 480px) {
    .header-cta {
        display: none;
    }
}

@media (max-width: 360px) {
    .header-inner {
        padding: 0 12px;
    }

    .site-logo img {
        height: 32px;
    }
}
