:root {
    --dpf-blue: #1d2088;
    --dpf-blue-dark: #11145f;
    --dpf-red: #e60013;
    --dpf-ink: #222638;
    --dpf-muted: #737889;
    --dpf-line: #e6e8f0;
    --dpf-soft: #f6f7fb;
}

.dpf,
.dpf * {
    box-sizing: border-box;
}

.dpf {
    width: 100%;
    color: var(--dpf-ink);
    /* فونت فعال سایت (Peyda) را بدون بارگذاری فایل فونت جدید به ارث می‌برد. */
    font-family: inherit;
    text-align: right;
    --wd-primary-color: var(--dpf-blue);
}

/* جلوگیری از دخالت رنگ‌ها و hover عمومی قالب/المنتور */
.dpf button,
.dpf button:hover,
.dpf button:focus,
.dpf button:active {
    font-family: inherit !important;
    text-transform: none !important;
    outline: 0 !important;
}

.dpf-panel {
    position: relative;
    width: 100%;
    overflow: hidden;
    background:
        radial-gradient(circle at 100% 0, rgba(29, 32, 136, .08), transparent 30%),
        #fff;
    border: 1px solid var(--dpf-line);
    border-radius: 20px;
    box-shadow: 0 14px 42px rgba(28, 33, 72, .09);
    outline: none;
}

.dpf-panel::before {
    content: "";
    position: absolute;
    top: 0;
    right: 24px;
    left: 24px;
    height: 4px;
    background: linear-gradient(90deg, var(--dpf-blue), var(--dpf-red));
    border-radius: 0 0 8px 8px;
}

.dpf-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 21px 18px;
}

.dpf-heading,
.dpf-section-title {
    display: flex;
    align-items: center;
    min-width: 0;
}

.dpf-heading {
    gap: 12px;
}

.dpf-heading-icon,
.dpf-section-icon {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, var(--dpf-blue), var(--dpf-blue-dark));
    box-shadow: 0 8px 18px rgba(29, 32, 136, .22);
}

.dpf-heading-icon {
    width: 43px;
    height: 43px;
    border-radius: 13px;
}

.dpf-heading-icon svg,
.dpf-section-icon svg,
.dpf-mobile-trigger-icon svg {
    width: 23px;
    height: 23px;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dpf-heading strong {
    display: block;
    margin-bottom: 2px;
    color: var(--dpf-blue-dark);
    font-size: 17px;
    font-weight: 800;
    line-height: 1.5;
}

.dpf-heading small,
.dpf-section-title small {
    display: block;
    color: var(--dpf-muted);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.6;
}

.dpf-active {
    margin: 0 17px 14px;
    padding: 13px;
    background: linear-gradient(135deg, rgba(29, 32, 136, .055), rgba(29, 32, 136, .02));
    border: 1px solid rgba(29, 32, 136, .11);
    border-radius: 13px;
}

.dpf-active[hidden] {
    display: none;
}

.dpf-active-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    color: #4d5264;
    font-size: 11px;
    font-weight: 700;
}

.dpf-active-head button {
    padding: 0;
    color: var(--dpf-red);
    background: none;
    border: 0;
    font: inherit;
    cursor: pointer;
}

.dpf-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.dpf-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 29px;
    padding: 5px 9px 5px 6px;
    color: var(--dpf-blue);
    background: #fff;
    border: 1px solid rgba(29, 32, 136, .16);
    border-radius: 9px;
    font-family: inherit;
    font-size: 10.5px;
    font-weight: 650;
    line-height: 1;
    vertical-align: middle;
    cursor: pointer;
    transition: .2s ease;
}

.dpf-chip span {
    display: inline-flex;
    align-items: center;
    line-height: 1.45;
}

.dpf-chip b {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    min-width: 18px;
    color: #fff;
    background: var(--dpf-blue);
    border-radius: 6px;
    font-family: Arial, sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1;
}

.dpf-chip:hover {
    color: var(--dpf-blue) !important;
    background: #fff !important;
    border-color: var(--dpf-blue) !important;
    transform: translateY(-1px);
}

.dpf-chip:hover b {
    background: var(--dpf-blue);
}

.dpf-section {
    border-top: 1px solid var(--dpf-line);
}

