/* 기본 리셋 및 기본 스타일 */
.pm-header, .pm-header * {
    box-sizing: border-box;
}

/* 헤더 기본 스타일 */
.pm-header {
    background: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 100;
}

.pm-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

.pm-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

/* 로고 스타일 */
.pm-logo {
    margin-top: 10px;
    flex-shrink: 0;
}

.pm-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.pm-logo-img {
    height: 30px;
}

/* 우측 섹션 */
.pm-right-section {
    display: flex;
    align-items: center;
    gap: 24px;
}

/* 데스크톱 네비게이션 */
.pm-nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

.pm-menu-item {
    position: relative;
}

.pm-menu-link {
    color: #374151;
    text-decoration: none;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.2s;
    display: flex;
    align-items: center;
}

.pm-menu-link:hover {
    color: #667eea;
}

/* 메가메뉴 스타일 */
.pm-megamenu {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    width: 100vw;
    background: white;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-top: 1px solid #e5e7eb;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.pm-megamenu.pm-show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.pm-megamenu-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 60px;
    align-items: start;
}

/* 메가메뉴 좌측 Product 영역 */
.pm-megamenu-product {
    padding: 0;
    color: #374151;
}

.pm-megamenu-product-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 24px 0;
    color: #111827;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 12px;
}

.pm-product-item {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f3f4f6;
}

.pm-product-item:last-child {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.pm-product-name {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #667eea;
}

.pm-product-desc {
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
    color: #6b7280;
}

/* 메가메뉴 우측 메뉴 영역 */
.pm-megamenu-menus {
    display: flex;
    flex-wrap: nowrap;
    gap: 40px;
    align-items: flex-start;
    width: 100%;
}

.pm-megamenu-column {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
}

.pm-megamenu-title {
    margin-bottom: 20px;
}

.pm-megamenu-title a {
    color: #111827;
    text-decoration: none;
    font-size: 16px;
    font-weight: 700;
    transition: color 0.2s;
    position: relative;
}

.pm-megamenu-title a:hover {
    color: #667eea;
}

.pm-megamenu-title a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #667eea;
    transition: width 0.3s ease;
}

.pm-megamenu-title a:hover::after {
    width: 100%;
}

.pm-megamenu-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.pm-megamenu-list li {
    margin-bottom: 8px;
}

.pm-megamenu-list a {
    color: #6b7280;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    display: block;
    padding: 8px 0;
    position: relative;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pm-megamenu-list a:hover {
    color: #667eea;
    padding-left: 12px;
}

.pm-megamenu-list a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 1px;
    background: #667eea;
    transition: width 0.3s ease;
}

.pm-megamenu-list a:hover::before {
    width: 8px;
}

/* 나의 서비스 관리 버튼 */
.pm-service-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    background: #667eea;
    color: white;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    border: 2px solid #667eea;
    border-radius: 8px;
    transition: all 0.2s;
    white-space: nowrap;
}

.pm-service-btn:hover {
    background: #5a67d8;
    border-color: #5a67d8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* 아이콘 버튼들 */
.pm-icon-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pm-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: #000000;
    text-decoration: none;
    transition: all 0.2s;
    border-radius: 8px;
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
}

.pm-icon-btn:hover {
    color: #374151;
    background-color: rgba(0, 0, 0, 0.05);
}

.pm-icon {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* 포인트 버튼 (텍스트 포함) */
.pm-point-btn {
    width: auto;
    padding: 0 12px;
    gap: 6px;
}

.pm-point-text {
    font-size: 12px;
    font-weight: 600;
    color: inherit;
}

.pm-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* 모바일 토글 버튼 */
.pm-mobile-toggle {
    display: block;
}

.pm-hamburger {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
}

.pm-hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: #374151;
    margin-bottom: 4px;
    transition: all 0.3s ease;
}

.pm-hamburger span:last-child {
    margin-bottom: 0;
}

.pm-hamburger.pm-active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.pm-hamburger.pm-active span:nth-child(2) {
    opacity: 0;
}

.pm-hamburger.pm-active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* 모바일 메뉴 */
.pm-mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: white;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    overflow-y: auto;
}

.pm-mobile-menu.pm-open {
    opacity: 1;
    visibility: visible;
}

.pm-mobile-inner {
    padding: 80px 20px 20px;
    min-height: 100vh;
    position: relative;
}

/* 모바일 메뉴 닫기 버튼 */
.pm-mobile-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    z-index: 10000;
}

.pm-mobile-close span {
    display: block;
    width: 24px;
    height: 2px;
    background: #374151;
    transition: all 0.3s ease;
    margin-bottom: 4px;
}

.pm-mobile-close span:last-child {
    margin-bottom: 0;
}

