/**
 * SOPLAgent Mobile System Styles
 * React 컴포넌트를 PHP로 변환한 SOPLAgent 앱 스타일
 */

/* ===== 기본 레이아웃 ===== */
.sd-app-container {
    width: 100%;
    max-width: 428px;
    margin: 0 auto;
    background-color: #fff;
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    color: #292524;
    overflow-x: clip;
    /* hidden 대신 clip: scroll container 미생성 → position:fixed 정상 동작 */
}

/* ===== 헤더 ===== */
.sd-header {
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    background-color: #fff;
    position: sticky;
    top: 0;
    z-index: 30;
    border-bottom: 1px solid #f5f5f4;
}

.sd-header-left {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex: 1 1 auto;
    min-width: 0;
}

.sd-header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1 1 auto;
    text-decoration: none;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
}

.sd-header-brand img {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.1);
    flex-shrink: 0;
    object-fit: cover;
}

.sd-header-brand > span {
    display: grid;
    min-width: 0;
    gap: 1px;
}

.sd-header-brand strong {
    overflow: hidden;
    color: var(--sd-navy, #292524);
    font-size: 15px;
    font-style: italic;
    font-weight: 900;
    letter-spacing: -0.3px;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sd-header-brand small {
    color: var(--sd-light, #a8a29e);
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sd-header-right {
    display: flex;
    align-items: flex-start;
    gap: clamp(8px, 2.8vw, 16px);
    flex: 0 0 auto;
    min-width: 0;
}

.sd-header-icon {
    width: 22px;
    height: 22px;
    color: #57534e;
    flex-shrink: 0;
}

.sd-user-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 2px;
    flex: 0 0 auto;
    flex-shrink: 0;
    width: auto;
    min-width: 40px;
    max-width: 96px;
}

.sd-user-name {
    display: inline-flex;
    flex-direction: row;
    align-items: baseline;
    justify-content: center;
    gap: 0;
    font-size: 10.5px;
    font-weight: 700;
    color: #44403c;
    width: 100%;
    max-width: 96px;
    overflow: visible;
    text-align: center;
    line-height: 1.2;
    flex-shrink: 0;
}

.sd-user-name-core {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sd-user-name-honor {
    flex-shrink: 0;
    font-size: 10.5px;
    font-weight: 700;
    color: #44403c;
    white-space: nowrap;
}

.sd-user-avatar-link {
    flex-shrink: 0;
    text-decoration: none;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
}

.sd-user-avatar {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background-color: #f5f5f4;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.sd-user-avatar svg {
    width: 18px;
    height: 18px;
    color: #a8a29e;
}

/* 프로필 아바타 이미지 공통 (sd_avatar_helper.php) */
.sd-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

/* 헤더 로고 + 앱 스위처 화살표 (쿠팡 스타일) */
.sd-header-brand-row {
    display: flex;
    align-items: center;
    gap: 4px;
    width: 100%;
    min-width: 0;
}

@media (max-width: 360px) {
    .sd-header-brand small {
        display: none;
    }

    .sd-header-brand img {
        width: 36px;
        height: 36px;
        border-radius: 4px;
    }
}

.sd-header-arrow-btn {
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background-color: #f5f5f4;
    color: #78716c;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 0.2s, color 0.2s;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.08);
}

.sd-header-arrow-btn:hover {
    background-color: #e7e5e4;
    color: #57534e;
}

.sd-header-arrow-btn:active {
    background-color: #d6d3d1;
}

.sd-header-arrow-btn svg {
    width: 12px;
    height: 12px;
}

/* 앱 스위처 바텀 시트 (Android WebView에서 body 직계 자식 + 최상단 레이어) */
.sd-app-switcher-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    z-index: 2147483646;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    -webkit-tap-highlight-color: transparent;
}

.sd-app-switcher-overlay.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.sd-app-switcher-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 428px;
    margin: 0 auto;
    background: #fff;
    border-radius: 4px 4px 0 0;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
    z-index: 2147483647;
    transform: translateY(100%);
    -webkit-transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
    -webkit-transition: -webkit-transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
    padding: 6px 0 24px;
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0));
}

.sd-app-switcher-sheet.open {
    transform: translateY(0);
    -webkit-transform: translateY(0);
}

