@charset "UTF-8";

/* ==========================================================================
   화천(HWACHEON) 공식 플랫폼 공통 헤더(Header)
   ========================================================================== */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4.5rem;
    z-index: 1300;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.navbar {
    position: relative;
    z-index: 1301;
    max-width: 1440px;
    margin: 0 auto;
    height: 100%;
    padding: 0 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
}

/* ──────────────────────────────────────────────────────────────────────────
   SECTION 1. 좌측 MENU 토글 버튼
   ────────────────────────────────────────────────────────────────────────── */
.nav-left {
    display: flex;
    align-items: center;
}

.btn-menu-label {
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    color: #111111;
    transition: opacity 0.2s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    padding: 0.8rem 1rem 0.8rem 0;
    display: inline-flex;
    align-items: center;
}

.btn-menu-label:hover {
    opacity: 0.5;
}

.menu-text {
    pointer-events: none;
}

/* ──────────────────────────────────────────────────────────────────────────
   SECTION 2. 중앙 브랜드 LOGO
   ────────────────────────────────────────────────────────────────────────── */
.logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
}

.logo a {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo-text {
    font-size: 1.7rem;
    font-family: "Times New Roman", Times, "Batang", serif;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #111111;
}

/* ──────────────────────────────────────────────────────────────────────────
   SECTION 3. 우측 Login / Cart
   ────────────────────────────────────────────────────────────────────────── */
.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-util-link {
    font-size: 0.9rem;
    font-weight: 400;
    color: #111111;
    text-decoration: none;
    letter-spacing: 0.05em;
    transition: opacity 0.25s ease;
}

.nav-util-link:hover {
    opacity: 0.5;
}

/* ──────────────────────────────────────────────────────────────────────────
   SECTION 4. 풀스크린 오버레이 사이드 내비게이션
   ────────────────────────────────────────────────────────────────────────── */
.side_menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: #ffffff;
    color: #111111;
    z-index: 1200;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
}

#menu-toggle:checked ~ .side_menu {
    opacity: 1;
    visibility: visible;
}

.side_menu_menu {
    max-width: 87.5rem;
    margin: 0 auto;
    padding: 8rem 2.5rem 5rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4rem;
    text-align: left;
    box-sizing: border-box;
}

.menu_group {
    margin-bottom: 2.5rem;
}

/* details 기본 화살표 마커 제거 */
.menu_title {
    font-family: 'Jost', sans-serif !important;
    font-size: 1.35rem !important;
    font-weight: 700 !important;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #111111;
    color: #111111 !important;
    letter-spacing: 0.04em;
    list-style: none;
    cursor: default;
    user-select: none;
}

.menu_title::-webkit-details-marker {
    display: none;
}

.menu_sub_links {
    display: flex;
    flex-direction: column;
}

.menu_group a {
    display: block;
    font-size: 1.05rem;
    font-weight: 400;
    margin: 0.85rem 0;
    color: #555555;
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
}

.menu_group a:hover {
    color: #111111;
    transform: translateX(4px);
}

.auth_group {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
}

.auth_group .auth_link {
    font-size: 1.1rem;
    font-weight: 500;
    color: #111111;
}

/* ==========================================================================
   RESPONSIVE (반응형 5단계 규격)
   ========================================================================== */

/* ── 1. 와이드 모니터 대역 (Min 1440px) ── */
@media (min-width: 1440px) {
    .navbar {
        padding: 0 3.5rem;
    }
    .side_menu_menu {
        max-width: 1400px;
        gap: 6.25rem;
    }
}

/* ── 2. 슬림형 데스크톱 및 랩톱 (1024px ~ 1439px) ── */
@media (max-width: 1439px) and (min-width: 1024px) {
    .navbar {
        padding: 0 2.5rem;
    }
    .side_menu_menu {
        max-width: 1200px;
        gap: 4rem;
        padding-top: 7.5rem;
    }
    .menu_title {
        font-size: 1.2rem !important;
    }
    .menu_group a {
        font-size: 1rem;
    }
}

/* ── 3. 태블릿 패널 (768px ~ 1023px) ── */
@media (max-width: 1023px) and (min-width: 768px) {
    .site-header {
        height: 4.2rem;
    }
    .navbar {
        padding: 0 2rem;
    }
    .logo-text {
        font-size: 1.5rem;
    }
    .nav-right {
        gap: 1.1rem;
    }
    .nav-util-link {
        font-size: 0.86rem;
    }
    .side_menu_menu {
        grid-template-columns: repeat(3, 1fr);
        gap: 3rem;
        padding-top: 6.5rem;
    }
    .menu_title {
        font-size: 1.15rem !important;
    }
    .menu_group a {
        font-size: 0.95rem;
    }
}