.dpf-section-locked {
    padding: 15px 17px;
}

.dpf-locked-selection {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 67px;
    padding: 11px 12px;
    background: linear-gradient(135deg, rgba(29, 32, 136, .065), rgba(29, 32, 136, .018));
    border: 1px solid rgba(29, 32, 136, .13);
    border-radius: 14px;
}

.dpf-locked-copy {
    min-width: 0;
    flex: 1 1 auto;
}

.dpf-locked-copy small,
.dpf-locked-copy strong {
    display: block;
}

.dpf-locked-copy small {
    margin-bottom: 2px;
    color: var(--dpf-muted);
    font-size: 11px;
    font-weight: 600;
}

.dpf-locked-copy strong {
    color: var(--dpf-blue-dark);
    font-size: 14px;
    font-weight: 800;
}

.dpf-locked-check {
    display: grid;
    place-items: center;
    width: 25px;
    height: 25px;
    flex: 0 0 25px;
    color: #fff;
    background: var(--dpf-blue);
    border-radius: 8px;
}

.dpf-locked-check svg {
    width: 15px;
    height: 15px;
    stroke: currentColor;
    stroke-width: 2.4;
}

.dpf-section-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 18px 19px;
    color: inherit;
    background: transparent;
    border: 0;
    font-family: inherit;
    text-align: right;
    cursor: pointer;
}

.dpf .dpf-section-toggle:hover,
.dpf .dpf-section-toggle:focus,
.dpf .dpf-section-toggle:active {
    color: var(--dpf-ink) !important;
    background: rgba(29, 32, 136, .035) !important;
    border-color: transparent !important;
}

.dpf-section-title {
    gap: 11px;
}

.dpf-section-icon {
    width: 37px;
    height: 37px;
    color: var(--dpf-blue);
    background: rgba(29, 32, 136, .08);
    border: 1px solid rgba(29, 32, 136, .11);
    border-radius: 11px;
    box-shadow: none;
}

.dpf-section-icon.is-red {
    color: var(--dpf-red);
    background: rgba(230, 0, 19, .065);
    border-color: rgba(230, 0, 19, .11);
}

.dpf-section-title strong {
    display: block;
    margin-bottom: 2px;
    color: var(--dpf-ink);
    font-size: 13.5px;
    font-weight: 750;
    line-height: 1.5;
}

.dpf-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    color: var(--dpf-muted);
    background: var(--dpf-soft);
    border-radius: 9px;
    transition: transform .25s ease, color .25s ease, background-color .25s ease;
}

.dpf-chevron svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dpf-section.is-open .dpf-chevron {
    color: #fff;
    background: var(--dpf-blue);
    transform: rotate(180deg);
}

.dpf-section-body {
    display: none;
    padding: 0 17px 18px;
}

.dpf-section.is-open .dpf-section-body {
    display: block;
    animation: dpf-fade .24s ease both;
}

@keyframes dpf-fade {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.dpf-search {
    position: relative;
    display: block;
    margin-bottom: 12px;
}

.dpf-search > span {
    position: absolute;
    top: 50%;
    right: 12px;
    display: inline-flex;
    color: #8b90a0;
    pointer-events: none;
    transform: translateY(-50%);
}

.dpf-search svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
}

.dpf-search input {
    width: 100%;
    height: 43px;
    padding: 8px 39px 8px 12px !important;
    color: var(--dpf-ink);
    background: var(--dpf-soft) !important;
    border: 1px solid #e4e6ee !important;
    border-radius: 11px !important;
    outline: 0;
    box-shadow: none !important;
    font-family: inherit;
    font-size: 11.5px;
    transition: .2s ease;
}

.dpf-search input:focus {
    background: #fff !important;
    border-color: var(--dpf-blue) !important;
    box-shadow: 0 0 0 3px rgba(29, 32, 136, .08) !important;
}

.dpf-options {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 330px;
    padding-left: 4px;
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(29, 32, 136, .28) transparent;
}

.dpf-options::-webkit-scrollbar {
    width: 5px;
}

.dpf-options::-webkit-scrollbar-thumb {
    background: rgba(29, 32, 136, .25);
    border-radius: 10px;
}