.sd-app-switcher-sheet-handle {
    width: 36px;
    height: 4px;
    background: #e7e5e4;
    border-radius: 4px;
    margin: 8px auto 16px;
}

.sd-app-switcher-sheet-title {
    font-size: 12.5px;
    font-weight: 600;
    color: #a8a29e;
    padding: 0 20px 12px;
}

.sd-app-switcher-list {
    list-style: none;
    margin: 0;
    padding: 0 12px;
}

.sd-app-switcher-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 14px 16px;
    border: none;
    border-radius: 4px;
    background: #fff;
    color: #292524;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.15s;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: none;
    margin-bottom: 4px;
}

.sd-app-switcher-item:hover,
.sd-app-switcher-item:active {
    background: #fafaf9;
}

.sd-app-switcher-item--soon {
    cursor: default;
    opacity: 0.72;
}

.sd-app-switcher-item--soon:hover,
.sd-app-switcher-item--soon:active {
    background: #fff;
}

.sd-app-switcher-item-icon {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    background: #f5f5f4;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sd-app-switcher-item-icon svg {
    width: 20px;
    height: 20px;
    color: #78716c;
}

.sd-app-switcher-item-icon-img {
    padding: 6px;
    overflow: hidden;
}

.sd-app-switcher-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.sd-app-switcher-item-label {
    flex: 1;
}

.sd-app-switcher-item-desc {
    display: block;
    font-size: 11.5px;
    font-weight: 400;
    color: #a8a29e;
    margin-top: 2px;
}

/* ===== Hero Section ===== */
.sd-hero {
    position: relative;
    background-color: #fafaf9;
    overflow: hidden;
    padding: 24px 16px 48px;
}

.sd-hero-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.sd-hero-text {
    z-index: 10;
    margin-top: 16px;
}

.sd-hero-subtitle {
    font-size: 13.5px;
    color: #a8a29e;
    margin-bottom: 4px;
    font-weight: 500;
}

.sd-hero-title {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
    color: #292524;
    margin-bottom: 16px;
}

.sd-hero-title-highlight {
    color: #0284c7;
}

.sd-hero-button {
    margin-top: 24px;
    padding: 10px 20px;
    background-color: #44403c;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 11.5px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.sd-hero-image {
    position: absolute;
    right: -30px;
    top: 16px;
    opacity: 0.8;
}

.sd-hero-image-wrapper {
    width: 192px;
    height: 288px;
    background-color: #e7e5e4;
    border-radius: 24px;
    overflow: hidden;
    border: 8px solid #fff;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: rotate(6deg);
}

.sd-hero-image-wrapper.sd-hero-image-rotated {
    transform: rotate(6deg);
}

.sd-hero-image-wrapper img,
.sd-hero-image-inner {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: rotate(-6deg) scale(1.1);
}

