
/* =========================================================
   MIRSOFT SHOP — MAIN STYLES
   Bootstrap 4.1 compatible | RTL
========================================================= */

.ms-shop-page,
.ms-shop-breadcrumb,
.ms-shop-filter-modal {
    --ms-shop-primary: #3E4095;
    --ms-shop-primary-dark: #303174;
    --ms-shop-secondary: #65BC50;
    --ms-shop-bg: #F7F8FC;
    --ms-shop-border: #E7E8F1;
    --ms-shop-text: #272941;
    --ms-shop-muted: #85879B;
    direction: rtl;
    text-align: right;
}

.ms-shop-page {
    padding: 28px 0 60px;
    background: var(--ms-shop-bg);
    color: var(--ms-shop-text);
}

.ms-shop-page *,
.ms-shop-breadcrumb *,
.ms-shop-filter-modal * {
    box-sizing: border-box;
}

.ms-shop-breadcrumb {
    padding: 28px 0;
    background: #fff;
    border-bottom: 1px solid var(--ms-shop-border);
}

.ms-shop-breadcrumb-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.ms-shop-eyebrow {
    display: block;
    margin-bottom: 7px;
    color: var(--ms-shop-secondary);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .1px;
}

.ms-shop-breadcrumb h1 {
    margin: 0 0 7px;
    color: var(--ms-shop-primary);
    font-size: 27px;
    font-weight: 800;
}

.ms-shop-breadcrumb p {
    margin: 0;
    color: var(--ms-shop-muted);
    font-size: 12px;
    line-height: 1.9;
}

.ms-shop-breadcrumb-list {
    margin: 0;
    padding: 0;
    background: transparent;
    font-size: 12px;
}

.ms-shop-breadcrumb-list a {
    color: var(--ms-shop-muted);
    text-decoration: none;
}

.ms-shop-breadcrumb-list .active {
    color: var(--ms-shop-primary);
}

.ms-shop-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    align-items: start;
    gap: 24px;
}

.ms-shop-sidebar {
    min-width: 0;
    padding: 19px;
    background: #fff;
    border: 1px solid var(--ms-shop-border);
    border-radius: 16px;
    box-shadow: 0 3px 14px rgba(37, 40, 90, .025);
}

.ms-shop-sidebar-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 17px;
    border-bottom: 1px solid var(--ms-shop-border);
}

.ms-shop-sidebar-heading .ms-shop-eyebrow {
    margin-bottom: 4px;
}

.ms-shop-sidebar-heading h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
}

.ms-shop-sidebar-heading > i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 39px;
    height: 39px;
    color: var(--ms-shop-primary);
    background: #f0f0ff;
    border-radius: 12px;
    font-size: 21px;
}

.ms-shop-filter-section {
    padding: 17px 0;
    border-bottom: 1px solid #f0f0f5;
}

.ms-shop-filter-section:last-of-type {
    border-bottom: 0;
}

.ms-shop-filter-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0;
    color: var(--ms-shop-text);
    background: transparent;
    border: 0;
    outline: none;
    text-align: right;
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
}

.ms-shop-filter-title > span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ms-shop-filter-title > span > i {
    color: var(--ms-shop-primary);
    font-size: 18px;
}

.ms-shop-collapse-icon {
    color: #9294a7;
    font-size: 16px;
    transition: transform .2s ease;
}

.ms-shop-filter-title[aria-expanded="false"] .ms-shop-collapse-icon {
    transform: rotate(180deg);
}

.ms-shop-filter-body {
    padding-top: 15px;
}

.ms-shop-search-box {
    position: relative;
    margin-bottom: 14px;
}

.ms-shop-search-box > i {
    position: absolute;
    top: 50%;
    right: 12px;
    z-index: 2;
    color: #999bb0;
    font-size: 17px;
    transform: translateY(-50%);
    pointer-events: none;
}

.ms-shop-search-box .form-control {
    width: 100%;
    height: 43px;
    padding: 8px 37px 8px 12px;
    color: var(--ms-shop-text);
    background: #fafaff;
    border: 1px solid var(--ms-shop-border);
    border-radius: 10px;
    box-shadow: none;
    font-size: 12px;
    text-align: right;
}

