.mehrni-shop-widget,
.mehrni-shop-widget * {
    box-sizing: border-box;
}

.mehrni-shop-widget {
    --meh-green: #15803d;
    --meh-green-dark: #0f6b33;
    --meh-surface: #f8f4ef;
    --meh-surface-2: #fbf8f4;
    --meh-border: #eadfd3;
    --meh-text: #3e3932;
    --meh-muted: #8b8175;
    --meh-shadow: 0 14px 35px rgba(77, 55, 35, 0.08);
    direction: rtl;
    width: 100%;
    color: var(--meh-text);
    font-family: inherit;
}

.mehrni-shop-notice {
    direction: rtl;
    padding: 16px 18px;
    border: 1px solid #f2c7c7;
    border-radius: 14px;
    background: #fff7f7;
    color: #9f1d1d;
}

.meh-category-strip {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

.meh-category-card {
    position: relative;
    min-height: 78px;
    border: 1px solid transparent;
    border-radius: 14px;
    background: linear-gradient(135deg, #fbf8f4 0%, #f1ebe3 100%);
    box-shadow: 0 8px 20px rgba(77, 55, 35, 0.04);
    overflow: hidden;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 14px 96px 14px 22px;
    text-align: right;
    color: var(--meh-text);
    font: inherit;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.meh-category-card:hover,
.meh-category-card.is-active {
    border-color: rgba(21, 128, 61, .22);
    box-shadow: 0 13px 30px rgba(77, 55, 35, 0.09);
    transform: translateY(-1px);
}

.meh-category-card.is-active .meh-category-title,
.meh-category-icon {
    color: var(--meh-green);
}

.meh-category-title {
    position: relative;
    z-index: 2;
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
}

.meh-category-image {
    position: absolute;
    right: 16px;
    left: auto;
    bottom: 0;
    max-width: 92px;
    max-height: 78px;
    object-fit: contain;
    transform: translateY(3px);
}

.meh-category-icon {
    position: absolute;
    right: 22px;
    left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.meh-toolbar {
    min-height: 70px;
    border: 1px solid var(--meh-border);
    border-radius: 14px;
    background: rgba(255, 252, 248, .8);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
    padding: 12px 20px;
    margin-bottom: 22px;
}

.meh-filter-toggle {
    justify-self: start;
    display: inline-flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 0;
    border-radius: 10px;
    background: #eee9e2;
    color: var(--meh-text);
    min-width: 126px;
    height: 42px;
    padding: 0 15px;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
}

.meh-filter-toggle svg {
    color: var(--meh-green);
}

.meh-result-count {
    color: #6d6459;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

.meh-sort-label {
    justify-self: end;
    height: 44px;
    width: 100%;
    max-width: 300px;
    min-width: 260px;
    border: 1px solid var(--meh-border);
    border-radius: 10px;
    background: #fffdfa;
    display: flex;
    direction: rtl;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    padding: 0 13px;
    color: #6d6459;
    font-size: 13px;
    line-height: 44px;
    box-shadow: 0 4px 12px rgba(77, 55, 35, .025);
    overflow: hidden;
}

.meh-sort-label > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    height: 100%;
    white-space: nowrap;
    line-height: 44px;
}

.meh-sort-select {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    height: 42px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--meh-text);
    font: inherit;
    font-weight: 700;
    line-height: 42px;
    text-align: right;
    text-align-last: right;
    direction: rtl;
    cursor: pointer;
    padding: 0;
    margin: 0;
}

.meh-shop-body {
    direction: ltr;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 32px;
    align-items: start;
}

.meh-filter-sidebar,
.meh-products-wrap {
    direction: rtl;
}

.mehrni-shop-widget.no-sidebar .meh-shop-body {
    grid-template-columns: 1fr;
}

.meh-filter-sidebar {
    position: sticky;
    top: 20px;
    border: 1px solid var(--meh-border);
    border-radius: 12px;
    background: #fffdfa;
    overflow: hidden;
    box-shadow: 0 8px 22px rgba(77, 55, 35, .04);
}

.meh-filter-section {
    border-bottom: 1px solid var(--meh-border);
}

.meh-filter-heading {
    width: 100%;
    min-height: 58px;
    border: 0;
    background: transparent;
    color: var(--meh-text);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 18px;
    cursor: pointer;
    font: inherit;
    font-size: 15px;
    font-weight: 800;
    text-align: right;
}

.meh-chevron {
    color: var(--meh-muted);
    font-size: 20px;
    line-height: 1;
}

.meh-filter-content {
    padding: 0 18px 18px;
}

.meh-filter-section:not(.is-open) .meh-filter-content {
    display: none;
}

.meh-checkbox-row {
    direction: rtl;
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 30px;
    color: #71675c;
    font-size: 13px;
    cursor: pointer;
    margin: 4px 0;
}

.meh-checkbox-row > span,
.meh-checkbox-label {
    flex: 1 1 auto;
    text-align: right;
}

.meh-checkbox-row.is-child .meh-checkbox-label {
    padding-right: calc(var(--meh-level, 1) * 14px);
    font-size: 12.5px;
    color: #80766b;
}

.meh-cat-prefix {
    display: inline-block;
    margin-left: 5px;
    color: var(--meh-muted);
    font-size: 12px;
}


.meh-checkbox-row[hidden],
.meh-filter-section[hidden] {
    display: none !important;
}

.meh-checkbox-row input {
    width: 15px;
    height: 15px;
    accent-color: var(--meh-green);
}

.meh-color-filter-list,
.meh-product-colors {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.meh-color-filter {
    width: 22px;
    height: 22px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    cursor: pointer;
}

.meh-color-filter span,
.meh-product-color {
    display: block;
    width: 17px;
    height: 17px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,.08);
}

.meh-color-filter.is-active {
    border-color: var(--meh-green);
}

.meh-size-filter-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.meh-size-filter {
    height: 34px;
    border: 1px solid var(--meh-border);
    border-radius: 7px;
    background: #fffdfa;
    color: #71675c;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
}

.meh-size-filter.is-active {
    border-color: var(--meh-green);
    color: var(--meh-green);
    background: rgba(21, 128, 61, .07);
}

.meh-price-range input[type="range"] {
    width: 100%;
    accent-color: var(--meh-green);
}

.meh-price-values {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    color: #7d7469;
    font-size: 12px;
}

.meh-clear-filters {
    width: calc(100% - 36px);
    margin: 14px 18px 16px;
    min-height: 42px;
    border: 1px solid var(--meh-border);
    border-radius: 9px;
    background: #fbf8f4;
    color: #7b7166;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
}

.meh-products-wrap {
    min-width: 0;
}

.meh-products-grid {
    display: grid;
    grid-template-columns: repeat(var(--meh-columns), minmax(0, 1fr));
    gap: 18px 20px;
}

.meh-product-card {
    position: relative;
    min-height: 322px;
    border: 1px solid var(--meh-border);
    border-radius: 12px;
    background: linear-gradient(180deg, var(--meh-surface) 0%, #f4eee7 100%);
    overflow: hidden;
    padding: 18px 18px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 10px 25px rgba(77, 55, 35, .05);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.meh-product-card:hover {
    transform: translateY(-2px);
    border-color: rgba(21, 128, 61, .18);
    box-shadow: var(--meh-shadow);
}

.meh-wishlist {
    position: absolute;
    top: 14px;
    left: 14px;
    right: auto;
    z-index: 3;
    color: #9b9185;
    text-decoration: none;
    font-size: 28px;
    line-height: 1;
    font-weight: 300;
}

.meh-product-image-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 164px;
    margin-bottom: 10px;
}

.meh-product-image {
    width: 100%;
    max-width: 170px;
    height: 158px;
    object-fit: contain;
    transition: transform .2s ease;
}

.meh-product-card:hover .meh-product-image {
    transform: scale(1.03);
}

.meh-product-title {
    display: block;
    width: 100%;
    color: var(--meh-text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.8;
    min-height: 27px;
    margin-top: auto;
}

.meh-product-colors {
    min-height: 22px;
    gap: 8px;
    margin: 3px 0 4px;
}

.meh-product-color {
    width: 14px;
    height: 14px;
}

.meh-product-price {
    color: var(--meh-green);
    font-size: 14px;
    font-weight: 900;
    margin: 2px 0 10px;
    min-height: 25px;
}

.meh-product-price del {
    color: #9b9185;
    font-size: 12px;
    font-weight: 500;
    margin-left: 4px;
}

.meh-product-price ins {
    text-decoration: none;
}

.meh-add-to-cart {
    width: 100%;
    min-height: 34px;
    border-radius: 6px;
    background: var(--meh-green) !important;
    color: #ffffff !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    border: 0 !important;
    padding: 8px 12px;
    transition: background-color .2s ease;
}

.meh-add-to-cart:hover {
    background: var(--meh-green-dark) !important;
}

.meh-product-card.is-hidden {
    display: none;
}

.meh-empty-state {
    display: none;
    border: 1px solid var(--meh-border);
    border-radius: 12px;
    background: #fffdfa;
    padding: 24px;
    text-align: center;
    color: #71675c;
    font-weight: 700;
}

.meh-empty-state.is-visible {
    display: block;
}

.meh-pagination {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    direction: rtl;
    flex-wrap: wrap;
}

.meh-pagination.is-visible {
    display: flex;
}

.meh-pagination button,
.meh-page-dots {
    min-width: 36px;
    height: 36px;
    border: 1px solid var(--meh-border);
    border-radius: 9px;
    background: #fffdfa;
    color: #6d6459;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 11px;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
}

.meh-pagination button {
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}

.meh-pagination button:hover:not(:disabled),
.meh-pagination .is-active {
    border-color: var(--meh-green);
    background: var(--meh-green);
    color: #ffffff;
}

.meh-pagination button:disabled {
    cursor: not-allowed;
    opacity: .45;
}

@media (max-width: 1200px) {
    .meh-products-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1024px) {
    .meh-category-card {
        padding-right: 88px;
    }

    .meh-category-strip {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .meh-shop-body {
        grid-template-columns: 240px minmax(0, 1fr);
        gap: 20px;
    }

    .meh-products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .meh-category-strip {
        display: flex;
        overflow-x: auto;
        gap: 10px;
        padding-bottom: 4px;
        scroll-snap-type: x mandatory;
    }

    .meh-category-card {
        min-width: 190px;
        scroll-snap-align: start;
        padding-right: 92px;
    }

    .meh-toolbar {
        grid-template-columns: 1fr;
        align-items: stretch;
        gap: 10px;
        padding: 14px;
    }

    .meh-filter-toggle,
    .meh-sort-label,
    .meh-result-count {
        justify-self: stretch;
        width: 100%;
    }

    .meh-sort-label {
        min-width: 0;
        max-width: none;
    }

    .meh-result-count {
        text-align: right;
    }

    .meh-shop-body {
        display: block;
    }

    .meh-filter-sidebar {
        position: static;
        display: none;
        margin-bottom: 18px;
    }

    .mehrni-shop-widget.filters-open .meh-filter-sidebar {
        display: block;
    }

    .meh-products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .meh-product-card {
        min-height: 292px;
        padding: 15px 12px 12px;
    }

    .meh-product-image-link {
        min-height: 136px;
    }

    .meh-product-image {
        height: 132px;
    }
}

@media (max-width: 480px) {
    .meh-products-grid {
        grid-template-columns: 1fr;
    }
}


@media (min-width: 768px) {
    .mehrni-shop-widget.has-sidebar.filters-collapsed .meh-shop-body {
        grid-template-columns: 1fr;
    }

    .mehrni-shop-widget.has-sidebar.filters-collapsed .meh-filter-sidebar {
        display: none;
    }

    .mehrni-shop-widget.has-sidebar.filters-collapsed .meh-products-grid {
        grid-template-columns: repeat(var(--meh-columns-expanded), minmax(0, 1fr));
    }
}


/* =========================================================
   Mehrni Shop Widget Color Fix
   Version: 1.0.9
   هدف: نمایش کامل رنگ محصولات و مخفی شدن رنگ‌های ناموجود در فیلتر هر دسته
   ========================================================= */

.meh-color-filter[hidden],
.meh-size-filter[hidden],
.meh-filter-section[hidden] {
    display: none !important;
}

.meh-color-filter.is-disabled,
.meh-size-filter.is-disabled {
    display: none !important;
}

.meh-product-colors {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    min-height: 22px !important;
    max-height: none !important;
    overflow: visible !important;
    margin: 3px 0 4px !important;
}

.meh-product-color {
    display: inline-block !important;
    width: 12px !important;
    height: 12px !important;
    min-width: 12px !important;
    min-height: 12px !important;
    max-width: 12px !important;
    max-height: 12px !important;
    border-radius: 999px !important;
    border: 1px solid rgba(60, 55, 45, 0.20) !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12) !important;
    padding: 0 !important;
    margin: 0 !important;
}

.meh-product-color[style*="#fff"],
.meh-product-color[style*="#ffffff"],
.meh-color-filter span[style*="#fff"],
.meh-color-filter span[style*="#ffffff"] {
    border-color: rgba(60, 55, 45, 0.38) !important;
}

.meh-color-filter-list {
    justify-content: flex-start !important;
    gap: 9px !important;
}

.meh-color-filter {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.meh-color-filter span {
    display: block !important;
    border: 1px solid rgba(60, 55, 45, 0.18) !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.10) !important;
}

@media (max-width: 767px) {
    .meh-product-color {
        width: 10px !important;
        height: 10px !important;
        min-width: 10px !important;
        min-height: 10px !important;
        max-width: 10px !important;
        max-height: 10px !important;
    }
}

/* Product image hover layers — package 1.0.24 */
.meh-product-image-link .meh-product-image-swap {
    width: 100%;
    min-height: 164px;
    height: 164px;
}

.meh-product-image-link .meh-product-image-swap .meh-product-image {
    margin: auto;
}

.meh-product-color.is-unavailable {
    position: relative;
    opacity: .38;
    filter: grayscale(.35);
}

.meh-product-color.is-unavailable::after {
    content: "";
    position: absolute;
    left: -2px;
    right: -2px;
    top: 50%;
    height: 1px;
    background: rgba(80, 20, 20, .72);
    transform: rotate(-45deg);
}

.meh-product-color.is-velvet {
    outline: 1px solid rgba(113, 35, 96, .28);
    outline-offset: 1px;
}
