/**
 * 사용자 페이지 헤더 스타일
 */

/* 헤더 */
.user-header {
    background-color: #1a1a1a;
    color: #fff;
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
}

/* 가로 스크롤 핀 구간에서 헤더 숨김 */
.user-header.is-hidden {
    transform: translateY(-110%);
    opacity: 0;
    pointer-events: none;
}


/* 메인페이지에서만 투명하게 시작 (서브메뉴가 열리지 않을 때만 투명) */
.user-header.is-home:not(.has-submenu-open) {
    background-color: transparent;
    box-shadow: none;
}

/* 스크롤 시 헤더 배경색 자연스럽게 표시 (데스크톱) */
.user-header.is-home.scrolled:not(.has-submenu-open) {
    background-color: #1a1a1a !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
}

/* 데스크톱에서 명시적으로 스크롤 시 배경색 적용 */
@media (min-width: 768px) {
    .user-header.is-home.scrolled:not(.has-submenu-open) {
        background-color: #1a1a1a !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    }
}

/* 모바일에서는 헤더를 항상 보이게 (투명 효과 제거) */
@media (max-width: 767px) {
    .user-header.is-home:not(.has-submenu-open) {
        background-color: #1a1a1a;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }
}

/* 메뉴 호버 시 오버레이와 헤더 색상 변경 (더 높은 우선순위) */
.user-header.is-home.has-submenu-open {
    background-color: #1a1a1a !important;
    box-shadow: none !important;
    /* sticky 유지하여 서브메뉴가 다른 섹션 위에 표시되도록 */
    position: sticky;
    z-index: 1001;
}

/* 흰색 헤더 스타일 (test, board/list, guide 페이지) */
.user-header.is-white-header {
    background-color: #ffffff !important;
    color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.user-header.is-white-header .user-nav a {
    color: #333;
    text-shadow: none;
}

.user-header.is-white-header .user-nav a:hover {
    color: #333;
}

.user-header.is-white-header .user-nav a.active {
    color: #333;
}

.user-header.is-white-header .user-nav a::after {
    background-color: #333;
}

.user-header.is-white-header .submenu-container {
    background-color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.user-header.is-white-header.has-submenu-open .submenu-container {
    background-color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.user-header.is-white-header .submenu-list a {
    color: #666;
}

.user-header.is-white-header .submenu-list a:hover {
    color: #333;
    background-color: rgba(0, 0, 0, 0.05);
}

.user-header.is-white-header .submenu-list a.active {
    color: #333;
}

.user-header.is-white-header .submenu-list a.active::after {
    background-color: #333;
}

.user-header.is-white-header .user-logo a {
    color: #333;
    text-shadow: none;
}

.user-header.is-white-header .login-btn {
    color: #333;
    border-color: #333;
}

.user-header.is-white-header .login-btn:hover {
    background-color: #333;
    color: #fff;
}

.user-header.is-white-header .user-icon-btn {
    color: #333;
}

.user-header.is-white-header .user-icon-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: #333;
}

/* 오버레이를 항상 존재시키고 opacity로 전환 */
.user-header.is-home::before {
    content: '';
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    height: calc(100% - var(--header-height));
    background-color: rgba(0, 0, 0, 0);
    z-index: 1000;
    pointer-events: none;
    transition: background-color 0.3s ease;
}

.user-header.is-home.has-submenu-open::before {
    background-color: rgba(0, 0, 0, 0.5);
}

.user-header-inner {
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 85px;
}

/* 로고 */
.user-logo {
    margin: 0;
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    flex-shrink: 0;
}

.user-logo a {
    color: #fff;
    text-decoration: none;
    transition: opacity 0.3s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    display: inline-block;
    line-height: 0;
}

.user-logo a:hover {
    opacity: 0.8;
}

.user-logo img {
    height: 200px;
    width: auto;
    display: block;
    margin-top: 8px;
}

/* 네비게이션 메뉴 */
.user-nav {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.user-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 0;
    align-items: center;
}

.user-nav li {
    position: relative;
}

/* 서브메뉴가 있는 메뉴 */
.user-nav li.has-submenu {
    position: relative;
}

.user-nav li.has-submenu > a {
    position: relative;
}

/* 서브메뉴 드롭다운 (기존 개별 메뉴용 - 완전히 숨김) */
.submenu {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* 통합 서브메뉴 컨테이너 */
.submenu-container {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #1a1a1a;
    border-top: none;
    box-shadow: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease, height 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1002;
    overflow: hidden;
    pointer-events: none;
    height: 0;
    padding: 0;
}

.user-header.has-submenu-open .submenu-container {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    height: 240px; /* 서브메뉴(4개) 기준 충분한 높이 */
    padding: 1.5rem 0;
    background-color: #1a1a1a;
    box-shadow: none;
}

/* JS가 실패해도: 네비게이션에 호버하면 서브메뉴가 열리도록 CSS로 보장 */
.user-nav:hover + .submenu-container,
.submenu-container:hover {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    height: 240px;
    padding: 1.5rem 0;
}

/* PC에서 li 내부의 submenu-group 숨김 (submenu-container 내부의 것만 표시) */
.user-nav li.has-submenu > .submenu-group {
    display: none;
}

/* submenu-container 내부의 submenu-group만 PC에서 표시 */
.submenu-container .submenu-group {
    position: absolute;
    top: 0;
    background-color: transparent;
    padding: 0;
    min-width: 150px;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.25s ease 0.1s, transform 0.25s ease 0.1s, left 0.2s ease;
}

/* 서브메뉴 열릴 때 그룹 표시 */
.user-header.has-submenu-open .submenu-container .submenu-group {
    opacity: 1;
    transform: translateY(0);
}

.submenu-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.submenu-list li {
    margin: 0;
    opacity: 0;
    transform: translateY(-5px);
    transition: opacity 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}

/* 서브메뉴 열릴 때 아이템들 순차 등장 */
.user-header.has-submenu-open .submenu-list li {
    opacity: 1;
    transform: translateY(0);
}

.user-header.has-submenu-open .submenu-list li:nth-child(1) { transition-delay: 0.05s; }
.user-header.has-submenu-open .submenu-list li:nth-child(2) { transition-delay: 0.1s; }
.user-header.has-submenu-open .submenu-list li:nth-child(3) { transition-delay: 0.15s; }
.user-header.has-submenu-open .submenu-list li:nth-child(4) { transition-delay: 0.2s; }

.submenu-list a {
    color: #ccc;
    padding: 0.75rem 1.5rem;
    display: block;
    font-size: 1rem;
    transition: color 0.2s ease, background-color 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.submenu-list a:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.05);
}

.submenu-list a.active {
    color: #fff;
    font-weight: 600;
    position: relative;
}

.submenu-list a.active::after {
    content: '';
    position: absolute;
    bottom: 0.5rem;
    left: 1.5rem;
    width: calc(100% - 3rem);
    height: 2px;
    background-color: #fff;
}

.user-nav a {
    color: #fff;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    letter-spacing: -0.01em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.user-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 2px;
    background-color: #fff;
    transition: transform 0.3s ease;
}

.user-nav a:hover {
    color: #fff;
    opacity: 0.9;
}

.user-nav a:hover::after {
    transform: translateX(-50%) scaleX(1);
}

.user-nav a.active {
    color: #fff;
    font-weight: 500;
}

.user-nav a.active::after {
    transform: translateX(-50%) scaleX(1);
}

/* 우측 액션 버튼들 */
.user-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-shrink: 0;
    margin-left: 2rem;
}

/* 장바구니 버튼 */
.cart-btn {
    position: relative;
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.3s ease;
    background-color: transparent;
}

.cart-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.cart-btn svg {
    width: 20px;
    height: 20px;
}

.cart-count {
    position: absolute;
    top: -2px;
    right: -2px;
    background-color: #ff4444;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 사용자 이름 */
.user-name {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 400;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* 로그인 버튼 */
.login-btn {
    padding: 0.6rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background-color: transparent;
    color: #fff;
    letter-spacing: -0.01em;
}

.login-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

/* 사용자 메뉴 */
.user-menu-wrapper {
    position: relative;
}

.user-icon-btn {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.3s ease;
    padding: 0;
}

.user-icon-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.user-icon-btn svg {
    width: 24px;
    height: 24px;
}

/* 사용자 드롭다운 메뉴 */
.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 10000;
}

.user-menu-wrapper.active .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown .user-info {
    padding: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.user-name-text {
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
}

.user-menu-list {
    list-style: none;
    margin: 0;
    padding: 0.5rem 0;
}

.user-menu-item {
    display: block;
    padding: 0.75rem 1rem;
    color: #333;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background-color 0.2s ease;
}

.user-menu-item:hover {
    background-color: #f5f5f5;
    color: #007bff;
}

/* 디바이스별 반응형 디자인 */
/* 태블릿 가로 (1024px ~ 1199px) */
@media (max-width: 1199px) {
    .user-header-inner {
        padding: 0 1.5rem;
    }
    
    .user-logo img {
        height: 180px;
    }
    
    .user-nav a {
        font-size: 1.1rem;
        padding: 0.7rem 1.1rem;
        white-space: nowrap;
    }
    
    .user-actions {
        gap: 1.25rem;
    }
}

/* 태블릿 세로 (768px ~ 1023px) */
@media (max-width: 1023px) {
    .user-header-inner {
        padding: 0 1.25rem;
        height: 65px;
        gap: 0.5rem;
    }
    
    .user-logo {
        font-size: 1.65rem;
        flex-shrink: 1;
        min-width: 0;
    }
    
    .user-logo a {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: block;
        max-width: 100%;
    }
    
    .user-logo img {
        height: 150px;
    }
    
    .user-nav {
        flex-shrink: 1;
        min-width: 0;
    }
    
    .user-nav a {
        font-size: 0.95rem;
        padding: 0.65rem 0.9rem;
        white-space: nowrap;
    }
    
    .user-actions {
        gap: 1rem;
        margin-left: 0.75rem;
        flex-shrink: 0;
    }
    
    .submenu-container {
        height: 220px;
    }
    
    .user-header.has-submenu-open .submenu-container {
        height: 220px;
    }
}

/* 햄버거 버튼 */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    position: relative;
    flex-shrink: 0;
    order: -1; /* 제일 왼쪽에 배치 */
}

.mobile-menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: #fff;
    border-radius: 2px;
    transform-origin: center;
}

.user-header.is-white-header .mobile-menu-toggle span {
    background-color: #333;
}

/* 모바일 메뉴 오버레이 */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.user-header.mobile-menu-open .mobile-menu-overlay {
    opacity: 1;
    visibility: visible;
}

/* 모바일 중형 (480px ~ 767px) */
@media (max-width: 767px) {
    .user-header {
        position: sticky;
        top: 0;
        z-index: 1000;
        background-color: #1a1a1a;
        transition: background-color 0.3s ease;
    }
    
    .user-header.is-home {
        background-color: transparent;
    }
    
    .user-header.is-home.scrolled {
        background-color: #1a1a1a;
    }
    
    .user-header-inner {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        height: 60px;
        padding: 0 0.75rem;
        gap: 0.5rem;
        position: relative;
        min-width: 0; /* flexbox 오버플로우 방지 */
    }
    
    .mobile-menu-toggle {
        display: flex;
        order: -1; /* 제일 왼쪽에 배치 */
        flex: 0 0 32px;
        width: 32px;
        min-width: 32px;
        z-index: 1;
    }
    
    .user-logo {
        font-size: 1.4rem;
        flex-shrink: 1;
        order: 0;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        max-width: calc(100% - 120px); /* 좌우 버튼 공간 확보 */
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        z-index: 0;
    }
    
    .user-logo a {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .user-logo img {
        height: 200px;
        max-width: 100%;
    }
    
    .user-actions {
        order: 1;
        flex: 0 0 auto;
        margin-left: auto;
        min-width: fit-content;
        z-index: 1;
    }
    
    
    .user-nav {
        position: fixed;
        top: 60px;
        left: 0;
        width: 280px;
        height: calc(100vh - 60px);
        background-color: #1a1a1a;
        transform: translateX(-100%);
        z-index: 999;
        overflow-y: auto;
        padding: 0;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
    }
    
    /* 흰색 헤더 페이지에서 모바일 메뉴 배경색 */
    .user-header.is-white-header .user-nav {
        background-color: #ffffff;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }
    
    .user-header.is-white-header .user-nav a {
        color: #333;
    }
    
    .user-header.is-white-header .user-nav li {
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    .user-header.is-white-header .user-nav li.has-submenu.active {
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    .user-header.is-white-header .user-nav li.has-submenu > a {
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    .user-header.is-white-header .user-nav li.has-submenu > .submenu-group {
        background: rgba(0, 0, 0, 0.05);
    }
    
    .user-header.is-white-header .submenu-list li {
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }
    
    .user-header.is-white-header .submenu-list li:first-child {
        border-top: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    .user-header.is-white-header .submenu-list a {
        color: #666;
    }
    
    .user-header.is-white-header .submenu-list a:hover {
        background-color: rgba(0, 0, 0, 0.05);
        color: #333;
    }
    
    .user-nav ul {
        min-width: 0; /* flexbox 오버플로우 방지 */
    }
    
    .user-header.mobile-menu-open .user-nav {
        transform: translateX(0);
    }
    
    /* 흰색 헤더 페이지에서 모바일 메뉴 열렸을 때 배경색 유지 */
    .user-header.is-white-header.mobile-menu-open .user-nav {
        background-color: #ffffff;
    }
    
    .user-nav ul {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        width: 100%;
        margin: 0;
        padding: 0;
        list-style: none;
        flex-shrink: 0;
    }
    
    .user-nav li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .user-nav li.has-submenu {
        border-bottom: none;
    }
    
    .user-nav li.has-submenu.active {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .user-nav a {
        display: block;
        padding: 0.875rem 1.25rem;
        font-size: 0.95rem;
        width: 100%;
        text-align: left;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .user-nav a::after {
        display: none;
    }
    
    .user-nav li.has-submenu > a {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding-right: 2.5rem; /* 화살표 공간 확보 */
        padding-left: 1.25rem;
    }
    
    .user-nav li.has-submenu > a::after {
        content: '▲';
        position: absolute;
        right: 1.5rem;
        top: 50%;
        transform: translateY(-50%);
        font-size: 0.7rem;
        transition: transform 0.3s ease;
    }
    
    .user-nav li.has-submenu.active > a::after {
        transform: rotate(180deg);
    }
    
    .user-actions {
        gap: 0.5rem;
        margin-left: 0;
        flex-shrink: 0;
    }
    
    .cart-btn,
    .user-icon-btn {
        width: 36px;
        height: 36px;
        flex-shrink: 0;
    }
    
    .cart-btn svg,
    .user-icon-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .login-btn {
        padding: 0.5rem 0.875rem;
        font-size: 0.8rem;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .user-name {
        font-size: 0.85rem;
    }
    
    .submenu-container {
        display: none; /* 모바일에서는 데스크톱 서브메뉴 컨테이너 숨김 */
    }
    
    /* 모바일에서 서브메뉴를 li 내부에 배치 */
    .user-nav li.has-submenu {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }
    
    .user-nav li.has-submenu > a {
        order: 1; /* 메뉴 링크를 위쪽에 배치 */
        flex-shrink: 0;
    }
    
    /* 모바일에서만 li 내부의 submenu-group 표시 */
    .user-nav li.has-submenu > .submenu-group {
        display: block;
        position: static;
        background: rgba(0, 0, 0, 0.3);
        padding: 0;
        min-width: auto;
        width: 100%;
        order: 2; /* 서브메뉴를 아래쪽에 배치 */
        flex-shrink: 0;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transform: none; /* PC 애니메이션 무효화 */
        transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
    }
    
    .user-nav li.has-submenu.active .submenu-group {
        max-height: 500px;
        opacity: 1;
        padding: 0;
    }
    
    .submenu-list {
        padding: 0;
        margin: 0;
        list-style: none;
    }
    
    .submenu-list li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        /* 모바일에서는 PC 애니메이션 무효화 */
        opacity: 1;
        transform: none;
        transition: background-color 0.2s ease;
    }
    
    .submenu-list li:first-child {
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .submenu-list a {
        display: block;
        padding: 0.875rem 1.5rem 0.875rem 3rem;
        font-size: 0.95rem;
        color: rgba(255, 255, 255, 0.8);
        text-decoration: none;
        transition: background-color 0.2s ease, color 0.2s ease;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .submenu-list a:hover {
        background-color: rgba(255, 255, 255, 0.05);
        color: #fff;
    }
    
    .user-dropdown {
        min-width: 180px;
        right: -10px;
    }
    
    .mobile-menu-overlay {
        display: block;
    }
}

/* 모바일 소형 (320px ~ 479px) */
@media (max-width: 479px) {
    .user-header-inner {
        padding: 0 0.5rem;
        height: 56px;
        gap: 0.4rem;
        position: relative;
        min-width: 0;
    }
    
    .mobile-menu-toggle {
        width: 28px;
        height: 28px;
        order: -1; /* 제일 왼쪽에 배치 */
        flex: 0 0 28px;
        min-width: 28px;
        z-index: 1;
    }
    
    .user-logo {
        font-size: 1.15rem;
        order: 0;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        max-width: calc(100% - 100px); /* 좌우 버튼 공간 확보 */
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        z-index: 0;
    }
    
    .user-logo a {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .user-logo img {
        height: 120px;
        max-width: 100%;
    }
    
    .user-actions {
        order: 1;
        flex: 0 0 auto;
        margin-left: auto;
        min-width: fit-content;
        z-index: 1;
    }
    
    .mobile-menu-toggle span {
        height: 2.5px;
    }
    
    .user-nav {
        top: 56px;
        width: 260px;
        height: calc(100vh - 56px);
    }
    
    .user-nav a {
        padding: 0.875rem 1.25rem;
        font-size: 0.9rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .user-nav li.has-submenu > a {
        padding-right: 2.25rem; /* 화살표 공간 확보 */
        padding-left: 1.25rem;
    }
    
    .user-nav li.has-submenu > a::after {
        right: 1.25rem;
    }
    
    .user-actions {
        gap: 0.4rem;
        margin-left: 0;
    }
    
    .cart-btn,
    .user-icon-btn {
        width: 32px;
        height: 32px;
        flex-shrink: 0;
    }
    
    .cart-btn svg,
    .user-icon-btn svg {
        width: 16px;
        height: 16px;
    }
    
    .login-btn {
        padding: 0.45rem 0.75rem;
        font-size: 0.75rem;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .user-name {
        font-size: 0.8rem;
        display: none; /* 매우 작은 화면에서는 이름 숨김 */
    }
    
    .submenu-list a {
        padding: 0.75rem 1.25rem 0.75rem 2.5rem;
        font-size: 0.9rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .user-dropdown {
        min-width: 160px;
        right: -5px;
    }
    
    .user-dropdown .user-info {
        padding: 0.875rem;
    }
    
    .user-menu-item {
        padding: 0.65rem 0.875rem;
        font-size: 0.85rem;
    }
}


