/* ویجت مگا منو */
.elementor-widget-atlasshop_mega_menu,
.elementor-widget-atlasshop_mega_menu .elementor-widget-container,
.elementor-widget-atlasshop_mega_menu .elementor-widget-wrap,
.elementor-widget-atlasshop_mega_menu .e-con,
.elementor-widget-atlasshop_mega_menu .e-con-inner {
    overflow: visible !important;
}

.setmart-mm-widget {
    direction: rtl;
    position: relative;
    display: inline-block;
    font-family: inherit;
    z-index: 1;
}

.setmart-mm-widget.is-open {
    z-index: 100001;
}

.setmart-mm-trigger {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    color: #1e293b;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.4;
    transition: border-color 0.2s, color 0.2s, box-shadow 0.2s;
    position: relative;
    z-index: 2;
}

.setmart-mm-trigger:hover,
.setmart-mm-widget.is-open .setmart-mm-trigger {
    border-color: #f97316;
    color: #f97316;
    box-shadow: 0 4px 14px rgba(249, 115, 22, 0.12);
}

.setmart-mm-trigger-icon,
.setmart-mm-main-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.setmart-mm-trigger-chevron,
.setmart-mm-main-chevron {
    width: 8px;
    height: 8px;
    border-left: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    margin-inline-start: 2px;
    flex-shrink: 0;
}

.setmart-mm-dropdown {
    position: fixed;
    inset: 0;
    z-index: 99999;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}

.setmart-mm-widget.is-open .setmart-mm-dropdown,
.setmart-mm-widget.is-editor-preview .setmart-mm-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.setmart-mm-overlay {
    position: fixed;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.45);
    cursor: default;
    z-index: 1;
}

/* نوار تمام‌عرض خاکستری — کلیک از حاشیه‌ها عبور می‌کند به overlay */
.setmart-mm-panel {
    position: fixed;
    left: 0;
    right: 0;
    width: 100%;
    box-sizing: border-box;
    background: #e9e9e9;
    border: none;
    box-shadow: none;
    padding: 14px 0 22px;
    pointer-events: none;
    z-index: 2;
}

/* فقط باکس منو تعامل دارد (وسط + سایدبار) */
.setmart-mm-container {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 1320px;
    pointer-events: auto;
    position: relative;
    z-index: 3;
}

.setmart-mm-widget[data-align-site="1"] .setmart-mm-container {
    margin-left: auto;
    margin-right: auto;
}

.setmart-mm-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 0;
    align-items: stretch;
    min-height: 380px;
}

/* سایدبار سفید جدا با گوشه گرد */
.setmart-mm-main-col {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
    overflow: hidden;
    z-index: 2;
    position: relative;
}

.setmart-mm-main-list {
    list-style: none;
    margin: 0;
    padding: 6px 0;
}

.setmart-mm-main-item {
    position: relative;
    margin: 0;
}

.setmart-mm-main-item::before {
    content: '';
    position: absolute;
    inset-inline-end: 0;
    top: 6px;
    bottom: 6px;
    width: 3px;
    border-radius: 999px;
    background: transparent;
    transition: background-color 0.2s;
}

.setmart-mm-main-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 20px;
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s, background-color 0.2s;
}

.setmart-mm-main-text {
    flex: 1;
    min-width: 0;
}

.setmart-mm-main-item.is-active .setmart-mm-main-link,
.setmart-mm-main-item:hover .setmart-mm-main-link {
    color: #f97316;
    background: #fff5eb;
}

.setmart-mm-main-item.is-active::before {
    background: #f97316;
}

/* ناحیه محتوا — پس‌زمینه تصویر + زیرمنو + محصول */
.setmart-mm-content {
    position: relative;
    min-height: 380px;
    margin-inline-start: -1px;
    overflow: hidden;
    background-color: #efefef;
}

.setmart-mm-content-bgs {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.setmart-mm-content-bg {
    position: absolute;
    inset: 0;
    display: none;
    background-size: cover;
    background-position: center left;
    background-repeat: no-repeat;
}

.setmart-mm-content-bg.is-active {
    display: block;
}

.setmart-mm-content-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        270deg,
        rgba(255, 255, 255, 0.15) 0%,
        rgba(255, 255, 255, 0.55) 38%,
        rgba(255, 255, 255, 0.88) 100%
    );
    pointer-events: none;
}

.setmart-mm-content-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(200px, 1fr) minmax(300px, 52%);
    min-height: 380px;
    direction: rtl;
}

.setmart-mm-sub-col {
    padding: 32px 36px 32px 28px;
    min-width: 0;
    display: flex;
    align-items: flex-start;
}

.setmart-mm-sub-panels {
    position: relative;
    width: 100%;
    min-height: 200px;
}

.setmart-mm-sub-panel {
    display: none;
}

.setmart-mm-sub-panel.is-active {
    display: block;
}

.setmart-mm-sub-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px 22px;
    align-items: start;
}

.setmart-mm-sub-group {
    min-width: 0;
}

.setmart-mm-sub-group-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 12px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.45;
}

.setmart-mm-sub-group-bar {
    width: 4px;
    height: 20px;
    border-radius: 999px;
    background: #f97316;
    flex-shrink: 0;
}

.setmart-mm-sub-group-title a,
.setmart-mm-sub-group-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
    min-width: 0;
}

.setmart-mm-sub-group-chevron {
    font-size: 0.85em;
    opacity: 0.75;
    line-height: 1;
}

.setmart-mm-sub-group .setmart-mm-sub-list {
    gap: 10px;
}

.setmart-mm-sub-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.setmart-mm-sub-list a {
    color: #374151;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.setmart-mm-sub-list a:hover {
    color: #f97316;
}

.setmart-mm-image-col {
    position: relative;
    min-height: 380px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.setmart-mm-images {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 340px;
}

.setmart-mm-image-wrap {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px 10px 20px 24px;
}

.setmart-mm-image-wrap.is-active {
    display: flex;
}

.setmart-mm-image {
    max-width: 100%;
    max-height: 340px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.setmart-mm-image-placeholder {
    width: min(300px, 80%);
    aspect-ratio: 1;
    border-radius: 12px;
    background: rgba(148, 163, 184, 0.1);
}

.setmart-mm-placeholder {
    margin: 0;
    padding: 12px;
    color: #64748b;
    font-size: 0.9rem;
}

@media (max-width: 991px) {
    .setmart-mm-layout {
        grid-template-columns: 240px minmax(0, 1fr);
        min-height: 320px;
    }

    .setmart-mm-content-inner {
        grid-template-columns: minmax(140px, 1fr) minmax(220px, 48%);
    }

    .setmart-mm-sub-col {
        padding: 22px 20px;
    }

    .setmart-mm-sub-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 22px 16px;
    }
}

@media (max-width: 767px) {
    .setmart-mm-layout {
        grid-template-columns: 1fr;
    }

    .setmart-mm-content-inner {
        grid-template-columns: 1fr;
    }

    .setmart-mm-image-col {
        display: none;
    }

    .setmart-mm-sub-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
