@media only screen and (max-width: 768px) {
    .d-desktop {
        display: none !important;
    }

    .d-mobile {
        display: inline-block !important;
    }


    .first {
        order: 1;
    }

    .second {
        order: 2;
    }

    .third {
        order: 3;
    }

    .fourth {
        order: 4;
    }
    /* Other */
    .container-fluid.navgation h1 {
        font-size: 20px;
        font-weight: 500;
        margin-top: 10px;
        margin-bottom: 30px;
    }
    .container.callback .info {
        width: 89%;
    }
    /* Header All Page*/
    form#form-search-box-header {
        display: none !important;
    }
    .header.upSection .button_login_homepage {
        float: left;
        color: #6e4ff5;
        background: white;
        padding: 8px 15px 8px;
        border-radius: 3px;
        font-size: 10px;
        position: relative;
        top: 0px;
        left: 10px;
        min-width: 100px;
        border: 1px solid #6e4ff5;
    }
    .header.upSection .button_login_homepage span {
        display: block;
        width: 100%;
        text-align: center;
    }
    .col-md-12.headerMainPage > img {
        position: absolute;
        left: 50%;
        transform: translate(-50% , -50%);
        top: 50%;
        width: 100px;
    }
    .header.upSection .button_login_homepage i {
        display: none;
    }
    .col-md-12.headerMainPage > .toggle.d-mobile {
        position: relative;
        right: 20px;
        cursor: pointer;
    }
    .menubar-header.d-mobile{
        position: fixed;
        right: -255px;
        width: 200px;
        background: #682df5;
        height: 100%;
        top: 0;
        z-index: 1;
        padding: 10px;
    }
    .menubar-header.d-mobile.active {
        right: 0;
    }
    .menubar-header.d-mobile::before {
        content: '';
        position: fixed;
        top: 0;
        left: -100%;
        width: calc(100% - 200px);
        background: #0000008a;
        height: 100%;
        -webkit-transition: all .3s;
        -moz-transition: all .3s;
        -o-transition: all .3s;
        -ms-transition: all .3s;
        transition: all .3s;
    }
    .menubar-header.d-mobile.active::before {
        left: 0;
        -webkit-transition: all .3s;
        -moz-transition: all .3s;
        -o-transition: all .3s;
        -ms-transition: all .3s;
        transition: all .3s;
    }
    .header.upSection .container-fluid.menubar {
        padding: 0 0 0 0 !important;
    }
    .menubar-header.d-mobile > img {
        max-width: 100%;
        right: 50%;
        position: relative;
        transform: translate(50%);
    }
    .menubar-header.d-mobile .icon {
        position: absolute;
        left: -50px;
        color: white;
        width: 50px;
        height: 50px;
        z-index: 9999;
        background: #682df5;
        top: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 30px;
    }
    .logo-header.d-mobile {
        position: relative;
        right: 20px;
    }
    .menubar-header.d-mobile .link-header {
        font-size: 13px;
        margin-top: 25px;
    }
    .menubar-header.d-mobile .link-header li {
        margin-bottom: 15px;
        margin-right: 8px;
    }
    /* 45px of nothing between the purple banner and the card. On a desktop it
       is breathing room; on a 667px phone it is a quarter of the distance
       between the top of the page and the second version on offer. */
    .container.product-info {
        padding: 20px 0;
    }

    .container.product-info .info.m-b-10 {
        margin-bottom: 15px !important;
    }
    .container.product-info .tab-product li {
        margin: 0 0px -1px 0;
        font-size: 13px;
    }
    .container.product-info .information .content p {
        line-height: 2.3;
    }
    .container.product-info aside .list-notic li {
        margin-bottom: 8px;
    }
    .menubar-header.d-mobile .link-header > li > a {
        color: white;
    }
    .menubar-header.d-mobile .sub-link-header {
        background: white;
        width: 90%;
        padding: 8px 10px 1px !important;
        position: relative;
        display: block;
        margin-top: 8px;
        right: 5%;
        border-radius: 8px;
        height: 0;
        overflow: hidden;
        padding: 0 !important;
        margin: 0;
    }
    .menubar-header.d-mobile .sub-link-header.active {
        height: unset;
        padding: 7px 10px 1px !important;
        position: relative;
        margin-top: 8px;
    }
    /* Home Page*/
    .container-floud.SearchBox > .container > .row > div {
        right: 15px;
    }
    .container-floud.SearchBox h1 {
        font-size: 20px;
        width: 100%;
        display: block;
        text-align: center;
    }
    .search-category-homepage > form {
        justify-content: space-between;
        flex-direction: column;
    }
    .search-category-homepage > form > * {
        width: 100%;
        margin: 4px;
        height: 45px;
    }
    .categoryies-box > article {
        width: 46.5%;
        margin: 1.5%;
    }
    .container-floud.products-latest .products-box article {
        width: 100%;
        margin: 2% 0%;
    }
    .container-floud.statistics-latest .statistics-box {
        flex-wrap: wrap;
    }
    .container-floud.statistics-latest .statistics-box > article {
        width: 46%;
        margin: 2% 2%;
    }
    footer.container-fluid.footer header h4 {
        text-align: center;
    }
    footer.container-fluid.footer ul {
        padding: 0 !important;
        list-style: none;
        text-align: center;
    }


