.category-tabs {
    display: flex;
    gap: 40px;
}

.category-group {
    position: relative;
    display: flex;
    flex-direction: column;
    padding-bottom: 16px;
}

.category-tab {
    font-size: 18px;
    font-weight: 600;
    color: #343a40;
    cursor: pointer;
    position: relative;
    padding: 6px 0;
    transition: color 0.2s ease-in-out;
}

.category-tab::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0%;
    height: 2px;
    background-color: #1c7ed6;
    transition: width 0.3s ease-in-out;
}

.category-tab:hover::after {
    width: 100%;
}

.category-tab:hover {
    color: #1c7ed6;
}

.category-list {
    display: grid;
    grid-auto-flow: column; /* 열 우선 정렬 */
    grid-template-rows: repeat(10, auto); /* 10개씩 끊어서 한 열 구성 */
    gap: 4px 24px; /* 항목 간 간격 */

    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    position: absolute;
    top: 36px;
    left: 0;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 10px;
    padding: 12px 16px;
    z-index: 1;
    max-height: none; /* 높이 제한 해제 */
    overflow: visible; /* 스크롤 제거 */
    min-width: max-content;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    pointer-events: none;
}

.category-group:hover .category-list,
.category-group:focus-within .category-list {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.category-item {
    display: block;
    font-size: 15px;
    padding: 6px 8px;
    text-decoration: none;
    color: #333;
    border-radius: 4px;
    transition: background-color 0.2s ease, color 0.2s ease;
    white-space: nowrap;
    border-bottom: 1px solid #e9ecef;
}

.category-item:hover {
    background-color: #f1f3f5;
    color: #1c7ed6;
}

.category-item:last-child {
    border-bottom: none;
}

.category-tab {
    font-weight: bold;
    padding-bottom: 4px;
    border-bottom: 2px solid #000;
    font-size: 16px;
}