/* =====================================================
   DORSA PRODUCTS MEGA MENU  (RTL / Persian)
   Products mega menu plugin
   ===================================================== */

.dorsa-products-mega {
    --primary: #5188F7;
    --primary-strong: #188AFF;
    --primary-hover: #5188F7;
    --primary-active: #1468DC;
    --primary-glow: rgba(81, 136, 247, .20);
    --primary-active-glow: rgba(20, 104, 220, .22);

    --bg: #FFFFFF;
    --bg-soft: #FCFCFD;
    --bg-soft-2: #F8FAFC;

    --border: #E3E8EF;
    --border-soft: #E6E9EE;
    --border-softer: #EEF2F6;
    --border-300: #CDD5DF;

    --text: #000000;
    --text-2: #202939;
    --text-3: #262626;
    --muted: #4B5565;
    --muted-2: #697586;
    --muted-3: #666666;

    width: 100%;
    max-width: 1264px;
    margin: 0 auto;
    direction: rtl;
    font-family: "Dana", inherit, sans-serif;
    color: var(--text-2);
}

.dorsa-products-mega * {
    box-sizing: border-box;
}

/* ---------------------- WRAPPER ---------------------- */

.pmm-card {
    display: flex;
    align-items: stretch;
    justify-content: flex-end;
    gap: 31px;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    overflow: visible;
}

/* ---------------------- LEFT: STATIC PANEL ---------------------- */

.pmm-static {
    flex: 0 0 280px;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: flex-end;
    padding: 16px;
    background: var(--bg-soft);
    border: 1px solid var(--border-softer);
    border-radius: 8px;
    direction: ltr;
}

.pmm-static-title {
    width: 100%;
    margin: 0;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.5;
    text-align: right;
    color: var(--text);
}

.pmm-static-list {
    flex: 1 1 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.pmm-static-link {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    width: 100%;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    color: var(--muted);
    text-decoration: none;
    line-height: 1.5;
    transition: .2s ease;
}

.pmm-static-link:hover {
    color: var(--primary);
}

.pmm-static-link .pmm-chev {
    width: 20px;
    height: 20px;
    color: currentColor;
    flex-shrink: 0;
}

.pmm-static-link .pmm-chev svg {
    width: 100%;
    height: 100%;
    display: block;
}

.pmm-static-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid var(--primary);
    border-radius: 8px;
    background: transparent;
    color: var(--primary);
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.5;
    text-decoration: none;
    cursor: pointer;
    filter: drop-shadow(0 1px 1px rgba(179, 208, 244, .15));
    transition: .2s ease;
}

.pmm-static-cta:hover {
    background: var(--primary);
    color: #fff;
}

.pmm-static-cta .pmm-ico {
    width: 20px;
    height: 20px;
    color: currentColor;
    flex-shrink: 0;
}

.pmm-static-cta .pmm-ico svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* ---------------------- CENTER: CARDS ---------------------- */

.pmm-center {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pmm-panel {
    display: none;
    flex-direction: column;
    gap: 16px;
}

.pmm-panel.active {
    display: flex;
    animation: pmmFade .25s ease;
}

@keyframes pmmFade {
    from {
        opacity: 0;
        transform: translateY(2px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pmm-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 4px;
    width: 100%;
    padding: 24px;
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    text-align: right;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: .25s ease;
}

.pmm-item:hover {
    border-color: var(--primary-hover);
    box-shadow: 0 2px 12px rgba(81, 136, 247, .10);
}

.pmm-item:hover h4 {
    color: var(--primary-hover);
}

.pmm-item.is-active,
.pmm-item.is-active:hover {
    border-color: var(--primary-active);
    box-shadow: 0 4px 20px var(--primary-active-glow);
}

.pmm-item.is-active h4,
.pmm-item.is-active:hover h4 {
    color: var(--primary-active);
}

.pmm-item h4 {
    margin: 0;
    width: 100%;
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-3);
    line-height: 1.5;
    transition: color .25s ease;
}

.pmm-item p {
    margin: 0;
    width: 100%;
    font-family: inherit;
    font-size: 14px;
    font-weight: 400;
    color: var(--muted-3);
    line-height: 1.9;
}

/* ---------------------- RIGHT: TABS ---------------------- */

.pmm-tabs {
    flex: 0 0 174px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pmm-tab {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
    padding: 8px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    color: var(--muted-2);
    line-height: 1.5;
    transition: .25s ease;
    text-align: right;
}

.pmm-tab:hover {
    color: var(--text-2);
}

.pmm-tab-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 0 1 auto;
    text-align: right;
}

.pmm-tab-icon {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 6.4px;
    background: var(--bg-soft-2);
    border: .6px solid var(--border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--muted-2);
    transition: .25s ease;
    padding: 2.6px;
}

.pmm-tab-icon-inner {
    width: 100%;
    height: 100%;
    background: #fff;
    border: .4px solid var(--border-300);
    border-radius: 4.8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.pmm-tab-icon-inner .pmm-ico {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    background-color: currentColor;
    -webkit-mask-image: var(--pmm-icon);
    mask-image: var(--pmm-icon);
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}

.pmm-tab-icon-inner .pmm-ico img {
    display: none;
}

.pmm-tab.active {
    background: #000;
    border-color: var(--border-softer);
    color: #fff;
}

.pmm-tab.active .pmm-tab-icon {
    background: var(--text-2);
    border-color: var(--muted-2);
}

.pmm-tab.active .pmm-tab-icon-inner {
    background: var(--muted);
    border-color: var(--muted-2);
    color: #fff;
}

/* ---------------------- RESPONSIVE ---------------------- */

@media (max-width: 1024px) {
    .pmm-card {
        flex-wrap: wrap;
        gap: 20px;
    }
    .pmm-static {
        flex: 1 1 100%;
        order: 3;
    }
    .pmm-tabs {
        flex-basis: 160px;
    }
}

@media (max-width: 760px) {
    .dorsa-products-mega {
        padding: 0;
    }
    .pmm-card {
        flex-direction: column;
        gap: 16px;
    }
    .pmm-tabs {
        flex: 0 0 auto;
        flex-direction: row;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 4px;
        scrollbar-width: none;
        -ms-overflow-style: none;
        order: 1;
    }
    .pmm-tabs::-webkit-scrollbar {
        display: none;
    }
    .pmm-tab {
        flex: 0 0 auto;
        padding: 6px 10px 6px 6px;
    }
    .pmm-tab-label {
        flex: 0 0 auto;
    }
    .pmm-center {
        order: 2;
    }
    .pmm-static {
        order: 3;
        padding: 14px;
    }
    .pmm-item {
        padding: 18px;
    }
    .pmm-item h4 {
        font-size: 15px;
    }
    .pmm-item p {
        font-size: 13px;
        line-height: 1.8;
    }
    .pmm-static-title {
        font-size: 16px;
    }
}