/*   Callback Page   */
    .container.callback {
        padding-left: 5px !important;
        padding-right: 5px !important;
    }
    .container.callback .download-panel {
        margin: 16px 5px 0 !important;
        border-radius: 16px !important;
        box-shadow: 0 10px 26px rgba(75, 58, 156, 0.10) !important;
    }
    .container.callback .download-panel-head {
        padding: 14px 14px 12px !important;
        gap: 10px !important;
    }
    .container.callback .download-panel-check {
        width: 34px !important;
        height: 34px !important;
    }
    .container.callback .download-panel-heading strong {
        font-size: 15px !important;
    }
    .container.callback .download-panel-count {
        font-size: 11px !important;
    }
    .container.callback .download-panel-body {
        padding: 4px 0 !important;
    }
    .container.callback .download-panel-hint {
        padding: 11px 14px 13px !important;
        font-size: 11px !important;
    }
    .container.callback .download-panel + .promo-section {
        margin-top: 30px !important;
        padding-top: 24px !important;
    }
    .container.callback .box-download {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        grid-template-columns: unset !important;
        margin: 8px 5px !important;
        padding: 14px !important;
        gap: 12px !important;
        background: #ffffff !important;
        box-shadow: 0 4px 12px rgba(75, 58, 156, 0.1) !important;
        border-radius: 12px !important;
        min-height: auto !important;
    }
    .container.callback .box-download::before {
        display: none !important;
    }
    .container.callback .box-download::after {
        width: 100% !important;
        height: 3px !important;
        top: 0 !important;
        bottom: auto !important;
        right: 0 !important;
        border-radius: 12px 12px 0 0 !important;
    }
    .container.callback .box-download .download-body {
        display: flex !important;
        flex-direction: row !important;
        align-items: flex-start !important;
        gap: 10px !important;
        flex: 1 !important;
        min-width: 0 !important;
    }
    .container.callback .box-download .download-icon {
        display: none !important;
    }
    .container.callback .box-download .subject {
        flex: 1 !important;
        min-width: 0 !important;
        text-align: right !important;
        line-height: 1.8 !important;
        direction: rtl !important;
    }
    .container.callback .box-download .subject .download-title,
    .container.callback .box-download .subject a {
        font-size: 14px !important;
        font-weight: 600 !important;
        display: inline !important;
        color: #1f2937 !important;
    }
    .container.callback .box-download .download-meta {
        display: inline !important;
        margin-left: 0 !important;
        margin-right: 6px !important;
    }
    .container.callback .box-download .download-badge {
        font-size: 10px !important;
        padding: 2px 8px !important;
        font-weight: 600 !important;
        display: inline !important;
        vertical-align: middle !important;
    }
    .container.callback .box-download .download-size {
        font-size: 10px !important;
        display: inline !important;
        margin-right: 4px !important;
    }
    .container.callback .box-download .download {
        flex-shrink: 0 !important;
        align-self: stretch !important;
    }
    .container.callback .box-download .download a {
        width: 100% !important;
        height: auto !important;
        min-width: auto !important;
        padding: 12px 16px !important;
        font-size: 13px !important;
        border-radius: 10px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
    }
    .container.callback .box-download .download a i {
        font-size: 16px !important;
    }
    .container.callback .box-download .download a span {
        display: inline !important;
    }
    /* A document can offer several formats: let the buttons share the row
       instead of stacking a full-width button per format. */
    .container.callback .box-download .download a.button {
        flex: 1 1 120px !important;
        width: auto !important;
    }

/*     categories Page*/
    .products-list.categories .products-box article {
        width: 93%;

    }
/* contact-us Page */
    .container.contact-us .box-info {
        padding: 20px 40px !important;
    }
