/* 새로운 범용 메뉴 스타일 */

a {
    text-decoration: none;
    color: inherit;
    display: flex;
}

.header-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    margin: auto;
    width: 100%;
    background-color: white;
    z-index: 999;
    font-family: 'Pretendard', 'Noto Sans KR', Arial, sans-serif;
    font-weight: 700;
    letter-spacing: 0.02em;
    border-bottom: 1px solid hsl(0, 0%, 89.8%);
    /* 하단 테두리 추가 */


    .header-content {
        display: flex;
        height: 64px;
        align-items: center;
        padding-left: 16px;
        padding-right: 16px;
        margin-left: auto;
        margin-right: auto;
        width: 100%;
        max-width: 1400px;
    }

    .header-logo {
        flex-shrink: 0;
        margin-right: 32px;

        a {
            display: flex;
            align-items: center;

            img {
                height: 32px;
            }
        }
    }
}

.nav-menu {
    display: flex;
    flex: 1 1 0%;
    gap: 32px;
    align-items: center;
    height: 100%;
    z-index: 1210;

    /* a {
        display: flex;
        align-items: center;
        font-size: 1.125rem;
        font-weight: bold;
        height: 64px;
        text-decoration: none;
        color: inherit;
    } */
}

.icon-button {
    position: relative;
}

.cart-count-badge {
    position: absolute;
    top: 6px;
    right: 4px;
    background-color: #8A2BE2;
    color: white;
    font-size: 10px;
    font-weight: bold;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
}

.mobile-nav-menu {
    /* border: 1px solid red; */
}

.clothing-menu {
    position: relative;
    height: 100%;
}

.clothing-trigger {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 1.125rem;
    line-height: 1.75rem;
    font-weight: bold;
    height: 64px;
    cursor: pointer;
}

.dropdown-menu {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    width: 100%;
    background: #fff;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.10);
    border-top: 1px solid #e5e7eb;
    z-index: 999;
    display: none;
}

.dropdown-content {
    max-width: 1400px;
    padding: 2rem;
    margin: 0 auto;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 48px;
}

.category-section {
    display: flex;
    flex-direction: column;
}

.category-title {
    font-size: 1rem;
    color: #000;
    margin-bottom: 1rem;
}

.category-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.category-link {
    font-size: 0.875rem;
    color: #4b5563;
    display: block;
    padding-top: 4px;
    padding-bottom: 4px;
    text-decoration: none;
    transition: color 0.15s;
    cursor: pointer;
    font-weight: 400;
}

.category-link:hover {
    color: #000;
}

.bottom-categories {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 48px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.icon-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;

    .icon-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background: none;
        border: none;
        border-radius: 8px;
        font-size: 1rem;
        cursor: pointer;
        transition: background 0.15s;
    }

    .icon-button:hover {
        background-color: #f3f4f6;
        color: #374151;
    }

    .icon-button:focus-visible {
        outline: 2px solid #3b82f6;
        outline-offset: 2px;
    }
}


/* 모바일 미디어쿼리 (767px 이하) */
@media all and (max-width: 767px) {
    .nav-menu {
        display: none;
        /* 모바일에서는 nav-menu 숨김 */
    }
}

/* 태블릿 미디어쿼리 (768px 이상) */
@media all and (min-width: 768px) {
    .header-container {
        .header-content {
            padding-left: 24px;
            padding-right: 24px;
        }
    }


    .nav-menu {
        display: flex;
        /* 태블릿에서는 nav-menu 표시 */
    }

    .mobile-nav-menu {
        display: none;
    }

    /* 태블릿에서 드롭다운 메뉴 조정 */
    .dropdown-menu {
        width: 100vw;
        left: 50%;
        transform: translateX(-50%);
    }

    .dropdown-content {
        padding: 2rem;
    }

    .category-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 32px;
    }

    .bottom-categories {
        grid-template-columns: repeat(5, 1fr);
        gap: 32px;
    }
}

/* 데스크톱 미디어쿼리 (1280px 이상) */
@media all and (min-width: 1280px) {
    .header-container {
        .header-content {
            padding-left: 24px;
            padding-right: 24px;
        }
    }

    .nav-menu {
        display: flex;
        /* 데스크톱에서는 nav-menu 표시 */
    }

    .icon-menu {
        gap: 1rem;
    }

    .dropdown-content {
        padding: 2rem;
    }

    .category-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 48px;
    }

    .bottom-categories {
        grid-template-columns: repeat(5, 1fr);
        gap: 48px;
    }
}
