:root {
    --smm-accent: #ff6c00;
    --smm-accent-dark: #e05e00;
    --smm-border: #ebebeb;
    --smm-bg: #fff;
    --smm-root-bg: #f7f7f7;
    --smm-root-hover: #efefef;
    --smm-muted: #888;
    --smm-radius: 7px;
    --smm-panel-w: 820px;
    --smm-root-w: 210px;
    --smm-z: 9000;
    --smm-panel-h: 80vh;
}

.smm-wrap, .smm-wrap *, .smm-wrap *::before, .smm-wrap *::after {
    box-sizing: border-box;
}

.smm-wrap {
    display: inline-block;
    position: relative;
    direction: rtl;
    font: inherit;
    color: inherit;
}

.smm-trigger {
    display: inline-flex;
    align-items: center;
    gap: .45em;
    color: #444;
    cursor: pointer;
    font: inherit;
    line-height: 1;
    vertical-align: middle;
}

.smm-trigger-icon {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 16px;
    flex-shrink: 0;
}
.smm-trigger-icon span {
    display: block;
    height: 2px;
    background: #444;
    border-radius: 2px;
    transition: transform .25s, opacity .2s;
}
.smm-trigger.is-open .smm-trigger-icon span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.smm-trigger.is-open .smm-trigger-icon span:nth-child(2) { opacity: 0; }
.smm-trigger.is-open .smm-trigger-icon span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.smm-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .38);
    z-index: calc(var(--smm-z) - 1);
}
.smm-overlay.is-open { display: block; }

.smm-panel {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: var(--smm-panel-w);
    height: var(--smm-panel-h);
    background: var(--smm-bg);
    border: 1px solid var(--smm-border);
    border-top: 2px solid var(--smm-accent);
    border-radius: 0 0 var(--smm-radius) var(--smm-radius);
    z-index: var(--smm-z);
    display: none;
    direction: rtl;
    overflow: hidden;
}
.smm-panel.is-open {
    display: flex;
    animation: smmSlideDown .2s ease;
}
@keyframes smmSlideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ستون راست: دسته‌های اصلی */
.smm-root-list {
    width: var(--smm-root-w);
    min-width: var(--smm-root-w);
    height: 100%;
    background: var(--smm-root-bg);
    border-left: 1px solid var(--smm-border);
    list-style: none;
    margin: 0;
    padding: .5rem 0;
    overflow-y: auto;
    flex-shrink: 0;
    scrollbar-width: thin;
}

.smm-root-item { margin: 0; }

.smm-root-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .6rem 1rem .6rem .8rem;
    font-size: 1rem;
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background .13s, color .13s;
}
.smm-root-link:hover {
    background: var(--smm-root-hover);
    color: var(--smm-accent);
}
.smm-root-item.is-active > .smm-root-link {
    background: var(--smm-bg);
    color: var(--smm-accent);
    font-weight: 700;
    border-right: 3px solid var(--smm-accent);
}

.smm-root-arrow {
    font-size: 1.1em;
    color: var(--smm-muted);
    flex-shrink: 0;
    line-height: 1;
    margin-right: 4px;
}
.smm-root-item.is-active .smm-root-arrow { color: var(--smm-accent); }

/* ستون چپ: زیرمنو */
.smm-sub-panel {
    flex: 1;
    height: 100%;
    overflow-y: auto;
    padding: 1rem 1.2rem 1.2rem 1rem;
    scrollbar-width: thin;
}

.smm-sub-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
}

.smm-col {
    flex: 0 0 auto;
    width: calc(33.33% - 1px);
    padding: .3rem .9rem .6rem .9rem;
    border-left: 1px solid var(--smm-border);
    margin-bottom: .8rem;
}
.smm-col:nth-child(3n+1) { border-left: none; }
.smm-sub-inner:has(.smm-col:nth-child(2)):not(:has(.smm-col:nth-child(3))) .smm-col { width: 50%; }
.smm-sub-inner:not(:has(.smm-col:nth-child(2))) .smm-col { width: 100%; }

.smm-col-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 1rem;
    font-weight: 700;
    color: var(--smm-accent);
    text-decoration: none;
    padding-bottom: .4rem;
    margin-bottom: .4rem;
    border-bottom: 1px solid var(--smm-border);
    white-space: nowrap;
    transition: color .14s;
}
.smm-col-title:hover { color: var(--smm-accent-dark); }
.smm-col-more { opacity: .55; margin-right: 3px; }

.smm-col-list { list-style: none; margin: 0; padding: 0; }
.smm-col-list li { margin: 0; }
.smm-col-link {
    display: block;
    padding: .28rem 0;
    font-size: 1rem;
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color .13s, padding-right .13s;
}
.smm-col-link:hover {
    color: var(--smm-accent);
    padding-right: .3rem;
}
