.sd-catbrand-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 3000;
    display: none;
}
.sd-catbrand-overlay.show {
    display: block;
}

.sd-catbrand-modal {
    position: fixed;
    inset: 0;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    width: 100%;
    height: 100vh;
    background: #fff;
    border-radius: 0;
    box-shadow: 0 18px 60px rgba(0,0,0,0.25);
    z-index: 3001;
    display: none;
    overflow: hidden;
    flex-direction: column;
}
.sd-catbrand-modal.show {
    display: flex;
}

.sd-catbrand-header {
    padding: 12px 14px;
    border-bottom: 1px solid #f1f5f9;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.sd-catbrand-close {
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 6px;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sd-catbrand-tabs {
    flex: 1;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.sd-catbrand-tab {
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 8px 10px;
    font-size: 14px;
    font-weight: 900;
    color: #64748b;
    border-bottom: 2px solid transparent;
    min-width: 90px;
}

.sd-catbrand-tab.active {
    color: #8B5CF6;
    border-bottom-color: #8B5CF6;
}

.sd-catbrand-content {
    flex: 1;
    overflow: hidden; /* 전체 스크롤 대신 좌/우 패널 내부 스크롤 */
    padding: 14px;
    /* padding-bottom: 80px; */ /* 하단 네비 높이 보정 */
}

.sd-catbrand-category-layout {
    display: flex;
    gap: 10px;
    min-height: 260px;
    height: 100%;
}

.sd-catbrand-primary {
    width: 110px;
    background: #f8fafc;
    border-radius: 12px;
    padding: 6px 0;
    overflow: auto;
}

.sd-catbrand-primary-item {
    padding: 12px 8px;
    cursor: pointer;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
    transition: all 0.2s;
}

.sd-catbrand-primary-item:hover {
    background: #f1f5f9;
}

.sd-catbrand-primary-item.active {
    background: #fff;
    border-left: 3px solid #8B5CF6;
}

.sd-catbrand-primary-icon {
    font-size: 28px;
    margin-bottom: 6px;
}

.sd-catbrand-primary-name {
    font-size: 12px;
    color: #64748b;
    font-weight: 900;
    line-height: 1.2;
}

.sd-catbrand-primary-item.active .sd-catbrand-primary-name {
    color: #8B5CF6;
}

.sd-catbrand-secondary {
    flex: 1;
    background: #fff;
    border-radius: 12px;
    padding: 10px 12px;
    border: 1px solid #f1f5f9;
    overflow: auto; /* 우측 서브 메뉴는 내부에서만 스크롤 */
}

/* brand 탭도 모달 내부에서만 스크롤 */
#sdCatBrandBrandSection {
    height: 100%;
    overflow: auto;
}

#sdCatBrandCategorySection {
    height: 100%;
}

.sd-catbrand-secondary-title {
    font-size: 16px;
    font-weight: 900;
    color: #333;
    padding-bottom: 10px;
    border-bottom: 2px solid #8B5CF6;
    margin-bottom: 10px;
}

.sd-catbrand-secondary-items {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sd-catbrand-secondary-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 10px;
    border-radius: 10px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.sd-catbrand-secondary-item:hover {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.sd-catbrand-brand-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.sd-catbrand-brand-card {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 12px;
    display: flex;
    gap: 10px;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
}

.sd-catbrand-brand-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(0,0,0,0.08);
}

.sd-catbrand-brand-logo {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: rgba(139,93,246,0.10);
    color: #8B5CF6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 12px;
    flex-shrink: 0;
}

.sd-catbrand-brand-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sd-catbrand-brand-name {
    font-size: 12px;
    font-weight: 900;
    color: #333;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 150px;
}

.sd-catbrand-brand-follow {
    border: none;
    background: #fce7f3;
    color: #db2777;
    border-radius: 10px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
    white-space: nowrap;
}