/* ===== 메인 그리드 (카테고리) ===== */
.sd-main-grid {
    padding: 0 16px;
    margin-top: -24px;
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.sd-category-card {
    padding: 24px;
    border-radius: 4px;
    color: #fff;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    cursor: pointer;
    transform: scale(1);
    transition: transform 0.1s;
}

.sd-category-card:active {
    transform: scale(0.95);
}

.sd-category-card.cso,
.sd-category-card-cso {
    background-color: #4a5d66;
}

.sd-category-card.wholesale,
.sd-category-card-wholesale {
    background-color: #5c8ba1;
}

.sd-category-card.cp {
    background-color: #44403c;
}

.sd-category-card.notice {
    background-color: #f97316;
}

.sd-category-icon {
    background-color: rgba(255, 255, 255, 0.2);
    width: 40px;
    height: 40px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.sd-category-icon-round {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-bottom: 16px;
}

.sd-category-icon svg {
    width: 24px;
    height: 24px;
    color: #fff;
}

.sd-category-icon-round svg {
    width: 24px;
    height: 24px;
}

.sd-category-name {
    font-weight: 700;
    font-size: 20px;
}

.sd-category-subtitle {
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 4px;
}

/* ===== 서브 메뉴 그리드 ===== */
.sd-submenu-grid {
    padding: 0 16px;
    margin-top: 24px;
    display: grid;
    /* 좁은 화면에선 3열로 자동 조절되거나 너비를 유연하게 배분 */
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    /* 간격을 살짝 줄여서 짤림 방지 */
    text-align: center;
}

@media (max-width: 360px) {
    .sd-submenu-grid {
        grid-template-columns: repeat(3, 1fr);
        /* 아주 좁은 폰에선 3열로 대응 */
        gap: 8px;
    }
}

.sd-submenu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sd-submenu-icon {
    width: 48px;
    height: 48px;
    background-color: #fff;
    border: 1px solid #f5f5f4;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #57534e;
    margin-bottom: 4px;
}

.sd-submenu-icon svg {
    width: 20px;
    height: 20px;
}

.sd-submenu-label {
    font-size: 10.5px;
    font-weight: 500;
    color: #57534e;
}

/* ===== 제품 하이라이트 ===== */
.sd-product-section {
    margin-top: 40px;
    padding: 0 16px;
}

.sd-product-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.sd-product-title {
    font-weight: 700;
    font-size: 17px;
    display: flex;
    align-items: center;
}

.sd-product-title-hot {
    color: #f97316;
    margin-right: 4px;
}

.sd-product-view-all {
    font-size: 11.5px;
    color: #a8a29e;
}

.sd-product-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 16px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.sd-product-scroll::-webkit-scrollbar {
    display: none;
}

.sd-product-card {
    min-width: 140px;
    background-color: #fff;
    border-radius: 4px;
    border: 1px solid #f5f5f4;
    padding: 10px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: all 0.2s;
}

.sd-product-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.sd-product-card:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.sd-product-image {
    height: 96px;
    background-color: #fafaf9;
    border-radius: 4px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.sd-product-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    background-color: #ef4444;
    color: #fff;
    font-size: 9px;
    padding: 4px 6px;
    border-radius: 4px;
    font-weight: 700;
}

.sd-product-name {
    font-size: 11.5px;
    font-weight: 700;
    color: #292524;
}

.sd-product-delivery {
    margin-top: 4px;
    display: flex;
    align-items: center;
}

.sd-product-delivery-badge {
    font-size: 10.5px;
    color: #0284c7;
    font-weight: 700;
    background-color: #e0f2fe;
    padding: 0 4px;
    border-radius: 4px;
}

.sd-product-arrival {
    font-size: 10.5px;
    color: #a8a29e;
    margin-top: 4px;
}

/* 제품 카드 추가 스타일 (home.php 호환) */
.product-info {
    padding: 4px 8px;
}

.product-manufacturer {
    font-size: 10.5px;
    color: #616161;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-name {
    font-size: 11.5px;
    font-weight: 500;
    color: #212121;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
    min-height: 2.8em;
}

.product-insurance-type {
    font-size: 10.5px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===== 공지사항 섹션 ===== */
.sd-notice-section {
    margin-top: 24px;
    padding: 0 16px;
}

.sd-notice-tabs {
    background-color: #f5f5f4;
    border-radius: 4px;
    padding: 4px;
    display: flex;
    margin-bottom: 16px;
}

.sd-notice-tab {
    flex: 1;
    min-width: 0;
    text-align: center;
    padding: 6px;
    border-radius: 4px;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sd-notice-tab.active {
    background-color: #fff;
    color: #292524;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.sd-notice-tab:not(.active) {
    color: #78716c;
}

.sd-notice-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sd-notice-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border-bottom: 1px solid #fafaf9;
    padding-bottom: 12px;
}

.sd-notice-date {
    font-size: 10.5px;
    font-family: monospace;
    color: #a8a29e;
    flex-shrink: 0;
}

.sd-notice-content {
    flex: 1;
    min-width: 0;
}

.sd-notice-badge {
    background-color: #fed7aa;
    color: #c2410c;
    font-size: 9px;
    padding: 4px 6px;
    border-radius: 4px;
    font-weight: 700;
    margin-right: 8px;
    flex-shrink: 0;
    min-width: 38px;
    text-align: center;
    white-space: nowrap;
}

.sd-notice-title {
    font-size: 11.5px;
    font-weight: 500;
    color: #44403c;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
    margin: 0;
}

/* ===== 프로모션 배너 ===== */
.sd-promo-banner {
    margin: 32px 16px 0;
    background: linear-gradient(to right, var(--sd-navy, #292524), var(--sd-slate, #44403c));
    border-radius: 4px;
    padding: 20px;
    color: #fff;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.sd-promo-content {
    position: relative;
    z-index: 10;
}

.sd-promo-subtitle {
    font-size: 10.5px;
    font-weight: 700;
    color: #a8a29e;
}

.sd-promo-title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.2;
    margin-top: 4px;
}

.sd-promo-button {
    margin-top: 12px;
    background-color: #fff;
    color: var(--sd-navy, #292524);
    padding: 6px 16px;
    border-radius: 9999px;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    border: none;
}

.sd-promo-icon {
    position: absolute;
    right: -10px;
    bottom: -20px;
    opacity: 0.2;
}

.sd-promo-icon svg {
    width: 120px;
    height: 120px;
}

/* ===== 카테고리 상세 페이지 ===== */
.sd-category-detail {
    background-color: #fff;
}

.sd-category-header {
    position: sticky;
    top: 0;
    background-color: #fff;
    z-index: 20;
    display: flex;
    align-items: center;
    padding: 14px;
    border-bottom: 1px solid #f5f5f4;
}

.sd-back-button {
    padding: 4px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.sd-category-header-title {
    margin-left: 8px;
    font-weight: 700;
    font-size: 17px;
}

.sd-category-content {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sd-category-subsection {
    border-bottom: 1px solid #fafaf9;
    padding-bottom: 16px;
}

.sd-category-subtitle {
    font-weight: 700;
    color: #292524;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

.sd-category-subtitle-bar {
    width: 4px;
    height: 16px;
    margin-right: 8px;
    border-radius: 9999px;
}

.sd-category-subtitle-bar.cso {
    background-color: #056896;
}

.sd-category-subtitle-bar.wholesale {
    background-color: #0284c7;
}

.sd-category-subtitle-bar.cp {
    background-color: #44403c;
}

.sd-category-subtitle-bar.notice {
    background-color: #f97316;
}

.sd-category-menu-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.sd-category-menu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: #fafaf9;
    border-radius: 4px;
    font-size: 13.5px;
    color: #57534e;
    cursor: pointer;
    border: none;
    text-align: left;
}

.sd-category-menu-special {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 8px;
}

.sd-category-menu-special-btn {
    padding: 10px;
    background-color: #e0f2fe;
    color: #02547c;
    border-radius: 4px;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    border: none;
}

.sd-category-sticky-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 14px;
    background-color: #fff;
    border-top: 1px solid #f5f5f4;
    display: flex;
    gap: 8px;
}

.sd-category-footer-btn {
    padding: 14px;
    border-radius: 4px;
    font-weight: 700;
    cursor: pointer;
    border: none;
}

.sd-category-footer-btn.prev {
    flex: 1;
    background-color: #f5f5f4;
    color: #44403c;
}

.sd-category-footer-btn.apply {
    flex: 2;
    color: #fff;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.sd-category-footer-btn.apply.cso {
    background-color: #056896;
}

.sd-category-footer-btn.apply.wholesale {
    background-color: #0284c7;
}

.sd-category-footer-btn.apply.cp {
    background-color: #44403c;
}

.sd-category-footer-btn.apply.notice {
    background-color: #f97316;
}

/* ===== 마이페이지 ===== */
.sd-mypage-page .sd-pb-24 {
    padding-bottom: 100px;
}

.sd-mypage-profile {
    margin: 20px 16px 24px;
    padding: 20px;
    background: linear-gradient(135deg, #fafaf9 0%, #f5f5f4 100%);
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1px solid #e7e5e4;
}

.sd-mypage-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: #e7e5e4;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.sd-mypage-avatar svg {
    width: 28px;
    height: 28px;
    color: #78716c;
}

.sd-mypage-profile-info {
    flex: 1;
    min-width: 0;
}

.sd-mypage-name {
    font-size: 17px;
    font-weight: 700;
    color: #292524;
    margin: 0 0 4px 0;
}

.sd-mypage-email {
    font-size: 11.5px;
    color: #78716c;
    margin: 0;
}

.sd-mypage-section {
    padding: 0 16px;
    margin-bottom: 24px;
}

.sd-mypage-section-title {
    font-size: 11.5px;
    font-weight: 700;
    color: #a8a29e;
    margin: 0 0 12px 4px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.sd-mypage-menu-list {
    background-color: #fff;
    border-radius: 4px;
    border: 1px solid #f5f5f4;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.sd-mypage-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    text-decoration: none;
    color: #44403c;
    font-size: 13.5px;
    font-weight: 500;
    border-bottom: 1px solid #fafaf9;
    transition: background-color 0.15s;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.05);
}

.sd-mypage-menu-item:last-child {
    border-bottom: none;
}

.sd-mypage-menu-item:active {
    background-color: #fafaf9;
}

.sd-mypage-menu-icon {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    background-color: #f5f5f4;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sd-mypage-menu-icon svg {
    width: 20px;
    height: 20px;
    color: #57534e;
}

.sd-mypage-menu-label {
    flex: 1;
}

.sd-mypage-menu-arrow {
    width: 18px;
    height: 18px;
    color: #d6d3d1;
    flex-shrink: 0;
}

/* 로그아웃 버튼 */
.sd-mypage-logout-item {
    color: #ef4444;
}

.sd-mypage-logout-item:active {
    background-color: #fff5f5;
}

.sd-mypage-logout-icon {
    background-color: #fee2e2 !important;
}

.sd-mypage-logout-icon svg {
    color: #ef4444 !important;
}

/* 하단 nav에서 마이페이지 페이지에서는 버튼(비활성) 스타일 */
.sd-bottom-nav-item[disabled] {
    cursor: default;
    pointer-events: none;
}

/* ===== 하단 네비게이션 ===== */
.sd-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 428px;
    margin: 0 auto;
    background-color: #fff;
    border-top: 1px solid #e7e5e4;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 6px 0;
    /* 메뉴 버튼만 safe area 위로, 바는 화면 맨 아래에 붙임 */
    padding-bottom: max(8px, env(safe-area-inset-bottom, 0px));
    z-index: 50;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.03);
}

/* 카테고리 네비 페이지에서 보이는 "얇은 빈공간"은 주로 하단 네비 그림자(선택 불가 영역)로 인한 착시.
   카테고리 페이지에서는 그림자를 제거해 콘텐츠와 네비가 딱 맞닿도록 한다. */
body.sd-category-nav-page .sd-bottom-nav {
    box-shadow: none;
}

.sd-bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px;
    flex: 1;
    cursor: pointer;
    background: none;
    border: none;
    color: #a8a29e;
    transition: all 0.2s;
    transform: translateZ(0);
}

a.sd-bottom-nav-item {
    text-decoration: none;
    color: #a8a29e;
    box-sizing: border-box;
}

.sd-bottom-nav-item.active {
    color: #0284c7;
    transform: translateZ(0);
}

.sd-bottom-nav-item svg {
    width: 22px;
    height: 22px;
    display: block;
    overflow: visible;
    shape-rendering: geometricPrecision;
    transform: translateZ(0);
}

.sd-bottom-nav-label {
    font-size: 10.5px;
    margin-top: 4px;
    font-weight: 700;
}

/* ===== Lucide 아이콘 공통 렌더링 개선 ===== */
.icon-lucide {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    vertical-align: middle;
    flex-shrink: 0;
}

.icon-lucide svg,
svg.icon-lucide {
    display: block;
    overflow: visible;
    shape-rendering: geometricPrecision;
    vector-effect: non-scaling-stroke;
    transform: translateZ(0);
}

/* ===== 카테고리 네비게이션 ===== */
.sd-category-nav-container {
    display: flex;
    height: calc(100vh - 120px);
    margin-top: 60px;
    position: relative;
}

.sd-category-nav-left {
    width: 33.333%;
    background-color: #fafaf9;
    border-right: 1px solid #e7e5e4;
    overflow-y: auto;
}

.sd-category-nav-left-item {
    width: 100%;
    padding: 20px 12px;
    text-align: left;
    font-size: 11.5px;
    font-weight: 700;
    border: none;
    background: none;
    cursor: pointer;
    color: #78716c;
    border-bottom: 1px solid #f5f5f4;
    transition: all 0.2s;
    border-right: 4px solid transparent;
}

.sd-category-nav-left-item.active {
    background-color: #fff;
    font-weight: 800;
}

/* 카테고리별 색 — 우측 sd-category-nav-section-bar-* / 제목과 동일 */
.sd-category-nav-left-item[data-category="cso"].active {
    color: #056896;
    border-right-color: #056896;
}

.sd-category-nav-left-item[data-category="wholesale"].active {
    color: #0284c7;
    border-right-color: #0284c7;
}

.sd-category-nav-left-item[data-category="cp"].active {
    color: #44403c;
    border-right-color: #44403c;
}

.sd-category-nav-left-item[data-category="notice"].active {
    color: #f97316;
    border-right-color: #f97316;
}

.sd-category-nav-left-item[data-category="info"].active {
    color: #46b3e5;
    border-right-color: #46b3e5;
}

.sd-category-nav-right {
    width: 66.666%;
    background-color: #fff;
    overflow-y: auto;
    padding: 14px;
    padding-bottom: 100px;
}

.sd-category-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.sd-category-nav-title {
    font-weight: 900;
    font-size: 17px;
}

.sd-category-nav-title-cso {
    color: #056896;
}

.sd-category-nav-title-wholesale {
    color: #0284c7;
}

.sd-category-nav-title-cp {
    color: #44403c;
}

.sd-category-nav-title-notice {
    color: #f97316;
}

.sd-category-nav-title-info {
    color: #46b3e5;
}

.sd-category-nav-section {
    margin-bottom: 32px;
}

.sd-category-nav-section-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.sd-category-nav-section-bar {
    width: 4px;
    height: 12px;
    border-radius: 9999px;
    margin-right: 8px;
}

.sd-category-nav-section-bar-cso {
    background-color: #056896;
}

.sd-category-nav-section-bar-wholesale {
    background-color: #0284c7;
}

.sd-category-nav-section-bar-cp {
    background-color: #44403c;
}

.sd-category-nav-section-bar-notice {
    background-color: #f97316;
}

.sd-category-nav-section-bar-info {
    background-color: #46b3e5;
}

.sd-category-nav-section-title {
    font-size: 11.5px;
    font-weight: 700;
    color: #292524;
}

.sd-category-nav-items-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.sd-category-nav-item-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s;
    text-decoration: none;
    color: inherit;
}

.sd-category-nav-item-card:active,
.sd-category-nav-item-card:hover {
    transform: scale(0.95);
}

/* 아이콘 잘림 방지: 배경만 둥글게, SVG는 overflow visible */
.sd-category-nav-item-icon {
    position: relative;
    width: 56px;
    height: 56px;
    min-width: 56px;
    min-height: 56px;
    background-color: transparent;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    color: #a8a29e;
    transition: all 0.2s;
    overflow: visible !important;
    box-sizing: border-box;
}

.sd-category-nav-item-icon::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: #fafaf9;
    border-radius: 4px;
    z-index: 0;
    pointer-events: none;
}

.sd-category-nav-item-icon .sd-category-nav-svg,
.sd-category-nav-item-icon svg {
    position: relative;
    z-index: 1;
    overflow: visible !important;
    vector-effect: none;
}

.sd-category-nav-item-card:active .sd-category-nav-item-icon::before,
.sd-category-nav-item-card:hover .sd-category-nav-item-icon::before {
    background-color: #e0f2fe;
}

.sd-category-nav-item-card:active .sd-category-nav-item-icon,
.sd-category-nav-item-card:hover .sd-category-nav-item-icon {
    color: #0284c7;
}

.sd-category-nav-item-text {
    font-size: 10.5px;
    font-weight: 500;
    color: #57534e;
    text-align: center;
    line-height: 1.4;
}

/* ===== 유틸리티 ===== */
.sd-pb-24 {
    padding-bottom: 24px;
}

/* 홈 화면 하단 레이아웃 간격 정리 (컨설팅 카드-푸터-사업자정보) */
.sd-home-page .sd-promo-banner {
    margin-bottom: 12px;
}

.sd-home-page .wallet-footer {
    margin-top: 0;
}

.sd-home-page .footer-business-info {
    margin-top: 0;
}

/* footer 아래에 nav 높이만큼 스크롤 여유를 둬 고정 nav 가림 방지 (홈·마이페이지 공통) */
.sd-home-page .sd-footer-spacer,
.sd-mypage-page .sd-footer-spacer {
    /* APK WebView에서는 safe-area가 중복 반영될 수 있어 고정 높이로 유지 */
    height: 70px;
}

.no-scrollbar {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}