.ms-shop-search-box .form-control:focus {
    background: #fff;
    border-color: var(--ms-shop-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(62, 64, 149, .08);
}

.ms-shop-check-row {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 12px 0 0;
    color: #55576d;
    cursor: pointer;
    font-size: 12px;
    line-height: 1.9;
}

.ms-shop-check-row > input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.ms-shop-custom-check {
    position: relative;
    display: inline-flex;
    flex: 0 0 18px;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: #fff;
    border: 1px solid #d7d8e5;
    border-radius: 5px;
    transition: all .15s ease;
}

.ms-shop-check-row > input:checked + .ms-shop-custom-check {
    background: var(--ms-shop-primary);
    border-color: var(--ms-shop-primary);
}

.ms-shop-check-row > input:checked + .ms-shop-custom-check::after {
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    content: "";
    transform: rotate(45deg);
    margin-top: -2px;
}

.ms-shop-check-row > input:focus-visible + .ms-shop-custom-check {
    outline: 2px solid var(--ms-shop-secondary);
    outline-offset: 2px;
}

.ms-shop-brand-list {
    max-height: 230px;
    overflow-y: auto;
    padding-left: 3px;
}

.ms-shop-brand-row {
    padding: 4px 0;
}

.ms-shop-brand-name {
    overflow-wrap: anywhere;
}

.ms-shop-filter-empty {
    color: var(--ms-shop-muted);
    font-size: 12px;
}

.ms-shop-reset-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 40px;
    padding: 8px 13px;
    color: var(--ms-shop-primary);
    background: #f2f2ff;
    border: 1px solid #e7e7ff;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s ease;
}

.ms-shop-reset-btn:hover {
    background: #e8e8ff;
}

.ms-shop-reset-panel {
    width: 100%;
    margin-top: 15px;
}

.ms-shop-category-list,
.ms-shop-category-children {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ms-shop-category-item {
    min-width: 0;
}

.ms-shop-category-line {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
}

.ms-shop-category-toggle {
    display: inline-flex;
    flex: 0 0 24px;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    color: #9698aa;
    background: transparent;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    transition: all .2s ease;
}

.ms-shop-category-toggle:hover,
.ms-shop-category-toggle.is-open {
    color: var(--ms-shop-primary);
    background: #f0f0ff;
}

.ms-shop-category-toggle.is-open i {
    transform: rotate(-90deg);
}

.ms-shop-category-toggle i {
    font-size: 15px;
    transition: transform .2s ease;
}

.ms-shop-category-bullet {
    flex: 0 0 24px;
    width: 24px;
}

.ms-shop-category-link {
    display: flex;
    flex: 1;
    align-items: center;
    min-width: 0;
    gap: 5px;
    padding: 5px 0;
    color: #5d5f75;
    text-decoration: none !important;
    font-size: 12px;
    line-height: 1.9;
    overflow-wrap: anywhere;
}

.ms-shop-category-link:hover,
.ms-shop-category-link.is-active {
    color: var(--ms-shop-primary);
    font-weight: 800;
}

.ms-shop-category-link.is-active {
    position: relative;
}

.ms-shop-category-link.is-active::after {
    width: 5px;
    height: 5px;
    margin-right: auto;
    background: var(--ms-shop-secondary);
    border-radius: 50%;
    content: "";
}

.ms-shop-category-sign {
    color: var(--ms-shop-secondary);
}

.ms-shop-category-children {
    margin-right: 11px;
    padding-right: 12px;
    border-right: 1px solid #e8e8f3;
}

.ms-shop-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 19px;
}

.ms-shop-heading-title h2 {
    margin: 0 0 7px;
    color: var(--ms-shop-text);
    font-size: 21px;
    font-weight: 800;
}

.ms-shop-heading-title p {
    margin: 0;
    color: var(--ms-shop-muted);
    font-size: 12px;
}

.ms-shop-heading-title #totalcount {
    color: var(--ms-shop-primary);
    font-weight: 800;
}