.dpf-brand + .dpf-brand {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #e2e4ec;
}

.dpf-models {
    position: relative;
    margin: 4px 13px 0 0;
    padding-right: 10px;
}

.dpf-models::before {
    content: "";
    position: absolute;
    top: 2px;
    right: 0;
    bottom: 2px;
    width: 1px;
    background: linear-gradient(var(--dpf-blue), rgba(29, 32, 136, .04));
}

.dpf-option {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 39px;
    padding: 7px 8px;
    color: #505568;
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: color .18s ease, background-color .18s ease, border-color .18s ease, transform .18s ease;
}

.dpf-option[hidden],
.dpf-brand[hidden] {
    display: none !important;
}

.dpf-option:hover {
    color: var(--dpf-blue);
    background: rgba(29, 32, 136, .035);
    border-color: rgba(29, 32, 136, .08);
    transform: translateX(-2px);
}

.dpf-option.is-parent {
    color: var(--dpf-blue-dark);
    background: rgba(29, 32, 136, .045);
    font-weight: 750;
}

.dpf-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.dpf-check {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-left: 9px;
    color: transparent;
    background: #fff;
    border: 1.5px solid #cfd3df;
    border-radius: 7px;
    transition: .2s ease;
}

.dpf-check svg {
    width: 12px;
    height: 12px;
    stroke: currentColor;
    stroke-width: 2.3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dpf-option input:checked + .dpf-check {
    color: #fff;
    background: var(--dpf-blue);
    border-color: var(--dpf-blue);
    box-shadow: 0 5px 11px rgba(29, 32, 136, .22);
}

.dpf-option:has(input:checked) {
    color: var(--dpf-blue);
    background: rgba(29, 32, 136, .055);
    border-color: rgba(29, 32, 136, .1);
    font-weight: 650;
}

.dpf-option-name {
    min-width: 0;
    overflow: hidden;
    font-size: 11.5px;
    line-height: 1.7;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dpf-search-empty {
    margin: 10px 0 0;
    padding: 13px;
    color: var(--dpf-muted);
    background: var(--dpf-soft);
    border-radius: 10px;
    font-size: 11px;
    text-align: center;
}

.dpf-footer {
    padding: 14px 18px 17px;
    background: #fafbfe;
    border-top: 1px solid var(--dpf-line);
}

.dpf-status {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #686d7d;
    font-size: 10.5px;
    font-weight: 600;
}

.dpf-status-dot {
    width: 8px;
    height: 8px;
    background: #3cb371;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(60, 179, 113, .11);
}

.dpf[data-dpf-state="loading"] .dpf-status-dot {
    background: var(--dpf-blue);
    box-shadow: 0 0 0 4px rgba(29, 32, 136, .1);
    animation: dpf-pulse 1s ease infinite;
}

.dpf[data-dpf-state="error"] .dpf-status-dot,
.dpf[data-dpf-state="empty"] .dpf-status-dot {
    background: var(--dpf-red);
    box-shadow: 0 0 0 4px rgba(230, 0, 19, .09);
}

@keyframes dpf-pulse {
    50% { opacity: .35; transform: scale(.75); }
}

.dpf-mobile-trigger,
.dpf-mobile-close,
.dpf-mobile-apply,
.dpf-overlay {
    display: none;
}

.dpf .dpf-mobile-trigger:hover,
.dpf .dpf-mobile-trigger:focus,
.dpf .dpf-mobile-trigger:active,
.dpf .dpf-mobile-apply:hover,
.dpf .dpf-mobile-apply:focus,
.dpf .dpf-mobile-apply:active {
    color: #fff !important;
    background: var(--dpf-blue) !important;
}

/* رندر پایدار در Preview و Editor المنتور */
.elementor-editor-active .dpf,
.elementor-editor-preview .dpf {
    min-width: 220px;
}

.elementor-editor-active .dpf svg,
.elementor-editor-preview .dpf svg {
    display: block;
    max-width: 24px !important;
    max-height: 24px !important;
}

/* لودینگ نرم روی Loop Grid المنتور */
.elementor-widget-loop-grid.dpf-products-loading {
    position: relative;
    min-height: 320px;
    pointer-events: none;
}

.elementor-widget-loop-grid.dpf-products-loading::before {
    content: "";
    position: absolute;
    z-index: 20;
    inset: -8px;
    background: rgba(255, 255, 255, .76);
    border-radius: 18px;
    backdrop-filter: blur(3px);
}

.elementor-widget-loop-grid.dpf-products-loading::after {
    content: "";
    position: absolute;
    z-index: 21;
    top: 110px;
    left: 50%;
    width: 42px;
    height: 42px;
    margin-left: -21px;
    border: 3px solid rgba(29, 32, 136, .13);
    border-top-color: var(--dpf-blue);
    border-radius: 50%;
    animation: dpf-spin .7s linear infinite;
}

@keyframes dpf-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 767px) {
    html.dpf-no-scroll,
    html.dpf-no-scroll body {
        overflow: hidden !important;
    }

    .dpf-mobile-trigger {
        position: fixed;
        z-index: 9980;
        right: 16px;
        bottom: 18px;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 9px;
        height: 50px;
        min-height: 50px;
        padding: 0 15px;
        color: #fff;
        background: linear-gradient(135deg, var(--dpf-blue), var(--dpf-blue-dark));
        border: 0;
        border-radius: 15px;
        box-shadow: 0 12px 28px rgba(17, 20, 95, .28);
        font-family: inherit;
        font-size: 13px;
        font-weight: 750;
        line-height: 1 !important;
        white-space: nowrap;
        vertical-align: middle;
    }

    .dpf-mobile-trigger-icon {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 22px;
        height: 22px;
        flex: 0 0 22px;
        line-height: 0 !important;
    }

    .dpf-mobile-trigger-icon svg {
        width: 21px;
        height: 21px;
        display: block;
        margin: 0;
    }

    .dpf-mobile-trigger-text {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        height: 22px;
        margin: 0;
        padding: 0;
        line-height: 22px !important;
        vertical-align: middle;
        position: relative;
        top: 2px;
    }

    .dpf-mobile-badge {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 22px;
        min-width: 22px;
        height: 22px;
        padding: 0 !important;
        margin: 0;
        color: var(--dpf-blue);
        background: #fff;
        border-radius: 7px;
        font-family: Arial, sans-serif !important;
        font-size: 10px;
        font-weight: 800;
        line-height: 1 !important;
        text-align: center !important;
        font-variant-numeric: tabular-nums;
        flex: 0 0 22px;
        vertical-align: middle;
    }

    .dpf-mobile-badge[hidden] {
        display: none !important;
    }

    .dpf-overlay {
        position: fixed;
        z-index: 9990;
        inset: 0;
        display: block;
        background: rgba(15, 18, 39, .52);
        opacity: 0;
        visibility: hidden;
        backdrop-filter: blur(4px);
        transition: .25s ease;
    }

    .dpf-panel {
        position: fixed;
        z-index: 9991;
        right: 0;
        bottom: 0;
        left: 0;
        max-height: 88vh;
        overflow-y: auto;
        border-radius: 22px 22px 0 0;
        box-shadow: 0 -20px 55px rgba(15, 18, 39, .22);
        transform: translateY(105%);
        transition: transform .32s cubic-bezier(.22, .8, .25, 1);
    }

    .dpf.is-mobile-open .dpf-overlay {
        opacity: 1;
        visibility: visible;
    }

    .dpf.is-mobile-open .dpf-panel {
        transform: translateY(0);
    }

    .dpf-mobile-close {
        display: grid;
        place-items: center;
        width: 37px;
        height: 37px;
        padding: 0;
        color: #707586;
        background: var(--dpf-soft);
        border: 0;
        border-radius: 11px;
        font-family: Arial, sans-serif;
        font-size: 25px;
        line-height: 1;
    }

    .dpf-options {
        max-height: 280px;
    }

    .dpf-footer {
        position: sticky;
        bottom: 0;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        z-index: 2;
    }

    .dpf-mobile-apply {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 42px;
        padding: 8px 17px;
        color: #fff;
        background: var(--dpf-blue);
        border: 0;
        border-radius: 11px;
        font-family: inherit;
        font-size: 11px;
        font-weight: 750;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dpf *,
    .elementor-widget-loop-grid.dpf-products-loading::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}