@media (max-width: 768px) {
    .nav-right a[href="/auth/logout"] {
        display: none !important;
    }
    .nav-right {
        gap: 0.8rem;
    }
    .side_menu .auth_group a[href="/auth/logout"] {
        display: inline-block !important;
    }
}

/* ── 4. 대형 모바일 & 미니 태블릿 (480px ~ 767px) ── */
@media (max-width: 767px) and (min-width: 480px) {
    .site-header {
        height: 4rem;
    }
    .navbar {
        padding: 0 1.5rem;
    }
    .logo-text {
        font-size: 1.35rem;
    }
    .btn-menu-label {
        font-size: 0.85rem;
    }
    .nav-right {
        gap: 0.8rem;
    }
    .nav-util-link {
        font-size: 0.82rem;
    }
    .side_menu {
        height: 100dvh;
    }
    .side_menu_menu {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.2rem 1.5rem;
        padding: 6rem 1.8rem 4rem;
    }
    .menu_title {
        font-size: 1.05rem !important;
        margin-bottom: 0.8rem;
        padding-bottom: 0.5rem;
    }
    .menu_group a {
        font-size: 0.92rem;
        margin: 0.5rem 0;
    }
    .auth_group {
        grid-column: 1 / -1;
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1.2rem;
        margin-top: 1rem;
        padding-top: 1.5rem;
        border-top: 1px solid rgba(0, 0, 0, 0.08);
    }
    .auth_group .auth_link {
        font-size: 0.95rem;
    }
}

/* ── 5. 모바일 전용 아코디언 토글 (Max 479px) ── */
@media (max-width: 479px) {
    .site-header {
        height: 3.8rem;
    }
    .navbar {
        padding: 0 1.25rem;
    }
    .btn-menu-label {
        font-size: 0.82rem;
        padding: 0.6rem 0.8rem 0.6rem 0;
    }
    .logo-text {
        font-size: 1.22rem;
        letter-spacing: 0.04em;
    }
    .nav-right {
        gap: 0.6rem;
    }
    .nav-util-link {
        font-size: 0.76rem;
        letter-spacing: 0.02em;
    }

    .side_menu {
        height: 100dvh;
        background: #ffffff !important;
    }

    .side_menu_menu {
        grid-template-columns: 1fr !important;
        gap: 0 !important;
        padding: 4.8rem 1.25rem 3.5rem !important;
    }

    .menu_group {
        margin-bottom: 0 !important;
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
        padding: 0 !important;
    }

    .menu_title {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        font-size: 1.05rem !important;
        font-weight: 700 !important;
        color: #111111 !important;
        cursor: pointer !important;
        margin-bottom: 0 !important;
        padding: 1.1rem 0 !important;
        border-bottom: none !important;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
    }

    .menu_title::after {
        content: "＋" !important;
        font-size: 1.1rem !important;
        font-weight: 400;
        color: #111111;
        transition: transform 0.2s ease;
    }

    details.menu_group[open] > summary.menu_title::after {
        content: "－" !important;
    }

    .menu_sub_links {
        padding-bottom: 0.8rem;
    }

    .menu_group a {
        font-size: 0.95rem !important;
        font-weight: 400;
        margin: 0 !important;
        padding: 0.55rem 0 0.55rem 0.4rem !important;
        color: #666666 !important;
    }

    .auth_group {
        border-bottom: none !important;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 1rem 1.5rem !important;
        padding-top: 1.5rem !important;
        margin-top: 0.5rem !important;
    }

    .auth_group a {
        display: inline-block !important;
        padding: 0 !important;
        font-size: 0.9rem !important;
        font-weight: 600 !important;
        color: #111111 !important;
    }
}

/* ── 6. 초소형 스마트폰 (Max 360px) ── */
@media (max-width: 360px) {
    .site-header {
        height: 3.5rem;
    }
    .navbar {
        padding: 0 0.8rem;
    }
    .btn-menu-label {
        font-size: 0.72rem;
    }
    .logo-text {
        font-size: 1.1rem;
    }
    .nav-right {
        gap: 0.6rem;
    }
    .nav-util-link {
        font-size: 0.78rem;
    }
    .side_menu_menu {
        padding-top: 4.2rem !important;
    }
}