.ms-shop-mobile-filter {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 42px;
    padding: 8px 12px;
    color: var(--ms-shop-primary);
    background: #fff;
    border: 1px solid var(--ms-shop-border);
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
}

.ms-shop-mobile-filter i {
    font-size: 17px;
}

.ms-shop-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    min-height: 62px;
    margin-bottom: 17px;
    padding: 12px 15px;
    background: #fff;
    border: 1px solid var(--ms-shop-border);
    border-radius: 13px;
}

.ms-shop-toolbar-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ms-shop-muted);
    font-size: 12px;
}

.ms-shop-toolbar-label i {
    color: var(--ms-shop-primary);
    font-size: 18px;
}

.ms-shop-sort-select {
    width: auto;
    min-width: 175px;
    height: 38px;
    padding: 5px 12px;
    color: var(--ms-shop-text);
    background-color: #fafaff;
    border: 1px solid var(--ms-shop-border);
    border-radius: 9px;
    box-shadow: none;
    font-size: 12px;
}

.ms-shop-sort-select:focus {
    border-color: var(--ms-shop-primary);
    box-shadow: 0 0 0 3px rgba(62, 64, 149, .07);
}

.ms-shop-products {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    min-height: 80px;
}

.ms-shop-empty {
    grid-column: 1 / -1;
    padding: 55px 15px;
    text-align: center;
    background: #fff;
    border: 1px dashed #dcddec;
    border-radius: 16px;
}

.ms-shop-empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 68px;
    height: 68px;
    margin: 0 auto 17px;
    color: var(--ms-shop-primary);
    background: #f0f0ff;
    border-radius: 20px;
}

.ms-shop-empty-icon i {
    font-size: 31px;
}

.ms-shop-empty h3 {
    margin-bottom: 9px;
    font-size: 17px;
    font-weight: 800;
}

.ms-shop-empty p {
    color: var(--ms-shop-muted);
    font-size: 12px;
}

.ms-shop-empty-reset {
    margin-top: 8px;
    padding: 9px 16px;
    color: #fff;
    background: var(--ms-shop-primary);
    border: 0;
    border-radius: 9px;
    font-size: 12px;
    cursor: pointer;
}

.ms-shop-pagination-wrap {
    display: flex;
    justify-content: center;
    margin-top: 25px;
}

.ms-shop-pagination .pagination {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
}

.ms-shop-pagination .page-item {
    margin: 0;
}

.ms-shop-pagination .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 5px 10px;
    color: #55576f;
    background: #fff;
    border: 1px solid var(--ms-shop-border);
    border-radius: 10px !important;
    font-size: 12px;
    text-decoration: none;
    box-shadow: none;
}

.ms-shop-pagination .page-item.active .page-link {
    color: #fff;
    background: var(--ms-shop-primary);
    border-color: var(--ms-shop-primary);
}

.ms-shop-pagination .page-item.disabled .page-link {
    color: #a7a8b7;
    background: #f4f4f8;
}

.ms-shop-loader {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 11px;
    margin: 0 0 15px;
    padding: 15px;
    color: var(--ms-shop-primary);
    background: #fff;
    border: 1px solid var(--ms-shop-border);
    border-radius: 12px;
    font-size: 12px;
}

.ms-shop-loader.is-visible {
    display: flex;
}

.ms-shop-spinner {
    width: 22px;
    height: 22px;
    border: 2px solid #e3e3f5;
    border-top-color: var(--ms-shop-primary);
    border-radius: 50%;
    animation: ms-shop-spin .7s linear infinite;
}

@keyframes ms-shop-spin {
    to { transform: rotate(360deg); }
}

/* Mobile filter modal */
.ms-shop-filter-modal {
    padding-right: 0 !important;
}

.ms-shop-filter-modal .modal-dialog {
    width: 100%;
    max-width: 430px;
    height: 100%;
    margin: 0 0 0 auto;
}

.ms-shop-filter-modal .modal-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 0;
    border-radius: 0;
}

.ms-shop-modal-header {
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    padding: 18px;
    border-bottom: 1px solid var(--ms-shop-border);
}