/*     Factor Page */
    .container.shop .shop_cart {
        background: white;
        margin: 30px 0;
        box-shadow: 0 0 20px #ccc;
        border-radius: 4px;
        padding: 50px;
        text-align: center;
        width: 96%;
        right: 2%;
        position: relative;
    }
    .container.shop .shop_cart {
        background: white;
        margin: 30px 0;
        box-shadow: 0 0 20px #ccc;
        border-radius: 4px;
        padding: 15px;
        text-align: center;
        width: 96%;
        right: 2%;
        position: relative;
    }
    .container.shop .shop_cart ul.price li .title {
        font-size: 14px;
    }
    .container.shop .shop_cart form .submit_discount > button {

        padding: 8px;
        font-size: 20px;

    }
    .container.shop .shop_cart form .discount button {
        background: #6f7881;
        color: white;
        border: none;
        padding: 16px 10px;
        font-size: 10px;
        position: absolute;
        left: 0;
    }


    .container-fluid.navgation .breadcrumb {
        padding: 5px 5px 8px 5px !important;
        font-size: 10px;
    }

/*     Products */
    .container.products-list .products-box article {
        width: 91%;
    }
/*    User Panel */
    .container.user-panel {
        padding: 45px 15px;
    }
    .container.products-list {
        padding: 5px 0;
    }
    #buy_product .list-file-buy li .download {
        width: 100px;
        font-size: 9px;
    }
    #buy_product .list-file-buy li .download a span {
        font-size: 11px;
    }
    #buy_product .list-file-buy li .subject i {
        display: none;
    }
    #buy_product .list-file-buy li .subject a {
        width: calc(100%);
    }
    .container.products-list aside .box-filter {
        margin-bottom: 20px;
        margin: 15px 15px;
        position: relative;
    }



    footer.container-fluid.footer > .tags ul {
        flex-wrap: wrap;
    }
    footer.container-fluid.footer > .tags ul li {
        background: #888;
        padding: 4px 10px;
        border-radius: 1px;
        display: inline-block;
        font-size: 13px;
        width: 49%;
        margin: 3px 0;
        text-align: center;
    }
}

/* =============================================================================
   Horizontal overflow on phones.

   Several page containers set a shorthand `padding: Npx 0`, which silently
   zeroes the 15px left/right padding Bootstrap gives `.container`. Their child
   `.row` still carries `margin: 0 -15px`, so the row box sticks out 15px on each
   side. On desktop that is invisible — the centred container has gutter to
   spare — but at phone widths the container is the full viewport and the page
   gains a real horizontal scroll.

   Restoring the padding here (mobile only) fixes the scroll and, as a side
   effect, stops body text from touching the screen edge. Desktop is untouched.
   ========================================================================== */
@media only screen and (max-width: 768px) {
    /* The mobile header rule at style.css:2651 is `padding: 7px 0 !important`,
       so the sides have to be reinstated with the same weight. */
    .header.upSection > nav:first-child {
        padding-right: 15px !important;
        padding-left: 15px !important;
    }

    .container.product-info,
    .container.products-list,
    .container.user-panel,
    .container.callback {
        padding-right: 15px;
        padding-left: 15px;
    }
}

/* Suggested online test — a second, pricier product, not a second buy button.
   It used to render as a full-width bar in the same shape as «خرید و دانلود
   مستقیم» with no price and a label ending «+ تفسیر جامع», which read as part
   of the purchase above it. The note names it as separate and the price sits
   on the button so the two offers cannot merge. */
.suggest-test-block {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed #d8d4e8;
}
.suggest-test-note {
    display: block;
    font-size: 12px;
    line-height: 1.7;
    color: #6b6580;
    margin-bottom: 8px;
    text-align: right;
}
.btn-pay-product.bg-green-light.btn-block.text-cente.test-online {
    margin-top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
}
.test-online__title {
    font-size: 13px;
    line-height: 1.6;
    text-align: right;
}
.test-online__price {
    flex: 0 0 auto;
    font-size: 13px;
    font-weight: bold;
    background: rgba(255, 255, 255, .18);
    border-radius: 6px;
    padding: 3px 9px;
    white-space: nowrap;
}
@media (max-width: 420px) {
    .btn-pay-product.bg-green-light.btn-block.text-cente.test-online {
        flex-direction: column;
        align-items: stretch;
    }
    .test-online__title, .test-online__price { text-align: center; }
}

/* «محصولات مرتبط» — up to four product cards at the bottom of the product page.
   Desktop: one row of four. Tablet: two per row. Phone: a strip that glides by
   itself (JS in components/related-products; .is-gliding) and snaps card by
   card when motion is reduced.
   Nothing sits on the cover: covers are illustrations and designed test banners,
   and any chip on top of them hid a face or a banner's own lettering. The type,
   rating and sales live in the meta row under the image instead. */