.pm-mobile-close span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.pm-mobile-close span:nth-child(2) {
    opacity: 0;
}

.pm-mobile-close span:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
}

.pm-mobile-menu-item {
    margin-bottom: 8px;
}

.pm-mobile-menu-btn {
    width: 100%;
    text-align: left;
    color: #374151;
    background: none;
    border: none;
    padding: 16px 20px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 12px;
}

.pm-mobile-menu-btn:hover {
    color: #667eea;
    background-color: #f8fafc;
}

.pm-mobile-menu-link {
    display: block;
    color: #374151;
    text-decoration: none;
    padding: 16px 20px;
    font-size: 18px;
    font-weight: 600;
    transition: all 0.2s;
    border-radius: 12px;
}

.pm-mobile-menu-link:hover {
    color: #667eea;
    background-color: #f8fafc;
}

.pm-mobile-arrow {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.2s;
}

.pm-mobile-arrow.pm-rotated {
    transform: rotate(180deg);
}

.pm-mobile-submenu {
    display: none;
    padding-left: 20px;
    margin-top: 8px;
}

.pm-mobile-submenu.pm-show {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pm-mobile-submenu-item {
    display: block;
    color: #6b7280;
    text-decoration: none;
    padding: 12px 16px;
    font-size: 16px;
    transition: all 0.2s;
    border-radius: 8px;
    margin-bottom: 4px;
}

.pm-mobile-submenu-item:hover {
    color: #667eea;
    background-color: #f1f5f9;
}

/* 모바일 인증 영역 */
.pm-mobile-auth {
    border-top: 2px solid #f1f5f9;
    padding-top: 24px;
    margin-top: 32px;
}

.pm-mobile-user-info {
    padding: 16px 20px;
    background: #f8fafc;
    margin-bottom: 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.pm-mobile-user-details {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pm-mobile-username {
    color: #374151;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
}

.pm-mobile-points {
    color: #6b7280;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    background: #e5e7eb;
    padding: 4px 12px;
    border-radius: 20px;
}

.pm-mobile-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 0 20px;
    margin-bottom: 24px;
}

.pm-mobile-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #6b7280;
    text-decoration: none;
    transition: all 0.2s;
    position: relative;
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
}

.pm-mobile-action:hover {
    color: #667eea;
    background: #eff6ff;
    transform: translateY(-2px);
}

.pm-mobile-icon {
    width: 28px;
    height: 28px;
    margin-bottom: 8px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pm-mobile-action span {
    font-size: 14px;
    font-weight: 500;
}

.pm-mobile-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.pm-mobile-buttons {
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pm-mobile-service-btn {
    background: #667eea;
    color: white;
    text-decoration: none;
    padding: 16px 20px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    transition: all 0.2s;
    display: block;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    border: 2px solid #667eea;
}

.pm-mobile-service-btn:hover {
    background: #5a67d8;
    border-color: #5a67d8;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.pm-mobile-primary-btn {
    background: linear-gradient(135deg, #667eea 0%, #1d4ed8 100%);
    color: white;
    text-decoration: none;
    padding: 16px 20px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    transition: all 0.2s;
    display: block;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.pm-mobile-primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.pm-mobile-secondary-btn {
    color: #374151;
    text-decoration: none;
    padding: 16px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-weight: 600;
    text-align: center;
    transition: all 0.2s;
    display: block;
    background: white;
}

.pm-mobile-secondary-btn:hover {
    color: #667eea;
    border-color: #667eea;
    background: #f8fafc;
    transform: translateY(-1px);
}

/* 그누보드 새글 아이콘 스타일 */
.pm-header .new_icon {
    display: inline-block;
    margin-left: 4px;
}

/* 태블릿 반응형 */
@media (max-width: 1024px) {
    .pm-megamenu-container {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 30px 20px;
    }
    
    .pm-megamenu-product {
        order: 2;
    }
    
    .pm-megamenu-menus {
        order: 1;
        gap: 30px;
    }
    
    .pm-megamenu-column {
        min-width: 140px;
    }
}

/* 모바일에서만 표시 */
@media (max-width: 1023px) {
    .pm-nav {
        display: none;
    }
    
    .pm-icon-buttons {
        display: none;
    }
    
    .pm-mobile-toggle {
        display: block;
    }
    
    .pm-mobile-menu {
        display: block;
    }
    
    .pm-megamenu {
        display: none !important;
    }
}

/* 데스크톱에서 표시 */
@media (min-width: 1024px) {
    .pm-nav {
        display: flex !important;
    }
    
    .pm-icon-buttons {
        display: flex !important;
    }
    
    .pm-mobile-toggle {
        display: none !important;
    }
    
    .pm-mobile-menu {
        display: none !important;
    }
}