.ms-shop-modal-header .modal-title {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--ms-shop-primary);
    font-size: 16px;
    font-weight: 800;
}

.ms-shop-modal-close {
    padding: 5px;
    color: #6b6d81;
    opacity: 1;
}

.ms-shop-modal-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 0 20px 20px;
}

.ms-shop-modal-footer {
    flex: 0 0 auto;
    display: flex;
    gap: 10px;
    padding: 13px 18px;
    border-top: 1px solid var(--ms-shop-border);
    background: #fff;
}

.ms-shop-modal-footer .ms-shop-reset-btn,
.ms-shop-apply-btn {
    flex: 1;
    min-height: 44px;
}

.ms-shop-apply-btn {
    color: #fff;
    background: var(--ms-shop-primary);
    border: 1px solid var(--ms-shop-primary);
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.ms-shop-apply-btn:hover {
    background: var(--ms-shop-primary-dark);
}

@media (min-width: 1200px) {
    .ms-shop-products {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .ms-shop-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .ms-shop-sidebar {
        display: none;
    }

    .ms-shop-mobile-filter {
        display: inline-flex;
    }

    .ms-shop-products {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .ms-shop-page {
        padding: 20px 0 40px;
    }

    .ms-shop-breadcrumb {
        padding: 20px 0;
    }

    .ms-shop-breadcrumb-inner {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .ms-shop-breadcrumb h1 {
        font-size: 23px;
    }

    .ms-shop-heading-title h2 {
        font-size: 17px;
    }

    .ms-shop-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .ms-shop-sort-options,
    .ms-shop-sort-select {
        width: 100%;
    }

    .ms-shop-products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (prefers-reduced-motion: reduce) {
    .ms-shop-page *,
    .ms-shop-filter-modal * {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Shop Sorting Toolbar */
.ms-shop-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    padding: 14px 18px;
    margin-bottom: 22px;
    direction: rtl;
    background: #fff;
    border: 1px solid #e8e9f2;
    border-radius: 14px;
    box-shadow: 0 3px 12px rgba(62, 64, 149, 0.035);
}

.ms-shop-toolbar-label {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #343653;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.ms-shop-toolbar-label i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    color: #3e4095;
    background: #f0f0fb;
    border-radius: 10px;
    font-size: 18px;
}

.ms-shop-sort-options {
    position: relative;
    width: 220px;
    max-width: 100%;
}

.ms-shop-sort-options::after {
    content: "\ea5f";
    position: absolute;
    top: 50%;
    left: 13px;
    transform: translateY(-50%);
    color: #777994;
    font-family: "tabler-icons";
    font-size: 17px;
    pointer-events: none;
}

.ms-shop-sort-select {
    width: 100%;
    height: 43px;
    padding: 0 13px 0 38px;
    direction: rtl;
    color: #3c3e59;
    background-color: #fafaff;
    border: 1px solid #e5e6f0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    box-shadow: none;
    transition: border-color .2s ease, background-color .2s ease,
                box-shadow .2s ease;
    appearance: none;
    -webkit-appearance: none;
}

.ms-shop-sort-select:hover {
    border-color: #b9bae0;
    background-color: #fff;
}

.ms-shop-sort-select:focus {
    border-color: #3e4095;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(62, 64, 149, .09);
}

.ms-shop-sort-select option {
    color: #343653;
    background: #fff;
    font-family: inherit;
    font-size: 13px;
}

/* Tablet */
@media (max-width: 767.98px) {
    .ms-shop-toolbar {
        padding: 12px;
        gap: 10px;
        border-radius: 12px;
    }

    .ms-shop-toolbar-label {
        font-size: 12px;
    }

    .ms-shop-sort-options {
        width: 190px;
    }

    .ms-shop-sort-select {
        height: 40px;
        font-size: 11px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .ms-shop-toolbar {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
        padding: 12px;
        margin-bottom: 16px;
    }

    .ms-shop-toolbar-label {
        gap: 8px;
    }

    .ms-shop-toolbar-label i {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }

    .ms-shop-sort-options {
        width: 100%;
    }

    .ms-shop-sort-select {
        height: 42px;
        font-size: 12px;
    }
}