.ek-related {
    --rel-ink: #1d1933;
    --rel-muted: #8a85a0;
    --rel-line: #efedf5;
    --rel-brand: #6e4ff5;
    --rel-brand-soft: #f2efff;
    --rel-green: #1f9d63;
    --rel-green-soft: #e6f7ef;
    padding: 40px 0 48px;
    font-family: iranyekan;
}
.ek-related__head {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 2px 12px;
    margin-bottom: 20px;
}
.ek-related__title {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.6;
    color: var(--rel-ink);
}
.ek-related__lead {
    margin: 0;
    font-size: 13px;
    color: var(--rel-muted);
}
.ek-related__list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.ek-related__item {
    min-width: 0;
}
.ek-related__item.is-clone {
    display: none;
}
.ek-related__card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 8px;
    background: #fff;
    border: 1px solid rgba(29, 25, 51, .06);
    border-radius: 20px;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(29, 25, 51, .03);
    transition: transform .3s cubic-bezier(.2, .8, .2, 1), box-shadow .3s ease, border-color .3s ease;
}
.ek-related__card:hover,
.ek-related__card:focus-visible {
    color: inherit;
    text-decoration: none;
    transform: translateY(-4px);
    border-color: rgba(110, 79, 245, .18);
    box-shadow: 0 18px 40px -12px rgba(110, 79, 245, .28);
}
.ek-related__card:focus-visible {
    outline: 2px solid var(--rel-brand);
    outline-offset: 3px;
}
.ek-related__media {
    display: block;
    aspect-ratio: 750 / 400;
    overflow: hidden;
    border-radius: 14px;
    background: #f6f5fb;
}
.ek-related__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s cubic-bezier(.2, .8, .2, 1);
}
.ek-related__card:hover .ek-related__media img {
    transform: scale(1.06);
}
.ek-related__body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    gap: 8px;
    padding: 12px 8px 6px;
}
.ek-related__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 22px;
}
.ek-related__type {
    padding: 1px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.9;
    white-space: nowrap;
    color: var(--rel-brand);
    background: var(--rel-brand-soft);
}
.ek-related__card.is-test .ek-related__type {
    color: var(--rel-green);
    background: var(--rel-green-soft);
}
.ek-related__proof {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--rel-muted);
    white-space: nowrap;
}
.ek-related__proof > span + span::before {
    content: "·";
    margin-left: 8px;
}
.ek-related__rating {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-weight: 700;
    color: var(--rel-ink);
}
.ek-related__rating svg {
    color: #f5b301;
}
.ek-related__name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 3.5em;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.75;
    color: var(--rel-ink);
    transition: color .2s ease;
}
.ek-related__card:hover .ek-related__name {
    color: var(--rel-brand);
}
.ek-related__foot {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
    padding-top: 6px;
}
.ek-related__price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 4px;
    line-height: 1.4;
    white-space: nowrap;
}
.ek-related__price strong {
    font-size: 16px;
    font-weight: 800;
    color: var(--rel-ink);
}
.ek-related__price small {
    font-size: 11px;
    color: var(--rel-muted);
}
.ek-related__price.is-free strong {
    color: var(--rel-green);
}
.ek-related__was {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-basis: 100%;
    font-size: 11px;
}
.ek-related__was del {
    color: #b9b5c8;
}
.ek-related__was em {
    font-style: normal;
    font-weight: 700;
    padding: 0 6px;
    border-radius: 999px;
    color: #fff;
    background: #ef4b6c;
}
.ek-related__go {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    flex: 0 0 auto;
    padding: 5px 10px 5px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    color: var(--rel-brand);
    background: var(--rel-brand-soft);
    transition: background .25s ease, color .25s ease, padding .25s ease;
}
.ek-related__card:hover .ek-related__go {
    color: #fff;
    background: var(--rel-brand);
    padding-left: 12px;
}
@media (max-width: 991px) {
    .ek-related__list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 575px) {
    .ek-related {
        padding: 28px 0 32px;
    }
    .ek-related > .container {
        padding-left: 0;
        padding-right: 0;
    }
    .ek-related__head {
        padding: 0 16px;
        margin-bottom: 14px;
    }
    .ek-related__title {
        font-size: 17px;
    }
    .ek-related__lead {
        font-size: 12px;
    }
    .ek-related__viewport {
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .ek-related__viewport::-webkit-scrollbar {
        display: none;
    }
    /* Programmatic scrolling fights snap points; the glide drops them. */
    .ek-related__viewport.is-gliding {
        scroll-snap-type: none;
    }
    .ek-related__list {
        display: flex;
        gap: 0;
        width: max-content;
        padding: 6px 16px 18px 0;
    }
    /* Spacing lives on the item, not in `gap`, so one set of cards is exactly
       half the strip and the loop joins without a jump. */
    .ek-related__item,
    .ek-related__item.is-clone {
        display: block;
        flex: 0 0 auto;
        width: 70vw;
        max-width: 270px;
        padding-left: 12px;
        scroll-snap-align: start;
    }
    .ek-related__card:hover,
    .ek-related__card:focus-visible {
        transform: none;
    }
}
